/* * 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 WpayEverdaypayOptions = { /** * A dictionary of merchant defined data, to be passed to Wpay for anti-fraud control. */ merchantDefinedData?: { [k: string]: string } | null | undefined; /** * The customer ID for the Everyday Rewards account. */ customerId?: string | null | undefined; /** * The access token for the Everyday Rewards account. */ rewardsAccessToken?: string | null | undefined; /** * The ID of the device on which the payment is occuring. */ deviceId?: string | null | undefined; /** * Whether the transaction should redirect post-payment */ postPaymentRedirect?: boolean | null | undefined; }; /** @internal */ export type WpayEverdaypayOptions$Outbound = { merchant_defined_data?: { [k: string]: string } | null | undefined; customerId?: string | null | undefined; rewardsAccessToken?: string | null | undefined; deviceId?: string | null | undefined; postPaymentRedirect?: boolean | null | undefined; }; /** @internal */ export const WpayEverdaypayOptions$outboundSchema: z.ZodType< WpayEverdaypayOptions$Outbound, z.ZodTypeDef, WpayEverdaypayOptions > = z.object({ merchantDefinedData: z.nullable(z.record(z.string())).optional(), customerId: z.nullable(z.string()).optional(), rewardsAccessToken: z.nullable(z.string()).optional(), deviceId: z.nullable(z.string()).optional(), postPaymentRedirect: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { merchantDefinedData: "merchant_defined_data", }); }); export function wpayEverdaypayOptionsToJSON( wpayEverdaypayOptions: WpayEverdaypayOptions, ): string { return JSON.stringify( WpayEverdaypayOptions$outboundSchema.parse(wpayEverdaypayOptions), ); }