/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { LabelFileTypeEnum, LabelFileTypeEnum$outboundSchema, } from "./labelfiletypeenum.js"; export type TransactionCreateRequest = { async?: boolean | undefined; /** * Print format of the label. If empty, will use the default format set from * * @remarks * the Shippo dashboard. */ labelFileType?: LabelFileTypeEnum | undefined; metadata?: string | undefined; rate: string; order?: string | undefined; }; /** @internal */ export type TransactionCreateRequest$Outbound = { async: boolean; label_file_type?: string | undefined; metadata?: string | undefined; rate: string; order?: string | undefined; }; /** @internal */ export const TransactionCreateRequest$outboundSchema: z.ZodMiniType< TransactionCreateRequest$Outbound, TransactionCreateRequest > = z.pipe( z.object({ async: z._default(z.boolean(), true), labelFileType: z.optional(LabelFileTypeEnum$outboundSchema), metadata: z.optional(z.string()), rate: z.string(), order: z.optional(z.string()), }), z.transform((v) => { return remap$(v, { labelFileType: "label_file_type", }); }), ); export function transactionCreateRequestToJSON( transactionCreateRequest: TransactionCreateRequest, ): string { return JSON.stringify( TransactionCreateRequest$outboundSchema.parse(transactionCreateRequest), ); }