/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; export type UpdatePaymentMethodGlobals = { merchantAccountId?: string | undefined; }; export type UpdatePaymentMethodRequest = { /** * The ID of the payment method */ paymentMethodId: string; /** * The ID of the merchant account to use for this request. */ merchantAccountId?: string | null | undefined; paymentMethodUpdate: components.PaymentMethodUpdate; }; /** @internal */ export type UpdatePaymentMethodRequest$Outbound = { payment_method_id: string; merchantAccountId?: string | null | undefined; PaymentMethodUpdate: components.PaymentMethodUpdate$Outbound; }; /** @internal */ export const UpdatePaymentMethodRequest$outboundSchema: z.ZodType< UpdatePaymentMethodRequest$Outbound, z.ZodTypeDef, UpdatePaymentMethodRequest > = z.object({ paymentMethodId: z.string(), merchantAccountId: z.nullable(z.string()).optional(), paymentMethodUpdate: components.PaymentMethodUpdate$outboundSchema, }).transform((v) => { return remap$(v, { paymentMethodId: "payment_method_id", paymentMethodUpdate: "PaymentMethodUpdate", }); }); export function updatePaymentMethodRequestToJSON( updatePaymentMethodRequest: UpdatePaymentMethodRequest, ): string { return JSON.stringify( UpdatePaymentMethodRequest$outboundSchema.parse(updatePaymentMethodRequest), ); }