/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; export type APIKeyPairUpdate = { /** * The display name for the API key pair. */ displayName?: string | null | undefined; /** * Whether the API key pair is active and can be used to authenticate. */ active?: boolean | null | undefined; roleIds?: Array | null | undefined; /** * The IDs of the merchant accounts to associate with the API key pair. The caller can only assign merchant accounts it has access to. */ merchantAccountIds?: Array | null | undefined; }; /** @internal */ export type APIKeyPairUpdate$Outbound = { display_name?: string | null | undefined; active?: boolean | null | undefined; role_ids?: Array | null | undefined; merchant_account_ids?: Array | null | undefined; }; /** @internal */ export const APIKeyPairUpdate$outboundSchema: z.ZodType< APIKeyPairUpdate$Outbound, z.ZodTypeDef, APIKeyPairUpdate > = z.object({ displayName: z.nullable(z.string()).optional(), active: z.nullable(z.boolean()).optional(), roleIds: z.nullable(z.array(z.string())).optional(), merchantAccountIds: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { displayName: "display_name", roleIds: "role_ids", merchantAccountIds: "merchant_account_ids", }); }); export function apiKeyPairUpdateToJSON( apiKeyPairUpdate: APIKeyPairUpdate, ): string { return JSON.stringify( APIKeyPairUpdate$outboundSchema.parse(apiKeyPairUpdate), ); }