/* * 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 { ShipmentCreateRequest, ShipmentCreateRequest$Outbound, ShipmentCreateRequest$outboundSchema, } from "./shipmentcreaterequest.js"; export type BatchShipmentCreateRequest = { /** * Object ID of the carrier account to be used for this shipment (will override batch default) */ carrierAccount?: string | undefined; /** * A string of up to 100 characters that can be filled with any additional information you want * * @remarks * to attach to the object. */ metadata?: string | undefined; /** * A token that sets the shipping method for the batch, overriding the batch default. * * @remarks * Servicelevel tokens can be found in this list * or at this endpoint. */ servicelevelToken?: string | undefined; shipment: ShipmentCreateRequest; }; /** @internal */ export type BatchShipmentCreateRequest$Outbound = { carrier_account?: string | undefined; metadata?: string | undefined; servicelevel_token?: string | undefined; shipment: ShipmentCreateRequest$Outbound; }; /** @internal */ export const BatchShipmentCreateRequest$outboundSchema: z.ZodMiniType< BatchShipmentCreateRequest$Outbound, BatchShipmentCreateRequest > = z.pipe( z.object({ carrierAccount: z.optional(z.string()), metadata: z.optional(z.string()), servicelevelToken: z.optional(z.string()), shipment: ShipmentCreateRequest$outboundSchema, }), z.transform((v) => { return remap$(v, { carrierAccount: "carrier_account", servicelevelToken: "servicelevel_token", }); }), ); export function batchShipmentCreateRequestToJSON( batchShipmentCreateRequest: BatchShipmentCreateRequest, ): string { return JSON.stringify( BatchShipmentCreateRequest$outboundSchema.parse(batchShipmentCreateRequest), ); }