/* * 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 { TaxRateStatus, TaxRateStatus$outboundSchema, } from "./tax-rate-status.js"; export type UpdateTaxRateRequest = { /** * code is the updated unique alphanumeric identifier for the tax rate */ code?: string | undefined; /** * description is the updated text description for the tax rate */ description?: string | undefined; /** * metadata contains updated key-value pairs that will replace existing metadata */ metadata?: { [k: string]: string } | undefined; /** * name is the updated human-readable name for the tax rate */ name?: string | undefined; taxRateStatus?: TaxRateStatus | undefined; }; /** @internal */ export type UpdateTaxRateRequest$Outbound = { code?: string | undefined; description?: string | undefined; metadata?: { [k: string]: string } | undefined; name?: string | undefined; tax_rate_status?: string | undefined; }; /** @internal */ export const UpdateTaxRateRequest$outboundSchema: z.ZodMiniType< UpdateTaxRateRequest$Outbound, UpdateTaxRateRequest > = z.pipe( z.object({ code: z.optional(z.string()), description: z.optional(z.string()), metadata: z.optional(z.record(z.string(), z.string())), name: z.optional(z.string()), taxRateStatus: z.optional(TaxRateStatus$outboundSchema), }), z.transform((v) => { return remap$(v, { taxRateStatus: "tax_rate_status", }); }), ); export function updateTaxRateRequestToJSON( updateTaxRateRequest: UpdateTaxRateRequest, ): string { return JSON.stringify( UpdateTaxRateRequest$outboundSchema.parse(updateTaxRateRequest), ); }