@channelpayments/node-sdk 1.176.0 → 1.178.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.
- package/dist/cjs/apis/ChannelPaymentsApi.d.ts +9 -23
- package/dist/cjs/apis/ChannelPaymentsApi.js +3 -222
- package/dist/cjs/models/ConnectorServiceTokenEntity.d.ts +18 -2
- package/dist/cjs/models/ConnectorServiceTokenEntity.js +13 -0
- package/dist/cjs/models/CreateProvisionedCardTokenByMerchantDto.d.ts +59 -0
- package/dist/cjs/models/CreateProvisionedCardTokenByMerchantDto.js +65 -0
- package/dist/cjs/models/TransactionEntity.d.ts +7 -0
- package/dist/cjs/models/TransactionEntity.js +3 -0
- package/dist/cjs/models/index.d.ts +1 -2
- package/dist/cjs/models/index.js +1 -2
- package/dist/cjs/runtime.js +1 -1
- package/dist/mjs/apis/ChannelPaymentsApi.d.ts +9 -23
- package/dist/mjs/apis/ChannelPaymentsApi.js +4 -217
- package/dist/mjs/models/ConnectorServiceTokenEntity.d.ts +18 -2
- package/dist/mjs/models/ConnectorServiceTokenEntity.js +12 -0
- package/dist/mjs/models/CreateProvisionedCardTokenByMerchantDto.d.ts +59 -0
- package/dist/mjs/models/CreateProvisionedCardTokenByMerchantDto.js +58 -0
- package/dist/mjs/models/TransactionEntity.d.ts +7 -0
- package/dist/mjs/models/TransactionEntity.js +3 -0
- package/dist/mjs/models/index.d.ts +1 -2
- package/dist/mjs/models/index.js +1 -2
- package/dist/mjs/runtime.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/models/CreateTransactionNoteDto.d.ts +0 -32
- package/dist/cjs/models/CreateTransactionNoteDto.js +0 -49
- package/dist/cjs/models/UpdateTransactionNoteDto.d.ts +0 -32
- package/dist/cjs/models/UpdateTransactionNoteDto.js +0 -49
- package/dist/mjs/models/CreateTransactionNoteDto.d.ts +0 -32
- package/dist/mjs/models/CreateTransactionNoteDto.js +0 -43
- package/dist/mjs/models/UpdateTransactionNoteDto.d.ts +0 -32
- package/dist/mjs/models/UpdateTransactionNoteDto.js +0 -43
package/dist/cjs/runtime.js
CHANGED
|
@@ -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.
|
|
117
|
+
context.headers['user-agent'] = "@channelpayments/node-sdk/v1.178.0";
|
|
118
118
|
const token = this.generateAuthToken();
|
|
119
119
|
context.headers['Authorization'] = `Bearer ${token}`;
|
|
120
120
|
let url = this.url + context.path;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
*/
|
|
7
7
|
import * as runtime from '../runtime';
|
|
8
|
-
import type { BuyersEntity, BuyersSearchEntity, CaptureTransactionDto, ChangeNotificationEntity, ChangeNotificationsSearchEntity, CheckoutSessionEntity, ConnectorServiceTokenEntity, CreateBuyerDto, CreateCheckoutSessionDto, CreatePaymentMethodDto, CreateProvisionedCardTokenDto,
|
|
8
|
+
import type { BuyersEntity, BuyersSearchEntity, CaptureTransactionDto, ChangeNotificationEntity, ChangeNotificationsSearchEntity, CheckoutSessionEntity, ConnectorServiceTokenEntity, CreateBuyerDto, CreateCheckoutSessionDto, CreatePaymentMethodDto, CreateProvisionedCardTokenDto, CreateTransactionRefundDto, CreateTransactionRequestDto, MerchantEntity, PaymentMethodEntity, PaymentMethodsSearchEntity, ReturnNotificationEntity, ReturnNotificationsSearchEntity, TagDto, TransactionEntity, TransactionRefundEntity, TransactionRefundsSearchEntity, TransactionsSearchEntity, UpdateBuyerDto } from '../models';
|
|
9
9
|
export interface SearchBuyersRequest {
|
|
10
10
|
merchantId: string;
|
|
11
11
|
buyerId?: string;
|
|
@@ -127,11 +127,6 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
127
127
|
* Create transaction
|
|
128
128
|
*/
|
|
129
129
|
createTransaction(createTransactionRequestDto: CreateTransactionRequestDto, idempotencyKey?: string): Promise<TransactionEntity>;
|
|
130
|
-
/**
|
|
131
|
-
* Attempts to create a transaction note
|
|
132
|
-
* Create transaction note
|
|
133
|
-
*/
|
|
134
|
-
createTransactionNote(createTransactionNoteDto: CreateTransactionNoteDto): Promise<TransactionNoteEntity>;
|
|
135
130
|
/**
|
|
136
131
|
* Removes a buyer ID.
|
|
137
132
|
* Remove buyer.
|
|
@@ -141,17 +136,12 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
141
136
|
* Delete connector service token by connectorServiceTokenId.
|
|
142
137
|
* Delete connector service token.
|
|
143
138
|
*/
|
|
144
|
-
deleteConnectorServiceToken(connectorServiceTokenId:
|
|
139
|
+
deleteConnectorServiceToken(connectorServiceTokenId: string): Promise<ConnectorServiceTokenEntity>;
|
|
145
140
|
/**
|
|
146
141
|
* Delete payment method by paymentMethodId.
|
|
147
142
|
* Delete payment method.
|
|
148
143
|
*/
|
|
149
|
-
deletePaymentMethod(paymentMethodId:
|
|
150
|
-
/**
|
|
151
|
-
* Attempts to delete a transaction note.
|
|
152
|
-
* Delete transaction note.
|
|
153
|
-
*/
|
|
154
|
-
deleteTransactionNote(noteId: string): Promise<TransactionNoteEntity>;
|
|
144
|
+
deletePaymentMethod(paymentMethodId: string): Promise<PaymentMethodEntity>;
|
|
155
145
|
/**
|
|
156
146
|
* Find a buyer by buyer ID.
|
|
157
147
|
* Find buyer.
|
|
@@ -171,12 +161,12 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
171
161
|
* Find connector service token by connectorServiceTokenId.
|
|
172
162
|
* Find connector service token.
|
|
173
163
|
*/
|
|
174
|
-
getConnectorServiceToken(connectorServiceTokenId:
|
|
164
|
+
getConnectorServiceToken(connectorServiceTokenId: string): Promise<ConnectorServiceTokenEntity>;
|
|
175
165
|
/**
|
|
176
166
|
* Find connector service tokens by paymentMethodId.
|
|
177
167
|
* Find connector service tokens.
|
|
178
168
|
*/
|
|
179
|
-
getConnectorServiceTokens(paymentMethodId:
|
|
169
|
+
getConnectorServiceTokens(paymentMethodId: string): Promise<Array<ConnectorServiceTokenEntity>>;
|
|
180
170
|
/**
|
|
181
171
|
* Retrieve the merchant associated with the user making the request.
|
|
182
172
|
* Find merchant
|
|
@@ -186,7 +176,7 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
186
176
|
* Find payment method by paymentMethodId.
|
|
187
177
|
* Find by payment method.
|
|
188
178
|
*/
|
|
189
|
-
getPaymentMethod(paymentMethodId:
|
|
179
|
+
getPaymentMethod(paymentMethodId: string): Promise<PaymentMethodEntity>;
|
|
190
180
|
/**
|
|
191
181
|
* Attempts to find refund by transaction ID and refund ID
|
|
192
182
|
* Find refund
|
|
@@ -216,7 +206,7 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
216
206
|
* Search all change notifications by date range.
|
|
217
207
|
* Search for change notifications.
|
|
218
208
|
*/
|
|
219
|
-
searchChangeNotifications(requestParameters: SearchChangeNotificationsRequest): Promise<
|
|
209
|
+
searchChangeNotifications(requestParameters: SearchChangeNotificationsRequest): Promise<ChangeNotificationsSearchEntity>;
|
|
220
210
|
/**
|
|
221
211
|
* Search a payment methods by query params.
|
|
222
212
|
* Search payment methods.
|
|
@@ -231,7 +221,7 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
231
221
|
* Search all return notifications by date range.
|
|
232
222
|
* Search for return notifications.
|
|
233
223
|
*/
|
|
234
|
-
searchReturnNotifications(requestParameters: SearchReturnNotificationsRequest): Promise<
|
|
224
|
+
searchReturnNotifications(requestParameters: SearchReturnNotificationsRequest): Promise<ReturnNotificationsSearchEntity>;
|
|
235
225
|
/**
|
|
236
226
|
* Search transactions by query params
|
|
237
227
|
* Search transactions
|
|
@@ -247,11 +237,6 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
247
237
|
* Update buyer.
|
|
248
238
|
*/
|
|
249
239
|
updateBuyer(updateBuyerDto: UpdateBuyerDto): Promise<BuyersEntity>;
|
|
250
|
-
/**
|
|
251
|
-
* Updates an existing transaction note.
|
|
252
|
-
* Update transaction note.
|
|
253
|
-
*/
|
|
254
|
-
updateTransactionNote(noteId: string, updateTransactionNoteDto: UpdateTransactionNoteDto): Promise<TransactionNoteEntity>;
|
|
255
240
|
/**
|
|
256
241
|
* Attempts to void an authorized transaction
|
|
257
242
|
* Void a transaction
|
|
@@ -401,6 +386,7 @@ export declare const SearchTransactionsStatusEnum: {
|
|
|
401
386
|
readonly BuyerApprovalPending: "buyerApprovalPending";
|
|
402
387
|
readonly Authorized: "authorized";
|
|
403
388
|
readonly AuthorizationFailed: "authorizationFailed";
|
|
389
|
+
readonly CaptureFailed: "captureFailed";
|
|
404
390
|
readonly Declined: "declined";
|
|
405
391
|
readonly CapturePending: "capturePending";
|
|
406
392
|
readonly Captured: "captured";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
import * as runtime from '../runtime';
|
|
10
|
-
import { BuyersEntityFromJSON, BuyersSearchEntityFromJSON, CaptureTransactionDtoToJSON, ChangeNotificationEntityFromJSON, ChangeNotificationsSearchEntityFromJSON, CheckoutSessionEntityFromJSON, ConnectorServiceTokenEntityFromJSON, CreateBuyerDtoToJSON, CreateCheckoutSessionDtoToJSON, CreatePaymentMethodDtoToJSON, CreateProvisionedCardTokenDtoToJSON,
|
|
10
|
+
import { BuyersEntityFromJSON, BuyersSearchEntityFromJSON, CaptureTransactionDtoToJSON, ChangeNotificationEntityFromJSON, ChangeNotificationsSearchEntityFromJSON, CheckoutSessionEntityFromJSON, ConnectorServiceTokenEntityFromJSON, CreateBuyerDtoToJSON, CreateCheckoutSessionDtoToJSON, CreatePaymentMethodDtoToJSON, CreateProvisionedCardTokenDtoToJSON, CreateTransactionRefundDtoToJSON, CreateTransactionRequestDtoToJSON, ErrorEntityFromJSON, MerchantEntityFromJSON, PaymentMethodEntityFromJSON, PaymentMethodsSearchEntityFromJSON, ReturnNotificationEntityFromJSON, ReturnNotificationsSearchEntityFromJSON, TransactionEntityFromJSON, TransactionRefundEntityFromJSON, TransactionRefundsSearchEntityFromJSON, TransactionsSearchEntityFromJSON, UpdateBuyerDtoToJSON, } from '../models';
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
@@ -455,79 +455,6 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
455
455
|
}
|
|
456
456
|
return await response.value();
|
|
457
457
|
}
|
|
458
|
-
/**
|
|
459
|
-
* Attempts to create a transaction note
|
|
460
|
-
* Create transaction note
|
|
461
|
-
*/
|
|
462
|
-
async createTransactionNote(createTransactionNoteDto) {
|
|
463
|
-
if (createTransactionNoteDto === null || createTransactionNoteDto === undefined) {
|
|
464
|
-
throw new runtime.RequiredError('createTransactionNoteDto', 'Required parameter \'createTransactionNoteDto\' was null or undefined when calling createTransactionNote.');
|
|
465
|
-
}
|
|
466
|
-
if (createTransactionNoteDto.documentId === null || createTransactionNoteDto.documentId === undefined) {
|
|
467
|
-
throw new runtime.RequiredError('createTransactionNoteDto.documentId', 'Required parameter \'createTransactionNoteDto.documentId\' was null or undefined when calling createTransactionNote.');
|
|
468
|
-
}
|
|
469
|
-
if (createTransactionNoteDto.content === null || createTransactionNoteDto.content === undefined) {
|
|
470
|
-
throw new runtime.RequiredError('createTransactionNoteDto.content', 'Required parameter \'createTransactionNoteDto.content\' was null or undefined when calling createTransactionNote.');
|
|
471
|
-
}
|
|
472
|
-
const queryParameters = {};
|
|
473
|
-
const headerParameters = {};
|
|
474
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
475
|
-
const rawResponse = await this.request({
|
|
476
|
-
path: `/transaction-notes`,
|
|
477
|
-
method: 'POST',
|
|
478
|
-
headers: headerParameters,
|
|
479
|
-
query: queryParameters,
|
|
480
|
-
body: CreateTransactionNoteDtoToJSON(createTransactionNoteDto),
|
|
481
|
-
});
|
|
482
|
-
let response;
|
|
483
|
-
if (rawResponse.status === 201) {
|
|
484
|
-
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => TransactionNoteEntityFromJSON(jsonValue));
|
|
485
|
-
}
|
|
486
|
-
if (rawResponse.status === 400) {
|
|
487
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
488
|
-
const error = await errorResponse.value();
|
|
489
|
-
throw error;
|
|
490
|
-
}
|
|
491
|
-
if (rawResponse.status === 401) {
|
|
492
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
493
|
-
const error = await errorResponse.value();
|
|
494
|
-
throw error;
|
|
495
|
-
}
|
|
496
|
-
if (rawResponse.status === 403) {
|
|
497
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
498
|
-
const error = await errorResponse.value();
|
|
499
|
-
throw error;
|
|
500
|
-
}
|
|
501
|
-
if (rawResponse.status === 404) {
|
|
502
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
503
|
-
const error = await errorResponse.value();
|
|
504
|
-
throw error;
|
|
505
|
-
}
|
|
506
|
-
if (rawResponse.status === 500) {
|
|
507
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
508
|
-
const error = await errorResponse.value();
|
|
509
|
-
throw error;
|
|
510
|
-
}
|
|
511
|
-
if (rawResponse.status === 502) {
|
|
512
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
513
|
-
const error = await errorResponse.value();
|
|
514
|
-
throw error;
|
|
515
|
-
}
|
|
516
|
-
if (rawResponse.status === 503) {
|
|
517
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
518
|
-
const error = await errorResponse.value();
|
|
519
|
-
throw error;
|
|
520
|
-
}
|
|
521
|
-
if (rawResponse.status === 504) {
|
|
522
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
523
|
-
const error = await errorResponse.value();
|
|
524
|
-
throw error;
|
|
525
|
-
}
|
|
526
|
-
if (!response) {
|
|
527
|
-
response = new runtime.TextApiResponse(rawResponse);
|
|
528
|
-
}
|
|
529
|
-
return await response.value();
|
|
530
|
-
}
|
|
531
458
|
/**
|
|
532
459
|
* Removes a buyer ID.
|
|
533
460
|
* Remove buyer.
|
|
@@ -723,71 +650,6 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
723
650
|
}
|
|
724
651
|
return await response.value();
|
|
725
652
|
}
|
|
726
|
-
/**
|
|
727
|
-
* Attempts to delete a transaction note.
|
|
728
|
-
* Delete transaction note.
|
|
729
|
-
*/
|
|
730
|
-
async deleteTransactionNote(noteId) {
|
|
731
|
-
if (noteId === null || noteId === undefined) {
|
|
732
|
-
throw new runtime.RequiredError('noteId', 'Required parameter \'noteId\' was null or undefined when calling deleteTransactionNote.');
|
|
733
|
-
}
|
|
734
|
-
const queryParameters = {};
|
|
735
|
-
const headerParameters = {};
|
|
736
|
-
const rawResponse = await this.request({
|
|
737
|
-
path: `/transaction-notes/{noteId}`.replace(`{${"noteId"}}`, encodeURIComponent(noteId)),
|
|
738
|
-
method: 'DELETE',
|
|
739
|
-
headers: headerParameters,
|
|
740
|
-
query: queryParameters,
|
|
741
|
-
});
|
|
742
|
-
let response;
|
|
743
|
-
if (rawResponse.status === 200) {
|
|
744
|
-
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => TransactionNoteEntityFromJSON(jsonValue));
|
|
745
|
-
}
|
|
746
|
-
if (rawResponse.status === 400) {
|
|
747
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
748
|
-
const error = await errorResponse.value();
|
|
749
|
-
throw error;
|
|
750
|
-
}
|
|
751
|
-
if (rawResponse.status === 401) {
|
|
752
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
753
|
-
const error = await errorResponse.value();
|
|
754
|
-
throw error;
|
|
755
|
-
}
|
|
756
|
-
if (rawResponse.status === 403) {
|
|
757
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
758
|
-
const error = await errorResponse.value();
|
|
759
|
-
throw error;
|
|
760
|
-
}
|
|
761
|
-
if (rawResponse.status === 404) {
|
|
762
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
763
|
-
const error = await errorResponse.value();
|
|
764
|
-
throw error;
|
|
765
|
-
}
|
|
766
|
-
if (rawResponse.status === 500) {
|
|
767
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
768
|
-
const error = await errorResponse.value();
|
|
769
|
-
throw error;
|
|
770
|
-
}
|
|
771
|
-
if (rawResponse.status === 502) {
|
|
772
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
773
|
-
const error = await errorResponse.value();
|
|
774
|
-
throw error;
|
|
775
|
-
}
|
|
776
|
-
if (rawResponse.status === 503) {
|
|
777
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
778
|
-
const error = await errorResponse.value();
|
|
779
|
-
throw error;
|
|
780
|
-
}
|
|
781
|
-
if (rawResponse.status === 504) {
|
|
782
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
783
|
-
const error = await errorResponse.value();
|
|
784
|
-
throw error;
|
|
785
|
-
}
|
|
786
|
-
if (!response) {
|
|
787
|
-
response = new runtime.TextApiResponse(rawResponse);
|
|
788
|
-
}
|
|
789
|
-
return await response.value();
|
|
790
|
-
}
|
|
791
653
|
/**
|
|
792
654
|
* Find a buyer by buyer ID.
|
|
793
655
|
* Find buyer.
|
|
@@ -1650,7 +1512,7 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
1650
1512
|
});
|
|
1651
1513
|
let response;
|
|
1652
1514
|
if (rawResponse.status === 200) {
|
|
1653
|
-
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => jsonValue
|
|
1515
|
+
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ChangeNotificationsSearchEntityFromJSON(jsonValue));
|
|
1654
1516
|
}
|
|
1655
1517
|
if (rawResponse.status === 400) {
|
|
1656
1518
|
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
@@ -1923,7 +1785,7 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
1923
1785
|
});
|
|
1924
1786
|
let response;
|
|
1925
1787
|
if (rawResponse.status === 200) {
|
|
1926
|
-
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => jsonValue
|
|
1788
|
+
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ReturnNotificationsSearchEntityFromJSON(jsonValue));
|
|
1927
1789
|
}
|
|
1928
1790
|
if (rawResponse.status === 400) {
|
|
1929
1791
|
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
@@ -2265,82 +2127,6 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
2265
2127
|
}
|
|
2266
2128
|
return await response.value();
|
|
2267
2129
|
}
|
|
2268
|
-
/**
|
|
2269
|
-
* Updates an existing transaction note.
|
|
2270
|
-
* Update transaction note.
|
|
2271
|
-
*/
|
|
2272
|
-
async updateTransactionNote(noteId, updateTransactionNoteDto) {
|
|
2273
|
-
if (noteId === null || noteId === undefined) {
|
|
2274
|
-
throw new runtime.RequiredError('noteId', 'Required parameter \'noteId\' was null or undefined when calling updateTransactionNote.');
|
|
2275
|
-
}
|
|
2276
|
-
if (updateTransactionNoteDto === null || updateTransactionNoteDto === undefined) {
|
|
2277
|
-
throw new runtime.RequiredError('updateTransactionNoteDto', 'Required parameter \'updateTransactionNoteDto\' was null or undefined when calling updateTransactionNote.');
|
|
2278
|
-
}
|
|
2279
|
-
if (updateTransactionNoteDto.content === null || updateTransactionNoteDto.content === undefined) {
|
|
2280
|
-
throw new runtime.RequiredError('updateTransactionNoteDto.content', 'Required parameter \'updateTransactionNoteDto.content\' was null or undefined when calling updateTransactionNote.');
|
|
2281
|
-
}
|
|
2282
|
-
if (updateTransactionNoteDto.noteId === null || updateTransactionNoteDto.noteId === undefined) {
|
|
2283
|
-
throw new runtime.RequiredError('updateTransactionNoteDto.noteId', 'Required parameter \'updateTransactionNoteDto.noteId\' was null or undefined when calling updateTransactionNote.');
|
|
2284
|
-
}
|
|
2285
|
-
const queryParameters = {};
|
|
2286
|
-
const headerParameters = {};
|
|
2287
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
2288
|
-
const rawResponse = await this.request({
|
|
2289
|
-
path: `/transaction-notes/{noteId}`.replace(`{${"noteId"}}`, encodeURIComponent(noteId)),
|
|
2290
|
-
method: 'PATCH',
|
|
2291
|
-
headers: headerParameters,
|
|
2292
|
-
query: queryParameters,
|
|
2293
|
-
body: UpdateTransactionNoteDtoToJSON(updateTransactionNoteDto),
|
|
2294
|
-
});
|
|
2295
|
-
let response;
|
|
2296
|
-
if (rawResponse.status === 200) {
|
|
2297
|
-
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => TransactionNoteEntityFromJSON(jsonValue));
|
|
2298
|
-
}
|
|
2299
|
-
if (rawResponse.status === 400) {
|
|
2300
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
2301
|
-
const error = await errorResponse.value();
|
|
2302
|
-
throw error;
|
|
2303
|
-
}
|
|
2304
|
-
if (rawResponse.status === 401) {
|
|
2305
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
2306
|
-
const error = await errorResponse.value();
|
|
2307
|
-
throw error;
|
|
2308
|
-
}
|
|
2309
|
-
if (rawResponse.status === 403) {
|
|
2310
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
2311
|
-
const error = await errorResponse.value();
|
|
2312
|
-
throw error;
|
|
2313
|
-
}
|
|
2314
|
-
if (rawResponse.status === 404) {
|
|
2315
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
2316
|
-
const error = await errorResponse.value();
|
|
2317
|
-
throw error;
|
|
2318
|
-
}
|
|
2319
|
-
if (rawResponse.status === 500) {
|
|
2320
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
2321
|
-
const error = await errorResponse.value();
|
|
2322
|
-
throw error;
|
|
2323
|
-
}
|
|
2324
|
-
if (rawResponse.status === 502) {
|
|
2325
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
2326
|
-
const error = await errorResponse.value();
|
|
2327
|
-
throw error;
|
|
2328
|
-
}
|
|
2329
|
-
if (rawResponse.status === 503) {
|
|
2330
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
2331
|
-
const error = await errorResponse.value();
|
|
2332
|
-
throw error;
|
|
2333
|
-
}
|
|
2334
|
-
if (rawResponse.status === 504) {
|
|
2335
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
2336
|
-
const error = await errorResponse.value();
|
|
2337
|
-
throw error;
|
|
2338
|
-
}
|
|
2339
|
-
if (!response) {
|
|
2340
|
-
response = new runtime.TextApiResponse(rawResponse);
|
|
2341
|
-
}
|
|
2342
|
-
return await response.value();
|
|
2343
|
-
}
|
|
2344
2130
|
/**
|
|
2345
2131
|
* Attempts to void an authorized transaction
|
|
2346
2132
|
* Void a transaction
|
|
@@ -2538,6 +2324,7 @@ export const SearchTransactionsStatusEnum = {
|
|
|
2538
2324
|
BuyerApprovalPending: 'buyerApprovalPending',
|
|
2539
2325
|
Authorized: 'authorized',
|
|
2540
2326
|
AuthorizationFailed: 'authorizationFailed',
|
|
2327
|
+
CaptureFailed: 'captureFailed',
|
|
2541
2328
|
Declined: 'declined',
|
|
2542
2329
|
CapturePending: 'capturePending',
|
|
2543
2330
|
Captured: 'captured',
|
|
@@ -28,12 +28,18 @@ export interface ConnectorServiceTokenEntity {
|
|
|
28
28
|
* @memberof ConnectorServiceTokenEntity
|
|
29
29
|
*/
|
|
30
30
|
token: string;
|
|
31
|
+
/**
|
|
32
|
+
* The id of the connector associated with the connector service token.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof ConnectorServiceTokenEntity
|
|
35
|
+
*/
|
|
36
|
+
connectorId: string;
|
|
31
37
|
/**
|
|
32
38
|
* The connector of the connector service token.
|
|
33
|
-
* @type {
|
|
39
|
+
* @type {string}
|
|
34
40
|
* @memberof ConnectorServiceTokenEntity
|
|
35
41
|
*/
|
|
36
|
-
connector:
|
|
42
|
+
connector: ConnectorServiceTokenEntityConnectorEnum;
|
|
37
43
|
/**
|
|
38
44
|
* The date and time the token was created.
|
|
39
45
|
* @type {Date}
|
|
@@ -53,6 +59,16 @@ export interface ConnectorServiceTokenEntity {
|
|
|
53
59
|
*/
|
|
54
60
|
approvalUrl?: string;
|
|
55
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const ConnectorServiceTokenEntityConnectorEnum: {
|
|
66
|
+
readonly Epay: "EPAY";
|
|
67
|
+
readonly Nmi: "NMI";
|
|
68
|
+
readonly AuthorizeNet: "AUTHORIZE_NET";
|
|
69
|
+
readonly ChannelPayments: "CHANNEL_PAYMENTS";
|
|
70
|
+
};
|
|
71
|
+
export type ConnectorServiceTokenEntityConnectorEnum = typeof ConnectorServiceTokenEntityConnectorEnum[keyof typeof ConnectorServiceTokenEntityConnectorEnum];
|
|
56
72
|
/**
|
|
57
73
|
* Check if a given object implements the ConnectorServiceTokenEntity interface.
|
|
58
74
|
*/
|
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
import { exists, removeNullUndefined } from '../runtime';
|
|
10
|
+
/**
|
|
11
|
+
* @export
|
|
12
|
+
*/
|
|
13
|
+
export const ConnectorServiceTokenEntityConnectorEnum = {
|
|
14
|
+
Epay: 'EPAY',
|
|
15
|
+
Nmi: 'NMI',
|
|
16
|
+
AuthorizeNet: 'AUTHORIZE_NET',
|
|
17
|
+
ChannelPayments: 'CHANNEL_PAYMENTS'
|
|
18
|
+
};
|
|
10
19
|
/**
|
|
11
20
|
* Check if a given object implements the ConnectorServiceTokenEntity interface.
|
|
12
21
|
*/
|
|
@@ -15,6 +24,7 @@ export function instanceOfConnectorServiceTokenEntity(value) {
|
|
|
15
24
|
isInstance = isInstance && "paymentMethodId" in value;
|
|
16
25
|
isInstance = isInstance && "connectorServiceTokenId" in value;
|
|
17
26
|
isInstance = isInstance && "token" in value;
|
|
27
|
+
isInstance = isInstance && "connectorId" in value;
|
|
18
28
|
isInstance = isInstance && "connector" in value;
|
|
19
29
|
isInstance = isInstance && "createdAt" in value;
|
|
20
30
|
isInstance = isInstance && "updatedAt" in value;
|
|
@@ -31,6 +41,7 @@ export function ConnectorServiceTokenEntityFromJSONTyped(json, ignoreDiscriminat
|
|
|
31
41
|
'paymentMethodId': json['paymentMethodId'],
|
|
32
42
|
'connectorServiceTokenId': json['connectorServiceTokenId'],
|
|
33
43
|
'token': json['token'],
|
|
44
|
+
'connectorId': json['connectorId'],
|
|
34
45
|
'connector': json['connector'],
|
|
35
46
|
'createdAt': (new Date(json['createdAt'])),
|
|
36
47
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
@@ -49,6 +60,7 @@ export function ConnectorServiceTokenEntityToJSON(value) {
|
|
|
49
60
|
'paymentMethodId': value.paymentMethodId,
|
|
50
61
|
'connectorServiceTokenId': value.connectorServiceTokenId,
|
|
51
62
|
'token': value.token,
|
|
63
|
+
'connectorId': value.connectorId,
|
|
52
64
|
'connector': value.connector,
|
|
53
65
|
'createdAt': (value.createdAt.toISOString()),
|
|
54
66
|
'updatedAt': (value.updatedAt.toISOString()),
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel Payments API
|
|
3
|
+
*
|
|
4
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @export
|
|
10
|
+
* @interface CreateProvisionedCardTokenByMerchantDto
|
|
11
|
+
*/
|
|
12
|
+
export interface CreateProvisionedCardTokenByMerchantDto {
|
|
13
|
+
/**
|
|
14
|
+
* The id of the payment method to provision.
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof CreateProvisionedCardTokenByMerchantDto
|
|
17
|
+
*/
|
|
18
|
+
paymentMethodId: string;
|
|
19
|
+
/**
|
|
20
|
+
* The 3 or 4 digit code often found on the back of the card. Often referred to as the CVV or CVD. Must be unset if method is ACH.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof CreateProvisionedCardTokenByMerchantDto
|
|
23
|
+
*/
|
|
24
|
+
securityCode?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The connector to provision the payment method with.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof CreateProvisionedCardTokenByMerchantDto
|
|
29
|
+
*/
|
|
30
|
+
connector: CreateProvisionedCardTokenByMerchantDtoConnectorEnum;
|
|
31
|
+
/**
|
|
32
|
+
* The url to redirect the user to after the payment method is provisioned.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof CreateProvisionedCardTokenByMerchantDto
|
|
35
|
+
*/
|
|
36
|
+
redirectUrl?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The id of the merchant associated to the payment method.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof CreateProvisionedCardTokenByMerchantDto
|
|
41
|
+
*/
|
|
42
|
+
merchantId: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @export
|
|
46
|
+
*/
|
|
47
|
+
export declare const CreateProvisionedCardTokenByMerchantDtoConnectorEnum: {
|
|
48
|
+
readonly Epay: "EPAY";
|
|
49
|
+
readonly Nmi: "NMI";
|
|
50
|
+
readonly AuthorizeNet: "AUTHORIZE_NET";
|
|
51
|
+
};
|
|
52
|
+
export type CreateProvisionedCardTokenByMerchantDtoConnectorEnum = typeof CreateProvisionedCardTokenByMerchantDtoConnectorEnum[keyof typeof CreateProvisionedCardTokenByMerchantDtoConnectorEnum];
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the CreateProvisionedCardTokenByMerchantDto interface.
|
|
55
|
+
*/
|
|
56
|
+
export declare function instanceOfCreateProvisionedCardTokenByMerchantDto(value: object): boolean;
|
|
57
|
+
export declare function CreateProvisionedCardTokenByMerchantDtoFromJSON(json: any): CreateProvisionedCardTokenByMerchantDto;
|
|
58
|
+
export declare function CreateProvisionedCardTokenByMerchantDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProvisionedCardTokenByMerchantDto;
|
|
59
|
+
export declare function CreateProvisionedCardTokenByMerchantDtoToJSON(value?: CreateProvisionedCardTokenByMerchantDto | null): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Channel Payments API
|
|
5
|
+
*
|
|
6
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
import { exists, removeNullUndefined } from '../runtime';
|
|
10
|
+
/**
|
|
11
|
+
* @export
|
|
12
|
+
*/
|
|
13
|
+
export const CreateProvisionedCardTokenByMerchantDtoConnectorEnum = {
|
|
14
|
+
Epay: 'EPAY',
|
|
15
|
+
Nmi: 'NMI',
|
|
16
|
+
AuthorizeNet: 'AUTHORIZE_NET'
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the CreateProvisionedCardTokenByMerchantDto interface.
|
|
20
|
+
*/
|
|
21
|
+
export function instanceOfCreateProvisionedCardTokenByMerchantDto(value) {
|
|
22
|
+
let isInstance = true;
|
|
23
|
+
isInstance = isInstance && "paymentMethodId" in value;
|
|
24
|
+
isInstance = isInstance && "connector" in value;
|
|
25
|
+
isInstance = isInstance && "merchantId" in value;
|
|
26
|
+
return isInstance;
|
|
27
|
+
}
|
|
28
|
+
export function CreateProvisionedCardTokenByMerchantDtoFromJSON(json) {
|
|
29
|
+
return CreateProvisionedCardTokenByMerchantDtoFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function CreateProvisionedCardTokenByMerchantDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if ((json === undefined) || (json === null)) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
const typed = {
|
|
36
|
+
'paymentMethodId': json['paymentMethodId'],
|
|
37
|
+
'securityCode': !exists(json, 'securityCode') ? undefined : json['securityCode'],
|
|
38
|
+
'connector': json['connector'],
|
|
39
|
+
'redirectUrl': !exists(json, 'redirectUrl') ? undefined : json['redirectUrl'],
|
|
40
|
+
'merchantId': json['merchantId'],
|
|
41
|
+
};
|
|
42
|
+
return removeNullUndefined(typed);
|
|
43
|
+
}
|
|
44
|
+
export function CreateProvisionedCardTokenByMerchantDtoToJSON(value) {
|
|
45
|
+
if (value === undefined) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
if (value === null) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'paymentMethodId': value.paymentMethodId,
|
|
53
|
+
'securityCode': value.securityCode,
|
|
54
|
+
'connector': value.connector,
|
|
55
|
+
'redirectUrl': value.redirectUrl,
|
|
56
|
+
'merchantId': value.merchantId,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -109,6 +109,12 @@ export interface TransactionEntity {
|
|
|
109
109
|
* @memberof TransactionEntity
|
|
110
110
|
*/
|
|
111
111
|
cvvResponseCode?: string;
|
|
112
|
+
/**
|
|
113
|
+
* The authorization code of the transaction.
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof TransactionEntity
|
|
116
|
+
*/
|
|
117
|
+
authCode?: string;
|
|
112
118
|
/**
|
|
113
119
|
* The authorized amount of the transaction.
|
|
114
120
|
* @type {number}
|
|
@@ -238,6 +244,7 @@ export declare const TransactionEntityStatusEnum: {
|
|
|
238
244
|
readonly BuyerApprovalPending: "buyerApprovalPending";
|
|
239
245
|
readonly Authorized: "authorized";
|
|
240
246
|
readonly AuthorizationFailed: "authorizationFailed";
|
|
247
|
+
readonly CaptureFailed: "captureFailed";
|
|
241
248
|
readonly Declined: "declined";
|
|
242
249
|
readonly CapturePending: "capturePending";
|
|
243
250
|
readonly Captured: "captured";
|
|
@@ -18,6 +18,7 @@ export const TransactionEntityStatusEnum = {
|
|
|
18
18
|
BuyerApprovalPending: 'buyerApprovalPending',
|
|
19
19
|
Authorized: 'authorized',
|
|
20
20
|
AuthorizationFailed: 'authorizationFailed',
|
|
21
|
+
CaptureFailed: 'captureFailed',
|
|
21
22
|
Declined: 'declined',
|
|
22
23
|
CapturePending: 'capturePending',
|
|
23
24
|
Captured: 'captured',
|
|
@@ -94,6 +95,7 @@ export function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
94
95
|
'rawResponseDescription': !exists(json, 'rawResponseDescription') ? undefined : json['rawResponseDescription'],
|
|
95
96
|
'avsResponseCode': !exists(json, 'avsResponseCode') ? undefined : json['avsResponseCode'],
|
|
96
97
|
'cvvResponseCode': !exists(json, 'cvvResponseCode') ? undefined : json['cvvResponseCode'],
|
|
98
|
+
'authCode': !exists(json, 'authCode') ? undefined : json['authCode'],
|
|
97
99
|
'authorizedAmount': !exists(json, 'authorizedAmount') ? undefined : json['authorizedAmount'],
|
|
98
100
|
'capturedAmount': !exists(json, 'capturedAmount') ? undefined : json['capturedAmount'],
|
|
99
101
|
'settledAmount': !exists(json, 'settledAmount') ? undefined : json['settledAmount'],
|
|
@@ -141,6 +143,7 @@ export function TransactionEntityToJSON(value) {
|
|
|
141
143
|
'rawResponseDescription': value.rawResponseDescription,
|
|
142
144
|
'avsResponseCode': value.avsResponseCode,
|
|
143
145
|
'cvvResponseCode': value.cvvResponseCode,
|
|
146
|
+
'authCode': value.authCode,
|
|
144
147
|
'authorizedAmount': value.authorizedAmount,
|
|
145
148
|
'capturedAmount': value.capturedAmount,
|
|
146
149
|
'settledAmount': value.settledAmount,
|
|
@@ -37,9 +37,9 @@ export * from './CreateMerchantConnectorWithoutMerchantAccountIdDto';
|
|
|
37
37
|
export * from './CreateMerchantCredentialsDto';
|
|
38
38
|
export * from './CreateMerchantDto';
|
|
39
39
|
export * from './CreatePaymentMethodDto';
|
|
40
|
+
export * from './CreateProvisionedCardTokenByMerchantDto';
|
|
40
41
|
export * from './CreateProvisionedCardTokenDto';
|
|
41
42
|
export * from './CreateStoredCardPaymentMethod';
|
|
42
|
-
export * from './CreateTransactionNoteDto';
|
|
43
43
|
export * from './CreateTransactionRefundDto';
|
|
44
44
|
export * from './CreateTransactionRequestDto';
|
|
45
45
|
export * from './CreateUserDto';
|
|
@@ -82,7 +82,6 @@ export * from './UpdateMerchantCredentialsDto';
|
|
|
82
82
|
export * from './UpdateMerchantDto';
|
|
83
83
|
export * from './UpdatePaymentMethodStatusDto';
|
|
84
84
|
export * from './UpdateSelfDto';
|
|
85
|
-
export * from './UpdateTransactionNoteDto';
|
|
86
85
|
export * from './UpdateUserDto';
|
|
87
86
|
export * from './UpdateWebhookDto';
|
|
88
87
|
export * from './UserEntity';
|
package/dist/mjs/models/index.js
CHANGED
|
@@ -39,9 +39,9 @@ export * from './CreateMerchantConnectorWithoutMerchantAccountIdDto';
|
|
|
39
39
|
export * from './CreateMerchantCredentialsDto';
|
|
40
40
|
export * from './CreateMerchantDto';
|
|
41
41
|
export * from './CreatePaymentMethodDto';
|
|
42
|
+
export * from './CreateProvisionedCardTokenByMerchantDto';
|
|
42
43
|
export * from './CreateProvisionedCardTokenDto';
|
|
43
44
|
export * from './CreateStoredCardPaymentMethod';
|
|
44
|
-
export * from './CreateTransactionNoteDto';
|
|
45
45
|
export * from './CreateTransactionRefundDto';
|
|
46
46
|
export * from './CreateTransactionRequestDto';
|
|
47
47
|
export * from './CreateUserDto';
|
|
@@ -84,7 +84,6 @@ export * from './UpdateMerchantCredentialsDto';
|
|
|
84
84
|
export * from './UpdateMerchantDto';
|
|
85
85
|
export * from './UpdatePaymentMethodStatusDto';
|
|
86
86
|
export * from './UpdateSelfDto';
|
|
87
|
-
export * from './UpdateTransactionNoteDto';
|
|
88
87
|
export * from './UpdateUserDto';
|
|
89
88
|
export * from './UpdateWebhookDto';
|
|
90
89
|
export * from './UserEntity';
|