@vantagepay/vantagepay 0.15.6 → 0.15.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,10 @@ export declare class LoginCredentials {
21
21
  username: string;
22
22
  /** Gets or sets the password (required). */
23
23
  password: string;
24
+ /** Indicates whether the user is locked out. */
25
+ isLockedOut: boolean;
26
+ /** Gets the reason (if any) of why the user has been locked out. */
27
+ reasonForLockout?: string;
24
28
  }
25
29
  /** Provides details for the reason why a login attempt failed (401 errors). */
26
30
  export declare class LoginErrorResponse {
@@ -1,4 +1,5 @@
1
1
  import { Country } from '../lookups/types';
2
+ import { Currency } from '../lookups/types';
2
3
  import { IdentityDocumentType } from '../lookups/types';
3
4
  /** Model to hold address details. */
4
5
  export declare class Address {
@@ -34,6 +35,11 @@ export declare enum AddressType {
34
35
  BILL = "BILL",
35
36
  SHIP = "SHIP"
36
37
  }
38
+ /** Model to hold account balance details. */
39
+ export declare class Balance {
40
+ currency: Currency;
41
+ amountInCents?: number;
42
+ }
37
43
  export declare enum BankAccountType {
38
44
  SAVINGS = "SAVINGS",
39
45
  CURRENT = "CURRENT",
@@ -1,11 +1,14 @@
1
1
  import { BaseApi } from '../baseApi';
2
- import { ContactDetails } from '../common/types';
3
- import { Consumer, Message } from './types';
2
+ import { Balance, ContactDetails } from '../common/types';
3
+ import { Consumer, ConsumerFile, Message } from './types';
4
4
  export declare class Consumers extends BaseApi {
5
5
  createConsumer(request: Consumer): Promise<Consumer>;
6
6
  updateConsumer(request: Consumer): Promise<Consumer>;
7
7
  deleteConsumer(): Promise<void>;
8
8
  getConsumer(): Promise<Consumer>;
9
+ stopCard(cardReference: string, reason?: string): Promise<void>;
10
+ getBankAccountBalance(bankAccountReference: string): Promise<Balance>;
11
+ downloadFile(fileReference: string, queryParameters?: Record<string, string>): Promise<ConsumerFile | null>;
9
12
  submitFeedback(description: string): Promise<void>;
10
13
  getAllMessages(): Promise<Message[]>;
11
14
  getMessage(messageReference: string): Promise<Message>;
@@ -1,9 +1,9 @@
1
1
  import { Country } from '../lookups/types';
2
2
  import { Gender } from '../lookups/types';
3
3
  import { Language } from '../lookups/types';
4
+ import { Currency } from '../lookups/types';
4
5
  import { BankAccountType } from '../common/types';
5
6
  import { Bank } from '../lookups/types';
6
- import { Currency } from '../lookups/types';
7
7
  import { Month } from '../lookups/types';
8
8
  import { MobileWalletOperator } from '../lookups/types';
9
9
  import { LoginCredentials } from '../authentication/types';
@@ -53,14 +53,55 @@ export declare class Beneficiary {
53
53
  reference?: string;
54
54
  /** The beneficiary name. */
55
55
  name: string;
56
+ /** The contact number for this beneficiary. */
57
+ contactNumber?: string;
58
+ /** The date and time of the last transaction made to this beneficiary account. */
59
+ lastTransactionDate?: Date;
60
+ /** The amount in cents of the last transaction made to this beneficiary account. */
61
+ lastTransactionAmountInCents?: number;
62
+ /** The currency of the last transaction made to this beneficiary account. */
63
+ lastTransactionCurrency?: Currency;
56
64
  /** A list of bank accounts associated with a beneficiary. */
57
65
  bankAccounts: BeneficiaryBankAccount[];
58
66
  /** A list of mobile wallets associated with a beneficiary. */
59
67
  mobileWallets: BeneficiaryMobileWallet[];
60
68
  /** A list of cards associated with a beneficiary. */
61
69
  cards: BeneficiaryCard[];
70
+ /** A list of generic accounts (mobile numbers, meter numbers, etc) associated with a beneficiary. */
71
+ accounts: BeneficiaryAccount[];
62
72
  isActive: boolean;
63
73
  }
74
+ /** Model to hold the unique details for a generic beneficiary account (mobile number, meter number, etc). */
75
+ export declare class BeneficiaryAccount {
76
+ /** The account number (can be a mobile number, meter number, etc). */
77
+ accountNumber: string;
78
+ /** The type of beneficiary account. */
79
+ beneficiaryAccountType: BeneficiaryAccountType;
80
+ beneficiaryAccountTypeName: string;
81
+ createdDate: Date;
82
+ /** A globally unique reference (UUID) generated by the system internally to identify a specific beneficiary account. */
83
+ reference?: string;
84
+ /** A 3 character ISO currency code. */
85
+ currency: Currency;
86
+ /** The details which add sufficient context behind the money transfer to the beneficiary. */
87
+ recipientReference?: string;
88
+ /** The details which add sufficient context behind the money transfer to the consumer. */
89
+ senderReference?: string;
90
+ /** A flag indicating whether the consumer requires a notification to be sent to the beneficiary after a successful money transfer. */
91
+ sendProofOfPayment: boolean;
92
+ /** The email address for the beneficiary. */
93
+ proofOfPaymentEmailAddress?: string;
94
+ /** The mobile number for the beneficiary. */
95
+ proofOfPaymentMobileNumber?: string;
96
+ isActive: boolean;
97
+ }
98
+ export declare enum BeneficiaryAccountType {
99
+ None = "None",
100
+ MobileNumber = "MobileNumber",
101
+ WaterMeter = "WaterMeter",
102
+ ElectricityMeter = "ElectricityMeter",
103
+ PayShap = "PayShap"
104
+ }
64
105
  /** Model to hold the unique details for a bank account beneficiary. */
65
106
  export declare class BeneficiaryBankAccount {
66
107
  /** The bank account token that was generated by the system. */
@@ -75,7 +116,7 @@ export declare class BeneficiaryBankAccount {
75
116
  routingCode?: string;
76
117
  createdDate: Date;
77
118
  /** A globally unique reference (UUID) generated by the system internally to identify a specific beneficiary account. */
78
- reference: string;
119
+ reference?: string;
79
120
  /** A 3 character ISO currency code. */
80
121
  currency: Currency;
81
122
  /** The details which add sufficient context behind the money transfer to the beneficiary. */
@@ -105,7 +146,7 @@ export declare class BeneficiaryCard {
105
146
  cardIssuer: string;
106
147
  createdDate: Date;
107
148
  /** A globally unique reference (UUID) generated by the system internally to identify a specific beneficiary account. */
108
- reference: string;
149
+ reference?: string;
109
150
  /** A 3 character ISO currency code. */
110
151
  currency: Currency;
111
152
  /** The details which add sufficient context behind the money transfer to the beneficiary. */
@@ -132,7 +173,7 @@ export declare class BeneficiaryMobileWallet {
132
173
  mobileWalletOperatorName: string;
133
174
  createdDate: Date;
134
175
  /** A globally unique reference (UUID) generated by the system internally to identify a specific beneficiary account. */
135
- reference: string;
176
+ reference?: string;
136
177
  /** A 3 character ISO currency code. */
137
178
  currency: Currency;
138
179
  /** The details which add sufficient context behind the money transfer to the beneficiary. */
@@ -147,12 +188,21 @@ export declare class BeneficiaryMobileWallet {
147
188
  proofOfPaymentMobileNumber?: string;
148
189
  isActive: boolean;
149
190
  }
191
+ /** Model to hold consumer card settings and preferences. */
192
+ export declare class CardSettings {
193
+ /** Gets or sets a value indicating whether tap to pay functionality is allowed for this card. */
194
+ allowTapToPay: boolean;
195
+ /** Gets or sets a value indicating whether a PIN should always be requested for transactions with this card. */
196
+ alwaysAskForPin: boolean;
197
+ }
150
198
  /** Model to hold detailed consumer details. */
151
199
  export declare class Consumer {
152
200
  /** The date and time this consumer record was created. */
153
201
  createdDate: Date;
154
202
  /** Gets or sets the login credentials that this consumer can use to access their data. */
155
203
  loginCredentials?: LoginCredentials;
204
+ /** Gets or sets the preferred name of the consumer. */
205
+ preferredName?: string;
156
206
  /** Gets or sets the full name of a consumer's next of kin. */
157
207
  fullNameOfNextOfKin?: string;
158
208
  /** Gets or sets the contact number for a consumer's next of kin. */
@@ -254,7 +304,7 @@ export declare class ConsumerBankAccount {
254
304
  branchName?: string;
255
305
  /** The branch code associated with the bank which holds the bank account. */
256
306
  routingCode?: string;
257
- hasActiveCard: boolean;
307
+ linkedCardReferences: string[];
258
308
  createdDate: Date;
259
309
  /** A globally unique transaction reference (UUID) generated by the system internally to identify a specific consumer account. */
260
310
  reference?: string;
@@ -279,6 +329,10 @@ export declare class ConsumerCard {
279
329
  expiryMonth: Month;
280
330
  /** The year in which the card expires. */
281
331
  expiryYear: number;
332
+ /** Gets the list of linked bank account references. */
333
+ linkedBankAccountReferences: string[];
334
+ /** Gets or sets the card settings and preferences. */
335
+ settings?: CardSettings;
282
336
  createdDate: Date;
283
337
  /** A globally unique transaction reference (UUID) generated by the system internally to identify a specific consumer account. */
284
338
  reference?: string;
@@ -403,7 +457,7 @@ export declare enum KycStatusSummary {
403
457
  /** Model to hold consumer message details. */
404
458
  export declare class Message {
405
459
  /** A globally unique transaction reference (UUID) generated by the system internally to identify a specific message. */
406
- reference: string;
460
+ reference?: string;
407
461
  /** A globally unique transaction reference (UUID) generated by the system internally to identify a specific consumer. */
408
462
  consumerReference: string;
409
463
  /** A short text string which briefly summarizes the message details. */
@@ -420,3 +474,10 @@ export declare class RewardPointsInfo {
420
474
  rewardTier: number;
421
475
  creditTransactionCount: number;
422
476
  }
477
+ /** Request to stop a consumer card. */
478
+ export declare class StopCardRequest {
479
+ /** The card reference to stop. */
480
+ cardReference?: string;
481
+ /** The reason for stopping the card. */
482
+ reason?: string;
483
+ }