pnz-payments-sdk
Version:
PNZ Payments Account and Transaction API
45 lines (41 loc) • 2.24 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 { Account, accountSchema } from './account';
import {
AccountSubTypeEnum,
accountSubTypeEnumSchema,
} from './accountSubTypeEnum';
import { AccountTypeEnum, accountTypeEnumSchema } from './accountTypeEnum';
import { Servicer, servicerSchema } from './servicer';
export interface AccountModel {
/** A unique and immutable identifier used to identify the account resource. This identifier has no meaning to the account owner. */
accountId: string;
/** Identification of the currency in which the account is held. Usage: Currency should only be used in case one and the same account number covers several currencies and the initiating party needs to identify which currency needs to be used for settlement on the account. */
currency: string;
/** Specifies the type of account (personal or business). */
accountType?: AccountTypeEnum;
/** Specifies the sub type of account (product family group). */
accountSubType?: AccountSubTypeEnum;
/** Specifies the description of the account type. */
description?: string;
/** The nickname of the account, assigned by the account owner in order to provide an additional means of identification of the account. */
nickname: string;
/** Provides the details to identify an account. */
account?: Account;
/** 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. */
servicer?: Servicer;
}
export const accountModelSchema: Schema<AccountModel> = object({
accountId: ['AccountId', string()],
currency: ['Currency', string()],
accountType: ['AccountType', optional(accountTypeEnumSchema)],
accountSubType: ['AccountSubType', optional(accountSubTypeEnumSchema)],
description: ['Description', optional(string())],
nickname: ['Nickname', string()],
account: ['Account', optional(lazy(() => accountSchema))],
servicer: ['Servicer', optional(lazy(() => servicerSchema))],
});