UNPKG

pnz-payments-sdk

Version:

PNZ Payments Account and Transaction API

43 lines (39 loc) 2.16 kB
/** * Account and Transaction API SpecificationLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, object, optional, Schema, string } from '../schema'; import { PermissionEnum, permissionEnumSchema } from './permissionEnum'; /** Contains the requested consent */ export interface Consent { /** Specifies the Open Banking account access consent types. This is a list of the data clusters being consented by the Customer, and requested for authorisation with the API Provider. */ permissions: PermissionEnum[]; /** * Specified date and time the permissions will expire. If this is not populated, the permissions will be open ended. * 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 */ expirationDateTime?: string; /** * Specified start date and time for the transaction query period. If this is not populated, the start date will be open ended, and data will be returned from the earliest available transaction. * 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 */ transactionFromDateTime?: string; /** * Specified end date and time for the transaction query period. If this is not populated, the end date will be open ended, and data will be returned to the latest available transaction. * 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 */ transactionToDateTime?: string; } export const consentSchema: Schema<Consent> = object({ permissions: ['Permissions', array(permissionEnumSchema)], expirationDateTime: ['ExpirationDateTime', optional(string())], transactionFromDateTime: ['TransactionFromDateTime', optional(string())], transactionToDateTime: ['TransactionToDateTime', optional(string())], });