@cobo/cobo-waas2 1.13.0 → 1.14.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.
Files changed (137) hide show
  1. package/README.md +52 -5
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/FeeStationApi.js +51 -8
  4. package/dist/api/PaymentApi.js +891 -0
  5. package/dist/api/TransactionsApi.js +6 -6
  6. package/dist/api/WalletsApi.js +143 -0
  7. package/dist/index.js +185 -3
  8. package/dist/model/AddressesEventData.js +18 -3
  9. package/dist/model/BTCBIP137MessageSignDestination.js +1 -1
  10. package/dist/model/BTCBIP322MessageSignDestination.js +1 -1
  11. package/dist/model/ChainsEventData.js +40 -3
  12. package/dist/model/CosmosAdr36MessageSignDestination.js +1 -1
  13. package/dist/model/CreateBankAccountRequest.js +108 -0
  14. package/dist/model/CreateMerchantRequest.js +125 -0
  15. package/dist/model/CreatePaymentOrderRequest.js +206 -0
  16. package/dist/model/CreateRefundRequest.js +192 -0
  17. package/dist/model/CreateSettlement.js +4 -4
  18. package/dist/model/CreateSettlementRequestRequest.js +142 -0
  19. package/dist/model/CreateTokenListingRequest201Response.js +110 -0
  20. package/dist/model/CreateTokenListingRequestRequest.js +147 -0
  21. package/dist/model/FeeStationDestination.js +136 -0
  22. package/dist/model/FeeStationTransfer.js +127 -0
  23. package/dist/model/GetExchangeRate200Response.js +140 -0
  24. package/dist/model/GetRefunds200Response.js +123 -0
  25. package/dist/model/GetSettlementInfoByIds200Response.js +136 -0
  26. package/dist/model/ListMerchants200Response.js +123 -0
  27. package/dist/model/ListPaymentOrders200Response.js +123 -0
  28. package/dist/model/ListSettlementRequests200Response.js +123 -0
  29. package/dist/model/ListTokenBalancesForFeeStation200Response.js +123 -0
  30. package/dist/model/ListTokenBalancesForFeeStation200ResponseDataInner.js +142 -0
  31. package/dist/model/ListTokenListingRequests200Response.js +123 -0
  32. package/dist/model/MPCVaultEventData.js +18 -3
  33. package/dist/model/Merchant.js +2 -2
  34. package/dist/model/Order.js +15 -15
  35. package/dist/model/PaymentOrderEventData.js +479 -0
  36. package/dist/model/PaymentRefundEventData.js +381 -0
  37. package/dist/model/PaymentSettlementEvent.js +285 -0
  38. package/dist/model/PaymentTransaction.js +7 -7
  39. package/dist/model/Refund.js +4 -3
  40. package/dist/model/Settlement.js +4 -4
  41. package/dist/model/SettlementDetail.js +4 -3
  42. package/dist/model/SettlementInfo.js +7 -7
  43. package/dist/model/SwapActivity.js +18 -5
  44. package/dist/model/SwapActivityDetail.js +378 -0
  45. package/dist/model/SwapActivityTimeline.js +135 -0
  46. package/dist/model/SwapQuote.js +6 -4
  47. package/dist/model/{SwapActivityType.js → SwapType.js} +7 -7
  48. package/dist/model/TSSRequestWebhookEventData.js +18 -3
  49. package/dist/model/TokenListingEventData.js +18 -3
  50. package/dist/model/TokensEventData.js +40 -3
  51. package/dist/model/Transaction.js +1 -1
  52. package/dist/model/TransactionBIP137Destination.js +1 -1
  53. package/dist/model/TransactionBIP322Destination.js +1 -1
  54. package/dist/model/TransactionBabylonBusinessInfo.js +1 -1
  55. package/dist/model/TransactionBabylonTxParameters.js +3 -3
  56. package/dist/model/TransactionCoreStakeInfo.js +3 -3
  57. package/dist/model/TransactionCosmosAdr36Destination.js +1 -1
  58. package/dist/model/TransactionDetail.js +2 -2
  59. package/dist/model/TransactionDetails.js +2 -2
  60. package/dist/model/TransactionEvmEip1559Fee.js +13 -0
  61. package/dist/model/TransactionEvmLegacyFee.js +13 -0
  62. package/dist/model/TransactionExtra.js +3 -3
  63. package/dist/model/TransactionFee.js +6 -0
  64. package/dist/model/TransactionFixedFee.js +13 -0
  65. package/dist/model/TransactionMessageSignBTCEIP191Destination.js +1 -1
  66. package/dist/model/TransactionSolContractDestination.js +1 -1
  67. package/dist/model/TransactionUtxoFee.js +13 -0
  68. package/dist/model/TransactionWebhookEventData.js +20 -5
  69. package/dist/model/UpdateMerchantByIdRequest.js +87 -0
  70. package/dist/model/UpdatePaymentOrderRequest.js +106 -0
  71. package/dist/model/WalletInfoEventData.js +18 -3
  72. package/dist/model/WebhookEventData.js +218 -20
  73. package/dist/model/WebhookEventDataType.js +17 -2
  74. package/dist/model/WebhookEventType.js +30 -0
  75. package/docs/AddressesEventData.md +7 -1
  76. package/docs/ChainsEventData.md +9 -1
  77. package/docs/CreateBankAccountRequest.md +9 -0
  78. package/docs/CreateMerchantRequest.md +10 -0
  79. package/docs/CreatePaymentOrderRequest.md +16 -0
  80. package/docs/CreateRefundRequest.md +15 -0
  81. package/docs/CreateSettlement.md +3 -3
  82. package/docs/CreateSettlementRequestRequest.md +10 -0
  83. package/docs/CreateTokenListingRequest201Response.md +9 -0
  84. package/docs/CreateTokenListingRequestRequest.md +12 -0
  85. package/docs/FeeStationApi.md +55 -2
  86. package/docs/FeeStationDestination.md +11 -0
  87. package/docs/FeeStationTransfer.md +10 -0
  88. package/docs/GetExchangeRate200Response.md +11 -0
  89. package/docs/GetRefunds200Response.md +10 -0
  90. package/docs/GetSettlementInfoByIds200Response.md +10 -0
  91. package/docs/ListMerchants200Response.md +10 -0
  92. package/docs/ListPaymentOrders200Response.md +10 -0
  93. package/docs/ListSettlementRequests200Response.md +10 -0
  94. package/docs/ListTokenBalancesForFeeStation200Response.md +10 -0
  95. package/docs/ListTokenBalancesForFeeStation200ResponseDataInner.md +11 -0
  96. package/docs/ListTokenListingRequests200Response.md +10 -0
  97. package/docs/MPCVaultEventData.md +7 -1
  98. package/docs/Merchant.md +1 -1
  99. package/docs/Order.md +8 -8
  100. package/docs/PaymentApi.md +986 -0
  101. package/docs/PaymentOrderEventData.md +55 -0
  102. package/docs/PaymentRefundEventData.md +49 -0
  103. package/docs/PaymentSettlementEvent.md +44 -0
  104. package/docs/PaymentTransaction.md +4 -4
  105. package/docs/Refund.md +3 -3
  106. package/docs/Settlement.md +2 -2
  107. package/docs/SettlementDetail.md +4 -4
  108. package/docs/SettlementInfo.md +6 -6
  109. package/docs/SwapActivity.md +2 -1
  110. package/docs/SwapActivityDetail.md +25 -0
  111. package/docs/SwapActivityTimeline.md +11 -0
  112. package/docs/SwapQuote.md +1 -1
  113. package/docs/{SwapActivityType.md → SwapType.md} +1 -1
  114. package/docs/TSSRequestWebhookEventData.md +7 -1
  115. package/docs/TokenListingEventData.md +7 -1
  116. package/docs/TokensEventData.md +9 -1
  117. package/docs/Transaction.md +1 -1
  118. package/docs/TransactionBabylonTxParameters.md +2 -2
  119. package/docs/TransactionCoreStakeInfo.md +2 -2
  120. package/docs/TransactionDetail.md +1 -1
  121. package/docs/TransactionDetails.md +1 -1
  122. package/docs/TransactionEvmEip1559Fee.md +1 -0
  123. package/docs/TransactionEvmLegacyFee.md +1 -0
  124. package/docs/TransactionExtra.md +3 -3
  125. package/docs/TransactionFee.md +1 -0
  126. package/docs/TransactionFixedFee.md +1 -0
  127. package/docs/TransactionUtxoFee.md +1 -0
  128. package/docs/TransactionWebhookEventData.md +8 -2
  129. package/docs/TransactionsApi.md +3 -3
  130. package/docs/UpdateMerchantByIdRequest.md +9 -0
  131. package/docs/UpdatePaymentOrderRequest.md +9 -0
  132. package/docs/WalletInfoEventData.md +7 -1
  133. package/docs/WalletsApi.md +161 -0
  134. package/docs/WebhookEventData.md +32 -7
  135. package/docs/WebhookEventDataType.md +7 -1
  136. package/docs/WebhookEventType.md +12 -0
  137. package/package.json +1 -1
@@ -0,0 +1,891 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _BankAccount = _interopRequireDefault(require("../model/BankAccount"));
9
+ var _CreateBankAccountRequest = _interopRequireDefault(require("../model/CreateBankAccountRequest"));
10
+ var _CreateMerchantRequest = _interopRequireDefault(require("../model/CreateMerchantRequest"));
11
+ var _CreatePaymentOrderRequest = _interopRequireDefault(require("../model/CreatePaymentOrderRequest"));
12
+ var _CreateRefundRequest = _interopRequireDefault(require("../model/CreateRefundRequest"));
13
+ var _CreateSettlementRequestRequest = _interopRequireDefault(require("../model/CreateSettlementRequestRequest"));
14
+ var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
15
+ var _GetExchangeRate200Response = _interopRequireDefault(require("../model/GetExchangeRate200Response"));
16
+ var _GetRefunds200Response = _interopRequireDefault(require("../model/GetRefunds200Response"));
17
+ var _GetSettlementInfoByIds200Response = _interopRequireDefault(require("../model/GetSettlementInfoByIds200Response"));
18
+ var _ListMerchants200Response = _interopRequireDefault(require("../model/ListMerchants200Response"));
19
+ var _ListPaymentOrders200Response = _interopRequireDefault(require("../model/ListPaymentOrders200Response"));
20
+ var _ListSettlementRequests200Response = _interopRequireDefault(require("../model/ListSettlementRequests200Response"));
21
+ var _Merchant = _interopRequireDefault(require("../model/Merchant"));
22
+ var _Order = _interopRequireDefault(require("../model/Order"));
23
+ var _Refund = _interopRequireDefault(require("../model/Refund"));
24
+ var _Settlement = _interopRequireDefault(require("../model/Settlement"));
25
+ var _UpdateMerchantByIdRequest = _interopRequireDefault(require("../model/UpdateMerchantByIdRequest"));
26
+ var _UpdatePaymentOrderRequest = _interopRequireDefault(require("../model/UpdatePaymentOrderRequest"));
27
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
28
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
29
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
30
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
31
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
32
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
33
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
34
+ * Cobo Wallet as a Service 2.0
35
+ *
36
+ * Contact: help@cobo.com
37
+ *
38
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
39
+ * https://openapi-generator.tech
40
+ * Do not edit the class manually.
41
+ *
42
+ */
43
+ /**
44
+ * Payment service.
45
+ * @module api/PaymentApi
46
+ */
47
+ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
48
+ /**
49
+ * Constructs a new PaymentApi.
50
+ * @alias module:api/PaymentApi
51
+ * @class
52
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
53
+ * default to {@link module:ApiClient#instance} if unspecified.
54
+ */
55
+ function PaymentApi(apiClient) {
56
+ _classCallCheck(this, PaymentApi);
57
+ this.apiClient = apiClient || _ApiClient["default"].instance;
58
+ }
59
+
60
+ /**
61
+ * Create bank account
62
+ * This operation registers a bank account for payment settlement. Upon successful registration, the bank account details can be retrieved using the assigned bank account ID.
63
+ * @param {Object} opts Optional parameters
64
+ * @param {module:model/CreateBankAccountRequest} [CreateBankAccountRequest] The request body to register a bank account.
65
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BankAccount} and HTTP response
66
+ */
67
+ return _createClass(PaymentApi, [{
68
+ key: "createBankAccountWithHttpInfo",
69
+ value: function createBankAccountWithHttpInfo(opts) {
70
+ opts = opts || {};
71
+ var postBody = opts['CreateBankAccountRequest'];
72
+ if (postBody && postBody.toJSON) {
73
+ postBody = postBody.toJSON();
74
+ }
75
+ var pathParams = {};
76
+ var queryParams = {};
77
+ var headerParams = {};
78
+ var formParams = {};
79
+ var authNames = ['OAuth2', 'CoboAuth'];
80
+ var contentTypes = ['application/json'];
81
+ var accepts = ['application/json'];
82
+ var returnType = _BankAccount["default"];
83
+ return this.apiClient.callApi('/payments/bank_accounts', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
84
+ }
85
+
86
+ /**
87
+ * Create bank account
88
+ * This operation registers a bank account for payment settlement. Upon successful registration, the bank account details can be retrieved using the assigned bank account ID.
89
+ * @param {Object} opts Optional parameters
90
+ * @param {module:model/CreateBankAccountRequest} opts.CreateBankAccountRequest The request body to register a bank account.
91
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BankAccount}
92
+ */
93
+ }, {
94
+ key: "createBankAccount",
95
+ value: function createBankAccount(opts) {
96
+ return this.createBankAccountWithHttpInfo(opts).then(function (response_and_data) {
97
+ return response_and_data.data;
98
+ });
99
+ }
100
+
101
+ /**
102
+ * Create merchant
103
+ * This operation creates a merchant and links it to a specified wallet. Payments to the merchant will be deposited into the linked wallet. Upon successful creation, a merchant ID is generated and returned along with the merchant's information.
104
+ * @param {Object} opts Optional parameters
105
+ * @param {module:model/CreateMerchantRequest} [CreateMerchantRequest] The request body to create a merchant.
106
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Merchant} and HTTP response
107
+ */
108
+ }, {
109
+ key: "createMerchantWithHttpInfo",
110
+ value: function createMerchantWithHttpInfo(opts) {
111
+ opts = opts || {};
112
+ var postBody = opts['CreateMerchantRequest'];
113
+ if (postBody && postBody.toJSON) {
114
+ postBody = postBody.toJSON();
115
+ }
116
+ var pathParams = {};
117
+ var queryParams = {};
118
+ var headerParams = {};
119
+ var formParams = {};
120
+ var authNames = ['OAuth2', 'CoboAuth'];
121
+ var contentTypes = ['application/json'];
122
+ var accepts = ['application/json'];
123
+ var returnType = _Merchant["default"];
124
+ return this.apiClient.callApi('/payments/merchants', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
125
+ }
126
+
127
+ /**
128
+ * Create merchant
129
+ * This operation creates a merchant and links it to a specified wallet. Payments to the merchant will be deposited into the linked wallet. Upon successful creation, a merchant ID is generated and returned along with the merchant's information.
130
+ * @param {Object} opts Optional parameters
131
+ * @param {module:model/CreateMerchantRequest} opts.CreateMerchantRequest The request body to create a merchant.
132
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Merchant}
133
+ */
134
+ }, {
135
+ key: "createMerchant",
136
+ value: function createMerchant(opts) {
137
+ return this.createMerchantWithHttpInfo(opts).then(function (response_and_data) {
138
+ return response_and_data.data;
139
+ });
140
+ }
141
+
142
+ /**
143
+ * Create pay-in order
144
+ * This operation creates a pay-in order.
145
+ * @param {Object} opts Optional parameters
146
+ * @param {module:model/CreatePaymentOrderRequest} [CreatePaymentOrderRequest] The request body to create a pay-in order.
147
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Order} and HTTP response
148
+ */
149
+ }, {
150
+ key: "createPaymentOrderWithHttpInfo",
151
+ value: function createPaymentOrderWithHttpInfo(opts) {
152
+ opts = opts || {};
153
+ var postBody = opts['CreatePaymentOrderRequest'];
154
+ if (postBody && postBody.toJSON) {
155
+ postBody = postBody.toJSON();
156
+ }
157
+ var pathParams = {};
158
+ var queryParams = {};
159
+ var headerParams = {};
160
+ var formParams = {};
161
+ var authNames = ['OAuth2', 'CoboAuth'];
162
+ var contentTypes = ['application/json'];
163
+ var accepts = ['application/json'];
164
+ var returnType = _Order["default"];
165
+ return this.apiClient.callApi('/payments/orders', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
166
+ }
167
+
168
+ /**
169
+ * Create pay-in order
170
+ * This operation creates a pay-in order.
171
+ * @param {Object} opts Optional parameters
172
+ * @param {module:model/CreatePaymentOrderRequest} opts.CreatePaymentOrderRequest The request body to create a pay-in order.
173
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order}
174
+ */
175
+ }, {
176
+ key: "createPaymentOrder",
177
+ value: function createPaymentOrder(opts) {
178
+ return this.createPaymentOrderWithHttpInfo(opts).then(function (response_and_data) {
179
+ return response_and_data.data;
180
+ });
181
+ }
182
+
183
+ /**
184
+ * Create refund order
185
+ * This operation creates a refund order to return cryptocurrency to a specified address. When creating a refund order, you can optionally link it to an existing pay-in order for tracking and reconciliation purposes.
186
+ * @param {Object} opts Optional parameters
187
+ * @param {module:model/CreateRefundRequest} [CreateRefundRequest] The request body to create a refund order.
188
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Refund} and HTTP response
189
+ */
190
+ }, {
191
+ key: "createRefundWithHttpInfo",
192
+ value: function createRefundWithHttpInfo(opts) {
193
+ opts = opts || {};
194
+ var postBody = opts['CreateRefundRequest'];
195
+ if (postBody && postBody.toJSON) {
196
+ postBody = postBody.toJSON();
197
+ }
198
+ var pathParams = {};
199
+ var queryParams = {};
200
+ var headerParams = {};
201
+ var formParams = {};
202
+ var authNames = ['OAuth2', 'CoboAuth'];
203
+ var contentTypes = ['application/json'];
204
+ var accepts = ['application/json'];
205
+ var returnType = _Refund["default"];
206
+ return this.apiClient.callApi('/payments/refunds', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
207
+ }
208
+
209
+ /**
210
+ * Create refund order
211
+ * This operation creates a refund order to return cryptocurrency to a specified address. When creating a refund order, you can optionally link it to an existing pay-in order for tracking and reconciliation purposes.
212
+ * @param {Object} opts Optional parameters
213
+ * @param {module:model/CreateRefundRequest} opts.CreateRefundRequest The request body to create a refund order.
214
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Refund}
215
+ */
216
+ }, {
217
+ key: "createRefund",
218
+ value: function createRefund(opts) {
219
+ return this.createRefundWithHttpInfo(opts).then(function (response_and_data) {
220
+ return response_and_data.data;
221
+ });
222
+ }
223
+
224
+ /**
225
+ * Create settlement request
226
+ * This operation creates a settlement request to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single settlement request.
227
+ * @param {Object} opts Optional parameters
228
+ * @param {module:model/CreateSettlementRequestRequest} [CreateSettlementRequestRequest] The request body to create a settlement request.
229
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Settlement} and HTTP response
230
+ */
231
+ }, {
232
+ key: "createSettlementRequestWithHttpInfo",
233
+ value: function createSettlementRequestWithHttpInfo(opts) {
234
+ opts = opts || {};
235
+ var postBody = opts['CreateSettlementRequestRequest'];
236
+ if (postBody && postBody.toJSON) {
237
+ postBody = postBody.toJSON();
238
+ }
239
+ var pathParams = {};
240
+ var queryParams = {};
241
+ var headerParams = {};
242
+ var formParams = {};
243
+ var authNames = ['OAuth2', 'CoboAuth'];
244
+ var contentTypes = ['application/json'];
245
+ var accepts = ['application/json'];
246
+ var returnType = _Settlement["default"];
247
+ return this.apiClient.callApi('/payments/settlement_requests', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
248
+ }
249
+
250
+ /**
251
+ * Create settlement request
252
+ * This operation creates a settlement request to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single settlement request.
253
+ * @param {Object} opts Optional parameters
254
+ * @param {module:model/CreateSettlementRequestRequest} opts.CreateSettlementRequestRequest The request body to create a settlement request.
255
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Settlement}
256
+ */
257
+ }, {
258
+ key: "createSettlementRequest",
259
+ value: function createSettlementRequest(opts) {
260
+ return this.createSettlementRequestWithHttpInfo(opts).then(function (response_and_data) {
261
+ return response_and_data.data;
262
+ });
263
+ }
264
+
265
+ /**
266
+ * Get exchange rate
267
+ * This operation retrieves the current exchange rate between a specified currency pair.
268
+ * @param {String} token_id The token ID, which identifies the cryptocurrency. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
269
+ * @param {String} currency The fiat currency. Currently, only `USD` is supported.
270
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetExchangeRate200Response} and HTTP response
271
+ */
272
+ }, {
273
+ key: "getExchangeRateWithHttpInfo",
274
+ value: function getExchangeRateWithHttpInfo(token_id, currency) {
275
+ var postBody = null;
276
+ if (postBody && postBody.toJSON) {
277
+ postBody = postBody.toJSON();
278
+ }
279
+ // verify the required parameter 'token_id' is set
280
+ if (token_id === undefined || token_id === null) {
281
+ throw new Error("Missing the required parameter 'token_id' when calling getExchangeRate");
282
+ }
283
+ // verify the required parameter 'currency' is set
284
+ if (currency === undefined || currency === null) {
285
+ throw new Error("Missing the required parameter 'currency' when calling getExchangeRate");
286
+ }
287
+ var pathParams = {
288
+ 'token_id': token_id,
289
+ 'currency': currency
290
+ };
291
+ var queryParams = {};
292
+ var headerParams = {};
293
+ var formParams = {};
294
+ var authNames = ['CoboAuth'];
295
+ var contentTypes = [];
296
+ var accepts = ['application/json'];
297
+ var returnType = _GetExchangeRate200Response["default"];
298
+ return this.apiClient.callApi('/payments/exchange_rates/{token_id}/{currency}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
299
+ }
300
+
301
+ /**
302
+ * Get exchange rate
303
+ * This operation retrieves the current exchange rate between a specified currency pair.
304
+ * @param {String} token_id The token ID, which identifies the cryptocurrency. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
305
+ * @param {String} currency The fiat currency. Currently, only `USD` is supported.
306
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetExchangeRate200Response}
307
+ */
308
+ }, {
309
+ key: "getExchangeRate",
310
+ value: function getExchangeRate(token_id, currency) {
311
+ return this.getExchangeRateWithHttpInfo(token_id, currency).then(function (response_and_data) {
312
+ return response_and_data.data;
313
+ });
314
+ }
315
+
316
+ /**
317
+ * Get pay-in order information
318
+ * This operation retrieves details of a specific pay-in order.
319
+ * @param {String} order_id The pay-in order ID.
320
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Order} and HTTP response
321
+ */
322
+ }, {
323
+ key: "getPaymentOrderDetailByIdWithHttpInfo",
324
+ value: function getPaymentOrderDetailByIdWithHttpInfo(order_id) {
325
+ var postBody = null;
326
+ if (postBody && postBody.toJSON) {
327
+ postBody = postBody.toJSON();
328
+ }
329
+ // verify the required parameter 'order_id' is set
330
+ if (order_id === undefined || order_id === null) {
331
+ throw new Error("Missing the required parameter 'order_id' when calling getPaymentOrderDetailById");
332
+ }
333
+ var pathParams = {
334
+ 'order_id': order_id
335
+ };
336
+ var queryParams = {};
337
+ var headerParams = {};
338
+ var formParams = {};
339
+ var authNames = ['OAuth2', 'CoboAuth'];
340
+ var contentTypes = [];
341
+ var accepts = ['application/json'];
342
+ var returnType = _Order["default"];
343
+ return this.apiClient.callApi('/payments/orders/{order_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
344
+ }
345
+
346
+ /**
347
+ * Get pay-in order information
348
+ * This operation retrieves details of a specific pay-in order.
349
+ * @param {String} order_id The pay-in order ID.
350
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order}
351
+ */
352
+ }, {
353
+ key: "getPaymentOrderDetailById",
354
+ value: function getPaymentOrderDetailById(order_id) {
355
+ return this.getPaymentOrderDetailByIdWithHttpInfo(order_id).then(function (response_and_data) {
356
+ return response_and_data.data;
357
+ });
358
+ }
359
+
360
+ /**
361
+ * Get refund order information
362
+ * This operation retrieves the detailed information about a specified refund order.
363
+ * @param {String} refund_id The refund order ID.
364
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Refund} and HTTP response
365
+ */
366
+ }, {
367
+ key: "getRefundDetailByIdWithHttpInfo",
368
+ value: function getRefundDetailByIdWithHttpInfo(refund_id) {
369
+ var postBody = null;
370
+ if (postBody && postBody.toJSON) {
371
+ postBody = postBody.toJSON();
372
+ }
373
+ // verify the required parameter 'refund_id' is set
374
+ if (refund_id === undefined || refund_id === null) {
375
+ throw new Error("Missing the required parameter 'refund_id' when calling getRefundDetailById");
376
+ }
377
+ var pathParams = {
378
+ 'refund_id': refund_id
379
+ };
380
+ var queryParams = {};
381
+ var headerParams = {};
382
+ var formParams = {};
383
+ var authNames = ['OAuth2', 'CoboAuth'];
384
+ var contentTypes = [];
385
+ var accepts = ['application/json'];
386
+ var returnType = _Refund["default"];
387
+ return this.apiClient.callApi('/payments/refunds/{refund_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
388
+ }
389
+
390
+ /**
391
+ * Get refund order information
392
+ * This operation retrieves the detailed information about a specified refund order.
393
+ * @param {String} refund_id The refund order ID.
394
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Refund}
395
+ */
396
+ }, {
397
+ key: "getRefundDetailById",
398
+ value: function getRefundDetailById(refund_id) {
399
+ return this.getRefundDetailByIdWithHttpInfo(refund_id).then(function (response_and_data) {
400
+ return response_and_data.data;
401
+ });
402
+ }
403
+
404
+ /**
405
+ * List all refund orders
406
+ * This operation retrieves the information of all refund orders.
407
+ * @param {Object} opts Optional parameters
408
+ * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
409
+ * @param {String} [before] This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
410
+ * @param {String} [after] This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
411
+ * @param {String} [merchant_id] The merchant ID.
412
+ * @param {String} [request_id] The request ID.
413
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetRefunds200Response} and HTTP response
414
+ */
415
+ }, {
416
+ key: "getRefundsWithHttpInfo",
417
+ value: function getRefundsWithHttpInfo(opts) {
418
+ opts = opts || {};
419
+ var postBody = null;
420
+ if (postBody && postBody.toJSON) {
421
+ postBody = postBody.toJSON();
422
+ }
423
+ var pathParams = {};
424
+ var queryParams = {
425
+ 'limit': opts['limit'],
426
+ 'before': opts['before'],
427
+ 'after': opts['after'],
428
+ 'merchant_id': opts['merchant_id'],
429
+ 'request_id': opts['request_id']
430
+ };
431
+ var headerParams = {};
432
+ var formParams = {};
433
+ var authNames = ['OAuth2', 'CoboAuth'];
434
+ var contentTypes = [];
435
+ var accepts = ['application/json'];
436
+ var returnType = _GetRefunds200Response["default"];
437
+ return this.apiClient.callApi('/payments/refunds', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
438
+ }
439
+
440
+ /**
441
+ * List all refund orders
442
+ * This operation retrieves the information of all refund orders.
443
+ * @param {Object} opts Optional parameters
444
+ * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
445
+ * @param {String} opts.before This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
446
+ * @param {String} opts.after This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
447
+ * @param {String} opts.merchant_id The merchant ID.
448
+ * @param {String} opts.request_id The request ID.
449
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetRefunds200Response}
450
+ */
451
+ }, {
452
+ key: "getRefunds",
453
+ value: function getRefunds(opts) {
454
+ return this.getRefundsWithHttpInfo(opts).then(function (response_and_data) {
455
+ return response_and_data.data;
456
+ });
457
+ }
458
+
459
+ /**
460
+ * Get settlement request information
461
+ * This operation retrieves the information of a specific settlement request.
462
+ * @param {String} settlement_request_id The settlement request ID.
463
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Settlement} and HTTP response
464
+ */
465
+ }, {
466
+ key: "getSettlementByIdWithHttpInfo",
467
+ value: function getSettlementByIdWithHttpInfo(settlement_request_id) {
468
+ var postBody = null;
469
+ if (postBody && postBody.toJSON) {
470
+ postBody = postBody.toJSON();
471
+ }
472
+ // verify the required parameter 'settlement_request_id' is set
473
+ if (settlement_request_id === undefined || settlement_request_id === null) {
474
+ throw new Error("Missing the required parameter 'settlement_request_id' when calling getSettlementById");
475
+ }
476
+ var pathParams = {
477
+ 'settlement_request_id': settlement_request_id
478
+ };
479
+ var queryParams = {};
480
+ var headerParams = {};
481
+ var formParams = {};
482
+ var authNames = ['OAuth2', 'CoboAuth'];
483
+ var contentTypes = [];
484
+ var accepts = ['application/json'];
485
+ var returnType = _Settlement["default"];
486
+ return this.apiClient.callApi('/payments/settlement_requests/{settlement_request_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
487
+ }
488
+
489
+ /**
490
+ * Get settlement request information
491
+ * This operation retrieves the information of a specific settlement request.
492
+ * @param {String} settlement_request_id The settlement request ID.
493
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Settlement}
494
+ */
495
+ }, {
496
+ key: "getSettlementById",
497
+ value: function getSettlementById(settlement_request_id) {
498
+ return this.getSettlementByIdWithHttpInfo(settlement_request_id).then(function (response_and_data) {
499
+ return response_and_data.data;
500
+ });
501
+ }
502
+
503
+ /**
504
+ * Get withdrawable balances
505
+ * This operation retrieves the current withdrawable balances of specified merchants or the developer.
506
+ * @param {Object} opts Optional parameters
507
+ * @param {String} [merchant_ids] A list of merchant IDs to query.
508
+ * @param {String} [currency = 'USD')] The currency for the operation. Currently, only `USD` is supported.
509
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetSettlementInfoByIds200Response} and HTTP response
510
+ */
511
+ }, {
512
+ key: "getSettlementInfoByIdsWithHttpInfo",
513
+ value: function getSettlementInfoByIdsWithHttpInfo(opts) {
514
+ opts = opts || {};
515
+ var postBody = null;
516
+ if (postBody && postBody.toJSON) {
517
+ postBody = postBody.toJSON();
518
+ }
519
+ var pathParams = {};
520
+ var queryParams = {
521
+ 'merchant_ids': opts['merchant_ids'],
522
+ 'currency': opts['currency']
523
+ };
524
+ var headerParams = {};
525
+ var formParams = {};
526
+ var authNames = ['OAuth2', 'CoboAuth'];
527
+ var contentTypes = [];
528
+ var accepts = ['application/json'];
529
+ var returnType = _GetSettlementInfoByIds200Response["default"];
530
+ return this.apiClient.callApi('/payments/settlement_info', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
531
+ }
532
+
533
+ /**
534
+ * Get withdrawable balances
535
+ * This operation retrieves the current withdrawable balances of specified merchants or the developer.
536
+ * @param {Object} opts Optional parameters
537
+ * @param {String} opts.merchant_ids A list of merchant IDs to query.
538
+ * @param {String} opts.currency The currency for the operation. Currently, only `USD` is supported. (default to 'USD')
539
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetSettlementInfoByIds200Response}
540
+ */
541
+ }, {
542
+ key: "getSettlementInfoByIds",
543
+ value: function getSettlementInfoByIds(opts) {
544
+ return this.getSettlementInfoByIdsWithHttpInfo(opts).then(function (response_and_data) {
545
+ return response_and_data.data;
546
+ });
547
+ }
548
+
549
+ /**
550
+ * List all bank accounts
551
+ * This operation retrieves the information of all bank accounts registered.
552
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/BankAccount>} and HTTP response
553
+ */
554
+ }, {
555
+ key: "listBankAccountsWithHttpInfo",
556
+ value: function listBankAccountsWithHttpInfo() {
557
+ var postBody = null;
558
+ if (postBody && postBody.toJSON) {
559
+ postBody = postBody.toJSON();
560
+ }
561
+ var pathParams = {};
562
+ var queryParams = {};
563
+ var headerParams = {};
564
+ var formParams = {};
565
+ var authNames = ['OAuth2', 'CoboAuth'];
566
+ var contentTypes = [];
567
+ var accepts = ['application/json'];
568
+ var returnType = [_BankAccount["default"]];
569
+ return this.apiClient.callApi('/payments/bank_accounts', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
570
+ }
571
+
572
+ /**
573
+ * List all bank accounts
574
+ * This operation retrieves the information of all bank accounts registered.
575
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/BankAccount>}
576
+ */
577
+ }, {
578
+ key: "listBankAccounts",
579
+ value: function listBankAccounts() {
580
+ return this.listBankAccountsWithHttpInfo().then(function (response_and_data) {
581
+ return response_and_data.data;
582
+ });
583
+ }
584
+
585
+ /**
586
+ * List all merchants
587
+ * This operation retrieves the information of all merchants. You can filter the results by using a keyword for fuzzy search on merchant names or by specifying a wallet ID.
588
+ * @param {Object} opts Optional parameters
589
+ * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
590
+ * @param {String} [before] This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
591
+ * @param {String} [after] This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
592
+ * @param {String} [keyword] A search term used for fuzzy matching of merchant names.
593
+ * @param {String} [wallet_id] The wallet ID.
594
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMerchants200Response} and HTTP response
595
+ */
596
+ }, {
597
+ key: "listMerchantsWithHttpInfo",
598
+ value: function listMerchantsWithHttpInfo(opts) {
599
+ opts = opts || {};
600
+ var postBody = null;
601
+ if (postBody && postBody.toJSON) {
602
+ postBody = postBody.toJSON();
603
+ }
604
+ var pathParams = {};
605
+ var queryParams = {
606
+ 'limit': opts['limit'],
607
+ 'before': opts['before'],
608
+ 'after': opts['after'],
609
+ 'keyword': opts['keyword'],
610
+ 'wallet_id': opts['wallet_id']
611
+ };
612
+ var headerParams = {};
613
+ var formParams = {};
614
+ var authNames = ['OAuth2', 'CoboAuth'];
615
+ var contentTypes = [];
616
+ var accepts = ['application/json'];
617
+ var returnType = _ListMerchants200Response["default"];
618
+ return this.apiClient.callApi('/payments/merchants', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
619
+ }
620
+
621
+ /**
622
+ * List all merchants
623
+ * This operation retrieves the information of all merchants. You can filter the results by using a keyword for fuzzy search on merchant names or by specifying a wallet ID.
624
+ * @param {Object} opts Optional parameters
625
+ * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
626
+ * @param {String} opts.before This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
627
+ * @param {String} opts.after This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
628
+ * @param {String} opts.keyword A search term used for fuzzy matching of merchant names.
629
+ * @param {String} opts.wallet_id The wallet ID.
630
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMerchants200Response}
631
+ */
632
+ }, {
633
+ key: "listMerchants",
634
+ value: function listMerchants(opts) {
635
+ return this.listMerchantsWithHttpInfo(opts).then(function (response_and_data) {
636
+ return response_and_data.data;
637
+ });
638
+ }
639
+
640
+ /**
641
+ * List all pay-in orders
642
+ * This operation retrieves the information of all pay-in orders. You can filter the result by merchant ID.
643
+ * @param {Object} opts Optional parameters
644
+ * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
645
+ * @param {String} [before] This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
646
+ * @param {String} [after] This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
647
+ * @param {String} [merchant_id] The merchant ID.
648
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPaymentOrders200Response} and HTTP response
649
+ */
650
+ }, {
651
+ key: "listPaymentOrdersWithHttpInfo",
652
+ value: function listPaymentOrdersWithHttpInfo(opts) {
653
+ opts = opts || {};
654
+ var postBody = null;
655
+ if (postBody && postBody.toJSON) {
656
+ postBody = postBody.toJSON();
657
+ }
658
+ var pathParams = {};
659
+ var queryParams = {
660
+ 'limit': opts['limit'],
661
+ 'before': opts['before'],
662
+ 'after': opts['after'],
663
+ 'merchant_id': opts['merchant_id']
664
+ };
665
+ var headerParams = {};
666
+ var formParams = {};
667
+ var authNames = ['OAuth2', 'CoboAuth'];
668
+ var contentTypes = [];
669
+ var accepts = ['application/json'];
670
+ var returnType = _ListPaymentOrders200Response["default"];
671
+ return this.apiClient.callApi('/payments/orders', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
672
+ }
673
+
674
+ /**
675
+ * List all pay-in orders
676
+ * This operation retrieves the information of all pay-in orders. You can filter the result by merchant ID.
677
+ * @param {Object} opts Optional parameters
678
+ * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
679
+ * @param {String} opts.before This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
680
+ * @param {String} opts.after This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
681
+ * @param {String} opts.merchant_id The merchant ID.
682
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPaymentOrders200Response}
683
+ */
684
+ }, {
685
+ key: "listPaymentOrders",
686
+ value: function listPaymentOrders(opts) {
687
+ return this.listPaymentOrdersWithHttpInfo(opts).then(function (response_and_data) {
688
+ return response_and_data.data;
689
+ });
690
+ }
691
+
692
+ /**
693
+ * List all settlement requests
694
+ * This operation retrieves the information of all settlement requests.
695
+ * @param {Object} opts Optional parameters
696
+ * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
697
+ * @param {String} [before] This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
698
+ * @param {String} [after] This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
699
+ * @param {String} [request_id] The request ID.
700
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSettlementRequests200Response} and HTTP response
701
+ */
702
+ }, {
703
+ key: "listSettlementRequestsWithHttpInfo",
704
+ value: function listSettlementRequestsWithHttpInfo(opts) {
705
+ opts = opts || {};
706
+ var postBody = null;
707
+ if (postBody && postBody.toJSON) {
708
+ postBody = postBody.toJSON();
709
+ }
710
+ var pathParams = {};
711
+ var queryParams = {
712
+ 'limit': opts['limit'],
713
+ 'before': opts['before'],
714
+ 'after': opts['after'],
715
+ 'request_id': opts['request_id']
716
+ };
717
+ var headerParams = {};
718
+ var formParams = {};
719
+ var authNames = ['OAuth2', 'CoboAuth'];
720
+ var contentTypes = [];
721
+ var accepts = ['application/json'];
722
+ var returnType = _ListSettlementRequests200Response["default"];
723
+ return this.apiClient.callApi('/payments/settlement_requests', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
724
+ }
725
+
726
+ /**
727
+ * List all settlement requests
728
+ * This operation retrieves the information of all settlement requests.
729
+ * @param {Object} opts Optional parameters
730
+ * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
731
+ * @param {String} opts.before This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
732
+ * @param {String} opts.after This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
733
+ * @param {String} opts.request_id The request ID.
734
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSettlementRequests200Response}
735
+ */
736
+ }, {
737
+ key: "listSettlementRequests",
738
+ value: function listSettlementRequests(opts) {
739
+ return this.listSettlementRequestsWithHttpInfo(opts).then(function (response_and_data) {
740
+ return response_and_data.data;
741
+ });
742
+ }
743
+
744
+ /**
745
+ * Update bank account
746
+ * This operation updates the information of an existing bank account.
747
+ * @param {String} bank_account_id The bank account ID.
748
+ * @param {Object} opts Optional parameters
749
+ * @param {module:model/CreateBankAccountRequest} [CreateBankAccountRequest] The request body for updating an existing bank account.
750
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BankAccount} and HTTP response
751
+ */
752
+ }, {
753
+ key: "updateBankAccountByIdWithHttpInfo",
754
+ value: function updateBankAccountByIdWithHttpInfo(bank_account_id, opts) {
755
+ opts = opts || {};
756
+ var postBody = opts['CreateBankAccountRequest'];
757
+ if (postBody && postBody.toJSON) {
758
+ postBody = postBody.toJSON();
759
+ }
760
+ // verify the required parameter 'bank_account_id' is set
761
+ if (bank_account_id === undefined || bank_account_id === null) {
762
+ throw new Error("Missing the required parameter 'bank_account_id' when calling updateBankAccountById");
763
+ }
764
+ var pathParams = {
765
+ 'bank_account_id': bank_account_id
766
+ };
767
+ var queryParams = {};
768
+ var headerParams = {};
769
+ var formParams = {};
770
+ var authNames = ['OAuth2', 'CoboAuth'];
771
+ var contentTypes = ['application/json'];
772
+ var accepts = ['application/json'];
773
+ var returnType = _BankAccount["default"];
774
+ return this.apiClient.callApi('/payments/bank_accounts/{bank_account_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
775
+ }
776
+
777
+ /**
778
+ * Update bank account
779
+ * This operation updates the information of an existing bank account.
780
+ * @param {String} bank_account_id The bank account ID.
781
+ * @param {Object} opts Optional parameters
782
+ * @param {module:model/CreateBankAccountRequest} opts.CreateBankAccountRequest The request body for updating an existing bank account.
783
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BankAccount}
784
+ */
785
+ }, {
786
+ key: "updateBankAccountById",
787
+ value: function updateBankAccountById(bank_account_id, opts) {
788
+ return this.updateBankAccountByIdWithHttpInfo(bank_account_id, opts).then(function (response_and_data) {
789
+ return response_and_data.data;
790
+ });
791
+ }
792
+
793
+ /**
794
+ * Update merchant
795
+ * This operation updates the information of an existing merchant.
796
+ * @param {String} merchant_id The merchant ID.
797
+ * @param {Object} opts Optional parameters
798
+ * @param {module:model/UpdateMerchantByIdRequest} [UpdateMerchantByIdRequest] The request body to update a merchant.
799
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Merchant} and HTTP response
800
+ */
801
+ }, {
802
+ key: "updateMerchantByIdWithHttpInfo",
803
+ value: function updateMerchantByIdWithHttpInfo(merchant_id, opts) {
804
+ opts = opts || {};
805
+ var postBody = opts['UpdateMerchantByIdRequest'];
806
+ if (postBody && postBody.toJSON) {
807
+ postBody = postBody.toJSON();
808
+ }
809
+ // verify the required parameter 'merchant_id' is set
810
+ if (merchant_id === undefined || merchant_id === null) {
811
+ throw new Error("Missing the required parameter 'merchant_id' when calling updateMerchantById");
812
+ }
813
+ var pathParams = {
814
+ 'merchant_id': merchant_id
815
+ };
816
+ var queryParams = {};
817
+ var headerParams = {};
818
+ var formParams = {};
819
+ var authNames = ['OAuth2', 'CoboAuth'];
820
+ var contentTypes = ['application/json'];
821
+ var accepts = ['application/json'];
822
+ var returnType = _Merchant["default"];
823
+ return this.apiClient.callApi('/payments/merchants/{merchant_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
824
+ }
825
+
826
+ /**
827
+ * Update merchant
828
+ * This operation updates the information of an existing merchant.
829
+ * @param {String} merchant_id The merchant ID.
830
+ * @param {Object} opts Optional parameters
831
+ * @param {module:model/UpdateMerchantByIdRequest} opts.UpdateMerchantByIdRequest The request body to update a merchant.
832
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Merchant}
833
+ */
834
+ }, {
835
+ key: "updateMerchantById",
836
+ value: function updateMerchantById(merchant_id, opts) {
837
+ return this.updateMerchantByIdWithHttpInfo(merchant_id, opts).then(function (response_and_data) {
838
+ return response_and_data.data;
839
+ });
840
+ }
841
+
842
+ /**
843
+ * Update pay-in order
844
+ * This operation updates a pay-in order. Use this operation to expire a pay-in order that is no longer needed.
845
+ * @param {String} order_id The pay-in order ID.
846
+ * @param {Object} opts Optional parameters
847
+ * @param {module:model/UpdatePaymentOrderRequest} [UpdatePaymentOrderRequest] The request body to update a pay-in order.
848
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Order} and HTTP response
849
+ */
850
+ }, {
851
+ key: "updatePaymentOrderWithHttpInfo",
852
+ value: function updatePaymentOrderWithHttpInfo(order_id, opts) {
853
+ opts = opts || {};
854
+ var postBody = opts['UpdatePaymentOrderRequest'];
855
+ if (postBody && postBody.toJSON) {
856
+ postBody = postBody.toJSON();
857
+ }
858
+ // verify the required parameter 'order_id' is set
859
+ if (order_id === undefined || order_id === null) {
860
+ throw new Error("Missing the required parameter 'order_id' when calling updatePaymentOrder");
861
+ }
862
+ var pathParams = {
863
+ 'order_id': order_id
864
+ };
865
+ var queryParams = {};
866
+ var headerParams = {};
867
+ var formParams = {};
868
+ var authNames = ['OAuth2', 'CoboAuth'];
869
+ var contentTypes = ['application/json'];
870
+ var accepts = ['application/json'];
871
+ var returnType = _Order["default"];
872
+ return this.apiClient.callApi('/payments/orders/{order_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
873
+ }
874
+
875
+ /**
876
+ * Update pay-in order
877
+ * This operation updates a pay-in order. Use this operation to expire a pay-in order that is no longer needed.
878
+ * @param {String} order_id The pay-in order ID.
879
+ * @param {Object} opts Optional parameters
880
+ * @param {module:model/UpdatePaymentOrderRequest} opts.UpdatePaymentOrderRequest The request body to update a pay-in order.
881
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order}
882
+ */
883
+ }, {
884
+ key: "updatePaymentOrder",
885
+ value: function updatePaymentOrder(order_id, opts) {
886
+ return this.updatePaymentOrderWithHttpInfo(order_id, opts).then(function (response_and_data) {
887
+ return response_and_data.data;
888
+ });
889
+ }
890
+ }]);
891
+ }();