/* * 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 { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type MerchantProfileSchemeSummary = { /** * Acquirer BIN to use when calling 3DS through this scheme. */ merchantAcquirerBin: string; /** * Merchant ID to use when calling 3DS through this scheme. */ merchantAcquirerId: string; merchantName: string; /** * The merchant's ISO 3166-1 numeric country code. */ merchantCountryCode: string; /** * Merchant category code to use when calling 3DS through this scheme. */ merchantCategoryCode: string; /** * URL to send when calling 3DS through this scheme. */ merchantUrl: string; /** * The date and time when this profile was first created in our system. */ createdAt: Date; }; /** @internal */ export const MerchantProfileSchemeSummary$inboundSchema: z.ZodType< MerchantProfileSchemeSummary, z.ZodTypeDef, unknown > = z.object({ merchant_acquirer_bin: z.string(), merchant_acquirer_id: z.string(), merchant_name: z.string(), merchant_country_code: z.string(), merchant_category_code: z.string(), merchant_url: z.string(), created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), }).transform((v) => { return remap$(v, { "merchant_acquirer_bin": "merchantAcquirerBin", "merchant_acquirer_id": "merchantAcquirerId", "merchant_name": "merchantName", "merchant_country_code": "merchantCountryCode", "merchant_category_code": "merchantCategoryCode", "merchant_url": "merchantUrl", "created_at": "createdAt", }); }); export function merchantProfileSchemeSummaryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MerchantProfileSchemeSummary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MerchantProfileSchemeSummary' from JSON`, ); }