/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; export type AccountUpdaterOptions = { /** * The type of response to simulate. */ responseCode?: "updated" | null | undefined; /** * When the `response_code` is set to `updated`, the payment method's account number will be updated to this value. */ accountNumber?: string | null | undefined; /** * When the `response_code` is set to `updated`, the payment method's expiration month will be updated to this value. */ expirationMonth?: string | null | undefined; /** * When the `response_code` is set to `updated`, the payment method's expiration year will be updated to this value. */ expirationYear?: string | null | undefined; /** * The type of error code to simulate. */ errorCode?: string | null | undefined; }; /** @internal */ export type AccountUpdaterOptions$Outbound = { response_code?: "updated" | null | undefined; account_number?: string | null | undefined; expiration_month?: string | null | undefined; expiration_year?: string | null | undefined; error_code?: string | null | undefined; }; /** @internal */ export const AccountUpdaterOptions$outboundSchema: z.ZodType< AccountUpdaterOptions$Outbound, z.ZodTypeDef, AccountUpdaterOptions > = z.object({ responseCode: z.nullable(z.literal("updated")).optional(), accountNumber: z.nullable(z.string()).optional(), expirationMonth: z.nullable(z.string()).optional(), expirationYear: z.nullable(z.string()).optional(), errorCode: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { responseCode: "response_code", accountNumber: "account_number", expirationMonth: "expiration_month", expirationYear: "expiration_year", errorCode: "error_code", }); }); export function accountUpdaterOptionsToJSON( accountUpdaterOptions: AccountUpdaterOptions, ): string { return JSON.stringify( AccountUpdaterOptions$outboundSchema.parse(accountUpdaterOptions), ); }