/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { cardsUpdate } from "../../funcs/cardsUpdate.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.UpdateCardRequest$inboundSchema, }; export const tool$cardsUpdate: ToolDefinition = { name: "cards-update", description: `Update a linked card and/or resubmit it for verification. If a value is provided for CVV, a new verification ($0 authorization) will be submitted for the card. Updating the expiration date or address will update the information stored on file for the card but will not be verified. Read our [accept card payments guide](https://docs.moov.io/guides/sources/cards/accept-card-payments/#reverify-a-card) to learn more. Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance. To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the \`/accounts/{accountID}/cards.write\` scope.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await cardsUpdate( client, args.request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } const value = result.value.result; return formatResult(value, apiCall); }, };