/* * 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 { Address, Address$Outbound, Address$outboundSchema, } from "./address.js"; export type PayoutMerchant = { /** * The name of the merchant. */ name: string; /** * Unique value which identifies a merchant for processing transactions, also known as a MID. */ identificationNumber: string; /** * The phone number for the merchant which should be formatted according to the E164 number standard. */ phoneNumber: string; /** * Merchant website URL. */ url: string; /** * Value to explain charges or payments on bank statements. */ statementDescriptor: string; /** * Merchant classification for the type of goods or services it provides. */ merchantCategoryCode: string; /** * The address for the merchant. */ address?: Address | null | undefined; }; /** @internal */ export type PayoutMerchant$Outbound = { name: string; identification_number: string; phone_number: string; url: string; statement_descriptor: string; merchant_category_code: string; address?: Address$Outbound | null | undefined; }; /** @internal */ export const PayoutMerchant$outboundSchema: z.ZodType< PayoutMerchant$Outbound, z.ZodTypeDef, PayoutMerchant > = z.object({ name: z.string(), identificationNumber: z.string(), phoneNumber: z.string(), url: z.string(), statementDescriptor: z.string(), merchantCategoryCode: z.string(), address: z.nullable(Address$outboundSchema).optional(), }).transform((v) => { return remap$(v, { identificationNumber: "identification_number", phoneNumber: "phone_number", statementDescriptor: "statement_descriptor", merchantCategoryCode: "merchant_category_code", }); }); export function payoutMerchantToJSON(payoutMerchant: PayoutMerchant): string { return JSON.stringify(PayoutMerchant$outboundSchema.parse(payoutMerchant)); }