/* * 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 { ClosedEnum } from "../../types/enums.js"; export const GetTaxRatesOrder = { Asc: "asc", Desc: "desc", } as const; export type GetTaxRatesOrder = ClosedEnum; export const Scope = { Internal: "INTERNAL", External: "EXTERNAL", Onetime: "ONETIME", } as const; export type Scope = ClosedEnum; export const GetTaxRatesStatus = { Published: "published", Deleted: "deleted", Archived: "archived", } as const; export type GetTaxRatesStatus = ClosedEnum; export type GetTaxRatesRequest = { endTime?: string | undefined; expand?: string | undefined; limit?: number | undefined; offset?: number | undefined; order?: GetTaxRatesOrder | undefined; scope?: Scope | undefined; startTime?: string | undefined; status?: GetTaxRatesStatus | undefined; taxrateCodes?: Array | undefined; taxrateIds?: Array | undefined; }; /** @internal */ export const GetTaxRatesOrder$outboundSchema: z.ZodMiniEnum< typeof GetTaxRatesOrder > = z.enum(GetTaxRatesOrder); /** @internal */ export const Scope$outboundSchema: z.ZodMiniEnum = z.enum(Scope); /** @internal */ export const GetTaxRatesStatus$outboundSchema: z.ZodMiniEnum< typeof GetTaxRatesStatus > = z.enum(GetTaxRatesStatus); /** @internal */ export type GetTaxRatesRequest$Outbound = { end_time?: string | undefined; expand?: string | undefined; limit?: number | undefined; offset?: number | undefined; order?: string | undefined; scope?: string | undefined; start_time?: string | undefined; status?: string | undefined; taxrate_codes?: Array | undefined; taxrate_ids?: Array | undefined; }; /** @internal */ export const GetTaxRatesRequest$outboundSchema: z.ZodMiniType< GetTaxRatesRequest$Outbound, GetTaxRatesRequest > = z.pipe( z.object({ endTime: z.optional(z.string()), expand: z.optional(z.string()), limit: z.optional(z.int()), offset: z.optional(z.int()), order: z.optional(GetTaxRatesOrder$outboundSchema), scope: z.optional(Scope$outboundSchema), startTime: z.optional(z.string()), status: z.optional(GetTaxRatesStatus$outboundSchema), taxrateCodes: z.optional(z.array(z.string())), taxrateIds: z.optional(z.array(z.string())), }), z.transform((v) => { return remap$(v, { endTime: "end_time", startTime: "start_time", taxrateCodes: "taxrate_codes", taxrateIds: "taxrate_ids", }); }), ); export function getTaxRatesRequestToJSON( getTaxRatesRequest: GetTaxRatesRequest, ): string { return JSON.stringify( GetTaxRatesRequest$outboundSchema.parse(getTaxRatesRequest), ); }