@channelpayments/node-sdk 1.179.0 → 1.180.0

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.
@@ -119,8 +119,8 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
119
119
  */
120
120
  createBuyer(createBuyerDto: CreateBuyerDto): Promise<BuyersEntity>;
121
121
  /**
122
- * Attempts to create a transaction session token
123
- * Create transaction session
122
+ * Attempts to create a checkout session
123
+ * Create checkout session
124
124
  */
125
125
  createCheckoutSession(createCheckoutSessionDto: CreateCheckoutSessionDto): Promise<CheckoutSessionEntity>;
126
126
  /**
@@ -149,7 +149,7 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
149
149
  */
150
150
  getBuyer(buyerId: string): Promise<BuyersEntity>;
151
151
  /**
152
- * Attempts to fetch a checkout session for hosted client
152
+ * Attempts to fetch a checkout session
153
153
  * Get checkout session
154
154
  */
155
155
  getCheckoutSession(sessionId: string): Promise<CheckoutSessionEntity>;
@@ -357,8 +357,8 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
357
357
  });
358
358
  }
359
359
  /**
360
- * Attempts to create a transaction session token
361
- * Create transaction session
360
+ * Attempts to create a checkout session
361
+ * Create checkout session
362
362
  */
363
363
  createCheckoutSession(createCheckoutSessionDto) {
364
364
  return __awaiter(this, void 0, void 0, function* () {
@@ -781,7 +781,7 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
781
781
  });
782
782
  }
783
783
  /**
784
- * Attempts to fetch a checkout session for hosted client
784
+ * Attempts to fetch a checkout session
785
785
  * Get checkout session
786
786
  */
787
787
  getCheckoutSession(sessionId) {
@@ -193,6 +193,18 @@ export interface TransactionEntity {
193
193
  * @memberof TransactionEntity
194
194
  */
195
195
  capturedAt?: Date;
196
+ /**
197
+ * The declined date of the card transaction.
198
+ * @type {Date}
199
+ * @memberof TransactionEntity
200
+ */
201
+ declinedAt?: Date;
202
+ /**
203
+ * The declined reason of the card transaction.
204
+ * @type {string}
205
+ * @memberof TransactionEntity
206
+ */
207
+ declinedReason?: string;
196
208
  /**
197
209
  * The submitted date of the ACH transaction.
198
210
  * @type {Date}
@@ -235,6 +247,12 @@ export interface TransactionEntity {
235
247
  * @memberof TransactionEntity
236
248
  */
237
249
  tags?: Array<TagEntity>;
250
+ /**
251
+ *
252
+ * @type {string}
253
+ * @memberof TransactionEntity
254
+ */
255
+ declineReason?: string;
238
256
  }
239
257
  /**
240
258
  * @export
@@ -116,6 +116,8 @@ function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
116
116
  'updatedAt': !(0, runtime_1.exists)(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
117
117
  'authorizedAt': !(0, runtime_1.exists)(json, 'authorizedAt') ? undefined : (new Date(json['authorizedAt'])),
118
118
  'capturedAt': !(0, runtime_1.exists)(json, 'capturedAt') ? undefined : (new Date(json['capturedAt'])),
119
+ 'declinedAt': !(0, runtime_1.exists)(json, 'declinedAt') ? undefined : (new Date(json['declinedAt'])),
120
+ 'declinedReason': !(0, runtime_1.exists)(json, 'declinedReason') ? undefined : json['declinedReason'],
119
121
  'submittedAt': !(0, runtime_1.exists)(json, 'submittedAt') ? undefined : (new Date(json['submittedAt'])),
120
122
  'rejectedAt': !(0, runtime_1.exists)(json, 'rejectedAt') ? undefined : (new Date(json['rejectedAt'])),
121
123
  'voidedAt': !(0, runtime_1.exists)(json, 'voidedAt') ? undefined : (new Date(json['voidedAt'])),
@@ -123,6 +125,7 @@ function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
123
125
  'settledAt': !(0, runtime_1.exists)(json, 'settledAt') ? undefined : (new Date(json['settledAt'])),
124
126
  'returnedAt': !(0, runtime_1.exists)(json, 'returnedAt') ? undefined : (new Date(json['returnedAt'])),
125
127
  'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : (json['tags'].map(TagEntity_1.TagEntityFromJSON)),
128
+ 'declineReason': !(0, runtime_1.exists)(json, 'declineReason') ? undefined : json['declineReason'],
126
129
  };
127
130
  return (0, runtime_1.removeNullUndefined)(typed);
128
131
  }
@@ -164,6 +167,8 @@ function TransactionEntityToJSON(value) {
164
167
  'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
165
168
  'authorizedAt': value.authorizedAt === undefined ? undefined : (value.authorizedAt.toISOString()),
166
169
  'capturedAt': value.capturedAt === undefined ? undefined : (value.capturedAt.toISOString()),
170
+ 'declinedAt': value.declinedAt === undefined ? undefined : (value.declinedAt.toISOString()),
171
+ 'declinedReason': value.declinedReason,
167
172
  'submittedAt': value.submittedAt === undefined ? undefined : (value.submittedAt.toISOString()),
168
173
  'rejectedAt': value.rejectedAt === undefined ? undefined : (value.rejectedAt.toISOString()),
169
174
  'voidedAt': value.voidedAt === undefined ? undefined : (value.voidedAt.toISOString()),
@@ -171,5 +176,6 @@ function TransactionEntityToJSON(value) {
171
176
  'settledAt': value.settledAt === undefined ? undefined : (value.settledAt.toISOString()),
172
177
  'returnedAt': value.returnedAt === undefined ? undefined : (value.returnedAt.toISOString()),
173
178
  'tags': value.tags === undefined ? undefined : (value.tags.map(TagEntity_1.TagEntityToJSON)),
179
+ 'declineReason': value.declineReason,
174
180
  };
175
181
  }
@@ -114,7 +114,7 @@ class BaseAPI {
114
114
  createFetchParams(context) {
115
115
  return __awaiter(this, void 0, void 0, function* () {
116
116
  Object.keys(context.headers).forEach(key => context.headers[key] === undefined ? delete context.headers[key] : {});
117
- context.headers['user-agent'] = "@channelpayments/node-sdk/v1.179.0";
117
+ context.headers['user-agent'] = "@channelpayments/node-sdk/v1.180.0";
118
118
  const token = this.generateAuthToken();
119
119
  context.headers['Authorization'] = `Bearer ${token}`;
120
120
  let url = this.url + context.path;
@@ -119,8 +119,8 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
119
119
  */
120
120
  createBuyer(createBuyerDto: CreateBuyerDto): Promise<BuyersEntity>;
121
121
  /**
122
- * Attempts to create a transaction session token
123
- * Create transaction session
122
+ * Attempts to create a checkout session
123
+ * Create checkout session
124
124
  */
125
125
  createCheckoutSession(createCheckoutSessionDto: CreateCheckoutSessionDto): Promise<CheckoutSessionEntity>;
126
126
  /**
@@ -149,7 +149,7 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
149
149
  */
150
150
  getBuyer(buyerId: string): Promise<BuyersEntity>;
151
151
  /**
152
- * Attempts to fetch a checkout session for hosted client
152
+ * Attempts to fetch a checkout session
153
153
  * Get checkout session
154
154
  */
155
155
  getCheckoutSession(sessionId: string): Promise<CheckoutSessionEntity>;
@@ -304,8 +304,8 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
304
304
  return await response.value();
305
305
  }
306
306
  /**
307
- * Attempts to create a transaction session token
308
- * Create transaction session
307
+ * Attempts to create a checkout session
308
+ * Create checkout session
309
309
  */
310
310
  async createCheckoutSession(createCheckoutSessionDto) {
311
311
  if (createCheckoutSessionDto === null || createCheckoutSessionDto === undefined) {
@@ -716,7 +716,7 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
716
716
  return await response.value();
717
717
  }
718
718
  /**
719
- * Attempts to fetch a checkout session for hosted client
719
+ * Attempts to fetch a checkout session
720
720
  * Get checkout session
721
721
  */
722
722
  async getCheckoutSession(sessionId) {
@@ -193,6 +193,18 @@ export interface TransactionEntity {
193
193
  * @memberof TransactionEntity
194
194
  */
195
195
  capturedAt?: Date;
196
+ /**
197
+ * The declined date of the card transaction.
198
+ * @type {Date}
199
+ * @memberof TransactionEntity
200
+ */
201
+ declinedAt?: Date;
202
+ /**
203
+ * The declined reason of the card transaction.
204
+ * @type {string}
205
+ * @memberof TransactionEntity
206
+ */
207
+ declinedReason?: string;
196
208
  /**
197
209
  * The submitted date of the ACH transaction.
198
210
  * @type {Date}
@@ -235,6 +247,12 @@ export interface TransactionEntity {
235
247
  * @memberof TransactionEntity
236
248
  */
237
249
  tags?: Array<TagEntity>;
250
+ /**
251
+ *
252
+ * @type {string}
253
+ * @memberof TransactionEntity
254
+ */
255
+ declineReason?: string;
238
256
  }
239
257
  /**
240
258
  * @export
@@ -109,6 +109,8 @@ export function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
109
109
  'updatedAt': !exists(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
110
110
  'authorizedAt': !exists(json, 'authorizedAt') ? undefined : (new Date(json['authorizedAt'])),
111
111
  'capturedAt': !exists(json, 'capturedAt') ? undefined : (new Date(json['capturedAt'])),
112
+ 'declinedAt': !exists(json, 'declinedAt') ? undefined : (new Date(json['declinedAt'])),
113
+ 'declinedReason': !exists(json, 'declinedReason') ? undefined : json['declinedReason'],
112
114
  'submittedAt': !exists(json, 'submittedAt') ? undefined : (new Date(json['submittedAt'])),
113
115
  'rejectedAt': !exists(json, 'rejectedAt') ? undefined : (new Date(json['rejectedAt'])),
114
116
  'voidedAt': !exists(json, 'voidedAt') ? undefined : (new Date(json['voidedAt'])),
@@ -116,6 +118,7 @@ export function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
116
118
  'settledAt': !exists(json, 'settledAt') ? undefined : (new Date(json['settledAt'])),
117
119
  'returnedAt': !exists(json, 'returnedAt') ? undefined : (new Date(json['returnedAt'])),
118
120
  'tags': !exists(json, 'tags') ? undefined : (json['tags'].map(TagEntityFromJSON)),
121
+ 'declineReason': !exists(json, 'declineReason') ? undefined : json['declineReason'],
119
122
  };
120
123
  return removeNullUndefined(typed);
121
124
  }
@@ -157,6 +160,8 @@ export function TransactionEntityToJSON(value) {
157
160
  'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
158
161
  'authorizedAt': value.authorizedAt === undefined ? undefined : (value.authorizedAt.toISOString()),
159
162
  'capturedAt': value.capturedAt === undefined ? undefined : (value.capturedAt.toISOString()),
163
+ 'declinedAt': value.declinedAt === undefined ? undefined : (value.declinedAt.toISOString()),
164
+ 'declinedReason': value.declinedReason,
160
165
  'submittedAt': value.submittedAt === undefined ? undefined : (value.submittedAt.toISOString()),
161
166
  'rejectedAt': value.rejectedAt === undefined ? undefined : (value.rejectedAt.toISOString()),
162
167
  'voidedAt': value.voidedAt === undefined ? undefined : (value.voidedAt.toISOString()),
@@ -164,5 +169,6 @@ export function TransactionEntityToJSON(value) {
164
169
  'settledAt': value.settledAt === undefined ? undefined : (value.settledAt.toISOString()),
165
170
  'returnedAt': value.returnedAt === undefined ? undefined : (value.returnedAt.toISOString()),
166
171
  'tags': value.tags === undefined ? undefined : (value.tags.map(TagEntityToJSON)),
172
+ 'declineReason': value.declineReason,
167
173
  };
168
174
  }
@@ -64,7 +64,7 @@ export class BaseAPI {
64
64
  }
65
65
  async createFetchParams(context) {
66
66
  Object.keys(context.headers).forEach(key => context.headers[key] === undefined ? delete context.headers[key] : {});
67
- context.headers['user-agent'] = "@channelpayments/node-sdk/v1.179.0";
67
+ context.headers['user-agent'] = "@channelpayments/node-sdk/v1.180.0";
68
68
  const token = this.generateAuthToken();
69
69
  context.headers['Authorization'] = `Bearer ${token}`;
70
70
  let url = this.url + context.path;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@channelpayments/node-sdk",
3
3
  "description": "Channel Payments nodejs sdk",
4
- "version": "1.179.0",
4
+ "version": "1.180.0",
5
5
  "author": "Channel Payments",
6
6
  "license": "ISC",
7
7
  "main": "dist/cjs/index.js",