pnz-payments-sdk
Version:
PNZ Payments Account and Transaction API
58 lines (54 loc) • 2.66 kB
text/typescript
/**
* Account and Transaction API SpecificationLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import { lazy, object, optional, Schema, string } from '../schema';
import { CreditorAccount, creditorAccountSchema } from './creditorAccount';
import { CreditorAgent, creditorAgentSchema } from './creditorAgent';
import { InstructedAmount, instructedAmountSchema } from './instructedAmount';
import { Reference, referenceSchema } from './reference';
import {
ScheduledTypeEnum,
scheduledTypeEnumSchema,
} from './scheduledTypeEnum';
export interface ScheduledPaymentModel {
/** A unique and immutable identifier used to identify the account resource. This identifier has no meaning to the account owner. */
accountId: string;
/** A unique and immutable identifier used to identify the scheduled payment resource. This identifier has no meaning to the account owner. */
scheduledPaymentId?: string;
/**
* The date on which the scheduled payment will be made.
* All dates in the JSON payloads are represented in ISO 8601 date-time format.
* All date-time fields in responses must include the timezone. An example is below:
* 2017-04-05T10:43:07+00:00
*/
scheduledPaymentDateTime: string;
/** Specifies the scheduled payment date type requested */
scheduledType: ScheduledTypeEnum;
/** Amount of money of the cash balance after a transaction entry is applied to the account.. */
instructedAmount: InstructedAmount;
reference?: Reference;
/**
* Party that manages the account on behalf of the account owner, that is manages the registration and booking of entries on the account, calculates balances on the account and provides information about the account.
* This is the servicer of the beneficiary account.
*/
creditorAgent?: CreditorAgent;
/** Unambiguous identification of the account of the creditor, in the case of a debit transaction. */
creditorAccount?: CreditorAccount;
}
export const scheduledPaymentModelSchema: Schema<ScheduledPaymentModel> = object(
{
accountId: ['AccountId', string()],
scheduledPaymentId: ['ScheduledPaymentId', optional(string())],
scheduledPaymentDateTime: ['ScheduledPaymentDateTime', string()],
scheduledType: ['ScheduledType', scheduledTypeEnumSchema],
instructedAmount: ['InstructedAmount', lazy(() => instructedAmountSchema)],
reference: ['Reference', optional(lazy(() => referenceSchema))],
creditorAgent: ['CreditorAgent', optional(lazy(() => creditorAgentSchema))],
creditorAccount: [
'CreditorAccount',
optional(lazy(() => creditorAccountSchema)),
],
}
);