/* * 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 { DigitalWalletAddress, DigitalWalletAddress$Outbound, DigitalWalletAddress$outboundSchema, } from "./digitalwalletaddress.js"; import { DigitalWalletProvider, DigitalWalletProvider$outboundSchema, } from "./digitalwalletprovider.js"; /** * Request body for registering a new digital wallet */ export type DigitalWalletCreate = { provider: DigitalWalletProvider; merchantName: string; merchantDisplayName?: string | null | undefined; merchantUrl?: string | null | undefined; merchantCountryCode?: string | null | undefined; merchantCategoryCode?: string | null | undefined; address?: DigitalWalletAddress | null | undefined; extraConfiguration?: { [k: string]: any } | null | undefined; domainNames?: Array | undefined; acceptTermsAndConditions: boolean; }; /** @internal */ export type DigitalWalletCreate$Outbound = { provider: string; merchant_name: string; merchant_display_name?: string | null | undefined; merchant_url?: string | null | undefined; merchant_country_code?: string | null | undefined; merchant_category_code?: string | null | undefined; address?: DigitalWalletAddress$Outbound | null | undefined; extra_configuration?: { [k: string]: any } | null | undefined; domain_names?: Array | undefined; accept_terms_and_conditions: boolean; }; /** @internal */ export const DigitalWalletCreate$outboundSchema: z.ZodType< DigitalWalletCreate$Outbound, z.ZodTypeDef, DigitalWalletCreate > = z.object({ provider: DigitalWalletProvider$outboundSchema, merchantName: z.string(), merchantDisplayName: z.nullable(z.string()).optional(), merchantUrl: z.nullable(z.string()).optional(), merchantCountryCode: z.nullable(z.string()).optional(), merchantCategoryCode: z.nullable(z.string()).optional(), address: z.nullable(DigitalWalletAddress$outboundSchema).optional(), extraConfiguration: z.nullable(z.record(z.any())).optional(), domainNames: z.array(z.string()).optional(), acceptTermsAndConditions: z.boolean(), }).transform((v) => { return remap$(v, { merchantName: "merchant_name", merchantDisplayName: "merchant_display_name", merchantUrl: "merchant_url", merchantCountryCode: "merchant_country_code", merchantCategoryCode: "merchant_category_code", extraConfiguration: "extra_configuration", domainNames: "domain_names", acceptTermsAndConditions: "accept_terms_and_conditions", }); }); export function digitalWalletCreateToJSON( digitalWalletCreate: DigitalWalletCreate, ): string { return JSON.stringify( DigitalWalletCreate$outboundSchema.parse(digitalWalletCreate), ); }