UNPKG

pnz-apicentre-sandbox-sdk

Version:

The sandbox, powered by Middleware New Zealand, is a dedicated environment that mimics an API Provider, as defined in the [Payments NZ API Centre standards](https://paymentsnz.atlassian.net/wiki/spaces/PaymentsNZAPIStandards/overview). This SDK is generat

38 lines (34 loc) 1.07 kB
/** * Account information PNZ-API-CentreLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { lazy, number, object, optional, Schema, string } from '../schema'; import { Amount, amountSchema } from './amount'; import { Fee, feeSchema } from './fee'; export interface Offer { accountId: string; offerId: string; offerType: string; description: string; startDateTime: string; endDateTime: string; amount?: Amount; fee?: Fee; value?: number; term?: string; rate?: string; } export const offerSchema: Schema<Offer> = object({ accountId: ['AccountId', string()], offerId: ['OfferId', string()], offerType: ['OfferType', string()], description: ['Description', string()], startDateTime: ['StartDateTime', string()], endDateTime: ['EndDateTime', string()], amount: ['Amount', optional(lazy(() => amountSchema))], fee: ['Fee', optional(lazy(() => feeSchema))], value: ['Value', optional(number())], term: ['Term', optional(string())], rate: ['Rate', optional(string())], });