bleumi_pay_sdk_ruby 1.0.2 → 1.0.7
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.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +67 -47
- data/bleumi_pay_sdk_ruby.gemspec +4 -5
- data/docs/AlgorandBalance.md +28 -0
- data/docs/AlgorandWalletAddress.md +24 -0
- data/docs/AlgorandWalletInputs.md +23 -0
- data/docs/BadRequest.md +2 -1
- data/docs/Chain.md +14 -0
- data/docs/CheckoutToken.md +28 -0
- data/docs/CreateCheckoutUrlRequest.md +28 -0
- data/docs/CreateCheckoutUrlResponse.md +17 -0
- data/docs/CreatePaymentRequest.md +19 -0
- data/docs/CreatePaymentResponse.md +15 -0
- data/docs/CreatePayoutRequest.md +28 -0
- data/docs/CreatePayoutResponse.md +15 -0
- data/docs/EthereumBalance.md +30 -0
- data/docs/EthereumWalletAddress.md +23 -0
- data/docs/EthereumWalletInputs.md +23 -0
- data/docs/HostedCheckoutsApi.md +197 -0
- data/docs/PaginatedPaymentOperations.md +28 -0
- data/docs/PaginatedPayments.md +95 -0
- data/docs/PaginatedPayoutItems.md +59 -0
- data/docs/Payment.md +67 -0
- data/docs/PaymentAddresses.md +21 -0
- data/docs/PaymentBalances.md +21 -0
- data/docs/PaymentOperation.md +46 -0
- data/docs/PaymentOperationInputs.md +31 -0
- data/docs/PaymentOperationResponse.md +15 -0
- data/docs/PaymentRefundRequest.md +14 -0
- data/docs/PaymentSettleRequest.md +17 -0
- data/docs/PaymentsApi.md +368 -0
- data/docs/Payout.md +18 -0
- data/docs/PayoutItem.md +39 -0
- data/docs/PayoutItemInputs.md +28 -0
- data/docs/PayoutsApi.md +137 -0
- data/docs/RskBalance.md +28 -0
- data/docs/ValidateCheckoutRequest.md +21 -0
- data/docs/ValidateCheckoutResponse.md +15 -0
- data/docs/WalletBalance.md +18 -4
- data/hc_create.rb +40 -0
- data/hc_list.rb +17 -0
- data/hc_validate.rb +22 -0
- data/lib/bleumi_pay_sdk_ruby.rb +38 -17
- data/lib/bleumi_pay_sdk_ruby/api/hosted_checkouts_api.rb +212 -0
- data/lib/bleumi_pay_sdk_ruby/api/payments_api.rb +517 -0
- data/lib/bleumi_pay_sdk_ruby/api/payouts_api.rb +157 -0
- data/lib/bleumi_pay_sdk_ruby/api/request_validator.rb +288 -0
- data/lib/bleumi_pay_sdk_ruby/api_client.rb +11 -9
- data/lib/bleumi_pay_sdk_ruby/api_error.rb +3 -3
- data/lib/bleumi_pay_sdk_ruby/configuration.rb +4 -4
- data/lib/bleumi_pay_sdk_ruby/models/algorand_balance.rb +219 -0
- data/lib/bleumi_pay_sdk_ruby/models/algorand_wallet_address.rb +221 -0
- data/lib/bleumi_pay_sdk_ruby/models/algorand_wallet_inputs.rb +247 -0
- data/lib/bleumi_pay_sdk_ruby/models/bad_request.rb +15 -5
- data/lib/bleumi_pay_sdk_ruby/models/{eth_network.rb → chain.rb} +12 -9
- data/lib/bleumi_pay_sdk_ruby/models/checkout_token.rb +302 -0
- data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_request.rb +312 -0
- data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_response.rb +227 -0
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_create_input.rb → create_payment_request.rb} +33 -11
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_create_output.rb → create_payment_response.rb} +19 -23
- data/lib/bleumi_pay_sdk_ruby/models/create_payout_request.rb +244 -0
- data/lib/bleumi_pay_sdk_ruby/models/create_payout_response.rb +212 -0
- data/lib/bleumi_pay_sdk_ruby/models/ethereum_balance.rb +241 -0
- data/lib/bleumi_pay_sdk_ruby/models/ethereum_wallet_address.rb +221 -0
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_inputs.rb → ethereum_wallet_inputs.rb} +35 -50
- data/lib/bleumi_pay_sdk_ruby/models/paginated_payment_operations.rb +224 -0
- data/lib/bleumi_pay_sdk_ruby/models/{paginated_wallet_operations.rb → paginated_payments.rb} +19 -9
- data/lib/bleumi_pay_sdk_ruby/models/{paginated_wallets.rb → paginated_payout_items.rb} +19 -9
- data/lib/bleumi_pay_sdk_ruby/models/{wallet.rb → payment.rb} +31 -54
- data/lib/bleumi_pay_sdk_ruby/models/payment_addresses.rb +231 -0
- data/lib/bleumi_pay_sdk_ruby/models/payment_balances.rb +225 -0
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_operation.rb → payment_operation.rb} +44 -18
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_operation_inputs.rb → payment_operation_inputs.rb} +38 -12
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_operation_output.rb → payment_operation_response.rb} +18 -8
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_refund_operation_input.rb → payment_refund_request.rb} +18 -8
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_settle_operation_input.rb → payment_settle_request.rb} +18 -8
- data/lib/bleumi_pay_sdk_ruby/models/payout.rb +237 -0
- data/lib/bleumi_pay_sdk_ruby/models/payout_item.rb +286 -0
- data/lib/bleumi_pay_sdk_ruby/models/payout_item_inputs.rb +244 -0
- data/lib/bleumi_pay_sdk_ruby/models/rsk_balance.rb +219 -0
- data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_request.rb +257 -0
- data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_response.rb +212 -0
- data/lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb +37 -12
- data/lib/bleumi_pay_sdk_ruby/version.rb +4 -4
- data/po_create.rb +39 -0
- data/po_list.rb +23 -0
- data/py_create.rb +48 -0
- data/py_get.rb +18 -0
- data/py_getop.rb +19 -0
- data/py_list.rb +24 -0
- data/py_listops.rb +21 -0
- data/py_refund.rb +43 -0
- data/py_settle.rb +43 -0
- data/spec/api/hosted_checkouts_api_spec.rb +67 -0
- data/spec/api/payments_api_spec.rb +123 -0
- data/spec/api/payouts_api_spec.rb +61 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/algorand_balance_spec.rb +47 -0
- data/spec/models/algorand_wallet_address_spec.rb +47 -0
- data/spec/models/algorand_wallet_inputs_spec.rb +65 -0
- data/spec/models/bad_request_spec.rb +47 -0
- data/spec/models/chain_spec.rb +35 -0
- data/spec/models/checkout_token_spec.rb +77 -0
- data/spec/models/create_checkout_url_request_spec.rb +89 -0
- data/spec/models/create_checkout_url_response_spec.rb +47 -0
- data/spec/models/create_payment_request_spec.rb +59 -0
- data/spec/models/create_payment_response_spec.rb +41 -0
- data/spec/models/create_payout_request_spec.rb +53 -0
- data/spec/models/create_payout_response_spec.rb +41 -0
- data/spec/models/ethereum_balance_spec.rb +59 -0
- data/spec/models/ethereum_wallet_address_spec.rb +47 -0
- data/spec/models/ethereum_wallet_inputs_spec.rb +65 -0
- data/spec/models/paginated_payment_operations_spec.rb +47 -0
- data/spec/models/paginated_payments_spec.rb +47 -0
- data/spec/models/paginated_payout_items_spec.rb +47 -0
- data/spec/models/payment_addresses_spec.rb +53 -0
- data/spec/models/payment_balances_spec.rb +53 -0
- data/spec/models/payment_operation_inputs_spec.rb +65 -0
- data/spec/models/payment_operation_response_spec.rb +41 -0
- data/spec/models/payment_operation_spec.rb +71 -0
- data/spec/models/payment_refund_request_spec.rb +41 -0
- data/spec/models/payment_settle_request_spec.rb +47 -0
- data/spec/models/payment_spec.rb +65 -0
- data/spec/models/payout_item_inputs_spec.rb +53 -0
- data/spec/models/payout_item_spec.rb +71 -0
- data/spec/models/payout_spec.rb +53 -0
- data/spec/models/rsk_balance_spec.rb +47 -0
- data/spec/models/validate_checkout_request_spec.rb +59 -0
- data/spec/models/validate_checkout_response_spec.rb +41 -0
- data/spec/models/wallet_balance_spec.rb +65 -0
- data/spec/spec_helper.rb +111 -0
- metadata +180 -49
- data/docs/Erc20PaymentsApi.md +0 -334
- data/docs/EthAddress.md +0 -8
- data/docs/EthNetwork.md +0 -9
- data/docs/PaginatedWalletOperations.md +0 -8
- data/docs/PaginatedWallets.md +0 -8
- data/docs/Wallet.md +0 -13
- data/docs/WalletCreateInput.md +0 -9
- data/docs/WalletCreateOutput.md +0 -10
- data/docs/WalletInputs.md +0 -11
- data/docs/WalletOperation.md +0 -11
- data/docs/WalletOperationInputs.md +0 -10
- data/docs/WalletOperationOutput.md +0 -8
- data/docs/WalletRefundOperationInput.md +0 -7
- data/docs/WalletSettleOperationInput.md +0 -8
- data/lib/bleumi_pay_sdk_ruby/api/erc20_payments_api.rb +0 -482
- data/lib/bleumi_pay_sdk_ruby/models/eth_address.rb +0 -208
data/docs/EthAddress.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# BleumiPay::EthAddress
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
Name | Type | Description | Notes
|
|
6
|
-
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**addr** | **String** | Valid Ethereum address string should pass validation pattern: '^0x[a-fA-F0-9]{40}$'| Eg. 0x13e4ACeFE6a6700604929946E70E6443E4E73447
|
|
8
|
-
|
data/docs/EthNetwork.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# BleumiPay::EthNetwork
|
|
2
|
-
|
|
3
|
-
## Enum
|
|
4
|
-
|
|
5
|
-
* `BleumiPay::EthNetwork::MAINNET` (value: `"mainnet"`)
|
|
6
|
-
* `BleumiPay::EthNetwork::ROPSTEN` (value: `"ropsten"`)
|
|
7
|
-
* `BleumiPay::EthNetwork::GOERLI` (value: `"goerli"`)
|
|
8
|
-
* `BleumiPay::EthNetwork::KOVAN` (value: `"kovan"`)
|
|
9
|
-
* `BleumiPay::EthNetwork::RINKEBY` (value: `"rinkeby"`)
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# BleumiPay::PaginatedWalletOperations
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
Name | Type | Description | Notes
|
|
6
|
-
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**results** | [**Array<WalletOperation>**](WalletOperation.md) | Array of Wallet Operations |
|
|
8
|
-
**next_token** | **String** | Cursor to fetch next set of results. (if next set is available) |
|
data/docs/PaginatedWallets.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# BleumiPay::PaginatedWallets
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
Name | Type | Description | Notes
|
|
6
|
-
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**results** | [**Array<Wallet>**](Wallet.md) | Array of Wallets |
|
|
8
|
-
**next_token** | **String** | Cursor to fetch next page of results, empty if no more results |
|
data/docs/Wallet.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# BleumiPay::Wallet
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
Name | Type | Description | Notes
|
|
6
|
-
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**id** | **String** | Unique ID identifying the wallet |
|
|
8
|
-
**chain** | **String** | Ethereum network of the wallet. Please refer to the [Supported Ethereum Networks.](https://pay.bleumi.com/docs/#supported-ethereum-networks) |
|
|
9
|
-
**addr** | **String** | Wallet address |
|
|
10
|
-
**balances** | [**Hash<String, WalletBalance>**](WalletBalance.md) | A dictionary which gives the balance, token-digits and token-balance for each ERC-20 token in the wallet. |
|
|
11
|
-
**inputs** | [**WalletInputs**](WalletInputs.md) | Parameters required to interact with the [Payment Processor](https://pay.bleumi.com/docs/#payment-processor-address) |
|
|
12
|
-
**created_at** | **Integer** | The created UNIX timestamp of the wallet |
|
|
13
|
-
**updated_at** | **Integer** | The last updated UNIX timestamp of the wallet |
|
data/docs/WalletCreateInput.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# BleumiPay::WalletCreateInput
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
Name | Type | Description | Notes
|
|
6
|
-
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**id** | **String** | Unique identifier for this wallet |
|
|
8
|
-
**buyer_address** | [**EthAddress**](EthAddress.md) | Ethereum address of buyer. Refund operations on this wallet will use this address. |
|
|
9
|
-
**transfer_address** | [**EthAddress**](EthAddress.md) | The Ethereum network address of merchant. |
|
data/docs/WalletCreateOutput.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# BleumiPay::WalletCreateOutput
|
|
2
|
-
|
|
3
|
-
Confirmation of wallet generation.
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
Name | Type | Description | Notes
|
|
8
|
-
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**chain** | [**EthNetwork**](EthNetwork.md) | Ethereum network in which wallet will be created. Please refer to the [Supported Ethereum Networks](https://pay.bleumi.com/docs/#supported-ethereum-networks) |
|
|
10
|
-
**addr** | **String** | Wallet address |
|
data/docs/WalletInputs.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# BleumiPay::WalletInputs
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
Name | Type | Description | Notes
|
|
6
|
-
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**buyer** | **String** | Address of the buyer |
|
|
8
|
-
**merchant** | **String** | Address of the merchant |
|
|
9
|
-
**wallet_library** | **String** | Wallet Library address |
|
|
10
|
-
**wallet_proxy** | **String** | Wallet Proxy address |
|
|
11
|
-
**salt** | **String** | Salt used to create the wallet |
|
data/docs/WalletOperation.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# BleumiPay::WalletOperation
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
Name | Type | Description | Notes
|
|
6
|
-
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**id** | **String** | Unique ID of the wallet; specified when it was created by your system | [optional]
|
|
8
|
-
**func_name** | **String** | Name of the function invoked on the [Payment Processor](https://pay.bleumi.com/docs/#payment-processor-address). Following are the functions available:<br/> - createAndSettleWallet<br/> - createAndRefundWallet |
|
|
9
|
-
**status** | **Boolean** | <b>null</b> - operation in progress <br/> <b>true</b> - operation completed successfuly <br/> <b>false</b> - operation failed to process |
|
|
10
|
-
**inputs** | [**WalletOperationInputs**](WalletOperationInputs.md) | The parameters used to interact with the [Payment Processor](https://pay.bleumi.com/docs/#payment-processor-address) on the ethereum network |
|
|
11
|
-
**hash** | **String** | Transaction hash of operation submitted to the network. This field is blank when operation is in progress. |
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# BleumiPay::WalletOperationInputs
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
Name | Type | Description | Notes
|
|
6
|
-
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**amount** | **String** | ERC-20 token amount to be settled incase of 'createAndSettleWallet' operation |
|
|
8
|
-
**token** | **String** | ERC-20 token address |
|
|
9
|
-
**token_amount** | **String** | ERC-20 token amount to be settled incase of 'createAndSettleWallet' operation (in Ethereum format) |
|
|
10
|
-
**token_decimals** | **String** | ERC-20 token decimal places incase of 'createAndSettleWallet' operation|
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# BleumiPay::WalletRefundOperationInput
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
Name | Type | Description | Notes
|
|
6
|
-
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**token** | [**EthAddress**](EthAddress.md) | Unique identifier of the wallet (specified during [Generate Wallet](/docs/Erc20PaymentsApi.md#generate_wallet)) to refund |
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# BleumiPay::WalletSettleOperationInput
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
Name | Type | Description | Notes
|
|
6
|
-
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**token** | [**EthAddress**](EthAddress.md) | Address of the ERC-20 token to be settled |
|
|
8
|
-
**amount** | **String** | ERC-20 token amount to be settled to the transferAddress specified during [Generate Wallet](/docs/Erc20PaymentsApi.md#generate_wallet) |
|
|
@@ -1,482 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Bleumi Pay API
|
|
3
|
-
|
|
4
|
-
#A simple and powerful REST API to integrate ERC20 payments into your business or application
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0.0
|
|
7
|
-
Contact: info@bleumi.com
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.2.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'cgi'
|
|
14
|
-
|
|
15
|
-
module BleumiPay
|
|
16
|
-
class Erc20PaymentsApi
|
|
17
|
-
attr_accessor :api_client
|
|
18
|
-
|
|
19
|
-
def initialize(api_client = ApiClient.default)
|
|
20
|
-
@api_client = api_client
|
|
21
|
-
end
|
|
22
|
-
# Create an unique wallet address to accept payments for an ERC-20 token from a buyer
|
|
23
|
-
# @param wallet_create_input [WalletCreateInput]
|
|
24
|
-
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @option opts [EthNetwork] :chain Ethereum network in which wallet is to be created.
|
|
26
|
-
# @return [WalletCreateOutput]
|
|
27
|
-
def generate_wallet(wallet_create_input, opts = {})
|
|
28
|
-
data, _status_code, _headers = generate_wallet_with_http_info(wallet_create_input, opts)
|
|
29
|
-
data
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Create an unique wallet address to accept payments for an ERC-20 token from a buyer
|
|
33
|
-
# @param wallet_create_input [WalletCreateInput]
|
|
34
|
-
# @param [Hash] opts the optional parameters
|
|
35
|
-
# @option opts [EthNetwork] :chain Ethereum network in which wallet is to be created.
|
|
36
|
-
# @return [Array<(WalletCreateOutput, Integer, Hash)>] WalletCreateOutput data, response status code and response headers
|
|
37
|
-
def generate_wallet_with_http_info(wallet_create_input, opts = {})
|
|
38
|
-
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: Erc20PaymentsApi.generate_wallet ...'
|
|
40
|
-
end
|
|
41
|
-
# verify the required parameter 'wallet_create_input' is set
|
|
42
|
-
if @api_client.config.client_side_validation && wallet_create_input.nil?
|
|
43
|
-
fail ArgumentError, "Missing the required parameter 'wallet_create_input' when calling Erc20PaymentsApi.generate_wallet"
|
|
44
|
-
end
|
|
45
|
-
# resource path
|
|
46
|
-
local_var_path = '/v1/payment/eth/wallet'
|
|
47
|
-
|
|
48
|
-
# query parameters
|
|
49
|
-
query_params = opts[:query_params] || {}
|
|
50
|
-
query_params[:'chain'] = opts[:'chain'] if !opts[:'chain'].nil?
|
|
51
|
-
|
|
52
|
-
# header parameters
|
|
53
|
-
header_params = opts[:header_params] || {}
|
|
54
|
-
# HTTP header 'Accept' (if needed)
|
|
55
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
56
|
-
# HTTP header 'Content-Type'
|
|
57
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
58
|
-
|
|
59
|
-
# form parameters
|
|
60
|
-
form_params = opts[:form_params] || {}
|
|
61
|
-
|
|
62
|
-
# http body (model)
|
|
63
|
-
post_body = opts[:body] || @api_client.object_to_http_body(wallet_create_input)
|
|
64
|
-
|
|
65
|
-
# return_type
|
|
66
|
-
return_type = opts[:return_type] || 'WalletCreateOutput'
|
|
67
|
-
|
|
68
|
-
# auth_names
|
|
69
|
-
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
70
|
-
|
|
71
|
-
new_options = opts.merge(
|
|
72
|
-
:header_params => header_params,
|
|
73
|
-
:query_params => query_params,
|
|
74
|
-
:form_params => form_params,
|
|
75
|
-
:body => post_body,
|
|
76
|
-
:auth_names => auth_names,
|
|
77
|
-
:return_type => return_type
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
81
|
-
if @api_client.config.debugging
|
|
82
|
-
@api_client.config.logger.debug "API called: Erc20PaymentsApi#generate_wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
83
|
-
end
|
|
84
|
-
return data, status_code, headers
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
# Return a specific wallet
|
|
88
|
-
# @param id [String] Unique ID identifying the wallet in your system
|
|
89
|
-
# @param [Hash] opts the optional parameters
|
|
90
|
-
# @return [Wallet]
|
|
91
|
-
def get_wallet(id, opts = {})
|
|
92
|
-
data, _status_code, _headers = get_wallet_with_http_info(id, opts)
|
|
93
|
-
data
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# Return a specific wallet
|
|
97
|
-
# @param id [String] Unique ID identifying the wallet in your system
|
|
98
|
-
# @param [Hash] opts the optional parameters
|
|
99
|
-
# @return [Array<(Wallet, Integer, Hash)>] Wallet data, response status code and response headers
|
|
100
|
-
def get_wallet_with_http_info(id, opts = {})
|
|
101
|
-
if @api_client.config.debugging
|
|
102
|
-
@api_client.config.logger.debug 'Calling API: Erc20PaymentsApi.get_wallet ...'
|
|
103
|
-
end
|
|
104
|
-
# verify the required parameter 'id' is set
|
|
105
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
106
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling Erc20PaymentsApi.get_wallet"
|
|
107
|
-
end
|
|
108
|
-
# resource path
|
|
109
|
-
local_var_path = '/v1/payment/eth/wallet/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
110
|
-
|
|
111
|
-
# query parameters
|
|
112
|
-
query_params = opts[:query_params] || {}
|
|
113
|
-
|
|
114
|
-
# header parameters
|
|
115
|
-
header_params = opts[:header_params] || {}
|
|
116
|
-
# HTTP header 'Accept' (if needed)
|
|
117
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
118
|
-
|
|
119
|
-
# form parameters
|
|
120
|
-
form_params = opts[:form_params] || {}
|
|
121
|
-
|
|
122
|
-
# http body (model)
|
|
123
|
-
post_body = opts[:body]
|
|
124
|
-
|
|
125
|
-
# return_type
|
|
126
|
-
return_type = opts[:return_type] || 'Wallet'
|
|
127
|
-
|
|
128
|
-
# auth_names
|
|
129
|
-
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
130
|
-
|
|
131
|
-
new_options = opts.merge(
|
|
132
|
-
:header_params => header_params,
|
|
133
|
-
:query_params => query_params,
|
|
134
|
-
:form_params => form_params,
|
|
135
|
-
:body => post_body,
|
|
136
|
-
:auth_names => auth_names,
|
|
137
|
-
:return_type => return_type
|
|
138
|
-
)
|
|
139
|
-
|
|
140
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
141
|
-
if @api_client.config.debugging
|
|
142
|
-
@api_client.config.logger.debug "API called: Erc20PaymentsApi#get_wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
143
|
-
end
|
|
144
|
-
return data, status_code, headers
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
# Return a specific operation of the wallet
|
|
148
|
-
# @param id [String] Unique ID identifying the wallet in your system
|
|
149
|
-
# @param txid [String] ID of a specific operation of the wallet
|
|
150
|
-
# @param [Hash] opts the optional parameters
|
|
151
|
-
# @return [WalletOperation]
|
|
152
|
-
def get_wallet_operation(id, txid, opts = {})
|
|
153
|
-
data, _status_code, _headers = get_wallet_operation_with_http_info(id, txid, opts)
|
|
154
|
-
data
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
# Return a specific operation of the wallet
|
|
158
|
-
# @param id [String] Unique ID identifying the wallet in your system
|
|
159
|
-
# @param txid [String] ID of a specific operation of the wallet
|
|
160
|
-
# @param [Hash] opts the optional parameters
|
|
161
|
-
# @return [Array<(WalletOperation, Integer, Hash)>] WalletOperation data, response status code and response headers
|
|
162
|
-
def get_wallet_operation_with_http_info(id, txid, opts = {})
|
|
163
|
-
if @api_client.config.debugging
|
|
164
|
-
@api_client.config.logger.debug 'Calling API: Erc20PaymentsApi.get_wallet_operation ...'
|
|
165
|
-
end
|
|
166
|
-
# verify the required parameter 'id' is set
|
|
167
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
168
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling Erc20PaymentsApi.get_wallet_operation"
|
|
169
|
-
end
|
|
170
|
-
# verify the required parameter 'txid' is set
|
|
171
|
-
if @api_client.config.client_side_validation && txid.nil?
|
|
172
|
-
fail ArgumentError, "Missing the required parameter 'txid' when calling Erc20PaymentsApi.get_wallet_operation"
|
|
173
|
-
end
|
|
174
|
-
# resource path
|
|
175
|
-
local_var_path = '/v1/payment/eth/wallet/{id}/operation/{txid}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'txid' + '}', CGI.escape(txid.to_s))
|
|
176
|
-
|
|
177
|
-
# query parameters
|
|
178
|
-
query_params = opts[:query_params] || {}
|
|
179
|
-
|
|
180
|
-
# header parameters
|
|
181
|
-
header_params = opts[:header_params] || {}
|
|
182
|
-
# HTTP header 'Accept' (if needed)
|
|
183
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
184
|
-
|
|
185
|
-
# form parameters
|
|
186
|
-
form_params = opts[:form_params] || {}
|
|
187
|
-
|
|
188
|
-
# http body (model)
|
|
189
|
-
post_body = opts[:body]
|
|
190
|
-
|
|
191
|
-
# return_type
|
|
192
|
-
return_type = opts[:return_type] || 'WalletOperation'
|
|
193
|
-
|
|
194
|
-
# auth_names
|
|
195
|
-
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
196
|
-
|
|
197
|
-
new_options = opts.merge(
|
|
198
|
-
:header_params => header_params,
|
|
199
|
-
:query_params => query_params,
|
|
200
|
-
:form_params => form_params,
|
|
201
|
-
:body => post_body,
|
|
202
|
-
:auth_names => auth_names,
|
|
203
|
-
:return_type => return_type
|
|
204
|
-
)
|
|
205
|
-
|
|
206
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
207
|
-
if @api_client.config.debugging
|
|
208
|
-
@api_client.config.logger.debug "API called: Erc20PaymentsApi#get_wallet_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
209
|
-
end
|
|
210
|
-
return data, status_code, headers
|
|
211
|
-
end
|
|
212
|
-
|
|
213
|
-
# Return the list of operations performed by the mechant on a specific wallet
|
|
214
|
-
# @param id [String] Unique ID identifying the wallet in your system
|
|
215
|
-
# @param [Hash] opts the optional parameters
|
|
216
|
-
# @option opts [String] :next_token Cursor to start results from
|
|
217
|
-
# @return [PaginatedWalletOperations]
|
|
218
|
-
def list_wallet_operations(id, opts = {})
|
|
219
|
-
data, _status_code, _headers = list_wallet_operations_with_http_info(id, opts)
|
|
220
|
-
data
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
# Return the list of operations performed by the mechant on a specific wallet
|
|
224
|
-
# @param id [String] Unique ID identifying the wallet in your system
|
|
225
|
-
# @param [Hash] opts the optional parameters
|
|
226
|
-
# @option opts [String] :next_token Cursor to start results from
|
|
227
|
-
# @return [Array<(PaginatedWalletOperations, Integer, Hash)>] PaginatedWalletOperations data, response status code and response headers
|
|
228
|
-
def list_wallet_operations_with_http_info(id, opts = {})
|
|
229
|
-
if @api_client.config.debugging
|
|
230
|
-
@api_client.config.logger.debug 'Calling API: Erc20PaymentsApi.list_wallet_operations ...'
|
|
231
|
-
end
|
|
232
|
-
# verify the required parameter 'id' is set
|
|
233
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
234
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling Erc20PaymentsApi.list_wallet_operations"
|
|
235
|
-
end
|
|
236
|
-
# resource path
|
|
237
|
-
local_var_path = '/v1/payment/eth/wallet/{id}/operation'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
238
|
-
|
|
239
|
-
# query parameters
|
|
240
|
-
query_params = opts[:query_params] || {}
|
|
241
|
-
query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
|
242
|
-
|
|
243
|
-
# header parameters
|
|
244
|
-
header_params = opts[:header_params] || {}
|
|
245
|
-
# HTTP header 'Accept' (if needed)
|
|
246
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
247
|
-
|
|
248
|
-
# form parameters
|
|
249
|
-
form_params = opts[:form_params] || {}
|
|
250
|
-
|
|
251
|
-
# http body (model)
|
|
252
|
-
post_body = opts[:body]
|
|
253
|
-
|
|
254
|
-
# return_type
|
|
255
|
-
return_type = opts[:return_type] || 'PaginatedWalletOperations'
|
|
256
|
-
|
|
257
|
-
# auth_names
|
|
258
|
-
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
259
|
-
|
|
260
|
-
new_options = opts.merge(
|
|
261
|
-
:header_params => header_params,
|
|
262
|
-
:query_params => query_params,
|
|
263
|
-
:form_params => form_params,
|
|
264
|
-
:body => post_body,
|
|
265
|
-
:auth_names => auth_names,
|
|
266
|
-
:return_type => return_type
|
|
267
|
-
)
|
|
268
|
-
|
|
269
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
270
|
-
if @api_client.config.debugging
|
|
271
|
-
@api_client.config.logger.debug "API called: Erc20PaymentsApi#list_wallet_operations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
272
|
-
end
|
|
273
|
-
return data, status_code, headers
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
# Returns a list of wallets
|
|
277
|
-
# @param [Hash] opts the optional parameters
|
|
278
|
-
# @option opts [String] :next_token Cursor to start results from
|
|
279
|
-
# @option opts [String] :sort_by Sort wallets by
|
|
280
|
-
# @option opts [String] :start_at Get wallets from this timestamp
|
|
281
|
-
# @option opts [String] :end_at Get wallets till this timestamp
|
|
282
|
-
# @return [PaginatedWallets]
|
|
283
|
-
def list_wallets(opts = {})
|
|
284
|
-
data, _status_code, _headers = list_wallets_with_http_info(opts)
|
|
285
|
-
data
|
|
286
|
-
end
|
|
287
|
-
|
|
288
|
-
# Returns a list of wallets
|
|
289
|
-
# @param [Hash] opts the optional parameters
|
|
290
|
-
# @option opts [String] :next_token Cursor to start results from
|
|
291
|
-
# @option opts [String] :sort_by Sort wallets by
|
|
292
|
-
# @option opts [String] :start_at Get wallets from this timestamp
|
|
293
|
-
# @option opts [String] :end_at Get wallets till this timestamp
|
|
294
|
-
# @return [Array<(PaginatedWallets, Integer, Hash)>] PaginatedWallets data, response status code and response headers
|
|
295
|
-
def list_wallets_with_http_info(opts = {})
|
|
296
|
-
if @api_client.config.debugging
|
|
297
|
-
@api_client.config.logger.debug 'Calling API: Erc20PaymentsApi.list_wallets ...'
|
|
298
|
-
end
|
|
299
|
-
allowable_values = ["createdAt", "updatedAt"]
|
|
300
|
-
if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
|
|
301
|
-
fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
|
|
302
|
-
end
|
|
303
|
-
# resource path
|
|
304
|
-
local_var_path = '/v1/payment/eth/wallet'
|
|
305
|
-
|
|
306
|
-
# query parameters
|
|
307
|
-
query_params = opts[:query_params] || {}
|
|
308
|
-
query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
|
309
|
-
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
310
|
-
query_params[:'startAt'] = opts[:'start_at'] if !opts[:'start_at'].nil?
|
|
311
|
-
query_params[:'endAt'] = opts[:'end_at'] if !opts[:'end_at'].nil?
|
|
312
|
-
|
|
313
|
-
# header parameters
|
|
314
|
-
header_params = opts[:header_params] || {}
|
|
315
|
-
# HTTP header 'Accept' (if needed)
|
|
316
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
317
|
-
|
|
318
|
-
# form parameters
|
|
319
|
-
form_params = opts[:form_params] || {}
|
|
320
|
-
|
|
321
|
-
# http body (model)
|
|
322
|
-
post_body = opts[:body]
|
|
323
|
-
|
|
324
|
-
# return_type
|
|
325
|
-
return_type = opts[:return_type] || 'PaginatedWallets'
|
|
326
|
-
|
|
327
|
-
# auth_names
|
|
328
|
-
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
329
|
-
|
|
330
|
-
new_options = opts.merge(
|
|
331
|
-
:header_params => header_params,
|
|
332
|
-
:query_params => query_params,
|
|
333
|
-
:form_params => form_params,
|
|
334
|
-
:body => post_body,
|
|
335
|
-
:auth_names => auth_names,
|
|
336
|
-
:return_type => return_type
|
|
337
|
-
)
|
|
338
|
-
|
|
339
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
340
|
-
if @api_client.config.debugging
|
|
341
|
-
@api_client.config.logger.debug "API called: Erc20PaymentsApi#list_wallets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
342
|
-
end
|
|
343
|
-
return data, status_code, headers
|
|
344
|
-
end
|
|
345
|
-
|
|
346
|
-
# Refund wallet
|
|
347
|
-
# @param id [String] Unique ID identifying this record in your system
|
|
348
|
-
# @param wallet_refund_operation_input [WalletRefundOperationInput] Request body - used to specify the token to refund.
|
|
349
|
-
# @param [Hash] opts the optional parameters
|
|
350
|
-
# @return [WalletOperationOutput]
|
|
351
|
-
def refund_wallet(id, wallet_refund_operation_input, opts = {})
|
|
352
|
-
data, _status_code, _headers = refund_wallet_with_http_info(id, wallet_refund_operation_input, opts)
|
|
353
|
-
data
|
|
354
|
-
end
|
|
355
|
-
|
|
356
|
-
# Refund wallet
|
|
357
|
-
# @param id [String] Unique ID identifying this record in your system
|
|
358
|
-
# @param wallet_refund_operation_input [WalletRefundOperationInput] Request body - used to specify the token to refund.
|
|
359
|
-
# @param [Hash] opts the optional parameters
|
|
360
|
-
# @return [Array<(WalletOperationOutput, Integer, Hash)>] WalletOperationOutput data, response status code and response headers
|
|
361
|
-
def refund_wallet_with_http_info(id, wallet_refund_operation_input, opts = {})
|
|
362
|
-
if @api_client.config.debugging
|
|
363
|
-
@api_client.config.logger.debug 'Calling API: Erc20PaymentsApi.refund_wallet ...'
|
|
364
|
-
end
|
|
365
|
-
# verify the required parameter 'id' is set
|
|
366
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
367
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling Erc20PaymentsApi.refund_wallet"
|
|
368
|
-
end
|
|
369
|
-
# verify the required parameter 'wallet_refund_operation_input' is set
|
|
370
|
-
if @api_client.config.client_side_validation && wallet_refund_operation_input.nil?
|
|
371
|
-
fail ArgumentError, "Missing the required parameter 'wallet_refund_operation_input' when calling Erc20PaymentsApi.refund_wallet"
|
|
372
|
-
end
|
|
373
|
-
# resource path
|
|
374
|
-
local_var_path = '/v1/payment/eth/wallet/{id}/refund'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
375
|
-
|
|
376
|
-
# query parameters
|
|
377
|
-
query_params = opts[:query_params] || {}
|
|
378
|
-
|
|
379
|
-
# header parameters
|
|
380
|
-
header_params = opts[:header_params] || {}
|
|
381
|
-
# HTTP header 'Accept' (if needed)
|
|
382
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
383
|
-
# HTTP header 'Content-Type'
|
|
384
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
385
|
-
|
|
386
|
-
# form parameters
|
|
387
|
-
form_params = opts[:form_params] || {}
|
|
388
|
-
|
|
389
|
-
# http body (model)
|
|
390
|
-
post_body = opts[:body] || @api_client.object_to_http_body(wallet_refund_operation_input)
|
|
391
|
-
|
|
392
|
-
# return_type
|
|
393
|
-
return_type = opts[:return_type] || 'WalletOperationOutput'
|
|
394
|
-
|
|
395
|
-
# auth_names
|
|
396
|
-
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
397
|
-
|
|
398
|
-
new_options = opts.merge(
|
|
399
|
-
:header_params => header_params,
|
|
400
|
-
:query_params => query_params,
|
|
401
|
-
:form_params => form_params,
|
|
402
|
-
:body => post_body,
|
|
403
|
-
:auth_names => auth_names,
|
|
404
|
-
:return_type => return_type
|
|
405
|
-
)
|
|
406
|
-
|
|
407
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
408
|
-
if @api_client.config.debugging
|
|
409
|
-
@api_client.config.logger.debug "API called: Erc20PaymentsApi#refund_wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
410
|
-
end
|
|
411
|
-
return data, status_code, headers
|
|
412
|
-
end
|
|
413
|
-
|
|
414
|
-
# Settle a wallet, amount received will be transferred even if less than payment amount
|
|
415
|
-
# @param id [String] Unique ID identifying this record in your system
|
|
416
|
-
# @param wallet_settle_operation_input [WalletSettleOperationInput] Request body - used to specify the amount to settle.
|
|
417
|
-
# @param [Hash] opts the optional parameters
|
|
418
|
-
# @return [WalletOperationOutput]
|
|
419
|
-
def settle_wallet(id, wallet_settle_operation_input, opts = {})
|
|
420
|
-
data, _status_code, _headers = settle_wallet_with_http_info(id, wallet_settle_operation_input, opts)
|
|
421
|
-
data
|
|
422
|
-
end
|
|
423
|
-
|
|
424
|
-
# Settle a wallet, amount received will be transferred even if less than payment amount
|
|
425
|
-
# @param id [String] Unique ID identifying this record in your system
|
|
426
|
-
# @param wallet_settle_operation_input [WalletSettleOperationInput] Request body - used to specify the amount to settle.
|
|
427
|
-
# @param [Hash] opts the optional parameters
|
|
428
|
-
# @return [Array<(WalletOperationOutput, Integer, Hash)>] WalletOperationOutput data, response status code and response headers
|
|
429
|
-
def settle_wallet_with_http_info(id, wallet_settle_operation_input, opts = {})
|
|
430
|
-
if @api_client.config.debugging
|
|
431
|
-
@api_client.config.logger.debug 'Calling API: Erc20PaymentsApi.settle_wallet ...'
|
|
432
|
-
end
|
|
433
|
-
# verify the required parameter 'id' is set
|
|
434
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
435
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling Erc20PaymentsApi.settle_wallet"
|
|
436
|
-
end
|
|
437
|
-
# verify the required parameter 'wallet_settle_operation_input' is set
|
|
438
|
-
if @api_client.config.client_side_validation && wallet_settle_operation_input.nil?
|
|
439
|
-
fail ArgumentError, "Missing the required parameter 'wallet_settle_operation_input' when calling Erc20PaymentsApi.settle_wallet"
|
|
440
|
-
end
|
|
441
|
-
# resource path
|
|
442
|
-
local_var_path = '/v1/payment/eth/wallet/{id}/settle'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
443
|
-
|
|
444
|
-
# query parameters
|
|
445
|
-
query_params = opts[:query_params] || {}
|
|
446
|
-
|
|
447
|
-
# header parameters
|
|
448
|
-
header_params = opts[:header_params] || {}
|
|
449
|
-
# HTTP header 'Accept' (if needed)
|
|
450
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
451
|
-
# HTTP header 'Content-Type'
|
|
452
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
453
|
-
|
|
454
|
-
# form parameters
|
|
455
|
-
form_params = opts[:form_params] || {}
|
|
456
|
-
|
|
457
|
-
# http body (model)
|
|
458
|
-
post_body = opts[:body] || @api_client.object_to_http_body(wallet_settle_operation_input)
|
|
459
|
-
|
|
460
|
-
# return_type
|
|
461
|
-
return_type = opts[:return_type] || 'WalletOperationOutput'
|
|
462
|
-
|
|
463
|
-
# auth_names
|
|
464
|
-
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
465
|
-
|
|
466
|
-
new_options = opts.merge(
|
|
467
|
-
:header_params => header_params,
|
|
468
|
-
:query_params => query_params,
|
|
469
|
-
:form_params => form_params,
|
|
470
|
-
:body => post_body,
|
|
471
|
-
:auth_names => auth_names,
|
|
472
|
-
:return_type => return_type
|
|
473
|
-
)
|
|
474
|
-
|
|
475
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
476
|
-
if @api_client.config.debugging
|
|
477
|
-
@api_client.config.logger.debug "API called: Erc20PaymentsApi#settle_wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
478
|
-
end
|
|
479
|
-
return data, status_code, headers
|
|
480
|
-
end
|
|
481
|
-
end
|
|
482
|
-
end
|