cashfree-pg 3.2.0 → 4.0.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/dist/api.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Cashfree Payment Gateway APIs
6
6
  * Cashfree\'s Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites.
7
7
  *
8
- * The version of the OpenAPI document: 2022-09-01
8
+ * The version of the OpenAPI document: 2023-08-01
9
9
  * Contact: developers@cashfree.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -266,6 +266,110 @@ exports.UpiChannelEnum = {
266
266
  QRCODE: 'qrcode',
267
267
  UNKNOWN_DEFAULT_OPEN_API: '11184809'
268
268
  };
269
+ /**
270
+ * CustomersApi - axios parameter creator
271
+ * @export
272
+ */
273
+ const CustomersApiAxiosParamCreator = function (configuration) {
274
+ return {
275
+ /**
276
+ * Create Customer at Cashfree
277
+ * @summary Create Customer at Cashfree
278
+
279
+ * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
280
+ * @param {CreateCustomerRequest} CreateCustomerRequest Request to create a new customer at Cashfree
281
+ * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
282
+ * @param {string} [x_idempotency_key] An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.
283
+ * @param {*} [options] Override http request option.
284
+ * @throws {RequiredError}
285
+ * x_idempotency_key?: string,
286
+ */
287
+ pGCreateCustomer: (x_api_version, CreateCustomerRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
288
+ // verify required parameter 'x_api_version' is not null or undefined
289
+ (0, common_1.assertParamExists)('pGCreateCustomer', 'x_api_version', x_api_version);
290
+ // verify required parameter 'CreateCustomerRequest' is not null or undefined
291
+ (0, common_1.assertParamExists)('pGCreateCustomer', 'CreateCustomerRequest', CreateCustomerRequest);
292
+ const localVarPath = `/customers`;
293
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
294
+ var url = "https://sandbox.cashfree.com/pg";
295
+ if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
296
+ url = "https://api.cashfree.com/pg";
297
+ }
298
+ const localVarUrlObj = new URL(localVarPath, url);
299
+ let baseOptions;
300
+ if (configuration) {
301
+ baseOptions = configuration.baseOptions;
302
+ }
303
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
304
+ const localVarHeaderParameter = {};
305
+ const localVarQueryParameter = {};
306
+ // authentication XPartnerAPIKey required
307
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
308
+ // authentication XClientSecret required
309
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
310
+ // authentication XPartnerMerchantID required
311
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
312
+ // authentication XClientID required
313
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
314
+ // authentication XClientSignatureHeader required
315
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
316
+ localVarHeaderParameter['Content-Type'] = 'application/json';
317
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
318
+ if (x_api_version != null && x_api_version != undefined) {
319
+ localVarHeaderParameter['x-api-version'] = x_api_version;
320
+ }
321
+ if (x_request_id != null && x_request_id != undefined) {
322
+ localVarHeaderParameter['x-request-id'] = x_request_id;
323
+ }
324
+ if (x_idempotency_key != null && x_idempotency_key != undefined) {
325
+ localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
326
+ }
327
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
328
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
329
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
330
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(CreateCustomerRequest, localVarRequestOptions, configuration);
331
+ return {
332
+ url: (0, common_1.toPathString)(localVarUrlObj),
333
+ options: localVarRequestOptions,
334
+ };
335
+ }),
336
+ };
337
+ };
338
+ /**
339
+ * CustomersApi - functional programming interface
340
+ * @export
341
+ */
342
+ const CustomersApiFp = function (configuration) {
343
+ const localVarAxiosParamCreator = CustomersApiAxiosParamCreator(configuration);
344
+ return {
345
+ /**
346
+ * Create Customer at Cashfree
347
+ * @summary Create Customer at Cashfree
348
+ * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
349
+ * @param {CreateCustomerRequest} CreateCustomerRequest Request to create a new customer at Cashfree
350
+ * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
351
+ * @param {string} [x_idempotency_key] An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.
352
+ * @param {*} [options] Override http request option.
353
+ * @throws {RequiredError}
354
+ */
355
+ pGCreateCustomer(x_api_version, CreateCustomerRequest, x_request_id, x_idempotency_key, options) {
356
+ return __awaiter(this, void 0, void 0, function* () {
357
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.pGCreateCustomer(x_api_version, CreateCustomerRequest, x_request_id, x_idempotency_key, options);
358
+ var url = "https://sandbox.cashfree.com/pg";
359
+ if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
360
+ url = "https://api.cashfree.com/pg";
361
+ }
362
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
363
+ });
364
+ },
365
+ };
366
+ };
367
+ /**
368
+ * CustomersApi - object-oriented interface
369
+ * @export
370
+ * @class CustomersApi
371
+ * @extends {BaseAPI}
372
+ */
269
373
  /**
270
374
  * EligibilityApi - axios parameter creator
271
375
  * @export
@@ -274,7 +378,7 @@ const EligibilityApiAxiosParamCreator = function (configuration) {
274
378
  return {
275
379
  /**
276
380
  * Use this API to get eligible Cardless EMI Payment Methods available for a customer on an order basis their phone number.
277
- * @summary Get Eligible Cardless EMI
381
+ * @summary Get Eligible Cardless EMI Payment Methods for a customer on an order
278
382
 
279
383
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
280
384
  * @param {EligibilityFetchCardlessEMIRequest} EligibilityFetchCardlessEMIRequest Request Body to get eligible cardless emi options for a customer and order
@@ -314,7 +418,7 @@ const EligibilityApiAxiosParamCreator = function (configuration) {
314
418
  // authentication XClientSignatureHeader required
315
419
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
316
420
  localVarHeaderParameter['Content-Type'] = 'application/json';
317
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
421
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
318
422
  if (x_api_version != null && x_api_version != undefined) {
319
423
  localVarHeaderParameter['x-api-version'] = x_api_version;
320
424
  }
@@ -335,7 +439,7 @@ const EligibilityApiAxiosParamCreator = function (configuration) {
335
439
  }),
336
440
  /**
337
441
  * Use this API to get eligible offers for an order_id or order amount.
338
- * @summary Get Eligible Offers
442
+ * @summary Get Eligible Offers for an Order
339
443
 
340
444
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
341
445
  * @param {EligibilityFetchOffersRequest} EligibilityFetchOffersRequest Request Body to get eligible offers for a customer and order
@@ -375,7 +479,7 @@ const EligibilityApiAxiosParamCreator = function (configuration) {
375
479
  // authentication XClientSignatureHeader required
376
480
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
377
481
  localVarHeaderParameter['Content-Type'] = 'application/json';
378
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
482
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
379
483
  if (x_api_version != null && x_api_version != undefined) {
380
484
  localVarHeaderParameter['x-api-version'] = x_api_version;
381
485
  }
@@ -396,7 +500,7 @@ const EligibilityApiAxiosParamCreator = function (configuration) {
396
500
  }),
397
501
  /**
398
502
  * Use this API to get eligible Paylater Payment Methods for a customer on an order.
399
- * @summary Get Eligible Paylater
503
+ * @summary Get Eligible Paylater for a customer on an order
400
504
 
401
505
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
402
506
  * @param {EligibilityFetchPaylaterRequest} EligibilityFetchPaylaterRequest Request Body to get eligible paylater options for a customer and order
@@ -436,7 +540,7 @@ const EligibilityApiAxiosParamCreator = function (configuration) {
436
540
  // authentication XClientSignatureHeader required
437
541
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
438
542
  localVarHeaderParameter['Content-Type'] = 'application/json';
439
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
543
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
440
544
  if (x_api_version != null && x_api_version != undefined) {
441
545
  localVarHeaderParameter['x-api-version'] = x_api_version;
442
546
  }
@@ -457,7 +561,7 @@ const EligibilityApiAxiosParamCreator = function (configuration) {
457
561
  }),
458
562
  /**
459
563
  * Use this API to get eligible Payment Methods
460
- * @summary Get Eligible Payment Methods
564
+ * @summary Get eligible Payment Methods
461
565
 
462
566
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
463
567
  * @param {EligibilityFetchPaymentMethodsRequest} EligibilityFetchPaymentMethodsRequest Request Body to get eligible payment methods for an account and order
@@ -497,7 +601,7 @@ const EligibilityApiAxiosParamCreator = function (configuration) {
497
601
  // authentication XClientSignatureHeader required
498
602
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
499
603
  localVarHeaderParameter['Content-Type'] = 'application/json';
500
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
604
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
501
605
  if (x_api_version != null && x_api_version != undefined) {
502
606
  localVarHeaderParameter['x-api-version'] = x_api_version;
503
607
  }
@@ -527,7 +631,7 @@ const EligibilityApiFp = function (configuration) {
527
631
  return {
528
632
  /**
529
633
  * Use this API to get eligible Cardless EMI Payment Methods available for a customer on an order basis their phone number.
530
- * @summary Get Eligible Cardless EMI
634
+ * @summary Get Eligible Cardless EMI Payment Methods for a customer on an order
531
635
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
532
636
  * @param {EligibilityFetchCardlessEMIRequest} EligibilityFetchCardlessEMIRequest Request Body to get eligible cardless emi options for a customer and order
533
637
  * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
@@ -547,7 +651,7 @@ const EligibilityApiFp = function (configuration) {
547
651
  },
548
652
  /**
549
653
  * Use this API to get eligible offers for an order_id or order amount.
550
- * @summary Get Eligible Offers
654
+ * @summary Get Eligible Offers for an Order
551
655
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
552
656
  * @param {EligibilityFetchOffersRequest} EligibilityFetchOffersRequest Request Body to get eligible offers for a customer and order
553
657
  * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
@@ -567,7 +671,7 @@ const EligibilityApiFp = function (configuration) {
567
671
  },
568
672
  /**
569
673
  * Use this API to get eligible Paylater Payment Methods for a customer on an order.
570
- * @summary Get Eligible Paylater
674
+ * @summary Get Eligible Paylater for a customer on an order
571
675
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
572
676
  * @param {EligibilityFetchPaylaterRequest} EligibilityFetchPaylaterRequest Request Body to get eligible paylater options for a customer and order
573
677
  * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
@@ -587,7 +691,7 @@ const EligibilityApiFp = function (configuration) {
587
691
  },
588
692
  /**
589
693
  * Use this API to get eligible Payment Methods
590
- * @summary Get Eligible Payment Methods
694
+ * @summary Get eligible Payment Methods
591
695
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
592
696
  * @param {EligibilityFetchPaymentMethodsRequest} EligibilityFetchPaymentMethodsRequest Request Body to get eligible payment methods for an account and order
593
697
  * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
@@ -661,7 +765,7 @@ const OffersApiAxiosParamCreator = function (configuration) {
661
765
  // authentication XClientSignatureHeader required
662
766
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
663
767
  localVarHeaderParameter['Content-Type'] = 'application/json';
664
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
768
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
665
769
  if (x_api_version != null && x_api_version != undefined) {
666
770
  localVarHeaderParameter['x-api-version'] = x_api_version;
667
771
  }
@@ -722,7 +826,7 @@ const OffersApiAxiosParamCreator = function (configuration) {
722
826
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
723
827
  // authentication XClientSignatureHeader required
724
828
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
725
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
829
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
726
830
  if (x_api_version != null && x_api_version != undefined) {
727
831
  localVarHeaderParameter['x-api-version'] = x_api_version;
728
832
  }
@@ -845,7 +949,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
845
949
  // authentication XClientSignatureHeader required
846
950
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
847
951
  localVarHeaderParameter['Content-Type'] = 'application/json';
848
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
952
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
849
953
  if (x_api_version != null && x_api_version != undefined) {
850
954
  localVarHeaderParameter['x-api-version'] = x_api_version;
851
955
  }
@@ -906,7 +1010,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
906
1010
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
907
1011
  // authentication XClientSignatureHeader required
908
1012
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
909
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
1013
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
910
1014
  if (x_api_version != null && x_api_version != undefined) {
911
1015
  localVarHeaderParameter['x-api-version'] = x_api_version;
912
1016
  }
@@ -924,6 +1028,71 @@ const OrdersApiAxiosParamCreator = function (configuration) {
924
1028
  options: localVarRequestOptions,
925
1029
  };
926
1030
  }),
1031
+ /**
1032
+ * Use this API to terminate the order that was created at Cashfree\'s using the `order_id`.
1033
+ * @summary Terminate Order
1034
+
1035
+ * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
1036
+ * @param {string} order_id The id which uniquely identifies your order
1037
+ * @param {TerminateOrderRequest} TerminateOrderRequest Request body to terminate an order at cashfree
1038
+ * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
1039
+ * @param {string} [x_idempotency_key] An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.
1040
+ * @param {*} [options] Override http request option.
1041
+ * @throws {RequiredError}
1042
+ * x_request_id?: string,
1043
+ */
1044
+ pGTerminateOrder: (x_api_version, order_id, TerminateOrderRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
1045
+ // verify required parameter 'x_api_version' is not null or undefined
1046
+ (0, common_1.assertParamExists)('pGTerminateOrder', 'x_api_version', x_api_version);
1047
+ // verify required parameter 'order_id' is not null or undefined
1048
+ (0, common_1.assertParamExists)('pGTerminateOrder', 'order_id', order_id);
1049
+ // verify required parameter 'TerminateOrderRequest' is not null or undefined
1050
+ (0, common_1.assertParamExists)('pGTerminateOrder', 'TerminateOrderRequest', TerminateOrderRequest);
1051
+ const localVarPath = `/orders/{order_id}`
1052
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
1053
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1054
+ var url = "https://sandbox.cashfree.com/pg";
1055
+ if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
1056
+ url = "https://api.cashfree.com/pg";
1057
+ }
1058
+ const localVarUrlObj = new URL(localVarPath, url);
1059
+ let baseOptions;
1060
+ if (configuration) {
1061
+ baseOptions = configuration.baseOptions;
1062
+ }
1063
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
1064
+ const localVarHeaderParameter = {};
1065
+ const localVarQueryParameter = {};
1066
+ // authentication XPartnerAPIKey required
1067
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
1068
+ // authentication XClientSecret required
1069
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
1070
+ // authentication XPartnerMerchantID required
1071
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
1072
+ // authentication XClientID required
1073
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
1074
+ // authentication XClientSignatureHeader required
1075
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
1076
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1077
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1078
+ if (x_api_version != null && x_api_version != undefined) {
1079
+ localVarHeaderParameter['x-api-version'] = x_api_version;
1080
+ }
1081
+ if (x_request_id != null && x_request_id != undefined) {
1082
+ localVarHeaderParameter['x-request-id'] = x_request_id;
1083
+ }
1084
+ if (x_idempotency_key != null && x_idempotency_key != undefined) {
1085
+ localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
1086
+ }
1087
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1088
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1089
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1090
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(TerminateOrderRequest, localVarRequestOptions, configuration);
1091
+ return {
1092
+ url: (0, common_1.toPathString)(localVarUrlObj),
1093
+ options: localVarRequestOptions,
1094
+ };
1095
+ }),
927
1096
  };
928
1097
  };
929
1098
  /**
@@ -973,6 +1142,27 @@ const OrdersApiFp = function (configuration) {
973
1142
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
974
1143
  });
975
1144
  },
1145
+ /**
1146
+ * Use this API to terminate the order that was created at Cashfree\'s using the `order_id`.
1147
+ * @summary Terminate Order
1148
+ * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
1149
+ * @param {string} order_id The id which uniquely identifies your order
1150
+ * @param {TerminateOrderRequest} TerminateOrderRequest Request body to terminate an order at cashfree
1151
+ * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
1152
+ * @param {string} [x_idempotency_key] An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.
1153
+ * @param {*} [options] Override http request option.
1154
+ * @throws {RequiredError}
1155
+ */
1156
+ pGTerminateOrder(x_api_version, order_id, TerminateOrderRequest, x_request_id, x_idempotency_key, options) {
1157
+ return __awaiter(this, void 0, void 0, function* () {
1158
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.pGTerminateOrder(x_api_version, order_id, TerminateOrderRequest, x_request_id, x_idempotency_key, options);
1159
+ var url = "https://sandbox.cashfree.com/pg";
1160
+ if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
1161
+ url = "https://api.cashfree.com/pg";
1162
+ }
1163
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
1164
+ });
1165
+ },
976
1166
  };
977
1167
  };
978
1168
  /**
@@ -1031,7 +1221,7 @@ const PGReconciliationApiAxiosParamCreator = function (configuration) {
1031
1221
  // authentication XClientSignatureHeader required
1032
1222
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
1033
1223
  localVarHeaderParameter['Content-Type'] = 'application/json';
1034
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
1224
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1035
1225
  if (x_api_version != null && x_api_version != undefined) {
1036
1226
  localVarHeaderParameter['x-api-version'] = x_api_version;
1037
1227
  }
@@ -1137,7 +1327,7 @@ const PaymentLinksApiAxiosParamCreator = function (configuration) {
1137
1327
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
1138
1328
  // authentication XClientSignatureHeader required
1139
1329
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
1140
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
1330
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1141
1331
  if (x_api_version != null && x_api_version != undefined) {
1142
1332
  localVarHeaderParameter['x-api-version'] = x_api_version;
1143
1333
  }
@@ -1197,7 +1387,7 @@ const PaymentLinksApiAxiosParamCreator = function (configuration) {
1197
1387
  // authentication XClientSignatureHeader required
1198
1388
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
1199
1389
  localVarHeaderParameter['Content-Type'] = 'application/json';
1200
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
1390
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1201
1391
  if (x_api_version != null && x_api_version != undefined) {
1202
1392
  localVarHeaderParameter['x-api-version'] = x_api_version;
1203
1393
  }
@@ -1258,7 +1448,7 @@ const PaymentLinksApiAxiosParamCreator = function (configuration) {
1258
1448
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
1259
1449
  // authentication XClientSignatureHeader required
1260
1450
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
1261
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
1451
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1262
1452
  if (x_api_version != null && x_api_version != undefined) {
1263
1453
  localVarHeaderParameter['x-api-version'] = x_api_version;
1264
1454
  }
@@ -1318,7 +1508,7 @@ const PaymentLinksApiAxiosParamCreator = function (configuration) {
1318
1508
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
1319
1509
  // authentication XClientSignatureHeader required
1320
1510
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
1321
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
1511
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1322
1512
  if (x_api_version != null && x_api_version != undefined) {
1323
1513
  localVarHeaderParameter['x-api-version'] = x_api_version;
1324
1514
  }
@@ -1485,7 +1675,7 @@ const PaymentsApiAxiosParamCreator = function (configuration) {
1485
1675
  // authentication XClientSignatureHeader required
1486
1676
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
1487
1677
  localVarHeaderParameter['Content-Type'] = 'application/json';
1488
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
1678
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1489
1679
  if (x_api_version != null && x_api_version != undefined) {
1490
1680
  localVarHeaderParameter['x-api-version'] = x_api_version;
1491
1681
  }
@@ -1540,7 +1730,7 @@ const PaymentsApiAxiosParamCreator = function (configuration) {
1540
1730
  const localVarHeaderParameter = {};
1541
1731
  const localVarQueryParameter = {};
1542
1732
  localVarHeaderParameter['Content-Type'] = 'application/json';
1543
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
1733
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1544
1734
  if (x_api_version != null && x_api_version != undefined) {
1545
1735
  localVarHeaderParameter['x-api-version'] = x_api_version;
1546
1736
  }
@@ -1605,7 +1795,7 @@ const PaymentsApiAxiosParamCreator = function (configuration) {
1605
1795
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
1606
1796
  // authentication XClientSignatureHeader required
1607
1797
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
1608
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
1798
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1609
1799
  if (x_api_version != null && x_api_version != undefined) {
1610
1800
  localVarHeaderParameter['x-api-version'] = x_api_version;
1611
1801
  }
@@ -1665,7 +1855,7 @@ const PaymentsApiAxiosParamCreator = function (configuration) {
1665
1855
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
1666
1856
  // authentication XClientSignatureHeader required
1667
1857
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
1668
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
1858
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1669
1859
  if (x_api_version != null && x_api_version != undefined) {
1670
1860
  localVarHeaderParameter['x-api-version'] = x_api_version;
1671
1861
  }
@@ -1715,7 +1905,7 @@ const PaymentsApiAxiosParamCreator = function (configuration) {
1715
1905
  const localVarHeaderParameter = {};
1716
1906
  const localVarQueryParameter = {};
1717
1907
  localVarHeaderParameter['Content-Type'] = 'application/json';
1718
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
1908
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1719
1909
  if (x_api_version != null && x_api_version != undefined) {
1720
1910
  localVarHeaderParameter['x-api-version'] = x_api_version;
1721
1911
  }
@@ -1906,7 +2096,7 @@ const RefundsApiAxiosParamCreator = function (configuration) {
1906
2096
  // authentication XClientSignatureHeader required
1907
2097
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
1908
2098
  localVarHeaderParameter['Content-Type'] = 'application/json';
1909
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
2099
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1910
2100
  if (x_api_version != null && x_api_version != undefined) {
1911
2101
  localVarHeaderParameter['x-api-version'] = x_api_version;
1912
2102
  }
@@ -1971,7 +2161,7 @@ const RefundsApiAxiosParamCreator = function (configuration) {
1971
2161
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
1972
2162
  // authentication XClientSignatureHeader required
1973
2163
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
1974
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
2164
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
1975
2165
  if (x_api_version != null && x_api_version != undefined) {
1976
2166
  localVarHeaderParameter['x-api-version'] = x_api_version;
1977
2167
  }
@@ -2031,7 +2221,7 @@ const RefundsApiAxiosParamCreator = function (configuration) {
2031
2221
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
2032
2222
  // authentication XClientSignatureHeader required
2033
2223
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
2034
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
2224
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
2035
2225
  if (x_api_version != null && x_api_version != undefined) {
2036
2226
  localVarHeaderParameter['x-api-version'] = x_api_version;
2037
2227
  }
@@ -2178,7 +2368,7 @@ const SettlementReconciliationApiAxiosParamCreator = function (configuration) {
2178
2368
  // authentication XClientSignatureHeader required
2179
2369
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
2180
2370
  localVarHeaderParameter['Content-Type'] = 'application/json';
2181
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
2371
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
2182
2372
  if (x_api_version != null && x_api_version != undefined) {
2183
2373
  localVarHeaderParameter['x-api-version'] = x_api_version;
2184
2374
  }
@@ -2241,7 +2431,7 @@ const SettlementReconciliationApiAxiosParamCreator = function (configuration) {
2241
2431
  // authentication XClientSignatureHeader required
2242
2432
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
2243
2433
  localVarHeaderParameter['Content-Type'] = 'application/json';
2244
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
2434
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
2245
2435
  if (x_api_version != null && x_api_version != undefined) {
2246
2436
  localVarHeaderParameter['x-api-version'] = x_api_version;
2247
2437
  }
@@ -2369,7 +2559,7 @@ const SettlementsApiAxiosParamCreator = function (configuration) {
2369
2559
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
2370
2560
  // authentication XClientSignatureHeader required
2371
2561
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
2372
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
2562
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
2373
2563
  if (x_api_version != null && x_api_version != undefined) {
2374
2564
  localVarHeaderParameter['x-api-version'] = x_api_version;
2375
2565
  }
@@ -2472,7 +2662,7 @@ const SoftPOSApiAxiosParamCreator = function (configuration) {
2472
2662
  // authentication XClientSignatureHeader required
2473
2663
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
2474
2664
  localVarHeaderParameter['Content-Type'] = 'application/json';
2475
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
2665
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
2476
2666
  if (x_api_version != null && x_api_version != undefined) {
2477
2667
  localVarHeaderParameter['x-api-version'] = x_api_version;
2478
2668
  }
@@ -2493,7 +2683,7 @@ const SoftPOSApiAxiosParamCreator = function (configuration) {
2493
2683
  }),
2494
2684
  /**
2495
2685
  * Use this API to create a new terminal transaction. To use this API you should first create an order using the Create Order API. Also, you need to enter the terminal details while creating the order and pass the same terminal information while creating a transaction using the below mentioned API.
2496
- * @summary Create Terminal
2686
+ * @summary Create Terminal Transaction
2497
2687
 
2498
2688
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
2499
2689
  * @param {CreateTerminalTransactionRequest} CreateTerminalTransactionRequest Request body to create a terminal transaction
@@ -2533,7 +2723,7 @@ const SoftPOSApiAxiosParamCreator = function (configuration) {
2533
2723
  // authentication XClientSignatureHeader required
2534
2724
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
2535
2725
  localVarHeaderParameter['Content-Type'] = 'application/json';
2536
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
2726
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
2537
2727
  if (x_api_version != null && x_api_version != undefined) {
2538
2728
  localVarHeaderParameter['x-api-version'] = x_api_version;
2539
2729
  }
@@ -2594,7 +2784,7 @@ const SoftPOSApiAxiosParamCreator = function (configuration) {
2594
2784
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
2595
2785
  // authentication XClientSignatureHeader required
2596
2786
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
2597
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
2787
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
2598
2788
  if (x_api_version != null && x_api_version != undefined) {
2599
2789
  localVarHeaderParameter['x-api-version'] = x_api_version;
2600
2790
  }
@@ -2662,7 +2852,7 @@ const SoftPOSApiAxiosParamCreator = function (configuration) {
2662
2852
  if (cf_terminal_id !== undefined) {
2663
2853
  localVarQueryParameter['cf_terminal_id'] = cf_terminal_id;
2664
2854
  }
2665
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
2855
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
2666
2856
  if (x_api_version != null && x_api_version != undefined) {
2667
2857
  localVarHeaderParameter['x-api-version'] = x_api_version;
2668
2858
  }
@@ -2711,7 +2901,7 @@ const SoftPOSApiFp = function (configuration) {
2711
2901
  },
2712
2902
  /**
2713
2903
  * Use this API to create a new terminal transaction. To use this API you should first create an order using the Create Order API. Also, you need to enter the terminal details while creating the order and pass the same terminal information while creating a transaction using the below mentioned API.
2714
- * @summary Create Terminal
2904
+ * @summary Create Terminal Transaction
2715
2905
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
2716
2906
  * @param {CreateTerminalTransactionRequest} CreateTerminalTransactionRequest Request body to create a terminal transaction
2717
2907
  * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
@@ -2830,7 +3020,7 @@ const TokenVaultApiAxiosParamCreator = function (configuration) {
2830
3020
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
2831
3021
  // authentication XClientSignatureHeader required
2832
3022
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
2833
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
3023
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
2834
3024
  if (x_api_version != null && x_api_version != undefined) {
2835
3025
  localVarHeaderParameter['x-api-version'] = x_api_version;
2836
3026
  }
@@ -2894,7 +3084,7 @@ const TokenVaultApiAxiosParamCreator = function (configuration) {
2894
3084
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
2895
3085
  // authentication XClientSignatureHeader required
2896
3086
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
2897
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
3087
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
2898
3088
  if (x_api_version != null && x_api_version != undefined) {
2899
3089
  localVarHeaderParameter['x-api-version'] = x_api_version;
2900
3090
  }
@@ -2960,7 +3150,7 @@ const TokenVaultApiAxiosParamCreator = function (configuration) {
2960
3150
  if (instrument_type !== undefined) {
2961
3151
  localVarQueryParameter['instrument_type'] = instrument_type;
2962
3152
  }
2963
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
3153
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
2964
3154
  if (x_api_version != null && x_api_version != undefined) {
2965
3155
  localVarHeaderParameter['x-api-version'] = x_api_version;
2966
3156
  }
@@ -3024,7 +3214,7 @@ const TokenVaultApiAxiosParamCreator = function (configuration) {
3024
3214
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
3025
3215
  // authentication XClientSignatureHeader required
3026
3216
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
3027
- localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.2.0';
3217
+ localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-4.0.2';
3028
3218
  if (x_api_version != null && x_api_version != undefined) {
3029
3219
  localVarHeaderParameter['x-api-version'] = x_api_version;
3030
3220
  }
@@ -3183,9 +3373,69 @@ class Cashfree {
3183
3373
  }
3184
3374
  throw new Error("Generated signature and received signature did not match.");
3185
3375
  }
3376
+ /**
3377
+ * Create Customer at Cashfree
3378
+ * @summary Create Customer at Cashfree
3379
+ * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
3380
+ * @param {CreateCustomerRequest} CreateCustomerRequest Request to create a new customer at Cashfree
3381
+ * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
3382
+ * @param {string} [x_idempotency_key] An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.
3383
+ * @param {*} [options] Override http request option.
3384
+ * @throws {RequiredError}
3385
+ * @memberof CustomersApi
3386
+ */
3387
+ static PGCreateCustomer(x_api_version, CreateCustomerRequest, x_request_id, x_idempotency_key, options) {
3388
+ if (Cashfree.XEnableErrorAnalytics) {
3389
+ Sentry.init({
3390
+ dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
3391
+ // Performance Monitoring
3392
+ tracesSampleRate: 1.0,
3393
+ // Set sampling rate for profiling - this is relative to tracesSampleRate
3394
+ profilesSampleRate: 1.0,
3395
+ attachStacktrace: true,
3396
+ enableTracing: true,
3397
+ beforeSend: (event) => {
3398
+ delete event.contexts.os;
3399
+ delete event.contexts.device;
3400
+ delete event.server_name;
3401
+ if (event.exception && event.exception.values && event.exception.values[0].stacktrace) {
3402
+ const stackTrace = event.exception.values[0].stacktrace;
3403
+ if (stackTrace && stackTrace.frames) {
3404
+ const filteredDomains = stackTrace.frames.filter((x) => x.filename.includes("cashfree-pg")).map((x) => x.filename);
3405
+ if (filteredDomains[0].includes("cashfree-pg")) {
3406
+ if (Cashfree.XEnableErrorAnalytics) {
3407
+ return event;
3408
+ }
3409
+ return null;
3410
+ }
3411
+ }
3412
+ }
3413
+ return null;
3414
+ },
3415
+ });
3416
+ Sentry.configureScope((scope) => {
3417
+ if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
3418
+ scope.setExtra('environment', 'sandbox');
3419
+ }
3420
+ else {
3421
+ scope.setExtra('environment', 'production');
3422
+ }
3423
+ scope.setExtra('release', "4.0.2");
3424
+ });
3425
+ }
3426
+ try {
3427
+ return CustomersApiFp().pGCreateCustomer(x_api_version, CreateCustomerRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
3428
+ }
3429
+ catch (error) {
3430
+ if (Cashfree.XEnableErrorAnalytics) {
3431
+ Sentry.captureException(error);
3432
+ }
3433
+ throw error;
3434
+ }
3435
+ }
3186
3436
  /**
3187
3437
  * Use this API to get eligible Cardless EMI Payment Methods available for a customer on an order basis their phone number.
3188
- * @summary Get Eligible Cardless EMI
3438
+ * @summary Get Eligible Cardless EMI Payment Methods for a customer on an order
3189
3439
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
3190
3440
  * @param {EligibilityFetchCardlessEMIRequest} EligibilityFetchCardlessEMIRequest Request Body to get eligible cardless emi options for a customer and order
3191
3441
  * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
@@ -3230,7 +3480,7 @@ class Cashfree {
3230
3480
  else {
3231
3481
  scope.setExtra('environment', 'production');
3232
3482
  }
3233
- scope.setExtra('release', "3.2.0");
3483
+ scope.setExtra('release', "4.0.2");
3234
3484
  });
3235
3485
  }
3236
3486
  try {
@@ -3245,7 +3495,7 @@ class Cashfree {
3245
3495
  }
3246
3496
  /**
3247
3497
  * Use this API to get eligible offers for an order_id or order amount.
3248
- * @summary Get Eligible Offers
3498
+ * @summary Get Eligible Offers for an Order
3249
3499
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
3250
3500
  * @param {EligibilityFetchOffersRequest} EligibilityFetchOffersRequest Request Body to get eligible offers for a customer and order
3251
3501
  * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
@@ -3290,7 +3540,7 @@ class Cashfree {
3290
3540
  else {
3291
3541
  scope.setExtra('environment', 'production');
3292
3542
  }
3293
- scope.setExtra('release', "3.2.0");
3543
+ scope.setExtra('release', "4.0.2");
3294
3544
  });
3295
3545
  }
3296
3546
  try {
@@ -3305,7 +3555,7 @@ class Cashfree {
3305
3555
  }
3306
3556
  /**
3307
3557
  * Use this API to get eligible Paylater Payment Methods for a customer on an order.
3308
- * @summary Get Eligible Paylater
3558
+ * @summary Get Eligible Paylater for a customer on an order
3309
3559
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
3310
3560
  * @param {EligibilityFetchPaylaterRequest} EligibilityFetchPaylaterRequest Request Body to get eligible paylater options for a customer and order
3311
3561
  * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
@@ -3350,7 +3600,7 @@ class Cashfree {
3350
3600
  else {
3351
3601
  scope.setExtra('environment', 'production');
3352
3602
  }
3353
- scope.setExtra('release', "3.2.0");
3603
+ scope.setExtra('release', "4.0.2");
3354
3604
  });
3355
3605
  }
3356
3606
  try {
@@ -3365,7 +3615,7 @@ class Cashfree {
3365
3615
  }
3366
3616
  /**
3367
3617
  * Use this API to get eligible Payment Methods
3368
- * @summary Get Eligible Payment Methods
3618
+ * @summary Get eligible Payment Methods
3369
3619
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
3370
3620
  * @param {EligibilityFetchPaymentMethodsRequest} EligibilityFetchPaymentMethodsRequest Request Body to get eligible payment methods for an account and order
3371
3621
  * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
@@ -3410,7 +3660,7 @@ class Cashfree {
3410
3660
  else {
3411
3661
  scope.setExtra('environment', 'production');
3412
3662
  }
3413
- scope.setExtra('release', "3.2.0");
3663
+ scope.setExtra('release', "4.0.2");
3414
3664
  });
3415
3665
  }
3416
3666
  try {
@@ -3470,7 +3720,7 @@ class Cashfree {
3470
3720
  else {
3471
3721
  scope.setExtra('environment', 'production');
3472
3722
  }
3473
- scope.setExtra('release', "3.2.0");
3723
+ scope.setExtra('release', "4.0.2");
3474
3724
  });
3475
3725
  }
3476
3726
  try {
@@ -3530,7 +3780,7 @@ class Cashfree {
3530
3780
  else {
3531
3781
  scope.setExtra('environment', 'production');
3532
3782
  }
3533
- scope.setExtra('release', "3.2.0");
3783
+ scope.setExtra('release', "4.0.2");
3534
3784
  });
3535
3785
  }
3536
3786
  try {
@@ -3590,7 +3840,7 @@ class Cashfree {
3590
3840
  else {
3591
3841
  scope.setExtra('environment', 'production');
3592
3842
  }
3593
- scope.setExtra('release', "3.2.0");
3843
+ scope.setExtra('release', "4.0.2");
3594
3844
  });
3595
3845
  }
3596
3846
  try {
@@ -3650,7 +3900,7 @@ class Cashfree {
3650
3900
  else {
3651
3901
  scope.setExtra('environment', 'production');
3652
3902
  }
3653
- scope.setExtra('release', "3.2.0");
3903
+ scope.setExtra('release', "4.0.2");
3654
3904
  });
3655
3905
  }
3656
3906
  try {
@@ -3663,6 +3913,67 @@ class Cashfree {
3663
3913
  throw error;
3664
3914
  }
3665
3915
  }
3916
+ /**
3917
+ * Use this API to terminate the order that was created at Cashfree\'s using the `order_id`.
3918
+ * @summary Terminate Order
3919
+ * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
3920
+ * @param {string} order_id The id which uniquely identifies your order
3921
+ * @param {TerminateOrderRequest} TerminateOrderRequest Request body to terminate an order at cashfree
3922
+ * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
3923
+ * @param {string} [x_idempotency_key] An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.
3924
+ * @param {*} [options] Override http request option.
3925
+ * @throws {RequiredError}
3926
+ * @memberof OrdersApi
3927
+ */
3928
+ static PGTerminateOrder(x_api_version, order_id, TerminateOrderRequest, x_request_id, x_idempotency_key, options) {
3929
+ if (Cashfree.XEnableErrorAnalytics) {
3930
+ Sentry.init({
3931
+ dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
3932
+ // Performance Monitoring
3933
+ tracesSampleRate: 1.0,
3934
+ // Set sampling rate for profiling - this is relative to tracesSampleRate
3935
+ profilesSampleRate: 1.0,
3936
+ attachStacktrace: true,
3937
+ enableTracing: true,
3938
+ beforeSend: (event) => {
3939
+ delete event.contexts.os;
3940
+ delete event.contexts.device;
3941
+ delete event.server_name;
3942
+ if (event.exception && event.exception.values && event.exception.values[0].stacktrace) {
3943
+ const stackTrace = event.exception.values[0].stacktrace;
3944
+ if (stackTrace && stackTrace.frames) {
3945
+ const filteredDomains = stackTrace.frames.filter((x) => x.filename.includes("cashfree-pg")).map((x) => x.filename);
3946
+ if (filteredDomains[0].includes("cashfree-pg")) {
3947
+ if (Cashfree.XEnableErrorAnalytics) {
3948
+ return event;
3949
+ }
3950
+ return null;
3951
+ }
3952
+ }
3953
+ }
3954
+ return null;
3955
+ },
3956
+ });
3957
+ Sentry.configureScope((scope) => {
3958
+ if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
3959
+ scope.setExtra('environment', 'sandbox');
3960
+ }
3961
+ else {
3962
+ scope.setExtra('environment', 'production');
3963
+ }
3964
+ scope.setExtra('release', "4.0.2");
3965
+ });
3966
+ }
3967
+ try {
3968
+ return OrdersApiFp().pGTerminateOrder(x_api_version, order_id, TerminateOrderRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
3969
+ }
3970
+ catch (error) {
3971
+ if (Cashfree.XEnableErrorAnalytics) {
3972
+ Sentry.captureException(error);
3973
+ }
3974
+ throw error;
3975
+ }
3976
+ }
3666
3977
  /**
3667
3978
  * - Use this API to get the payment gateway reconciliation details with date range. - It will have events for your payment account
3668
3979
  * @summary PG Reconciliation
@@ -3712,7 +4023,7 @@ class Cashfree {
3712
4023
  else {
3713
4024
  scope.setExtra('environment', 'production');
3714
4025
  }
3715
- scope.setExtra('release', "3.2.0");
4026
+ scope.setExtra('release', "4.0.2");
3716
4027
  });
3717
4028
  }
3718
4029
  try {
@@ -3772,7 +4083,7 @@ class Cashfree {
3772
4083
  else {
3773
4084
  scope.setExtra('environment', 'production');
3774
4085
  }
3775
- scope.setExtra('release', "3.2.0");
4086
+ scope.setExtra('release', "4.0.2");
3776
4087
  });
3777
4088
  }
3778
4089
  try {
@@ -3832,7 +4143,7 @@ class Cashfree {
3832
4143
  else {
3833
4144
  scope.setExtra('environment', 'production');
3834
4145
  }
3835
- scope.setExtra('release', "3.2.0");
4146
+ scope.setExtra('release', "4.0.2");
3836
4147
  });
3837
4148
  }
3838
4149
  try {
@@ -3892,7 +4203,7 @@ class Cashfree {
3892
4203
  else {
3893
4204
  scope.setExtra('environment', 'production');
3894
4205
  }
3895
- scope.setExtra('release', "3.2.0");
4206
+ scope.setExtra('release', "4.0.2");
3896
4207
  });
3897
4208
  }
3898
4209
  try {
@@ -3952,7 +4263,7 @@ class Cashfree {
3952
4263
  else {
3953
4264
  scope.setExtra('environment', 'production');
3954
4265
  }
3955
- scope.setExtra('release', "3.2.0");
4266
+ scope.setExtra('release', "4.0.2");
3956
4267
  });
3957
4268
  }
3958
4269
  try {
@@ -4013,7 +4324,7 @@ class Cashfree {
4013
4324
  else {
4014
4325
  scope.setExtra('environment', 'production');
4015
4326
  }
4016
- scope.setExtra('release', "3.2.0");
4327
+ scope.setExtra('release', "4.0.2");
4017
4328
  });
4018
4329
  }
4019
4330
  try {
@@ -4074,7 +4385,7 @@ class Cashfree {
4074
4385
  else {
4075
4386
  scope.setExtra('environment', 'production');
4076
4387
  }
4077
- scope.setExtra('release', "3.2.0");
4388
+ scope.setExtra('release', "4.0.2");
4078
4389
  });
4079
4390
  }
4080
4391
  try {
@@ -4135,7 +4446,7 @@ class Cashfree {
4135
4446
  else {
4136
4447
  scope.setExtra('environment', 'production');
4137
4448
  }
4138
- scope.setExtra('release', "3.2.0");
4449
+ scope.setExtra('release', "4.0.2");
4139
4450
  });
4140
4451
  }
4141
4452
  try {
@@ -4195,7 +4506,7 @@ class Cashfree {
4195
4506
  else {
4196
4507
  scope.setExtra('environment', 'production');
4197
4508
  }
4198
- scope.setExtra('release', "3.2.0");
4509
+ scope.setExtra('release', "4.0.2");
4199
4510
  });
4200
4511
  }
4201
4512
  try {
@@ -4255,7 +4566,7 @@ class Cashfree {
4255
4566
  else {
4256
4567
  scope.setExtra('environment', 'production');
4257
4568
  }
4258
- scope.setExtra('release', "3.2.0");
4569
+ scope.setExtra('release', "4.0.2");
4259
4570
  });
4260
4571
  }
4261
4572
  try {
@@ -4316,7 +4627,7 @@ class Cashfree {
4316
4627
  else {
4317
4628
  scope.setExtra('environment', 'production');
4318
4629
  }
4319
- scope.setExtra('release', "3.2.0");
4630
+ scope.setExtra('release', "4.0.2");
4320
4631
  });
4321
4632
  }
4322
4633
  try {
@@ -4377,7 +4688,7 @@ class Cashfree {
4377
4688
  else {
4378
4689
  scope.setExtra('environment', 'production');
4379
4690
  }
4380
- scope.setExtra('release', "3.2.0");
4691
+ scope.setExtra('release', "4.0.2");
4381
4692
  });
4382
4693
  }
4383
4694
  try {
@@ -4437,7 +4748,7 @@ class Cashfree {
4437
4748
  else {
4438
4749
  scope.setExtra('environment', 'production');
4439
4750
  }
4440
- scope.setExtra('release', "3.2.0");
4751
+ scope.setExtra('release', "4.0.2");
4441
4752
  });
4442
4753
  }
4443
4754
  try {
@@ -4499,7 +4810,7 @@ class Cashfree {
4499
4810
  else {
4500
4811
  scope.setExtra('environment', 'production');
4501
4812
  }
4502
- scope.setExtra('release', "3.2.0");
4813
+ scope.setExtra('release', "4.0.2");
4503
4814
  });
4504
4815
  }
4505
4816
  try {
@@ -4561,7 +4872,7 @@ class Cashfree {
4561
4872
  else {
4562
4873
  scope.setExtra('environment', 'production');
4563
4874
  }
4564
- scope.setExtra('release', "3.2.0");
4875
+ scope.setExtra('release', "4.0.2");
4565
4876
  });
4566
4877
  }
4567
4878
  try {
@@ -4621,7 +4932,7 @@ class Cashfree {
4621
4932
  else {
4622
4933
  scope.setExtra('environment', 'production');
4623
4934
  }
4624
- scope.setExtra('release', "3.2.0");
4935
+ scope.setExtra('release', "4.0.2");
4625
4936
  });
4626
4937
  }
4627
4938
  try {
@@ -4681,7 +4992,7 @@ class Cashfree {
4681
4992
  else {
4682
4993
  scope.setExtra('environment', 'production');
4683
4994
  }
4684
- scope.setExtra('release', "3.2.0");
4995
+ scope.setExtra('release', "4.0.2");
4685
4996
  });
4686
4997
  }
4687
4998
  try {
@@ -4696,7 +5007,7 @@ class Cashfree {
4696
5007
  }
4697
5008
  /**
4698
5009
  * Use this API to create a new terminal transaction. To use this API you should first create an order using the Create Order API. Also, you need to enter the terminal details while creating the order and pass the same terminal information while creating a transaction using the below mentioned API.
4699
- * @summary Create Terminal
5010
+ * @summary Create Terminal Transaction
4700
5011
  * @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
4701
5012
  * @param {CreateTerminalTransactionRequest} CreateTerminalTransactionRequest Request body to create a terminal transaction
4702
5013
  * @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
@@ -4741,7 +5052,7 @@ class Cashfree {
4741
5052
  else {
4742
5053
  scope.setExtra('environment', 'production');
4743
5054
  }
4744
- scope.setExtra('release', "3.2.0");
5055
+ scope.setExtra('release', "4.0.2");
4745
5056
  });
4746
5057
  }
4747
5058
  try {
@@ -4801,7 +5112,7 @@ class Cashfree {
4801
5112
  else {
4802
5113
  scope.setExtra('environment', 'production');
4803
5114
  }
4804
- scope.setExtra('release', "3.2.0");
5115
+ scope.setExtra('release', "4.0.2");
4805
5116
  });
4806
5117
  }
4807
5118
  try {
@@ -4862,7 +5173,7 @@ class Cashfree {
4862
5173
  else {
4863
5174
  scope.setExtra('environment', 'production');
4864
5175
  }
4865
- scope.setExtra('release', "3.2.0");
5176
+ scope.setExtra('release', "4.0.2");
4866
5177
  });
4867
5178
  }
4868
5179
  try {
@@ -4923,7 +5234,7 @@ class Cashfree {
4923
5234
  else {
4924
5235
  scope.setExtra('environment', 'production');
4925
5236
  }
4926
- scope.setExtra('release', "3.2.0");
5237
+ scope.setExtra('release', "4.0.2");
4927
5238
  });
4928
5239
  }
4929
5240
  try {
@@ -4984,7 +5295,7 @@ class Cashfree {
4984
5295
  else {
4985
5296
  scope.setExtra('environment', 'production');
4986
5297
  }
4987
- scope.setExtra('release', "3.2.0");
5298
+ scope.setExtra('release', "4.0.2");
4988
5299
  });
4989
5300
  }
4990
5301
  try {
@@ -5045,7 +5356,7 @@ class Cashfree {
5045
5356
  else {
5046
5357
  scope.setExtra('environment', 'production');
5047
5358
  }
5048
- scope.setExtra('release', "3.2.0");
5359
+ scope.setExtra('release', "4.0.2");
5049
5360
  });
5050
5361
  }
5051
5362
  try {
@@ -5106,7 +5417,7 @@ class Cashfree {
5106
5417
  else {
5107
5418
  scope.setExtra('environment', 'production');
5108
5419
  }
5109
- scope.setExtra('release', "3.2.0");
5420
+ scope.setExtra('release', "4.0.2");
5110
5421
  });
5111
5422
  }
5112
5423
  try {
@@ -5122,5 +5433,5 @@ class Cashfree {
5122
5433
  }
5123
5434
  exports.Cashfree = Cashfree;
5124
5435
  Cashfree.XEnableErrorAnalytics = true;
5125
- Cashfree.XApiVersion = "2022-09-01";
5436
+ Cashfree.XApiVersion = "2023-08-01";
5126
5437
  Cashfree.Environment = new Environment();