@vantagepay/vantagepay 0.17.2 → 0.17.4

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.
@@ -91,6 +91,13 @@ export declare class IdentityDocument {
91
91
  /** Gets or sets the date at which the identification document expires. */
92
92
  expiryDate?: Date;
93
93
  }
94
+ export declare enum LimitResetPeriod {
95
+ PerTransaction = "PerTransaction",
96
+ Daily = "Daily",
97
+ Weekly = "Weekly",
98
+ Monthly = "Monthly",
99
+ Yearly = "Yearly"
100
+ }
94
101
  /** Model to hold location data. */
95
102
  export declare class Location {
96
103
  /** A latitude value expressed as a 64 bit floating point number (required). */
@@ -113,3 +120,18 @@ export declare class SwitchEnvironmentInfo {
113
120
  accessToken: string;
114
121
  apiBaseUrl: string;
115
122
  }
123
+ export declare enum TransactionLimitType {
124
+ Unknown = "Unknown",
125
+ CashWithdrawal = "CashWithdrawal",
126
+ Transfer = "Transfer",
127
+ Payment = "Payment",
128
+ Deposit = "Deposit",
129
+ Online = "Online",
130
+ Instant = "Instant",
131
+ Lotto = "Lotto",
132
+ PrepaidAirtime = "PrepaidAirtime",
133
+ PrepaidElectricity = "PrepaidElectricity",
134
+ PrepaidWater = "PrepaidWater",
135
+ PayShap = "PayShap",
136
+ Ussd = "Ussd"
137
+ }
@@ -1,18 +1,22 @@
1
1
  import { BaseApi } from '../baseApi';
2
- import { Balance, ContactDetails } from '../common/types';
3
- import { Consumer, ConsumerFile, Message } from './types';
2
+ import { Balance, ContactDetails, LimitResetPeriod, TransactionLimitType } from '../common/types';
3
+ import { BasicConsumer, Consumer, ConsumerFile, Message, BankAccountLimit } from './types';
4
4
  export declare class Consumers extends BaseApi {
5
- createConsumer(request: Consumer): Promise<Consumer>;
5
+ createConsumer(request: Consumer): Promise<BasicConsumer>;
6
6
  updateConsumer(request: Consumer): Promise<Consumer>;
7
7
  deleteConsumer(): Promise<void>;
8
8
  getConsumer(): Promise<Consumer>;
9
9
  getConsumerAgreement(): Promise<string>;
10
10
  acceptConsumerAgreement(): Promise<void>;
11
11
  stopCard(cardReference: string, reason?: string): Promise<void>;
12
- stopDebitOrder(debitOrderReference: string): Promise<void>;
13
- disputeDebitOrder(debitOrderReference: string): Promise<void>;
12
+ stopDebitOrders(debitOrderReferences: string[]): Promise<void>;
13
+ disputeDebitOrders(debitOrderReferences: string[]): Promise<void>;
14
14
  getBankAccountBalance(bankAccountReference: string): Promise<Balance>;
15
+ getBankAccountLimits(bankAccountReference: string): Promise<BankAccountLimit[]>;
16
+ changeBankAccountLimit(bankAccountReference: string, limitType: TransactionLimitType, resetPeriod: LimitResetPeriod, newLimitAmountInCents: number): Promise<void>;
15
17
  downloadFile(fileReference: string, queryParameters?: Record<string, string>): Promise<ConsumerFile | null>;
18
+ emailFile(fileReference: string, emailAddress: string, queryParameters?: Record<string, string>): Promise<void>;
19
+ smsFile(fileReference: string, msisdn: string, queryParameters?: Record<string, string>): Promise<void>;
16
20
  submitFeedback(description: string): Promise<void>;
17
21
  getAllMessages(): Promise<Message[]>;
18
22
  getMessage(messageReference: string): Promise<Message>;
@@ -17,6 +17,8 @@ import { LoanStatus } from '../lookups/types';
17
17
  import { KycProvider } from '../lookups/types';
18
18
  import { KycStatus } from '../lookups/types';
19
19
  import { KycVerificationType } from '../lookups/types';
20
+ import { TransactionLimitType } from '../common/types';
21
+ import { LimitResetPeriod } from '../common/types';
20
22
  /** Model to hold basic consumer details. */
21
23
  export declare class BasicConsumer {
22
24
  /** Gets or sets the consumer reference. */
@@ -191,6 +193,15 @@ export declare class CardSettings {
191
193
  allowTapToPay: boolean;
192
194
  /** Gets or sets a value indicating whether a PIN should always be requested for transactions with this card. */
193
195
  alwaysAskForPin: boolean;
196
+ /** Gets or sets a value indicating whether online banking is enabled. */
197
+ isOnlineBankingEnabled: boolean;
198
+ onlineBankingLastUsedDate?: Date;
199
+ /** Gets or sets a value indicating whether mobile banking features are enabled. */
200
+ isMobileBankingEnabled: boolean;
201
+ mobileBankingLastUsedDate?: Date;
202
+ /** Gets or sets a value indicating whether USSD banking functionality is enabled. */
203
+ isUssdBankingEnabled: boolean;
204
+ ussdBankingLastUsedDate?: Date;
194
205
  }
195
206
  /** Model to hold detailed consumer details. */
196
207
  export declare class Consumer {
@@ -304,8 +315,8 @@ export declare class ConsumerBankAccount {
304
315
  /** The branch code associated with the bank which holds the bank account. */
305
316
  routingCode?: string;
306
317
  linkedCardReferences: string[];
307
- /** Gets or sets the card settings and preferences. */
308
- cardSettings?: CardSettings;
318
+ /** Gets or sets the card settings and preferences that apply to this bank account and all linked cards. When updated, these settings cascade to all linked cards. */
319
+ linkedCardSettings?: CardSettings;
309
320
  /** Collection of debit orders linked to this bank account. */
310
321
  debitOrders: DebitOrder[];
311
322
  createdDate: Date;
@@ -357,6 +368,7 @@ export declare class ConsumerFile {
357
368
  kycResults: KycFileResult[];
358
369
  reference?: string;
359
370
  yourReference?: string;
371
+ description?: string;
360
372
  fileName: string;
361
373
  mimeType: string;
362
374
  base64Data?: string;
@@ -501,15 +513,11 @@ export declare class DebitOrder {
501
513
  disputedDate?: Date;
502
514
  /** Whether the debit order action date is in the future. */
503
515
  isFuture: boolean;
504
- /** Provider-specific metadata (not serialized to clients). */
505
- metadata: {
506
- [key: string]: string;
507
- };
508
516
  }
509
517
  /** Request to dispute a debit order. */
510
- export declare class DisputeDebitOrderRequest {
511
- /** The debit order reference to dispute. */
512
- debitOrderReference: string;
518
+ export declare class DisputeDebitOrdersRequest {
519
+ /** The debit order references to dispute. */
520
+ debitOrderReferences: string[];
513
521
  }
514
522
  export declare class Feedback {
515
523
  description?: string;
@@ -586,7 +594,29 @@ export declare class StopCardRequest {
586
594
  reason?: string;
587
595
  }
588
596
  /** Request to stop a debit order. */
589
- export declare class StopDebitOrderRequest {
590
- /** The debit order reference to stop. */
591
- debitOrderReference: string;
597
+ export declare class StopDebitOrdersRequest {
598
+ /** The debit order references to stop. */
599
+ debitOrderReferences: string[];
600
+ }
601
+ export declare class BankAccountLimit {
602
+ /** The transaction limit type (ATM, Payment, Transfer, etc.). */
603
+ transactionLimitType: TransactionLimitType;
604
+ transactionLimitTypeName: string;
605
+ /** The reset period for this limit (PerTransaction, Daily, Weekly, Monthly, Yearly). */
606
+ resetPeriod: LimitResetPeriod;
607
+ resetPeriodName: string;
608
+ /** The maximum amount allowed in cents for this transaction type and reset period. */
609
+ limitAmountInCents: number;
610
+ /** The amount already used in cents for this transaction type and reset period. */
611
+ usedAmountInCents: number;
612
+ /** The amount remaining in cents for this transaction type and reset period. */
613
+ remainingAmountInCents: number;
614
+ }
615
+ export declare class BankAccountLimitChange {
616
+ /** The transaction limit type (ATM, Payment, Transfer, etc.). */
617
+ transactionLimitType: TransactionLimitType;
618
+ /** The reset period for this limit (PerTransaction, Daily, Weekly, Monthly, Yearly). */
619
+ resetPeriod: LimitResetPeriod;
620
+ /** The maximum amount allowed in cents for this transaction type and reset period. */
621
+ newLimitAmountInCents: number;
592
622
  }