paymentMethods.update
Update billing address details for a payment method to ensure accurate transaction processing and customer information management.
Instructions
Update a Ryft payment method billing address.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| billingAddress | Yes |
Implementation Reference
- src/tools/payment-methods.ts:32-53 (handler)The implementation and registration of the 'paymentMethods.update' tool.
registerTool( 'paymentMethods.update', 'Update a Ryft payment method billing address.', paymentMethodUpdateSchema.shape, async (args) => { const parsed = paymentMethodUpdateSchema.parse(args); const { id, billingAddress } = parsed; return client.patch(`/payment-methods/${id}`, { billingAddress: { firstName: billingAddress.firstName, lastName: billingAddress.lastName, organization: billingAddress.organization, lineOne: billingAddress.lineOne ?? billingAddress.firstLine, lineTwo: billingAddress.lineTwo ?? billingAddress.secondLine, city: billingAddress.city, postalCode: billingAddress.postalCode, country: billingAddress.country, region: billingAddress.region, }, }); }, ); - src/tools/payment-methods.ts:19-22 (schema)The input validation schema for the 'paymentMethods.update' tool.
const paymentMethodUpdateSchema = z.object({ id: z.string().min(1), billingAddress: paymentMethodBillingAddressSchema, });