@cobo/cobo-waas2 1.32.0 → 1.34.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 +7 -1
- package/dist/ApiClient.js +1 -1
- package/dist/api/AutoSweepApi.js +48 -4
- package/dist/api/FeeStationApi.js +63 -0
- package/dist/api/PaymentApi.js +36 -0
- package/dist/index.js +21 -0
- package/dist/model/CreateAutoSweepTask.js +13 -0
- package/dist/model/FeeStationFiatTransaction.js +234 -0
- package/dist/model/FeeStationFiatTransactionType.js +61 -0
- package/dist/model/ListFeeStationFiatTransactions200Response.js +123 -0
- package/dist/model/PaymentEstimateFeeRequest.js +9 -0
- package/dist/model/PaymentPayoutRecipientInfo.js +9 -0
- package/dist/model/RefundLinkBusinessInfo.js +18 -7
- package/dist/model/TransactionExtra.js +54 -8
- package/docs/AutoSweepApi.md +51 -0
- package/docs/CreateAutoSweepTask.md +1 -0
- package/docs/FeeStationApi.md +65 -0
- package/docs/FeeStationFiatTransaction.md +30 -0
- package/docs/FeeStationFiatTransactionType.md +12 -0
- package/docs/ListFeeStationFiatTransactions200Response.md +10 -0
- package/docs/PaymentApi.md +47 -0
- package/docs/PaymentEstimateFeeRequest.md +1 -0
- package/docs/PaymentPayoutRecipientInfo.md +1 -0
- package/docs/RefundLinkBusinessInfo.md +2 -1
- package/docs/TransactionExtra.md +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,123 @@
|
|
|
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 _FeeStationFiatTransaction = _interopRequireDefault(require("./FeeStationFiatTransaction"));
|
|
9
|
+
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
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); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The ListFeeStationFiatTransactions200Response model module.
|
|
31
|
+
* @module model/ListFeeStationFiatTransactions200Response
|
|
32
|
+
*/
|
|
33
|
+
var ListFeeStationFiatTransactions200Response = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>ListFeeStationFiatTransactions200Response</code>.
|
|
36
|
+
* @alias module:model/ListFeeStationFiatTransactions200Response
|
|
37
|
+
*/
|
|
38
|
+
function ListFeeStationFiatTransactions200Response() {
|
|
39
|
+
_classCallCheck(this, ListFeeStationFiatTransactions200Response);
|
|
40
|
+
ListFeeStationFiatTransactions200Response.initialize(this);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(ListFeeStationFiatTransactions200Response, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj) {}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a <code>ListFeeStationFiatTransactions200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
54
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
55
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
56
|
+
* @param {module:model/ListFeeStationFiatTransactions200Response} obj Optional instance to populate.
|
|
57
|
+
* @return {module:model/ListFeeStationFiatTransactions200Response} The populated <code>ListFeeStationFiatTransactions200Response</code> instance.
|
|
58
|
+
*/
|
|
59
|
+
}, {
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value: function constructFromObject(data, obj) {
|
|
62
|
+
if (data) {
|
|
63
|
+
obj = obj || new ListFeeStationFiatTransactions200Response();
|
|
64
|
+
if (data.hasOwnProperty('data')) {
|
|
65
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_FeeStationFiatTransaction["default"]]);
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('pagination')) {
|
|
68
|
+
obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Validates the JSON data with respect to <code>ListFeeStationFiatTransactions200Response</code>.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListFeeStationFiatTransactions200Response</code>.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "validateJSON",
|
|
81
|
+
value: function validateJSON(data) {
|
|
82
|
+
if (data['data']) {
|
|
83
|
+
// data not null
|
|
84
|
+
// ensure the json data is an array
|
|
85
|
+
if (!Array.isArray(data['data'])) {
|
|
86
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
87
|
+
}
|
|
88
|
+
// validate the optional field `data` (array)
|
|
89
|
+
var _iterator = _createForOfIteratorHelper(data['data']),
|
|
90
|
+
_step;
|
|
91
|
+
try {
|
|
92
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
93
|
+
var item = _step.value;
|
|
94
|
+
_FeeStationFiatTransaction["default"].validateJSON(item);
|
|
95
|
+
}
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
;
|
|
102
|
+
}
|
|
103
|
+
// validate the optional field `pagination`
|
|
104
|
+
if (data['pagination']) {
|
|
105
|
+
// data not null
|
|
106
|
+
if (!!_Pagination["default"].validateJSON) {
|
|
107
|
+
_Pagination["default"].validateJSON(data['pagination']);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
}]);
|
|
113
|
+
}();
|
|
114
|
+
/**
|
|
115
|
+
* @member {Array.<module:model/FeeStationFiatTransaction>} data
|
|
116
|
+
*/
|
|
117
|
+
ListFeeStationFiatTransactions200Response.prototype['data'] = undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @member {module:model/Pagination} pagination
|
|
121
|
+
*/
|
|
122
|
+
ListFeeStationFiatTransactions200Response.prototype['pagination'] = undefined;
|
|
123
|
+
var _default = exports["default"] = ListFeeStationFiatTransactions200Response;
|
|
@@ -73,6 +73,9 @@ var PaymentEstimateFeeRequest = /*#__PURE__*/function () {
|
|
|
73
73
|
if (data.hasOwnProperty('recipient_token_id')) {
|
|
74
74
|
obj['recipient_token_id'] = _ApiClient["default"].convertToType(data['recipient_token_id'], 'String');
|
|
75
75
|
}
|
|
76
|
+
if (data.hasOwnProperty('transfer_via_va')) {
|
|
77
|
+
obj['transfer_via_va'] = _ApiClient["default"].convertToType(data['transfer_via_va'], 'Boolean');
|
|
78
|
+
}
|
|
76
79
|
}
|
|
77
80
|
return obj;
|
|
78
81
|
}
|
|
@@ -147,4 +150,10 @@ PaymentEstimateFeeRequest.prototype['estimate_fees'] = undefined;
|
|
|
147
150
|
* @member {String} recipient_token_id
|
|
148
151
|
*/
|
|
149
152
|
PaymentEstimateFeeRequest.prototype['recipient_token_id'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* For OffRamp payout, whether the payout is transferred to a registered bank account via a virtual account (VA) or directly. - `true`: The payout is transferred to a registered bank account via a VA (virtual account). - `false`: The payout is transferred directly to a registered bank account.
|
|
156
|
+
* @member {Boolean} transfer_via_va
|
|
157
|
+
*/
|
|
158
|
+
PaymentEstimateFeeRequest.prototype['transfer_via_va'] = undefined;
|
|
150
159
|
var _default = exports["default"] = PaymentEstimateFeeRequest;
|
|
@@ -68,6 +68,9 @@ var PaymentPayoutRecipientInfo = /*#__PURE__*/function () {
|
|
|
68
68
|
if (data.hasOwnProperty('bank_account_id')) {
|
|
69
69
|
obj['bank_account_id'] = _ApiClient["default"].convertToType(data['bank_account_id'], 'String');
|
|
70
70
|
}
|
|
71
|
+
if (data.hasOwnProperty('transfer_via_va')) {
|
|
72
|
+
obj['transfer_via_va'] = _ApiClient["default"].convertToType(data['transfer_via_va'], 'Boolean');
|
|
73
|
+
}
|
|
71
74
|
}
|
|
72
75
|
return obj;
|
|
73
76
|
}
|
|
@@ -123,4 +126,10 @@ PaymentPayoutRecipientInfo.prototype['currency'] = undefined;
|
|
|
123
126
|
* @member {String} bank_account_id
|
|
124
127
|
*/
|
|
125
128
|
PaymentPayoutRecipientInfo.prototype['bank_account_id'] = undefined;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* For OffRamp payout, whether the payout is transferred to a registered bank account via a virtual account (VA) or directly. - `true`: The payout is transferred to a registered bank account via a VA (virtual account). - `false`: The payout is transferred directly to a registered bank account.
|
|
132
|
+
* @member {Boolean} transfer_via_va
|
|
133
|
+
*/
|
|
134
|
+
PaymentPayoutRecipientInfo.prototype['transfer_via_va'] = undefined;
|
|
126
135
|
var _default = exports["default"] = PaymentPayoutRecipientInfo;
|
|
@@ -33,13 +33,12 @@ var RefundLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>RefundLinkBusinessInfo</code>.
|
|
35
35
|
* @alias module:model/RefundLinkBusinessInfo
|
|
36
|
-
* @param transaction_id {String} The transaction ID of the original order payment or top-up. On the refund page, the from address of this transaction will be pre-filled as the default refund address. The refund will be processed in the same token and on the same blockchain as this transaction.
|
|
37
36
|
* @param amount {String} The amount to refund, denominated in the cryptocurrency of the original payment transaction. The amount must be a positive number and can have up to two decimal places.
|
|
38
37
|
* @param refund_source {module:model/RefundType}
|
|
39
38
|
*/
|
|
40
|
-
function RefundLinkBusinessInfo(
|
|
39
|
+
function RefundLinkBusinessInfo(amount, refund_source) {
|
|
41
40
|
_classCallCheck(this, RefundLinkBusinessInfo);
|
|
42
|
-
RefundLinkBusinessInfo.initialize(this,
|
|
41
|
+
RefundLinkBusinessInfo.initialize(this, amount, refund_source);
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
/**
|
|
@@ -49,8 +48,7 @@ var RefundLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
49
48
|
*/
|
|
50
49
|
return _createClass(RefundLinkBusinessInfo, null, [{
|
|
51
50
|
key: "initialize",
|
|
52
|
-
value: function initialize(obj,
|
|
53
|
-
obj['transaction_id'] = transaction_id;
|
|
51
|
+
value: function initialize(obj, amount, refund_source) {
|
|
54
52
|
obj['amount'] = amount;
|
|
55
53
|
obj['refund_source'] = refund_source;
|
|
56
54
|
}
|
|
@@ -67,6 +65,9 @@ var RefundLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
67
65
|
value: function constructFromObject(data, obj) {
|
|
68
66
|
if (data) {
|
|
69
67
|
obj = obj || new RefundLinkBusinessInfo();
|
|
68
|
+
if (data.hasOwnProperty('order_id')) {
|
|
69
|
+
obj['order_id'] = _ApiClient["default"].convertToType(data['order_id'], 'String');
|
|
70
|
+
}
|
|
70
71
|
if (data.hasOwnProperty('transaction_id')) {
|
|
71
72
|
obj['transaction_id'] = _ApiClient["default"].convertToType(data['transaction_id'], 'String');
|
|
72
73
|
}
|
|
@@ -110,6 +111,10 @@ var RefundLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
110
111
|
} finally {
|
|
111
112
|
_iterator.f();
|
|
112
113
|
}
|
|
114
|
+
if (data['order_id'] && !(typeof data['order_id'] === 'string' || data['order_id'] instanceof String)) {
|
|
115
|
+
throw new Error("Expected the field `order_id` to be a primitive type in the JSON string but got " + data['order_id']);
|
|
116
|
+
}
|
|
117
|
+
// ensure the json data is a string
|
|
113
118
|
if (data['transaction_id'] && !(typeof data['transaction_id'] === 'string' || data['transaction_id'] instanceof String)) {
|
|
114
119
|
throw new Error("Expected the field `transaction_id` to be a primitive type in the JSON string but got " + data['transaction_id']);
|
|
115
120
|
}
|
|
@@ -129,10 +134,16 @@ var RefundLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
129
134
|
}
|
|
130
135
|
}]);
|
|
131
136
|
}();
|
|
132
|
-
RefundLinkBusinessInfo.RequiredProperties = ["
|
|
137
|
+
RefundLinkBusinessInfo.RequiredProperties = ["amount", "refund_source"];
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The id of the order to refund. Specify either `order_id` or `transaction_id`, but not both.
|
|
141
|
+
* @member {String} order_id
|
|
142
|
+
*/
|
|
143
|
+
RefundLinkBusinessInfo.prototype['order_id'] = undefined;
|
|
133
144
|
|
|
134
145
|
/**
|
|
135
|
-
* The transaction ID of the original order payment or top-up.
|
|
146
|
+
* The transaction ID of the original order payment or top-up. Specify either `order_id` or `transaction_id`, but not both. On the refund page, the from address of this transaction will be pre-filled as the default refund address. The refund will be processed in the same token and on the same blockchain as this transaction.
|
|
136
147
|
* @member {String} transaction_id
|
|
137
148
|
*/
|
|
138
149
|
RefundLinkBusinessInfo.prototype['transaction_id'] = undefined;
|
|
@@ -11,6 +11,7 @@ var _TransactionBabylonBusinessInfo = _interopRequireDefault(require("./Transact
|
|
|
11
11
|
var _TransactionBabylonTxParameters = _interopRequireDefault(require("./TransactionBabylonTxParameters"));
|
|
12
12
|
var _TransactionCoreStakeInfo = _interopRequireDefault(require("./TransactionCoreStakeInfo"));
|
|
13
13
|
var _TransactionExtraType = _interopRequireDefault(require("./TransactionExtraType"));
|
|
14
|
+
var _TransactionWalletConnectInfo = _interopRequireDefault(require("./TransactionWalletConnectInfo"));
|
|
14
15
|
var _TransactionExtra;
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
17
|
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); }
|
|
@@ -37,7 +38,7 @@ var TransactionExtra = /*#__PURE__*/function () {
|
|
|
37
38
|
/**
|
|
38
39
|
* Constructs a new <code>TransactionExtra</code>.
|
|
39
40
|
* @alias module:model/TransactionExtra
|
|
40
|
-
* @param {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo)} instance The actual instance to initialize TransactionExtra.
|
|
41
|
+
* @param {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo|module:model/TransactionWalletConnectInfo)} instance The actual instance to initialize TransactionExtra.
|
|
41
42
|
*/
|
|
42
43
|
function TransactionExtra() {
|
|
43
44
|
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -70,6 +71,10 @@ var TransactionExtra = /*#__PURE__*/function () {
|
|
|
70
71
|
this.actualInstance = _TransactionCoreStakeInfo["default"].constructFromObject(instance);
|
|
71
72
|
match++;
|
|
72
73
|
break;
|
|
74
|
+
case "WalletConnectInfo":
|
|
75
|
+
this.actualInstance = _TransactionWalletConnectInfo["default"].constructFromObject(instance);
|
|
76
|
+
match++;
|
|
77
|
+
break;
|
|
73
78
|
default:
|
|
74
79
|
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
75
80
|
break;
|
|
@@ -145,13 +150,36 @@ var TransactionExtra = /*#__PURE__*/function () {
|
|
|
145
150
|
// json data failed to deserialize into TransactionCoreStakeInfo
|
|
146
151
|
errorMessages.push("Failed to construct TransactionCoreStakeInfo: " + err);
|
|
147
152
|
}
|
|
153
|
+
try {
|
|
154
|
+
if (instance instanceof _TransactionWalletConnectInfo["default"]) {
|
|
155
|
+
this.actualInstance = instance;
|
|
156
|
+
} else if (!!_TransactionWalletConnectInfo["default"].validateJSON && _TransactionWalletConnectInfo["default"].validateJSON(instance)) {
|
|
157
|
+
// plain JS object
|
|
158
|
+
// create TransactionWalletConnectInfo from JS object
|
|
159
|
+
this.actualInstance = _TransactionWalletConnectInfo["default"].constructFromObject(instance);
|
|
160
|
+
} else {
|
|
161
|
+
if (_TransactionWalletConnectInfo["default"].constructFromObject(instance)) {
|
|
162
|
+
if (!!_TransactionWalletConnectInfo["default"].constructFromObject(instance).toJSON) {
|
|
163
|
+
if (_TransactionWalletConnectInfo["default"].constructFromObject(instance).toJSON()) {
|
|
164
|
+
this.actualInstance = _TransactionWalletConnectInfo["default"].constructFromObject(instance);
|
|
165
|
+
}
|
|
166
|
+
} else {
|
|
167
|
+
this.actualInstance = _TransactionWalletConnectInfo["default"].constructFromObject(instance);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
match++;
|
|
172
|
+
} catch (err) {
|
|
173
|
+
// json data failed to deserialize into TransactionWalletConnectInfo
|
|
174
|
+
errorMessages.push("Failed to construct TransactionWalletConnectInfo: " + err);
|
|
175
|
+
}
|
|
148
176
|
|
|
149
177
|
// if (match > 1) {
|
|
150
|
-
// throw new Error("Multiple matches found constructing `TransactionExtra` with oneOf schemas TransactionBabylonBusinessInfo, TransactionBabylonTxParameters, TransactionCoreStakeInfo. Input: " + JSON.stringify(instance));
|
|
178
|
+
// throw new Error("Multiple matches found constructing `TransactionExtra` with oneOf schemas TransactionBabylonBusinessInfo, TransactionBabylonTxParameters, TransactionCoreStakeInfo, TransactionWalletConnectInfo. Input: " + JSON.stringify(instance));
|
|
151
179
|
// } else
|
|
152
180
|
if (match === 0) {
|
|
153
181
|
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
154
|
-
// throw new Error("No match found constructing `TransactionExtra` with oneOf schemas TransactionBabylonBusinessInfo, TransactionBabylonTxParameters, TransactionCoreStakeInfo. Details: " +
|
|
182
|
+
// throw new Error("No match found constructing `TransactionExtra` with oneOf schemas TransactionBabylonBusinessInfo, TransactionBabylonTxParameters, TransactionCoreStakeInfo, TransactionWalletConnectInfo. Details: " +
|
|
155
183
|
// errorMessages.join(", "));
|
|
156
184
|
return;
|
|
157
185
|
} else {// only 1 match
|
|
@@ -170,16 +198,16 @@ var TransactionExtra = /*#__PURE__*/function () {
|
|
|
170
198
|
key: "getActualInstance",
|
|
171
199
|
value:
|
|
172
200
|
/**
|
|
173
|
-
* Gets the actual instance, which can be <code>TransactionBabylonBusinessInfo</code>, <code>TransactionBabylonTxParameters</code>, <code>TransactionCoreStakeInfo</code>.
|
|
174
|
-
* @return {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo)} The actual instance.
|
|
201
|
+
* Gets the actual instance, which can be <code>TransactionBabylonBusinessInfo</code>, <code>TransactionBabylonTxParameters</code>, <code>TransactionCoreStakeInfo</code>, <code>TransactionWalletConnectInfo</code>.
|
|
202
|
+
* @return {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo|module:model/TransactionWalletConnectInfo)} The actual instance.
|
|
175
203
|
*/
|
|
176
204
|
function getActualInstance() {
|
|
177
205
|
return this.actualInstance;
|
|
178
206
|
}
|
|
179
207
|
|
|
180
208
|
/**
|
|
181
|
-
* Sets the actual instance, which can be <code>TransactionBabylonBusinessInfo</code>, <code>TransactionBabylonTxParameters</code>, <code>TransactionCoreStakeInfo</code>.
|
|
182
|
-
* @param {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo)} obj The actual instance.
|
|
209
|
+
* Sets the actual instance, which can be <code>TransactionBabylonBusinessInfo</code>, <code>TransactionBabylonTxParameters</code>, <code>TransactionCoreStakeInfo</code>, <code>TransactionWalletConnectInfo</code>.
|
|
210
|
+
* @param {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo|module:model/TransactionWalletConnectInfo)} obj The actual instance.
|
|
183
211
|
*/
|
|
184
212
|
}, {
|
|
185
213
|
key: "setActualInstance",
|
|
@@ -274,5 +302,23 @@ TransactionExtra.prototype['validator_address'] = undefined;
|
|
|
274
302
|
* @member {String} reward_address
|
|
275
303
|
*/
|
|
276
304
|
TransactionExtra.prototype['reward_address'] = undefined;
|
|
277
|
-
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* The dapp name that initiated this transaction.
|
|
308
|
+
* @member {String} dapp_name
|
|
309
|
+
*/
|
|
310
|
+
TransactionExtra.prototype['dapp_name'] = undefined;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* The dapp domain that initiated this transaction
|
|
314
|
+
* @member {String} dapp_domain
|
|
315
|
+
*/
|
|
316
|
+
TransactionExtra.prototype['dapp_domain'] = undefined;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* The session id that initiated this transaction
|
|
320
|
+
* @member {String} session_id
|
|
321
|
+
*/
|
|
322
|
+
TransactionExtra.prototype['session_id'] = undefined;
|
|
323
|
+
TransactionExtra.OneOf = ["TransactionBabylonBusinessInfo", "TransactionBabylonTxParameters", "TransactionCoreStakeInfo", "TransactionWalletConnectInfo"];
|
|
278
324
|
var _default = exports["default"] = TransactionExtra;
|
package/docs/AutoSweepApi.md
CHANGED
|
@@ -4,6 +4,7 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
+
[**cancelAutoSweepTaskById**](AutoSweepApi.md#cancelAutoSweepTaskById) | **POST** /auto_sweep/tasks/{task_id}/cancel | Cancel auto sweep task
|
|
7
8
|
[**createAutoSweepTask**](AutoSweepApi.md#createAutoSweepTask) | **POST** /auto_sweep/tasks | Create auto-sweep task
|
|
8
9
|
[**createWalletSweepToAddresses**](AutoSweepApi.md#createWalletSweepToAddresses) | **POST** /auto_sweep/sweep_to_addresses | Create sweep-to address
|
|
9
10
|
[**getAutoSweepTaskById**](AutoSweepApi.md#getAutoSweepTaskById) | **GET** /auto_sweep/tasks/{task_id} | Get auto-sweep task details
|
|
@@ -12,6 +13,56 @@ Method | HTTP request | Description
|
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
## cancelAutoSweepTaskById
|
|
17
|
+
|
|
18
|
+
> AutoSweepTask cancelAutoSweepTaskById(task_id)
|
|
19
|
+
|
|
20
|
+
Cancel auto sweep task
|
|
21
|
+
|
|
22
|
+
This operation cancels an in-progress auto sweep task by its ID. Only tasks with the `Submitted` status can be cancelled. Tasks that have already been processed (status `TransactionCreated`) cannot be cancelled.
|
|
23
|
+
|
|
24
|
+
### Example
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
28
|
+
// Initialize the API client
|
|
29
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
30
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
31
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
32
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
33
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
34
|
+
// Call the API
|
|
35
|
+
const apiInstance = new CoboWaas2.AutoSweepApi();
|
|
36
|
+
const task_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
37
|
+
apiInstance.cancelAutoSweepTaskById(task_id).then((data) => {
|
|
38
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
39
|
+
}, (error) => {
|
|
40
|
+
console.error(error);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Parameters
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
Name | Type | Description | Notes
|
|
49
|
+
------------- | ------------- | ------------- | -------------
|
|
50
|
+
**task_id** | **String**| The auto sweep task ID. |
|
|
51
|
+
|
|
52
|
+
### Return type
|
|
53
|
+
|
|
54
|
+
[**AutoSweepTask**](AutoSweepTask.md)
|
|
55
|
+
|
|
56
|
+
### Authorization
|
|
57
|
+
|
|
58
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
59
|
+
|
|
60
|
+
### HTTP request headers
|
|
61
|
+
|
|
62
|
+
- **Content-Type**: Not defined
|
|
63
|
+
- **Accept**: application/json
|
|
64
|
+
|
|
65
|
+
|
|
15
66
|
## createAutoSweepTask
|
|
16
67
|
|
|
17
68
|
> AutoSweepTask createAutoSweepTask(opts)
|
|
@@ -6,5 +6,6 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**wallet_id** | **String** | ID of the wallet where the token will be swept. |
|
|
8
8
|
**token_id** | **String** | ID of the token to be swept. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). |
|
|
9
|
+
**min_balance_threshold** | **String** | The minimum token balance threshold for auto sweep. If the token balance of an address is less than this threshold, the address will not be swept. | [optional]
|
|
9
10
|
|
|
10
11
|
|
package/docs/FeeStationApi.md
CHANGED
|
@@ -8,6 +8,7 @@ Method | HTTP request | Description
|
|
|
8
8
|
[**estimateFeeStationFee**](FeeStationApi.md#estimateFeeStationFee) | **POST** /fee_station/transactions/estimate_fee | Estimate transaction fee
|
|
9
9
|
[**getFeeStationTransactionById**](FeeStationApi.md#getFeeStationTransactionById) | **GET** /fee_station/transactions/{transaction_id} | Get Fee Station transaction information
|
|
10
10
|
[**listFeeStationAddresses**](FeeStationApi.md#listFeeStationAddresses) | **GET** /fee_station/addresses | List Fee Station addresses
|
|
11
|
+
[**listFeeStationFiatTransactions**](FeeStationApi.md#listFeeStationFiatTransactions) | **GET** /fee_station/fiat_transactions | List Fee Station fiat transactions
|
|
11
12
|
[**listFeeStationTransactions**](FeeStationApi.md#listFeeStationTransactions) | **GET** /fee_station/transactions | List all Fee Station transactions
|
|
12
13
|
[**listTokenBalancesForFeeStation**](FeeStationApi.md#listTokenBalancesForFeeStation) | **GET** /fee_station/tokens | List Fee Station token balances
|
|
13
14
|
|
|
@@ -227,6 +228,70 @@ Name | Type | Description | Notes
|
|
|
227
228
|
- **Accept**: application/json
|
|
228
229
|
|
|
229
230
|
|
|
231
|
+
## listFeeStationFiatTransactions
|
|
232
|
+
|
|
233
|
+
> ListFeeStationFiatTransactions200Response listFeeStationFiatTransactions(opts)
|
|
234
|
+
|
|
235
|
+
List Fee Station fiat transactions
|
|
236
|
+
|
|
237
|
+
This operation retrieves all Fee Station fiat transactions under your organization. You can filter the results by request IDs, transaction IDs, transaction type, and created timestamp. You can also paginate your query results.
|
|
238
|
+
|
|
239
|
+
### Example
|
|
240
|
+
|
|
241
|
+
```javascript
|
|
242
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
243
|
+
// Initialize the API client
|
|
244
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
245
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
246
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
247
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
248
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
249
|
+
// Call the API
|
|
250
|
+
const apiInstance = new CoboWaas2.FeeStationApi();
|
|
251
|
+
const opts = {
|
|
252
|
+
'transaction_ids': "f47ac10b-58cc-4372-a567-0e02b2c3d479,557918d2-632a-4fe1-932f-315711f05fe3",
|
|
253
|
+
'transaction_type': new CoboWaas2.FeeStationFiatTransactionType(),
|
|
254
|
+
'min_created_timestamp': 1635744000000,
|
|
255
|
+
'max_created_timestamp': 1635744000000,
|
|
256
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
257
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
258
|
+
'limit': 10
|
|
259
|
+
};
|
|
260
|
+
apiInstance.listFeeStationFiatTransactions(opts).then((data) => {
|
|
261
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
262
|
+
}, (error) => {
|
|
263
|
+
console.error(error);
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Parameters
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
Name | Type | Description | Notes
|
|
272
|
+
------------- | ------------- | ------------- | -------------
|
|
273
|
+
**transaction_ids** | **String**| A list of transaction IDs, separated by comma. | [optional]
|
|
274
|
+
**transaction_type** | [**FeeStationFiatTransactionType**](.md)| The type of the fiat transaction. Possible values include: - `deposit`: A deposit transaction. - `transfer`: A transfer transaction. | [optional]
|
|
275
|
+
**min_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional]
|
|
276
|
+
**max_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. | [optional]
|
|
277
|
+
**before** | **String**| 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. | [optional]
|
|
278
|
+
**after** | **String**| 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. | [optional]
|
|
279
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
280
|
+
|
|
281
|
+
### Return type
|
|
282
|
+
|
|
283
|
+
[**ListFeeStationFiatTransactions200Response**](ListFeeStationFiatTransactions200Response.md)
|
|
284
|
+
|
|
285
|
+
### Authorization
|
|
286
|
+
|
|
287
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
288
|
+
|
|
289
|
+
### HTTP request headers
|
|
290
|
+
|
|
291
|
+
- **Content-Type**: Not defined
|
|
292
|
+
- **Accept**: application/json
|
|
293
|
+
|
|
294
|
+
|
|
230
295
|
## listFeeStationTransactions
|
|
231
296
|
|
|
232
297
|
> ListTransactions200Response listFeeStationTransactions(opts)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# CoboWaas2.FeeStationFiatTransaction
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**transaction_id** | **String** | The transaction ID. |
|
|
8
|
+
**main_transaction_id** | **String** | The UUID of the parent (main) transaction that this record is associated with. Set only when the current record is a gas/fee transaction initiated by FeeStation; omit for main transactions. | [optional]
|
|
9
|
+
**transaction_type** | [**FeeStationFiatTransactionType**](FeeStationFiatTransactionType.md) | |
|
|
10
|
+
**amount** | **String** | The transaction amount. |
|
|
11
|
+
**fiat_currency** | **String** | The fiat currency of the transaction. Possible values include: - `USD`: US Dollar. |
|
|
12
|
+
**status** | **String** | The status of the fiat transaction. Possible values include: - `Created`: The transaction has been created. - `Succeeded`: The transaction has been completed successfully. |
|
|
13
|
+
**cobo_category** | **[String]** | The Cobo category of the transaction. | [optional]
|
|
14
|
+
**created_timestamp** | **Number** | The time when the transaction was created, in Unix timestamp format, measured in milliseconds. | [optional]
|
|
15
|
+
**modified_timestamp** | **Number** | The time when the transaction was last modified, in Unix timestamp format, measured in milliseconds. | [optional]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Enum: StatusEnum
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* `Created` (value: `"Created"`)
|
|
23
|
+
|
|
24
|
+
* `Succeeded` (value: `"Succeeded"`)
|
|
25
|
+
|
|
26
|
+
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.ListFeeStationFiatTransactions200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**data** | [**[FeeStationFiatTransaction]**](FeeStationFiatTransaction.md) | | [optional]
|
|
8
|
+
**pagination** | [**Pagination**](Pagination.md) | | [optional]
|
|
9
|
+
|
|
10
|
+
|
package/docs/PaymentApi.md
CHANGED
|
@@ -21,6 +21,7 @@ Method | HTTP request | Description
|
|
|
21
21
|
[**createRefund**](PaymentApi.md#createRefund) | **POST** /payments/refunds | Create refund order
|
|
22
22
|
[**createRefundLink**](PaymentApi.md#createRefundLink) | **POST** /payments/links/refunds | Create refund link
|
|
23
23
|
[**createReport**](PaymentApi.md#createReport) | **POST** /payments/reports | Generate reports
|
|
24
|
+
[**createSdkLink**](PaymentApi.md#createSdkLink) | **POST** /payments/links/sdk | Create SDK link
|
|
24
25
|
[**createSettlementRequest**](PaymentApi.md#createSettlementRequest) | **POST** /payments/settlement_requests | Create settlement request
|
|
25
26
|
[**createTopUpAddresses**](PaymentApi.md#createTopUpAddresses) | **POST** /payments/topup/address | Batch create top-up addresses
|
|
26
27
|
[**deleteCounterpartyById**](PaymentApi.md#deleteCounterpartyById) | **DELETE** /payments/counterparty/{counterparty_id} | Delete counterparty
|
|
@@ -960,6 +961,52 @@ Name | Type | Description | Notes
|
|
|
960
961
|
- **Accept**: application/json
|
|
961
962
|
|
|
962
963
|
|
|
964
|
+
## createSdkLink
|
|
965
|
+
|
|
966
|
+
> Link createSdkLink()
|
|
967
|
+
|
|
968
|
+
Create SDK link
|
|
969
|
+
|
|
970
|
+
This operation creates a payment link for use with the front-end SDK integration. The returned URL and token can be used to initialize the Cobo payment SDK in your front-end application. For more information, see [Cobo Payment Guide](https://www.cobo.com/payments/en/guides/overview).
|
|
971
|
+
|
|
972
|
+
### Example
|
|
973
|
+
|
|
974
|
+
```javascript
|
|
975
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
976
|
+
// Initialize the API client
|
|
977
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
978
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
979
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
980
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
981
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
982
|
+
// Call the API
|
|
983
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
984
|
+
apiInstance.createSdkLink().then((data) => {
|
|
985
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
986
|
+
}, (error) => {
|
|
987
|
+
console.error(error);
|
|
988
|
+
});
|
|
989
|
+
|
|
990
|
+
```
|
|
991
|
+
|
|
992
|
+
### Parameters
|
|
993
|
+
|
|
994
|
+
This endpoint does not need any parameter.
|
|
995
|
+
|
|
996
|
+
### Return type
|
|
997
|
+
|
|
998
|
+
[**Link**](Link.md)
|
|
999
|
+
|
|
1000
|
+
### Authorization
|
|
1001
|
+
|
|
1002
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
1003
|
+
|
|
1004
|
+
### HTTP request headers
|
|
1005
|
+
|
|
1006
|
+
- **Content-Type**: Not defined
|
|
1007
|
+
- **Accept**: application/json
|
|
1008
|
+
|
|
1009
|
+
|
|
963
1010
|
## createSettlementRequest
|
|
964
1011
|
|
|
965
1012
|
> Settlement createSettlementRequest(opts)
|
|
@@ -7,5 +7,6 @@ Name | Type | Description | Notes
|
|
|
7
7
|
**fee_type** | [**PaymentFeeType**](PaymentFeeType.md) | | [optional]
|
|
8
8
|
**estimate_fees** | [**[PaymentEstimateFee]**](PaymentEstimateFee.md) | A list of token IDs and amounts for which fees will be calculated. |
|
|
9
9
|
**recipient_token_id** | **String** | The token ID that the recipient will receive. Required only when `fee_type` is `CryptoPayoutBridge`. | [optional]
|
|
10
|
+
**transfer_via_va** | **Boolean** | For OffRamp payout, whether the payout is transferred to a registered bank account via a virtual account (VA) or directly. - `true`: The payout is transferred to a registered bank account via a VA (virtual account). - `false`: The payout is transferred directly to a registered bank account. | [optional]
|
|
10
11
|
|
|
11
12
|
|
|
@@ -8,5 +8,6 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**token_id** | **String** | The token ID for the cryptocurrency to be sent to the recipient. If `recipient_info.token_id` is on a different chain than `payout_param.token_id`, the token will be automatically bridged to the chain specified in `recipient_info.token_id`. | [optional]
|
|
9
9
|
**currency** | **String** | The fiat currency of the bank account to which the payout will be sent. | [optional]
|
|
10
10
|
**bank_account_id** | **String** | The ID of the bank account to which the payout will be sent. You can retrieve the bank account ID by calling [List destination entries](https://www.cobo.com/payments/en/api-references/payment/list-destination-entries). | [optional]
|
|
11
|
+
**transfer_via_va** | **Boolean** | For OffRamp payout, whether the payout is transferred to a registered bank account via a virtual account (VA) or directly. - `true`: The payout is transferred to a registered bank account via a VA (virtual account). - `false`: The payout is transferred directly to a registered bank account. | [optional]
|
|
11
12
|
|
|
12
13
|
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**
|
|
7
|
+
**order_id** | **String** | The id of the order to refund. Specify either `order_id` or `transaction_id`, but not both. | [optional]
|
|
8
|
+
**transaction_id** | **String** | The transaction ID of the original order payment or top-up. Specify either `order_id` or `transaction_id`, but not both. On the refund page, the from address of this transaction will be pre-filled as the default refund address. The refund will be processed in the same token and on the same blockchain as this transaction. | [optional]
|
|
8
9
|
**amount** | **String** | The amount to refund, denominated in the cryptocurrency of the original payment transaction. The amount must be a positive number and can have up to two decimal places. |
|
|
9
10
|
**refund_source** | [**RefundType**](RefundType.md) | |
|
|
10
11
|
**merchant_id** | **String** | The merchant ID, required if `refund_source` is `Merchant`. The fund will be deducted from the specified merchant's balance. | [optional]
|