/* * 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 { lazySchema as lazySchema$ } from "../../lib/schemas.js"; export type RefundsFilter = { updatedSince?: Date | undefined; /** * Filter by customer id */ customerId?: string | undefined; /** * Filter by the subsidiary (legal entity) the record belongs to. Only honored on connectors that support multi-entity scoping (e.g. NetSuite OneWorld); ignored elsewhere. */ subsidiaryId?: string | undefined; }; /** @internal */ export type RefundsFilter$Outbound = { updated_since?: string | undefined; customer_id?: string | undefined; subsidiary_id?: string | undefined; }; /** @internal */ export const RefundsFilter$outboundSchema: z.ZodType< RefundsFilter$Outbound, z.ZodTypeDef, RefundsFilter > = /* @__PURE__ */ lazySchema$(() => z.object({ updatedSince: z.date().transform(v => v.toISOString()).optional(), customerId: z.string().optional(), subsidiaryId: z.string().optional(), }).transform((v) => { return remap$(v, { updatedSince: "updated_since", customerId: "customer_id", subsidiaryId: "subsidiary_id", }); }) ); export function refundsFilterToJSON(refundsFilter: RefundsFilter): string { return JSON.stringify(RefundsFilter$outboundSchema.parse(refundsFilter)); }