@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
|
@@ -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";
|
|
@@ -512,81 +512,6 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
512
512
|
return yield response.value();
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
|
-
/**
|
|
516
|
-
* Attempts to create a transaction note
|
|
517
|
-
* Create transaction note
|
|
518
|
-
*/
|
|
519
|
-
createTransactionNote(createTransactionNoteDto) {
|
|
520
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
521
|
-
if (createTransactionNoteDto === null || createTransactionNoteDto === undefined) {
|
|
522
|
-
throw new runtime.RequiredError('createTransactionNoteDto', 'Required parameter \'createTransactionNoteDto\' was null or undefined when calling createTransactionNote.');
|
|
523
|
-
}
|
|
524
|
-
if (createTransactionNoteDto.documentId === null || createTransactionNoteDto.documentId === undefined) {
|
|
525
|
-
throw new runtime.RequiredError('createTransactionNoteDto.documentId', 'Required parameter \'createTransactionNoteDto.documentId\' was null or undefined when calling createTransactionNote.');
|
|
526
|
-
}
|
|
527
|
-
if (createTransactionNoteDto.content === null || createTransactionNoteDto.content === undefined) {
|
|
528
|
-
throw new runtime.RequiredError('createTransactionNoteDto.content', 'Required parameter \'createTransactionNoteDto.content\' was null or undefined when calling createTransactionNote.');
|
|
529
|
-
}
|
|
530
|
-
const queryParameters = {};
|
|
531
|
-
const headerParameters = {};
|
|
532
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
533
|
-
const rawResponse = yield this.request({
|
|
534
|
-
path: `/transaction-notes`,
|
|
535
|
-
method: 'POST',
|
|
536
|
-
headers: headerParameters,
|
|
537
|
-
query: queryParameters,
|
|
538
|
-
body: (0, models_1.CreateTransactionNoteDtoToJSON)(createTransactionNoteDto),
|
|
539
|
-
});
|
|
540
|
-
let response;
|
|
541
|
-
if (rawResponse.status === 201) {
|
|
542
|
-
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.TransactionNoteEntityFromJSON)(jsonValue));
|
|
543
|
-
}
|
|
544
|
-
if (rawResponse.status === 400) {
|
|
545
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
546
|
-
const error = yield errorResponse.value();
|
|
547
|
-
throw error;
|
|
548
|
-
}
|
|
549
|
-
if (rawResponse.status === 401) {
|
|
550
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
551
|
-
const error = yield errorResponse.value();
|
|
552
|
-
throw error;
|
|
553
|
-
}
|
|
554
|
-
if (rawResponse.status === 403) {
|
|
555
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
556
|
-
const error = yield errorResponse.value();
|
|
557
|
-
throw error;
|
|
558
|
-
}
|
|
559
|
-
if (rawResponse.status === 404) {
|
|
560
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
561
|
-
const error = yield errorResponse.value();
|
|
562
|
-
throw error;
|
|
563
|
-
}
|
|
564
|
-
if (rawResponse.status === 500) {
|
|
565
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
566
|
-
const error = yield errorResponse.value();
|
|
567
|
-
throw error;
|
|
568
|
-
}
|
|
569
|
-
if (rawResponse.status === 502) {
|
|
570
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
571
|
-
const error = yield errorResponse.value();
|
|
572
|
-
throw error;
|
|
573
|
-
}
|
|
574
|
-
if (rawResponse.status === 503) {
|
|
575
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
576
|
-
const error = yield errorResponse.value();
|
|
577
|
-
throw error;
|
|
578
|
-
}
|
|
579
|
-
if (rawResponse.status === 504) {
|
|
580
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
581
|
-
const error = yield errorResponse.value();
|
|
582
|
-
throw error;
|
|
583
|
-
}
|
|
584
|
-
if (!response) {
|
|
585
|
-
response = new runtime.TextApiResponse(rawResponse);
|
|
586
|
-
}
|
|
587
|
-
return yield response.value();
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
515
|
/**
|
|
591
516
|
* Removes a buyer ID.
|
|
592
517
|
* Remove buyer.
|
|
@@ -788,73 +713,6 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
788
713
|
return yield response.value();
|
|
789
714
|
});
|
|
790
715
|
}
|
|
791
|
-
/**
|
|
792
|
-
* Attempts to delete a transaction note.
|
|
793
|
-
* Delete transaction note.
|
|
794
|
-
*/
|
|
795
|
-
deleteTransactionNote(noteId) {
|
|
796
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
797
|
-
if (noteId === null || noteId === undefined) {
|
|
798
|
-
throw new runtime.RequiredError('noteId', 'Required parameter \'noteId\' was null or undefined when calling deleteTransactionNote.');
|
|
799
|
-
}
|
|
800
|
-
const queryParameters = {};
|
|
801
|
-
const headerParameters = {};
|
|
802
|
-
const rawResponse = yield this.request({
|
|
803
|
-
path: `/transaction-notes/{noteId}`.replace(`{${"noteId"}}`, encodeURIComponent(noteId)),
|
|
804
|
-
method: 'DELETE',
|
|
805
|
-
headers: headerParameters,
|
|
806
|
-
query: queryParameters,
|
|
807
|
-
});
|
|
808
|
-
let response;
|
|
809
|
-
if (rawResponse.status === 200) {
|
|
810
|
-
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.TransactionNoteEntityFromJSON)(jsonValue));
|
|
811
|
-
}
|
|
812
|
-
if (rawResponse.status === 400) {
|
|
813
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
814
|
-
const error = yield errorResponse.value();
|
|
815
|
-
throw error;
|
|
816
|
-
}
|
|
817
|
-
if (rawResponse.status === 401) {
|
|
818
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
819
|
-
const error = yield errorResponse.value();
|
|
820
|
-
throw error;
|
|
821
|
-
}
|
|
822
|
-
if (rawResponse.status === 403) {
|
|
823
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
824
|
-
const error = yield errorResponse.value();
|
|
825
|
-
throw error;
|
|
826
|
-
}
|
|
827
|
-
if (rawResponse.status === 404) {
|
|
828
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
829
|
-
const error = yield errorResponse.value();
|
|
830
|
-
throw error;
|
|
831
|
-
}
|
|
832
|
-
if (rawResponse.status === 500) {
|
|
833
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
834
|
-
const error = yield errorResponse.value();
|
|
835
|
-
throw error;
|
|
836
|
-
}
|
|
837
|
-
if (rawResponse.status === 502) {
|
|
838
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
839
|
-
const error = yield errorResponse.value();
|
|
840
|
-
throw error;
|
|
841
|
-
}
|
|
842
|
-
if (rawResponse.status === 503) {
|
|
843
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
844
|
-
const error = yield errorResponse.value();
|
|
845
|
-
throw error;
|
|
846
|
-
}
|
|
847
|
-
if (rawResponse.status === 504) {
|
|
848
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
849
|
-
const error = yield errorResponse.value();
|
|
850
|
-
throw error;
|
|
851
|
-
}
|
|
852
|
-
if (!response) {
|
|
853
|
-
response = new runtime.TextApiResponse(rawResponse);
|
|
854
|
-
}
|
|
855
|
-
return yield response.value();
|
|
856
|
-
});
|
|
857
|
-
}
|
|
858
716
|
/**
|
|
859
717
|
* Find a buyer by buyer ID.
|
|
860
718
|
* Find buyer.
|
|
@@ -1742,7 +1600,7 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
1742
1600
|
});
|
|
1743
1601
|
let response;
|
|
1744
1602
|
if (rawResponse.status === 200) {
|
|
1745
|
-
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) =>
|
|
1603
|
+
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ChangeNotificationsSearchEntityFromJSON)(jsonValue));
|
|
1746
1604
|
}
|
|
1747
1605
|
if (rawResponse.status === 400) {
|
|
1748
1606
|
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
@@ -2021,7 +1879,7 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
2021
1879
|
});
|
|
2022
1880
|
let response;
|
|
2023
1881
|
if (rawResponse.status === 200) {
|
|
2024
|
-
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) =>
|
|
1882
|
+
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ReturnNotificationsSearchEntityFromJSON)(jsonValue));
|
|
2025
1883
|
}
|
|
2026
1884
|
if (rawResponse.status === 400) {
|
|
2027
1885
|
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
@@ -2370,84 +2228,6 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
2370
2228
|
return yield response.value();
|
|
2371
2229
|
});
|
|
2372
2230
|
}
|
|
2373
|
-
/**
|
|
2374
|
-
* Updates an existing transaction note.
|
|
2375
|
-
* Update transaction note.
|
|
2376
|
-
*/
|
|
2377
|
-
updateTransactionNote(noteId, updateTransactionNoteDto) {
|
|
2378
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
2379
|
-
if (noteId === null || noteId === undefined) {
|
|
2380
|
-
throw new runtime.RequiredError('noteId', 'Required parameter \'noteId\' was null or undefined when calling updateTransactionNote.');
|
|
2381
|
-
}
|
|
2382
|
-
if (updateTransactionNoteDto === null || updateTransactionNoteDto === undefined) {
|
|
2383
|
-
throw new runtime.RequiredError('updateTransactionNoteDto', 'Required parameter \'updateTransactionNoteDto\' was null or undefined when calling updateTransactionNote.');
|
|
2384
|
-
}
|
|
2385
|
-
if (updateTransactionNoteDto.content === null || updateTransactionNoteDto.content === undefined) {
|
|
2386
|
-
throw new runtime.RequiredError('updateTransactionNoteDto.content', 'Required parameter \'updateTransactionNoteDto.content\' was null or undefined when calling updateTransactionNote.');
|
|
2387
|
-
}
|
|
2388
|
-
if (updateTransactionNoteDto.noteId === null || updateTransactionNoteDto.noteId === undefined) {
|
|
2389
|
-
throw new runtime.RequiredError('updateTransactionNoteDto.noteId', 'Required parameter \'updateTransactionNoteDto.noteId\' was null or undefined when calling updateTransactionNote.');
|
|
2390
|
-
}
|
|
2391
|
-
const queryParameters = {};
|
|
2392
|
-
const headerParameters = {};
|
|
2393
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
2394
|
-
const rawResponse = yield this.request({
|
|
2395
|
-
path: `/transaction-notes/{noteId}`.replace(`{${"noteId"}}`, encodeURIComponent(noteId)),
|
|
2396
|
-
method: 'PATCH',
|
|
2397
|
-
headers: headerParameters,
|
|
2398
|
-
query: queryParameters,
|
|
2399
|
-
body: (0, models_1.UpdateTransactionNoteDtoToJSON)(updateTransactionNoteDto),
|
|
2400
|
-
});
|
|
2401
|
-
let response;
|
|
2402
|
-
if (rawResponse.status === 200) {
|
|
2403
|
-
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.TransactionNoteEntityFromJSON)(jsonValue));
|
|
2404
|
-
}
|
|
2405
|
-
if (rawResponse.status === 400) {
|
|
2406
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
2407
|
-
const error = yield errorResponse.value();
|
|
2408
|
-
throw error;
|
|
2409
|
-
}
|
|
2410
|
-
if (rawResponse.status === 401) {
|
|
2411
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
2412
|
-
const error = yield errorResponse.value();
|
|
2413
|
-
throw error;
|
|
2414
|
-
}
|
|
2415
|
-
if (rawResponse.status === 403) {
|
|
2416
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
2417
|
-
const error = yield errorResponse.value();
|
|
2418
|
-
throw error;
|
|
2419
|
-
}
|
|
2420
|
-
if (rawResponse.status === 404) {
|
|
2421
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
2422
|
-
const error = yield errorResponse.value();
|
|
2423
|
-
throw error;
|
|
2424
|
-
}
|
|
2425
|
-
if (rawResponse.status === 500) {
|
|
2426
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
2427
|
-
const error = yield errorResponse.value();
|
|
2428
|
-
throw error;
|
|
2429
|
-
}
|
|
2430
|
-
if (rawResponse.status === 502) {
|
|
2431
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
2432
|
-
const error = yield errorResponse.value();
|
|
2433
|
-
throw error;
|
|
2434
|
-
}
|
|
2435
|
-
if (rawResponse.status === 503) {
|
|
2436
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
2437
|
-
const error = yield errorResponse.value();
|
|
2438
|
-
throw error;
|
|
2439
|
-
}
|
|
2440
|
-
if (rawResponse.status === 504) {
|
|
2441
|
-
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
|
|
2442
|
-
const error = yield errorResponse.value();
|
|
2443
|
-
throw error;
|
|
2444
|
-
}
|
|
2445
|
-
if (!response) {
|
|
2446
|
-
response = new runtime.TextApiResponse(rawResponse);
|
|
2447
|
-
}
|
|
2448
|
-
return yield response.value();
|
|
2449
|
-
});
|
|
2450
|
-
}
|
|
2451
2231
|
/**
|
|
2452
2232
|
* Attempts to void an authorized transaction
|
|
2453
2233
|
* Void a transaction
|
|
@@ -2648,6 +2428,7 @@ exports.SearchTransactionsStatusEnum = {
|
|
|
2648
2428
|
BuyerApprovalPending: 'buyerApprovalPending',
|
|
2649
2429
|
Authorized: 'authorized',
|
|
2650
2430
|
AuthorizationFailed: 'authorizationFailed',
|
|
2431
|
+
CaptureFailed: 'captureFailed',
|
|
2651
2432
|
Declined: 'declined',
|
|
2652
2433
|
CapturePending: 'capturePending',
|
|
2653
2434
|
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
|
*/
|
|
@@ -8,11 +8,21 @@
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.ConnectorServiceTokenEntityConnectorEnum = void 0;
|
|
11
12
|
exports.instanceOfConnectorServiceTokenEntity = instanceOfConnectorServiceTokenEntity;
|
|
12
13
|
exports.ConnectorServiceTokenEntityFromJSON = ConnectorServiceTokenEntityFromJSON;
|
|
13
14
|
exports.ConnectorServiceTokenEntityFromJSONTyped = ConnectorServiceTokenEntityFromJSONTyped;
|
|
14
15
|
exports.ConnectorServiceTokenEntityToJSON = ConnectorServiceTokenEntityToJSON;
|
|
15
16
|
const runtime_1 = require("../runtime");
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
exports.ConnectorServiceTokenEntityConnectorEnum = {
|
|
21
|
+
Epay: 'EPAY',
|
|
22
|
+
Nmi: 'NMI',
|
|
23
|
+
AuthorizeNet: 'AUTHORIZE_NET',
|
|
24
|
+
ChannelPayments: 'CHANNEL_PAYMENTS'
|
|
25
|
+
};
|
|
16
26
|
/**
|
|
17
27
|
* Check if a given object implements the ConnectorServiceTokenEntity interface.
|
|
18
28
|
*/
|
|
@@ -21,6 +31,7 @@ function instanceOfConnectorServiceTokenEntity(value) {
|
|
|
21
31
|
isInstance = isInstance && "paymentMethodId" in value;
|
|
22
32
|
isInstance = isInstance && "connectorServiceTokenId" in value;
|
|
23
33
|
isInstance = isInstance && "token" in value;
|
|
34
|
+
isInstance = isInstance && "connectorId" in value;
|
|
24
35
|
isInstance = isInstance && "connector" in value;
|
|
25
36
|
isInstance = isInstance && "createdAt" in value;
|
|
26
37
|
isInstance = isInstance && "updatedAt" in value;
|
|
@@ -37,6 +48,7 @@ function ConnectorServiceTokenEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
48
|
'paymentMethodId': json['paymentMethodId'],
|
|
38
49
|
'connectorServiceTokenId': json['connectorServiceTokenId'],
|
|
39
50
|
'token': json['token'],
|
|
51
|
+
'connectorId': json['connectorId'],
|
|
40
52
|
'connector': json['connector'],
|
|
41
53
|
'createdAt': (new Date(json['createdAt'])),
|
|
42
54
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
@@ -55,6 +67,7 @@ function ConnectorServiceTokenEntityToJSON(value) {
|
|
|
55
67
|
'paymentMethodId': value.paymentMethodId,
|
|
56
68
|
'connectorServiceTokenId': value.connectorServiceTokenId,
|
|
57
69
|
'token': value.token,
|
|
70
|
+
'connectorId': value.connectorId,
|
|
58
71
|
'connector': value.connector,
|
|
59
72
|
'createdAt': (value.createdAt.toISOString()),
|
|
60
73
|
'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,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Channel Payments API
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.CreateProvisionedCardTokenByMerchantDtoConnectorEnum = void 0;
|
|
12
|
+
exports.instanceOfCreateProvisionedCardTokenByMerchantDto = instanceOfCreateProvisionedCardTokenByMerchantDto;
|
|
13
|
+
exports.CreateProvisionedCardTokenByMerchantDtoFromJSON = CreateProvisionedCardTokenByMerchantDtoFromJSON;
|
|
14
|
+
exports.CreateProvisionedCardTokenByMerchantDtoFromJSONTyped = CreateProvisionedCardTokenByMerchantDtoFromJSONTyped;
|
|
15
|
+
exports.CreateProvisionedCardTokenByMerchantDtoToJSON = CreateProvisionedCardTokenByMerchantDtoToJSON;
|
|
16
|
+
const runtime_1 = require("../runtime");
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
exports.CreateProvisionedCardTokenByMerchantDtoConnectorEnum = {
|
|
21
|
+
Epay: 'EPAY',
|
|
22
|
+
Nmi: 'NMI',
|
|
23
|
+
AuthorizeNet: 'AUTHORIZE_NET'
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the CreateProvisionedCardTokenByMerchantDto interface.
|
|
27
|
+
*/
|
|
28
|
+
function instanceOfCreateProvisionedCardTokenByMerchantDto(value) {
|
|
29
|
+
let isInstance = true;
|
|
30
|
+
isInstance = isInstance && "paymentMethodId" in value;
|
|
31
|
+
isInstance = isInstance && "connector" in value;
|
|
32
|
+
isInstance = isInstance && "merchantId" in value;
|
|
33
|
+
return isInstance;
|
|
34
|
+
}
|
|
35
|
+
function CreateProvisionedCardTokenByMerchantDtoFromJSON(json) {
|
|
36
|
+
return CreateProvisionedCardTokenByMerchantDtoFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function CreateProvisionedCardTokenByMerchantDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if ((json === undefined) || (json === null)) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
const typed = {
|
|
43
|
+
'paymentMethodId': json['paymentMethodId'],
|
|
44
|
+
'securityCode': !(0, runtime_1.exists)(json, 'securityCode') ? undefined : json['securityCode'],
|
|
45
|
+
'connector': json['connector'],
|
|
46
|
+
'redirectUrl': !(0, runtime_1.exists)(json, 'redirectUrl') ? undefined : json['redirectUrl'],
|
|
47
|
+
'merchantId': json['merchantId'],
|
|
48
|
+
};
|
|
49
|
+
return (0, runtime_1.removeNullUndefined)(typed);
|
|
50
|
+
}
|
|
51
|
+
function CreateProvisionedCardTokenByMerchantDtoToJSON(value) {
|
|
52
|
+
if (value === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
if (value === null) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'paymentMethodId': value.paymentMethodId,
|
|
60
|
+
'securityCode': value.securityCode,
|
|
61
|
+
'connector': value.connector,
|
|
62
|
+
'redirectUrl': value.redirectUrl,
|
|
63
|
+
'merchantId': value.merchantId,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -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";
|
|
@@ -25,6 +25,7 @@ exports.TransactionEntityStatusEnum = {
|
|
|
25
25
|
BuyerApprovalPending: 'buyerApprovalPending',
|
|
26
26
|
Authorized: 'authorized',
|
|
27
27
|
AuthorizationFailed: 'authorizationFailed',
|
|
28
|
+
CaptureFailed: 'captureFailed',
|
|
28
29
|
Declined: 'declined',
|
|
29
30
|
CapturePending: 'capturePending',
|
|
30
31
|
Captured: 'captured',
|
|
@@ -101,6 +102,7 @@ function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
101
102
|
'rawResponseDescription': !(0, runtime_1.exists)(json, 'rawResponseDescription') ? undefined : json['rawResponseDescription'],
|
|
102
103
|
'avsResponseCode': !(0, runtime_1.exists)(json, 'avsResponseCode') ? undefined : json['avsResponseCode'],
|
|
103
104
|
'cvvResponseCode': !(0, runtime_1.exists)(json, 'cvvResponseCode') ? undefined : json['cvvResponseCode'],
|
|
105
|
+
'authCode': !(0, runtime_1.exists)(json, 'authCode') ? undefined : json['authCode'],
|
|
104
106
|
'authorizedAmount': !(0, runtime_1.exists)(json, 'authorizedAmount') ? undefined : json['authorizedAmount'],
|
|
105
107
|
'capturedAmount': !(0, runtime_1.exists)(json, 'capturedAmount') ? undefined : json['capturedAmount'],
|
|
106
108
|
'settledAmount': !(0, runtime_1.exists)(json, 'settledAmount') ? undefined : json['settledAmount'],
|
|
@@ -148,6 +150,7 @@ function TransactionEntityToJSON(value) {
|
|
|
148
150
|
'rawResponseDescription': value.rawResponseDescription,
|
|
149
151
|
'avsResponseCode': value.avsResponseCode,
|
|
150
152
|
'cvvResponseCode': value.cvvResponseCode,
|
|
153
|
+
'authCode': value.authCode,
|
|
151
154
|
'authorizedAmount': value.authorizedAmount,
|
|
152
155
|
'capturedAmount': value.capturedAmount,
|
|
153
156
|
'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/cjs/models/index.js
CHANGED
|
@@ -55,9 +55,9 @@ __exportStar(require("./CreateMerchantConnectorWithoutMerchantAccountIdDto"), ex
|
|
|
55
55
|
__exportStar(require("./CreateMerchantCredentialsDto"), exports);
|
|
56
56
|
__exportStar(require("./CreateMerchantDto"), exports);
|
|
57
57
|
__exportStar(require("./CreatePaymentMethodDto"), exports);
|
|
58
|
+
__exportStar(require("./CreateProvisionedCardTokenByMerchantDto"), exports);
|
|
58
59
|
__exportStar(require("./CreateProvisionedCardTokenDto"), exports);
|
|
59
60
|
__exportStar(require("./CreateStoredCardPaymentMethod"), exports);
|
|
60
|
-
__exportStar(require("./CreateTransactionNoteDto"), exports);
|
|
61
61
|
__exportStar(require("./CreateTransactionRefundDto"), exports);
|
|
62
62
|
__exportStar(require("./CreateTransactionRequestDto"), exports);
|
|
63
63
|
__exportStar(require("./CreateUserDto"), exports);
|
|
@@ -100,7 +100,6 @@ __exportStar(require("./UpdateMerchantCredentialsDto"), exports);
|
|
|
100
100
|
__exportStar(require("./UpdateMerchantDto"), exports);
|
|
101
101
|
__exportStar(require("./UpdatePaymentMethodStatusDto"), exports);
|
|
102
102
|
__exportStar(require("./UpdateSelfDto"), exports);
|
|
103
|
-
__exportStar(require("./UpdateTransactionNoteDto"), exports);
|
|
104
103
|
__exportStar(require("./UpdateUserDto"), exports);
|
|
105
104
|
__exportStar(require("./UpdateWebhookDto"), exports);
|
|
106
105
|
__exportStar(require("./UserEntity"), exports);
|