@cobo/cobo-waas2 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -6
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +27 -33
- package/dist/api/AddressBooksApi.js +4 -4
- package/dist/api/AppWorkflowsApi.js +275 -0
- package/dist/api/DevelopersApi.js +4 -4
- package/dist/api/DevelopersWebhooksApi.js +12 -12
- package/dist/api/FeeStationApi.js +12 -12
- package/dist/api/OAuthApi.js +93 -6
- package/dist/api/PaymentApi.js +107 -161
- package/dist/api/StakingsApi.js +28 -28
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/api/WalletsApi.js +102 -51
- package/dist/api/WalletsExchangeWalletApi.js +8 -8
- package/dist/api/WalletsMPCWalletsApi.js +20 -20
- package/dist/index.js +224 -14
- package/dist/model/AppWorkflow.js +173 -0
- package/dist/model/AppWorkflowField.js +137 -0
- package/dist/model/AppWorkflowPolicy.js +144 -0
- package/dist/model/ApprovalEntry.js +148 -0
- package/dist/model/ApprovalRequest.js +180 -0
- package/dist/model/ApprovalRequestDetail.js +177 -0
- package/dist/model/ApprovalStatus.js +71 -0
- package/dist/model/ApprovalUser.js +146 -0
- package/dist/model/BabylonStakeExtra.js +16 -0
- package/dist/model/BatchCheckUtxo201Response.js +107 -0
- package/dist/model/BatchCheckUtxoRequest.js +142 -0
- package/dist/model/{CreateBankAccountRequest.js → BatchUTXOParam.js} +43 -28
- package/dist/model/ChainInfo.js +9 -0
- package/dist/model/CreateApprovalRequest201Response.js +110 -0
- package/dist/model/CreatePaymentOrderRequest.js +5 -5
- package/dist/model/CreateRefundRequest.js +35 -0
- package/dist/model/CreateSettlement.js +39 -29
- package/dist/model/CreateStakeActivityExtra.js +6 -0
- package/dist/model/CryptoAddress.js +171 -0
- package/dist/model/{OrderAddressInfo.js → CustodialTransferDestination.js} +36 -46
- package/dist/model/CustodialWeb3TransferSource.js +1 -1
- package/dist/model/EstimateContractCallFeeParams.js +13 -0
- package/dist/model/EstimateFeeParams.js +6 -0
- package/dist/model/EstimateTransferFeeParams.js +13 -0
- package/dist/model/ExchangePermissionToken201Response.js +122 -0
- package/dist/model/ExchangePermissionTokenRequest.js +110 -0
- package/dist/model/ListApprovalRequests200Response.js +123 -0
- package/dist/model/MpcTransferSource.js +1 -1
- package/dist/model/Order.js +4 -4
- package/dist/model/PaymentOrderEventData.js +6 -6
- package/dist/model/PayoutChannel.js +61 -0
- package/dist/model/PolicyAction.js +123 -0
- package/dist/model/PolicyActionContent.js +169 -0
- package/dist/model/PolicyActionType.js +66 -0
- package/dist/model/PolicyCondition.js +148 -0
- package/dist/model/PolicyFieldOperator.js +76 -0
- package/dist/model/PolicyFieldValueType.js +61 -0
- package/dist/model/RefreshPermissionTokenRequest.js +110 -0
- package/dist/model/RequestApproval.js +188 -0
- package/dist/model/RevokeApprovalRequest201Response.js +119 -0
- package/dist/model/RevokeApprovalRequestRequest.js +110 -0
- package/dist/model/SettlementDetail.js +22 -0
- package/dist/model/SupportedToken.js +222 -0
- package/dist/model/SwapActivityApprovers.js +122 -0
- package/dist/model/SwapActivityDetail.js +30 -0
- package/dist/model/SwapApproversStatus.js +66 -0
- package/dist/model/TransactionCoboCategory.js +102 -7
- package/dist/model/TransactionDestination.js +4 -0
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionSubStatus.js +10 -0
- package/dist/model/TransactionTransferToWalletDestination.js +2 -2
- package/dist/model/TransferDestination.js +42 -14
- package/dist/model/TransferDestinationType.js +5 -0
- package/dist/model/UTXO.js +9 -0
- package/docs/AddressBooksApi.md +2 -2
- package/docs/AppWorkflow.md +12 -0
- package/docs/AppWorkflowField.md +11 -0
- package/docs/AppWorkflowPolicy.md +10 -0
- package/docs/AppWorkflowsApi.md +273 -0
- package/docs/ApprovalEntry.md +11 -0
- package/docs/ApprovalRequest.md +13 -0
- package/docs/ApprovalRequestDetail.md +13 -0
- package/docs/ApprovalStatus.md +16 -0
- package/docs/ApprovalUser.md +12 -0
- package/docs/BabylonStakeExtra.md +1 -0
- package/docs/BatchCheckUtxo201Response.md +9 -0
- package/docs/BatchCheckUtxoRequest.md +10 -0
- package/docs/BatchUTXOParam.md +10 -0
- package/docs/ChainInfo.md +1 -0
- package/docs/CreateApprovalRequest201Response.md +9 -0
- package/docs/CreatePaymentOrderRequest.md +1 -1
- package/docs/CreateRefundRequest.md +3 -0
- package/docs/CreateSettlement.md +5 -2
- package/docs/CreateStakeActivityExtra.md +1 -0
- package/docs/CryptoAddress.md +14 -0
- package/docs/CustodialTransferDestination.md +11 -0
- package/docs/CustodialWeb3TransferSource.md +1 -1
- package/docs/DevelopersApi.md +2 -2
- package/docs/DevelopersWebhooksApi.md +6 -6
- package/docs/EstimateContractCallFeeParams.md +1 -0
- package/docs/EstimateFeeParams.md +1 -0
- package/docs/EstimateTransferFeeParams.md +1 -0
- package/docs/ExchangePermissionToken201Response.md +12 -0
- package/docs/ExchangePermissionTokenRequest.md +9 -0
- package/docs/FeeStationApi.md +6 -6
- package/docs/ListApprovalRequests200Response.md +10 -0
- package/docs/MpcTransferSource.md +1 -1
- package/docs/OAuthApi.md +102 -0
- package/docs/Order.md +2 -2
- package/docs/PaymentApi.md +86 -147
- package/docs/PaymentOrderEventData.md +2 -2
- package/docs/PayoutChannel.md +12 -0
- package/docs/PolicyAction.md +10 -0
- package/docs/PolicyActionContent.md +25 -0
- package/docs/PolicyActionType.md +14 -0
- package/docs/PolicyCondition.md +12 -0
- package/docs/PolicyFieldOperator.md +18 -0
- package/docs/PolicyFieldValueType.md +12 -0
- package/docs/RefreshPermissionTokenRequest.md +9 -0
- package/docs/RequestApproval.md +13 -0
- package/docs/RevokeApprovalRequest201Response.md +10 -0
- package/docs/RevokeApprovalRequestRequest.md +9 -0
- package/docs/SettlementDetail.md +2 -0
- package/docs/StakingsApi.md +14 -14
- package/docs/SupportedToken.md +17 -0
- package/docs/SwapActivityApprovers.md +10 -0
- package/docs/SwapActivityDetail.md +1 -0
- package/docs/SwapApproversStatus.md +14 -0
- package/docs/TransactionCoboCategory.md +41 -3
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionSubStatus.md +4 -0
- package/docs/TransactionTransferToWalletDestination.md +1 -1
- package/docs/TransactionsApi.md +2 -2
- package/docs/TransferDestination.md +1 -1
- package/docs/TransferDestinationType.md +2 -0
- package/docs/UTXO.md +1 -0
- package/docs/WalletsApi.md +78 -23
- package/docs/WalletsExchangeWalletApi.md +4 -4
- package/docs/WalletsMPCWalletsApi.md +10 -10
- package/package.json +1 -1
- package/docs/CreateBankAccountRequest.md +0 -9
- package/docs/OrderAddressInfo.md +0 -12
package/dist/api/OAuthApi.js
CHANGED
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
9
|
+
var _ExchangePermissionToken201Response = _interopRequireDefault(require("../model/ExchangePermissionToken201Response"));
|
|
10
|
+
var _ExchangePermissionTokenRequest = _interopRequireDefault(require("../model/ExchangePermissionTokenRequest"));
|
|
9
11
|
var _GetToken2XXResponse = _interopRequireDefault(require("../model/GetToken2XXResponse"));
|
|
10
12
|
var _GetToken4XXResponse = _interopRequireDefault(require("../model/GetToken4XXResponse"));
|
|
13
|
+
var _RefreshPermissionTokenRequest = _interopRequireDefault(require("../model/RefreshPermissionTokenRequest"));
|
|
11
14
|
var _RefreshToken2XXResponse = _interopRequireDefault(require("../model/RefreshToken2XXResponse"));
|
|
12
15
|
var _RefreshTokenRequest = _interopRequireDefault(require("../model/RefreshTokenRequest"));
|
|
13
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -44,14 +47,56 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
/**
|
|
47
|
-
*
|
|
48
|
-
* <Note>This operation is only applicable to Cobo Portal
|
|
49
|
-
* @param {
|
|
50
|
-
* @
|
|
51
|
-
* @param {String} grant_type The OAuth grant type. Set the value as `org_implicit`.
|
|
52
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetToken2XXResponse} and HTTP response
|
|
50
|
+
* Exchange Permission Access Token by API Key
|
|
51
|
+
* <Note>This operation is only applicable to Cobo Portal Checkout SDK developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an api key.</Note> This operation allows Portal Checkout SDK to obtain a new Permission Access Token with a specified client ID, grant type and a Permission Refresh Token. For security purposes, Permission Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Permission Access Token and a new Permission Refresh Token.
|
|
52
|
+
* @param {module:model/ExchangePermissionTokenRequest} ExchangePermissionTokenRequest The request body for exchanging an Permission Access Token.
|
|
53
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ExchangePermissionToken201Response} and HTTP response
|
|
53
54
|
*/
|
|
54
55
|
return _createClass(OAuthApi, [{
|
|
56
|
+
key: "exchangePermissionTokenWithHttpInfo",
|
|
57
|
+
value: function exchangePermissionTokenWithHttpInfo(ExchangePermissionTokenRequest) {
|
|
58
|
+
var postBody = ExchangePermissionTokenRequest;
|
|
59
|
+
if (postBody && postBody.toJSON) {
|
|
60
|
+
postBody = postBody.toJSON();
|
|
61
|
+
}
|
|
62
|
+
// verify the required parameter 'ExchangePermissionTokenRequest' is set
|
|
63
|
+
if (ExchangePermissionTokenRequest === undefined || ExchangePermissionTokenRequest === null) {
|
|
64
|
+
throw new Error("Missing the required parameter 'ExchangePermissionTokenRequest' when calling exchangePermissionToken");
|
|
65
|
+
}
|
|
66
|
+
var pathParams = {};
|
|
67
|
+
var queryParams = {};
|
|
68
|
+
var headerParams = {};
|
|
69
|
+
var formParams = {};
|
|
70
|
+
var authNames = ['CoboAuth'];
|
|
71
|
+
var contentTypes = ['application/json'];
|
|
72
|
+
var accepts = ['application/json'];
|
|
73
|
+
var returnType = _ExchangePermissionToken201Response["default"];
|
|
74
|
+
return this.apiClient.callApi('/oauth/permission_token/exchange', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Exchange Permission Access Token by API Key
|
|
79
|
+
* <Note>This operation is only applicable to Cobo Portal Checkout SDK developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an api key.</Note> This operation allows Portal Checkout SDK to obtain a new Permission Access Token with a specified client ID, grant type and a Permission Refresh Token. For security purposes, Permission Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Permission Access Token and a new Permission Refresh Token.
|
|
80
|
+
* @param {module:model/ExchangePermissionTokenRequest} ExchangePermissionTokenRequest The request body for exchanging an Permission Access Token.
|
|
81
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ExchangePermissionToken201Response}
|
|
82
|
+
*/
|
|
83
|
+
}, {
|
|
84
|
+
key: "exchangePermissionToken",
|
|
85
|
+
value: function exchangePermissionToken(ExchangePermissionTokenRequest) {
|
|
86
|
+
return this.exchangePermissionTokenWithHttpInfo(ExchangePermissionTokenRequest).then(function (response_and_data) {
|
|
87
|
+
return response_and_data.data;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Get Org Access Token
|
|
93
|
+
* <Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to get an Org Access Token and a Refresh Token with a specified client ID, organization ID, and grant type. Access tokens allow the app to signal to the WaaS service that it has received permission to access specific resources of the app user's [organization](https://manuals.cobo.com/en/portal/organization/introduction). Once the app has been granted permission by the organization's admin, it can use this operation to obtain both an Org Access Token and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call [Refresh token](https://www.cobo.com/developers/v2/api-references/oauth/refresh-org-access-token) to get a new Org Access Token and a new Refresh Token.
|
|
94
|
+
* @param {String} client_id The client ID, a unique identifier to distinguish Cobo Portal Apps. You can get the client ID by retrieving the manifest file after publishing the app.
|
|
95
|
+
* @param {String} org_id Organization ID, a unique identifier to distinguish different organizations. You can get the organization ID from the callback message sent to the URL that was configured in the manifest file.
|
|
96
|
+
* @param {String} grant_type The OAuth grant type. Set the value as `org_implicit`.
|
|
97
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetToken2XXResponse} and HTTP response
|
|
98
|
+
*/
|
|
99
|
+
}, {
|
|
55
100
|
key: "getTokenWithHttpInfo",
|
|
56
101
|
value: function getTokenWithHttpInfo(client_id, org_id, grant_type) {
|
|
57
102
|
var postBody = null;
|
|
@@ -101,6 +146,48 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
101
146
|
});
|
|
102
147
|
}
|
|
103
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Refresh Permission Access Token by Permission Refresh Token
|
|
151
|
+
* <Note>This operation is only applicable to Cobo Portal Checkout SDK developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an api key.</Note> This operation allows Portal Checkout SDK to refresh a new Permission Access Token with a specified client ID, grant type and a Permission Refresh Token. For security purposes, Permission Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Permission Access Token and a new Permission Refresh Token.
|
|
152
|
+
* @param {module:model/RefreshPermissionTokenRequest} RefreshPermissionTokenRequest The request body for refreshing an Permission Access Token.
|
|
153
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ExchangePermissionToken201Response} and HTTP response
|
|
154
|
+
*/
|
|
155
|
+
}, {
|
|
156
|
+
key: "refreshPermissionTokenWithHttpInfo",
|
|
157
|
+
value: function refreshPermissionTokenWithHttpInfo(RefreshPermissionTokenRequest) {
|
|
158
|
+
var postBody = RefreshPermissionTokenRequest;
|
|
159
|
+
if (postBody && postBody.toJSON) {
|
|
160
|
+
postBody = postBody.toJSON();
|
|
161
|
+
}
|
|
162
|
+
// verify the required parameter 'RefreshPermissionTokenRequest' is set
|
|
163
|
+
if (RefreshPermissionTokenRequest === undefined || RefreshPermissionTokenRequest === null) {
|
|
164
|
+
throw new Error("Missing the required parameter 'RefreshPermissionTokenRequest' when calling refreshPermissionToken");
|
|
165
|
+
}
|
|
166
|
+
var pathParams = {};
|
|
167
|
+
var queryParams = {};
|
|
168
|
+
var headerParams = {};
|
|
169
|
+
var formParams = {};
|
|
170
|
+
var authNames = ['CoboAuth'];
|
|
171
|
+
var contentTypes = ['application/json'];
|
|
172
|
+
var accepts = ['application/json'];
|
|
173
|
+
var returnType = _ExchangePermissionToken201Response["default"];
|
|
174
|
+
return this.apiClient.callApi('/oauth/permission_token/refresh', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Refresh Permission Access Token by Permission Refresh Token
|
|
179
|
+
* <Note>This operation is only applicable to Cobo Portal Checkout SDK developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an api key.</Note> This operation allows Portal Checkout SDK to refresh a new Permission Access Token with a specified client ID, grant type and a Permission Refresh Token. For security purposes, Permission Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Permission Access Token and a new Permission Refresh Token.
|
|
180
|
+
* @param {module:model/RefreshPermissionTokenRequest} RefreshPermissionTokenRequest The request body for refreshing an Permission Access Token.
|
|
181
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ExchangePermissionToken201Response}
|
|
182
|
+
*/
|
|
183
|
+
}, {
|
|
184
|
+
key: "refreshPermissionToken",
|
|
185
|
+
value: function refreshPermissionToken(RefreshPermissionTokenRequest) {
|
|
186
|
+
return this.refreshPermissionTokenWithHttpInfo(RefreshPermissionTokenRequest).then(function (response_and_data) {
|
|
187
|
+
return response_and_data.data;
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
|
|
104
191
|
/**
|
|
105
192
|
* Refresh Org Access Token
|
|
106
193
|
* <Note>This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to obtain a new Org Access Token with a specified client ID, grant type and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Org Access Token and a new Refresh Token.
|
package/dist/api/PaymentApi.js
CHANGED
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _BankAccount = _interopRequireDefault(require("../model/BankAccount"));
|
|
9
|
-
var _CreateBankAccountRequest = _interopRequireDefault(require("../model/CreateBankAccountRequest"));
|
|
10
9
|
var _CreateMerchantRequest = _interopRequireDefault(require("../model/CreateMerchantRequest"));
|
|
11
10
|
var _CreatePaymentOrderRequest = _interopRequireDefault(require("../model/CreatePaymentOrderRequest"));
|
|
12
11
|
var _CreateRefundRequest = _interopRequireDefault(require("../model/CreateRefundRequest"));
|
|
13
12
|
var _CreateSettlementRequestRequest = _interopRequireDefault(require("../model/CreateSettlementRequestRequest"));
|
|
13
|
+
var _CryptoAddress = _interopRequireDefault(require("../model/CryptoAddress"));
|
|
14
14
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
15
15
|
var _GetExchangeRate200Response = _interopRequireDefault(require("../model/GetExchangeRate200Response"));
|
|
16
16
|
var _GetRefunds200Response = _interopRequireDefault(require("../model/GetRefunds200Response"));
|
|
@@ -20,9 +20,9 @@ var _ListPaymentOrders200Response = _interopRequireDefault(require("../model/Lis
|
|
|
20
20
|
var _ListSettlementRequests200Response = _interopRequireDefault(require("../model/ListSettlementRequests200Response"));
|
|
21
21
|
var _Merchant = _interopRequireDefault(require("../model/Merchant"));
|
|
22
22
|
var _Order = _interopRequireDefault(require("../model/Order"));
|
|
23
|
-
var _OrderAddressInfo = _interopRequireDefault(require("../model/OrderAddressInfo"));
|
|
24
23
|
var _Refund = _interopRequireDefault(require("../model/Refund"));
|
|
25
24
|
var _Settlement = _interopRequireDefault(require("../model/Settlement"));
|
|
25
|
+
var _SupportedToken = _interopRequireDefault(require("../model/SupportedToken"));
|
|
26
26
|
var _UpdateMerchantByIdRequest = _interopRequireDefault(require("../model/UpdateMerchantByIdRequest"));
|
|
27
27
|
var _UpdatePaymentOrderRequest = _interopRequireDefault(require("../model/UpdatePaymentOrderRequest"));
|
|
28
28
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -59,54 +59,13 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* Create
|
|
63
|
-
* This operation
|
|
62
|
+
* Create merchant
|
|
63
|
+
* 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.
|
|
64
64
|
* @param {Object} opts Optional parameters
|
|
65
|
-
* @param {module:model/
|
|
66
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
65
|
+
* @param {module:model/CreateMerchantRequest} [CreateMerchantRequest] The request body to create a merchant.
|
|
66
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Merchant} and HTTP response
|
|
67
67
|
*/
|
|
68
68
|
return _createClass(PaymentApi, [{
|
|
69
|
-
key: "createBankAccountWithHttpInfo",
|
|
70
|
-
value: function createBankAccountWithHttpInfo(opts) {
|
|
71
|
-
opts = opts || {};
|
|
72
|
-
var postBody = opts['CreateBankAccountRequest'];
|
|
73
|
-
if (postBody && postBody.toJSON) {
|
|
74
|
-
postBody = postBody.toJSON();
|
|
75
|
-
}
|
|
76
|
-
var pathParams = {};
|
|
77
|
-
var queryParams = {};
|
|
78
|
-
var headerParams = {};
|
|
79
|
-
var formParams = {};
|
|
80
|
-
var authNames = ['OAuth2', 'CoboAuth'];
|
|
81
|
-
var contentTypes = ['application/json'];
|
|
82
|
-
var accepts = ['application/json'];
|
|
83
|
-
var returnType = _BankAccount["default"];
|
|
84
|
-
return this.apiClient.callApi('/payments/bank_accounts', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Create bank account
|
|
89
|
-
* 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.
|
|
90
|
-
* @param {Object} opts Optional parameters
|
|
91
|
-
* @param {module:model/CreateBankAccountRequest} opts.CreateBankAccountRequest The request body to register a bank account.
|
|
92
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BankAccount}
|
|
93
|
-
*/
|
|
94
|
-
}, {
|
|
95
|
-
key: "createBankAccount",
|
|
96
|
-
value: function createBankAccount(opts) {
|
|
97
|
-
return this.createBankAccountWithHttpInfo(opts).then(function (response_and_data) {
|
|
98
|
-
return response_and_data.data;
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Create merchant
|
|
104
|
-
* 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.
|
|
105
|
-
* @param {Object} opts Optional parameters
|
|
106
|
-
* @param {module:model/CreateMerchantRequest} [CreateMerchantRequest] The request body to create a merchant.
|
|
107
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Merchant} and HTTP response
|
|
108
|
-
*/
|
|
109
|
-
}, {
|
|
110
69
|
key: "createMerchantWithHttpInfo",
|
|
111
70
|
value: function createMerchantWithHttpInfo(opts) {
|
|
112
71
|
opts = opts || {};
|
|
@@ -314,52 +273,6 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
314
273
|
});
|
|
315
274
|
}
|
|
316
275
|
|
|
317
|
-
/**
|
|
318
|
-
* Get pay-in order's receiving address info
|
|
319
|
-
* This operation retrieves the detailed information about a specific pay-in address.
|
|
320
|
-
* @param {Object} opts Optional parameters
|
|
321
|
-
* @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`
|
|
322
|
-
* @param {String} [address] The receiving address.
|
|
323
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OrderAddressInfo} and HTTP response
|
|
324
|
-
*/
|
|
325
|
-
}, {
|
|
326
|
-
key: "getPaymentOrderAddressInfoWithHttpInfo",
|
|
327
|
-
value: function getPaymentOrderAddressInfoWithHttpInfo(opts) {
|
|
328
|
-
opts = opts || {};
|
|
329
|
-
var postBody = null;
|
|
330
|
-
if (postBody && postBody.toJSON) {
|
|
331
|
-
postBody = postBody.toJSON();
|
|
332
|
-
}
|
|
333
|
-
var pathParams = {};
|
|
334
|
-
var queryParams = {
|
|
335
|
-
'token_id': opts['token_id'],
|
|
336
|
-
'address': opts['address']
|
|
337
|
-
};
|
|
338
|
-
var headerParams = {};
|
|
339
|
-
var formParams = {};
|
|
340
|
-
var authNames = ['OAuth2', 'CoboAuth'];
|
|
341
|
-
var contentTypes = [];
|
|
342
|
-
var accepts = ['application/json'];
|
|
343
|
-
var returnType = _OrderAddressInfo["default"];
|
|
344
|
-
return this.apiClient.callApi('/payments/orders/address_info', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Get pay-in order's receiving address info
|
|
349
|
-
* This operation retrieves the detailed information about a specific pay-in address.
|
|
350
|
-
* @param {Object} opts Optional parameters
|
|
351
|
-
* @param {String} opts.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`
|
|
352
|
-
* @param {String} opts.address The receiving address.
|
|
353
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OrderAddressInfo}
|
|
354
|
-
*/
|
|
355
|
-
}, {
|
|
356
|
-
key: "getPaymentOrderAddressInfo",
|
|
357
|
-
value: function getPaymentOrderAddressInfo(opts) {
|
|
358
|
-
return this.getPaymentOrderAddressInfoWithHttpInfo(opts).then(function (response_and_data) {
|
|
359
|
-
return response_and_data.data;
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
|
|
363
276
|
/**
|
|
364
277
|
* Get pay-in order information
|
|
365
278
|
* This operation retrieves details of a specific pay-in order.
|
|
@@ -453,8 +366,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
453
366
|
* This operation retrieves the information of all refund orders.
|
|
454
367
|
* @param {Object} opts Optional parameters
|
|
455
368
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
456
|
-
* @param {String} [before]
|
|
457
|
-
* @param {String} [after]
|
|
369
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
370
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
458
371
|
* @param {String} [merchant_id] The merchant ID.
|
|
459
372
|
* @param {String} [request_id] The request ID.
|
|
460
373
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetRefunds200Response} and HTTP response
|
|
@@ -489,8 +402,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
489
402
|
* This operation retrieves the information of all refund orders.
|
|
490
403
|
* @param {Object} opts Optional parameters
|
|
491
404
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
492
|
-
* @param {String} opts.before
|
|
493
|
-
* @param {String} opts.after
|
|
405
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
406
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
494
407
|
* @param {String} opts.merchant_id The merchant ID.
|
|
495
408
|
* @param {String} opts.request_id The request ID.
|
|
496
409
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetRefunds200Response}
|
|
@@ -595,7 +508,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
595
508
|
|
|
596
509
|
/**
|
|
597
510
|
* List all bank accounts
|
|
598
|
-
* This operation retrieves the information of all bank accounts registered.
|
|
511
|
+
* This operation retrieves the information of all bank accounts you have registered for payment settlement. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new bank account.
|
|
599
512
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/BankAccount>} and HTTP response
|
|
600
513
|
*/
|
|
601
514
|
}, {
|
|
@@ -618,7 +531,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
618
531
|
|
|
619
532
|
/**
|
|
620
533
|
* List all bank accounts
|
|
621
|
-
* This operation retrieves the information of all bank accounts registered.
|
|
534
|
+
* This operation retrieves the information of all bank accounts you have registered for payment settlement. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new bank account.
|
|
622
535
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/BankAccount>}
|
|
623
536
|
*/
|
|
624
537
|
}, {
|
|
@@ -629,13 +542,56 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
629
542
|
});
|
|
630
543
|
}
|
|
631
544
|
|
|
545
|
+
/**
|
|
546
|
+
* List crypto addresses
|
|
547
|
+
* Retrieve a list of cryptocurrency addresses previously created for a given `token_id`.
|
|
548
|
+
* @param {Object} opts Optional parameters
|
|
549
|
+
* @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`
|
|
550
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CryptoAddress>} and HTTP response
|
|
551
|
+
*/
|
|
552
|
+
}, {
|
|
553
|
+
key: "listCryptoAddressesWithHttpInfo",
|
|
554
|
+
value: function listCryptoAddressesWithHttpInfo(opts) {
|
|
555
|
+
opts = opts || {};
|
|
556
|
+
var postBody = null;
|
|
557
|
+
if (postBody && postBody.toJSON) {
|
|
558
|
+
postBody = postBody.toJSON();
|
|
559
|
+
}
|
|
560
|
+
var pathParams = {};
|
|
561
|
+
var queryParams = {
|
|
562
|
+
'token_id': opts['token_id']
|
|
563
|
+
};
|
|
564
|
+
var headerParams = {};
|
|
565
|
+
var formParams = {};
|
|
566
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
567
|
+
var contentTypes = [];
|
|
568
|
+
var accepts = ['application/json'];
|
|
569
|
+
var returnType = [_CryptoAddress["default"]];
|
|
570
|
+
return this.apiClient.callApi('/payments/crypto_addresses', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* List crypto addresses
|
|
575
|
+
* Retrieve a list of cryptocurrency addresses previously created for a given `token_id`.
|
|
576
|
+
* @param {Object} opts Optional parameters
|
|
577
|
+
* @param {String} opts.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`
|
|
578
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CryptoAddress>}
|
|
579
|
+
*/
|
|
580
|
+
}, {
|
|
581
|
+
key: "listCryptoAddresses",
|
|
582
|
+
value: function listCryptoAddresses(opts) {
|
|
583
|
+
return this.listCryptoAddressesWithHttpInfo(opts).then(function (response_and_data) {
|
|
584
|
+
return response_and_data.data;
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
|
|
632
588
|
/**
|
|
633
589
|
* List all merchants
|
|
634
590
|
* 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.
|
|
635
591
|
* @param {Object} opts Optional parameters
|
|
636
592
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
637
|
-
* @param {String} [before]
|
|
638
|
-
* @param {String} [after]
|
|
593
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
594
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
639
595
|
* @param {String} [keyword] A search term used for fuzzy matching of merchant names.
|
|
640
596
|
* @param {String} [wallet_id] The wallet ID.
|
|
641
597
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMerchants200Response} and HTTP response
|
|
@@ -670,8 +626,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
670
626
|
* 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.
|
|
671
627
|
* @param {Object} opts Optional parameters
|
|
672
628
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
673
|
-
* @param {String} opts.before
|
|
674
|
-
* @param {String} opts.after
|
|
629
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
630
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
675
631
|
* @param {String} opts.keyword A search term used for fuzzy matching of merchant names.
|
|
676
632
|
* @param {String} opts.wallet_id The wallet ID.
|
|
677
633
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMerchants200Response}
|
|
@@ -689,9 +645,10 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
689
645
|
* This operation retrieves the information of all pay-in orders. You can filter the result by merchant ID.
|
|
690
646
|
* @param {Object} opts Optional parameters
|
|
691
647
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
692
|
-
* @param {String} [before]
|
|
693
|
-
* @param {String} [after]
|
|
648
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
649
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
694
650
|
* @param {String} [merchant_id] The merchant ID.
|
|
651
|
+
* @param {String} [psp_order_id] The PSP order ID.
|
|
695
652
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPaymentOrders200Response} and HTTP response
|
|
696
653
|
*/
|
|
697
654
|
}, {
|
|
@@ -707,7 +664,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
707
664
|
'limit': opts['limit'],
|
|
708
665
|
'before': opts['before'],
|
|
709
666
|
'after': opts['after'],
|
|
710
|
-
'merchant_id': opts['merchant_id']
|
|
667
|
+
'merchant_id': opts['merchant_id'],
|
|
668
|
+
'psp_order_id': opts['psp_order_id']
|
|
711
669
|
};
|
|
712
670
|
var headerParams = {};
|
|
713
671
|
var formParams = {};
|
|
@@ -723,9 +681,10 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
723
681
|
* This operation retrieves the information of all pay-in orders. You can filter the result by merchant ID.
|
|
724
682
|
* @param {Object} opts Optional parameters
|
|
725
683
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
726
|
-
* @param {String} opts.before
|
|
727
|
-
* @param {String} opts.after
|
|
684
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
685
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
728
686
|
* @param {String} opts.merchant_id The merchant ID.
|
|
687
|
+
* @param {String} opts.psp_order_id The PSP order ID.
|
|
729
688
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPaymentOrders200Response}
|
|
730
689
|
*/
|
|
731
690
|
}, {
|
|
@@ -736,13 +695,49 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
736
695
|
});
|
|
737
696
|
}
|
|
738
697
|
|
|
698
|
+
/**
|
|
699
|
+
* List all supported tokens
|
|
700
|
+
* This operation retrieves the information of all supported tokens.
|
|
701
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/SupportedToken>} and HTTP response
|
|
702
|
+
*/
|
|
703
|
+
}, {
|
|
704
|
+
key: "listPaymentSupportedTokensWithHttpInfo",
|
|
705
|
+
value: function listPaymentSupportedTokensWithHttpInfo() {
|
|
706
|
+
var postBody = null;
|
|
707
|
+
if (postBody && postBody.toJSON) {
|
|
708
|
+
postBody = postBody.toJSON();
|
|
709
|
+
}
|
|
710
|
+
var pathParams = {};
|
|
711
|
+
var queryParams = {};
|
|
712
|
+
var headerParams = {};
|
|
713
|
+
var formParams = {};
|
|
714
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
715
|
+
var contentTypes = [];
|
|
716
|
+
var accepts = ['application/json'];
|
|
717
|
+
var returnType = [_SupportedToken["default"]];
|
|
718
|
+
return this.apiClient.callApi('/payments/supported_tokens', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* List all supported tokens
|
|
723
|
+
* This operation retrieves the information of all supported tokens.
|
|
724
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/SupportedToken>}
|
|
725
|
+
*/
|
|
726
|
+
}, {
|
|
727
|
+
key: "listPaymentSupportedTokens",
|
|
728
|
+
value: function listPaymentSupportedTokens() {
|
|
729
|
+
return this.listPaymentSupportedTokensWithHttpInfo().then(function (response_and_data) {
|
|
730
|
+
return response_and_data.data;
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
|
|
739
734
|
/**
|
|
740
735
|
* List all settlement requests
|
|
741
736
|
* This operation retrieves the information of all settlement requests.
|
|
742
737
|
* @param {Object} opts Optional parameters
|
|
743
738
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
744
|
-
* @param {String} [before]
|
|
745
|
-
* @param {String} [after]
|
|
739
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
740
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
746
741
|
* @param {String} [request_id] The request ID.
|
|
747
742
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSettlementRequests200Response} and HTTP response
|
|
748
743
|
*/
|
|
@@ -775,8 +770,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
775
770
|
* This operation retrieves the information of all settlement requests.
|
|
776
771
|
* @param {Object} opts Optional parameters
|
|
777
772
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
778
|
-
* @param {String} opts.before
|
|
779
|
-
* @param {String} opts.after
|
|
773
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
774
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
780
775
|
* @param {String} opts.request_id The request ID.
|
|
781
776
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSettlementRequests200Response}
|
|
782
777
|
*/
|
|
@@ -788,55 +783,6 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
788
783
|
});
|
|
789
784
|
}
|
|
790
785
|
|
|
791
|
-
/**
|
|
792
|
-
* Update bank account
|
|
793
|
-
* This operation updates the information of an existing bank account.
|
|
794
|
-
* @param {String} bank_account_id The bank account ID.
|
|
795
|
-
* @param {Object} opts Optional parameters
|
|
796
|
-
* @param {module:model/CreateBankAccountRequest} [CreateBankAccountRequest] The request body for updating an existing bank account.
|
|
797
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BankAccount} and HTTP response
|
|
798
|
-
*/
|
|
799
|
-
}, {
|
|
800
|
-
key: "updateBankAccountByIdWithHttpInfo",
|
|
801
|
-
value: function updateBankAccountByIdWithHttpInfo(bank_account_id, opts) {
|
|
802
|
-
opts = opts || {};
|
|
803
|
-
var postBody = opts['CreateBankAccountRequest'];
|
|
804
|
-
if (postBody && postBody.toJSON) {
|
|
805
|
-
postBody = postBody.toJSON();
|
|
806
|
-
}
|
|
807
|
-
// verify the required parameter 'bank_account_id' is set
|
|
808
|
-
if (bank_account_id === undefined || bank_account_id === null) {
|
|
809
|
-
throw new Error("Missing the required parameter 'bank_account_id' when calling updateBankAccountById");
|
|
810
|
-
}
|
|
811
|
-
var pathParams = {
|
|
812
|
-
'bank_account_id': bank_account_id
|
|
813
|
-
};
|
|
814
|
-
var queryParams = {};
|
|
815
|
-
var headerParams = {};
|
|
816
|
-
var formParams = {};
|
|
817
|
-
var authNames = ['OAuth2', 'CoboAuth'];
|
|
818
|
-
var contentTypes = ['application/json'];
|
|
819
|
-
var accepts = ['application/json'];
|
|
820
|
-
var returnType = _BankAccount["default"];
|
|
821
|
-
return this.apiClient.callApi('/payments/bank_accounts/{bank_account_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* Update bank account
|
|
826
|
-
* This operation updates the information of an existing bank account.
|
|
827
|
-
* @param {String} bank_account_id The bank account ID.
|
|
828
|
-
* @param {Object} opts Optional parameters
|
|
829
|
-
* @param {module:model/CreateBankAccountRequest} opts.CreateBankAccountRequest The request body for updating an existing bank account.
|
|
830
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BankAccount}
|
|
831
|
-
*/
|
|
832
|
-
}, {
|
|
833
|
-
key: "updateBankAccountById",
|
|
834
|
-
value: function updateBankAccountById(bank_account_id, opts) {
|
|
835
|
-
return this.updateBankAccountByIdWithHttpInfo(bank_account_id, opts).then(function (response_and_data) {
|
|
836
|
-
return response_and_data.data;
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
|
|
840
786
|
/**
|
|
841
787
|
* Update merchant
|
|
842
788
|
* This operation updates the information of an existing merchant.
|