/* * 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 * as components from "../components/index.js"; export type UpdatePaymentServiceGlobals = { merchantAccountId?: string | undefined; }; export type UpdatePaymentServiceRequest = { /** * the ID of the payment service */ paymentServiceId: string; /** * The ID of the merchant account to use for this request. */ merchantAccountId?: string | null | undefined; paymentServiceUpdate: components.PaymentServiceUpdate; }; /** @internal */ export type UpdatePaymentServiceRequest$Outbound = { payment_service_id: string; merchantAccountId?: string | null | undefined; PaymentServiceUpdate: components.PaymentServiceUpdate$Outbound; }; /** @internal */ export const UpdatePaymentServiceRequest$outboundSchema: z.ZodType< UpdatePaymentServiceRequest$Outbound, z.ZodTypeDef, UpdatePaymentServiceRequest > = z.object({ paymentServiceId: z.string(), merchantAccountId: z.nullable(z.string()).optional(), paymentServiceUpdate: components.PaymentServiceUpdate$outboundSchema, }).transform((v) => { return remap$(v, { paymentServiceId: "payment_service_id", paymentServiceUpdate: "PaymentServiceUpdate", }); }); export function updatePaymentServiceRequestToJSON( updatePaymentServiceRequest: UpdatePaymentServiceRequest, ): string { return JSON.stringify( UpdatePaymentServiceRequest$outboundSchema.parse( updatePaymentServiceRequest, ), ); }