@vantagepay/vantagepay 0.15.1 → 0.15.2

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.
package/README.md CHANGED
@@ -71,7 +71,7 @@ The API will respond with typical REST HTTP error status codes (4xx and 5xx) for
71
71
 
72
72
  ```js
73
73
  try {
74
- // ... Call a method on the client library.
74
+ // ... Call a method on the client library.
75
75
  } catch (error) {
76
76
  // First check if it's an API error.
77
77
  if (error instanceof ApiError) {
@@ -106,8 +106,7 @@ try {
106
106
  console.error('Unknown status code from VantagePay client library: ' + error.statusCode)
107
107
  throw error
108
108
  }
109
- }
110
- else {
109
+ } else {
111
110
  // Not a client library error...
112
111
  throw error
113
112
  }
@@ -153,7 +152,7 @@ try {
153
152
  await VantagePayClient.auth.changePassword('NewComplexP@55word!')
154
153
  }
155
154
 
156
- if (authError.mustValidatePhoneNumber) {
155
+ if (authError.mustValidatePhoneNumber || authError.mustValidateEmailAddress) {
157
156
  console.log('Navigate to the OTP page password page, the token is internally set to allow calls to auth.resendOtp() and auth.validateOtp()')
158
157
 
159
158
  // A successful OTP verification will automatically log you in.
package/dist/baseApi.d.ts CHANGED
@@ -6,4 +6,5 @@ export declare abstract class BaseApi {
6
6
  protected readonly events: PubSubJS.Base<any, PubSubJS.Message>;
7
7
  constructor(axiosInstance: AxiosInstance, consoleLogging?: boolean);
8
8
  protected request<T>(endpoint: string, method: string, body?: any, token?: string | null): Promise<T>;
9
+ private convertDatesToIso;
9
10
  }
@@ -1,7 +1,7 @@
1
1
  import { BaseApi } from '../baseApi';
2
- import { BasicConsumer, Consumer, Message } from './types';
2
+ import { Consumer, Message } from './types';
3
3
  export declare class Consumers extends BaseApi {
4
- createConsumer(request: BasicConsumer): Promise<Consumer>;
4
+ createConsumer(request: Consumer): Promise<Consumer>;
5
5
  updateConsumer(request: Consumer): Promise<Consumer>;
6
6
  deleteConsumer(): Promise<void>;
7
7
  getConsumer(): Promise<Consumer>;
@@ -121,9 +121,9 @@ export declare class BeneficiaryCard {
121
121
  /** Model to hold the unique details for a mobile money beneficiary. */
122
122
  export declare class BeneficiaryMobileWallet {
123
123
  /**
124
- * Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally.
125
- * This number includes a country code and a National Destination Code which identifies the subscriber's operator.
126
- */
124
+ * Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally.
125
+ * This number includes a country code and a National Destination Code which identifies the subscriber's operator.
126
+ */
127
127
  msisdn: string;
128
128
  /** The mobile wallet operator that owns the mobile money account. */
129
129
  mobileWalletOperator: MobileWalletOperator;
@@ -226,7 +226,8 @@ export declare enum ConsumerAttribute {
226
226
  GMoneyWalletNumber = 4,
227
227
  LinkedGcbBankAccountReferences = 5,
228
228
  MarketingConsent = 6,
229
- CommunicationOutsideRegularHoursConsent = 7
229
+ CommunicationOutsideRegularHoursConsent = 7,
230
+ PrimarySourceOfFunds = 8
230
231
  }
231
232
  /** Model to hold various attributes about a consumer. */
232
233
  export declare class ConsumerAttributeValue {
@@ -287,9 +288,9 @@ export declare class ConsumerFile {
287
288
  }
288
289
  export declare class ConsumerMobileWallet {
289
290
  /**
290
- * Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally.
291
- * This number includes a country code and a National Destination Code which identifies the subscriber's operator.
292
- */
291
+ * Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally.
292
+ * This number includes a country code and a National Destination Code which identifies the subscriber's operator.
293
+ */
293
294
  msisdn: string;
294
295
  /** The mobile wallet operator that owns the mobile money account. */
295
296
  mobileWalletOperator: MobileWalletOperator;