bleumi_pay_sdk_ruby 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/README.md +37 -41
- data/docs/BadRequest.md +0 -9
- data/docs/Erc20PaymentsApi.md +50 -34
- data/docs/EthAddress.md +1 -10
- data/docs/EthNetwork.md +6 -13
- data/docs/PaginatedWalletOperations.md +2 -2
- data/docs/PaginatedWallets.md +2 -2
- data/docs/Wallet.md +6 -22
- data/docs/WalletBalance.md +4 -16
- data/docs/WalletCreateInput.md +3 -15
- data/docs/WalletCreateOutput.md +4 -13
- data/docs/WalletInputs.md +0 -1
- data/docs/WalletOperation.md +4 -5
- data/docs/WalletOperationInputs.md +4 -15
- data/docs/WalletOperationOutput.md +0 -7
- data/docs/WalletRefundOperationInput.md +1 -9
- data/docs/WalletSettleOperationInput.md +2 -13
- data/lib/bleumi_pay_sdk_ruby/api/erc20_payments_api.rb +19 -19
- data/lib/bleumi_pay_sdk_ruby/version.rb +1 -1
- metadata +4 -41
- data/spec/api/erc20_payments_api_spec.rb +0 -120
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/bad_request_spec.rb +0 -47
- data/spec/models/eth_address_spec.rb +0 -41
- data/spec/models/eth_network_spec.rb +0 -35
- data/spec/models/paginated_wallet_operations_spec.rb +0 -47
- data/spec/models/paginated_wallets_spec.rb +0 -47
- data/spec/models/wallet_balance_spec.rb +0 -59
- data/spec/models/wallet_create_input_spec.rb +0 -53
- data/spec/models/wallet_create_output_spec.rb +0 -47
- data/spec/models/wallet_inputs_spec.rb +0 -65
- data/spec/models/wallet_operation_inputs_spec.rb +0 -59
- data/spec/models/wallet_operation_output_spec.rb +0 -41
- data/spec/models/wallet_operation_spec.rb +0 -65
- data/spec/models/wallet_refund_operation_input_spec.rb +0 -41
- data/spec/models/wallet_settle_operation_input_spec.rb +0 -47
- data/spec/models/wallet_spec.rb +0 -77
- data/spec/spec_helper.rb +0 -111
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb14b4320f3d028617902cc9113626a5d0e973c71fdad64009b29a47cb6e20dc
|
4
|
+
data.tar.gz: f5b85bbaf36c6df463c51d32305a55f79257c2bc36a8d693bcac99ef08d195b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4ea80d9397c9c777ab8f10111345c12786576d56be488c9db150a42b916b6e20eb62d82ced47e4f9e398e7d57f962c1419504e08ee75712b2024f1305f5e528
|
7
|
+
data.tar.gz: 5b3424cdfefe5b8b7e3592ee3266bf5d0193f90d4541f456a174dc30f10066eb8d2cfaa5cc821e87f17a1416758f6ea2336720fae891650c7ce0590e155b1103
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2019 Bleumi
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
|
1
|
+
<img src="https://pay.bleumi.com/wp-content/uploads/2019/04/logo_dark_bleumi_invoice_6797x1122.png" height="30">
|
2
|
+
|
3
|
+
# Bleumi Pay SDK for Ruby
|
4
|
+
|
5
|
+
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/bleumi/bleumi-pay-sdk-ruby/master/LICENSE)
|
2
6
|
|
3
7
|
The Bleumi Pay SDK is a one-stop shop to help you integrate ECR-20 payments into your business or application. The SDK bundles [Bleumi Pay API](https://pay.bleumi.com/docs/#introduction) into one SDK to ease implementation and support.
|
4
8
|
|
@@ -14,7 +18,7 @@ Ruby 1.9+
|
|
14
18
|
|
15
19
|
#### Obtain An API Key
|
16
20
|
|
17
|
-
Bleumi Pay SDK uses API keys to authenticate requests. You can obtain an API key through the [Bleumi Pay
|
21
|
+
Bleumi Pay SDK uses API keys to authenticate requests. You can obtain an API key through the [Bleumi Pay Dashboard](https://pay.bleumi.com/app/).
|
18
22
|
|
19
23
|
### Install Package
|
20
24
|
|
@@ -23,7 +27,7 @@ Bleumi Pay SDK uses API keys to authenticate requests. You can obtain an API key
|
|
23
27
|
|
24
28
|
To install,
|
25
29
|
```bash
|
26
|
-
gem
|
30
|
+
gem install bleumi_pay_sdk_ruby
|
27
31
|
```
|
28
32
|
|
29
33
|
### Install from Git
|
@@ -32,17 +36,10 @@ Add the following in the Gemfile:
|
|
32
36
|
|
33
37
|
gem 'bleumi_pay_sdk_ruby', :git => 'https://github.com/bleumi/bleumi_pay_sdk_ruby.git'
|
34
38
|
|
35
|
-
### Include the Ruby code directly
|
36
|
-
|
37
|
-
Include the Ruby code directly using `-I` as follows:
|
38
|
-
|
39
|
-
```shell
|
40
|
-
ruby -Ilib script.rb
|
41
|
-
```
|
42
39
|
|
43
40
|
### Run Sample Code
|
44
41
|
|
45
|
-
The following code
|
42
|
+
The following code generates a wallet to accept payment from the buyer specific for the ECR-20 Token.
|
46
43
|
|
47
44
|
```ruby
|
48
45
|
# Load the gem
|
@@ -60,55 +57,54 @@ opts = {
|
|
60
57
|
chain: BleumiPay::EthNetwork::ROPSTEN # EthNetwork | Ethereum network in which wallet is to be created.
|
61
58
|
}
|
62
59
|
|
63
|
-
buyer_address = BleumiPay::EthAddress.new('<BUYER_ADDR>')
|
64
|
-
transfer_address = BleumiPay::EthAddress.new('<MERCHANT_ADDR>')
|
60
|
+
buyer_address = BleumiPay::EthAddress.new('<BUYER_ADDR>') # Replace <BUYER_ADDR> with the Buyer's Enthereum Network Address
|
61
|
+
transfer_address = BleumiPay::EthAddress.new('<MERCHANT_ADDR>') # Replace <MERCHANT_ADDR> with the Merchant's Enthereum Network Address
|
65
62
|
|
66
63
|
wallet_create_input.id = '<ID>'
|
67
64
|
wallet_create_input.buyer_address = buyer_address
|
68
65
|
wallet_create_input.transfer_address = transfer_address
|
69
66
|
|
70
67
|
begin
|
71
|
-
#
|
72
|
-
result = api_instance.
|
68
|
+
#Generate an unique wallet address to accept payments for an ERC-20 token from a buyer
|
69
|
+
result = api_instance.generate_wallet(wallet_create_input, opts)
|
73
70
|
p result
|
74
71
|
rescue BleumiPay::ApiError => e
|
75
|
-
puts "Exception when calling Erc20PaymentsApi->
|
72
|
+
puts "Exception when calling Erc20PaymentsApi->generate_wallet: #{e}"
|
76
73
|
end
|
77
74
|
|
78
75
|
```
|
79
76
|
|
80
|
-
More examples can be found under each method in [SDK Classes](
|
77
|
+
More examples can be found under each method in [SDK Classes](#sdk-classes) section.
|
81
78
|
|
82
79
|
## SDK Classes
|
83
80
|
|
84
81
|
Class | Method | HTTP request | Description
|
85
82
|
------------ | ------------- | ------------- | -------------
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
83
|
+
Erc20PaymentsApi | [**generate_wallet**](docs/Erc20PaymentsApi.md#generate_wallet) | **POST** /v1/payment/eth/wallet | Generates an unique wallet address to accept payments for an ERC-20 token.
|
84
|
+
Erc20PaymentsApi | [**get_wallet**](docs/Erc20PaymentsApi.md#get_wallet) | **GET** /v1/payment/eth/wallet/{id} | Retrieve a wallet.
|
85
|
+
Erc20PaymentsApi | [**list_wallets**](docs/Erc20PaymentsApi.md#list_wallets) | **GET** /v1/payment/eth/wallet | Retrieve all wallets.
|
86
|
+
Erc20PaymentsApi | [**settle_wallet**](docs/Erc20PaymentsApi.md#settle_wallet) | **POST** /v1/payment/eth/wallet/{id}/settle | This method settles a specific amount of an ERC-20 token of a wallet to the transferAddress specified during [Generate Wallet](/docs/Erc20PaymentsApi.md#generatewallet)
|
87
|
+
Erc20PaymentsApi | [**refund_wallet**](docs/Erc20PaymentsApi.md#refund_wallet) | **POST** /v1/payment/eth/wallet/{id}/refund | This method refunds the balance of an ERC-20 token of a wallet to the buyerAddress specified during [Generate Wallet](/docs/Erc20PaymentsApi.md#generatewallet).
|
88
|
+
Erc20PaymentsApi | [**get_wallet_operation**](docs/Erc20PaymentsApi.md#get_wallet_operation) | **GET** /v1/payment/eth/wallet/{id}/operation/{txid} | Retrieve an operation of a wallet
|
89
|
+
Erc20PaymentsApi | [**list_wallet_operations**](docs/Erc20PaymentsApi.md#list_wallet_operations) | **GET** /v1/payment/eth/wallet/{id}/operation | Retrieve all operations of a wallet.
|
94
90
|
|
95
91
|
## Documentation for Models
|
96
92
|
|
97
|
-
- [
|
98
|
-
- [
|
99
|
-
- [
|
100
|
-
- [
|
101
|
-
- [
|
102
|
-
- [
|
103
|
-
- [
|
104
|
-
- [
|
105
|
-
- [
|
106
|
-
- [
|
107
|
-
- [
|
108
|
-
- [
|
109
|
-
- [
|
110
|
-
- [
|
111
|
-
- [
|
93
|
+
- [BadRequest](docs/BadRequest.md)
|
94
|
+
- [EthAddress](docs/EthAddress.md)
|
95
|
+
- [EthNetwork](docs/EthNetwork.md)
|
96
|
+
- [PaginatedWalletOperations](docs/PaginatedWalletOperations.md)
|
97
|
+
- [PaginatedWallets](docs/PaginatedWallets.md)
|
98
|
+
- [Wallet](docs/Wallet.md)
|
99
|
+
- [WalletBalance](docs/WalletBalance.md)
|
100
|
+
- [WalletCreateInput](docs/WalletCreateInput.md)
|
101
|
+
- [WalletCreateOutput](docs/WalletCreateOutput.md)
|
102
|
+
- [WalletInputs](docs/WalletInputs.md)
|
103
|
+
- [WalletOperation](docs/WalletOperation.md)
|
104
|
+
- [WalletOperationInputs](docs/WalletOperationInputs.md)
|
105
|
+
- [WalletOperationOutput](docs/WalletOperationOutput.md)
|
106
|
+
- [WalletRefundOperationInput](docs/WalletRefundOperationInput.md)
|
107
|
+
- [WalletSettleOperationInput](docs/WalletSettleOperationInput.md)
|
112
108
|
|
113
109
|
## Limitations
|
114
110
|
|
@@ -118,4 +114,4 @@ BleumiPay::Erc20PaymentsApi | [**settle_wallet**](docs/Erc20PaymentsApi.md#settl
|
|
118
114
|
|
119
115
|
Copyright 2019 Bleumi, Inc.
|
120
116
|
|
121
|
-
Code licensed under the [MIT License](
|
117
|
+
Code licensed under the [MIT License](LICENSE).
|
data/docs/BadRequest.md
CHANGED
@@ -6,12 +6,3 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**error_code** | **String** | Code for error class. Complete list of error codes is available [here](https://pay.bleumi.com/docs/#errors) |
|
8
8
|
**error_message** | **String** | Error description | [optional]
|
9
|
-
|
10
|
-
## Code Sample
|
11
|
-
|
12
|
-
```ruby
|
13
|
-
require 'BleumiPay'
|
14
|
-
|
15
|
-
instance = BleumiPay::BadRequest.new(error_code: null,
|
16
|
-
error_message: null)
|
17
|
-
```
|
data/docs/Erc20PaymentsApi.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# BleumiPay::Erc20PaymentsApi
|
2
2
|
|
3
|
-
##
|
3
|
+
## generate_wallet
|
4
4
|
|
5
|
-
> WalletCreateOutput
|
5
|
+
> WalletCreateOutput generate_wallet(wallet_create_input, opts)
|
6
6
|
|
7
|
-
|
7
|
+
Generate an unique wallet address to accept payments for an ERC-20 token from a buyer.
|
8
8
|
|
9
9
|
### Example
|
10
10
|
|
@@ -23,19 +23,19 @@ opts = {
|
|
23
23
|
chain: BleumiPay::EthNetwork::ROPSTEN # EthNetwork | Ethereum network in which wallet is to be created.
|
24
24
|
}
|
25
25
|
|
26
|
-
buyer_address = BleumiPay::EthAddress.new('<BUYER_ADDR>')
|
27
|
-
transfer_address = BleumiPay::EthAddress.new('<MERCHANT_ADDR>')
|
26
|
+
buyer_address = BleumiPay::EthAddress.new('<BUYER_ADDR>') # Replace <BUYER_ADDR> with the Buyer Address
|
27
|
+
transfer_address = BleumiPay::EthAddress.new('<MERCHANT_ADDR>') # Replace <MERCHANT_ADDR> with the Merchant's Enthereum Network Address
|
28
28
|
|
29
|
-
wallet_create_input.id = '<ID>'
|
29
|
+
wallet_create_input.id = '<ID>' # String | Unique ID identifying the wallet in your system
|
30
30
|
wallet_create_input.buyer_address = buyer_address
|
31
31
|
wallet_create_input.transfer_address = transfer_address
|
32
32
|
|
33
33
|
begin
|
34
|
-
#
|
35
|
-
result = api_instance.
|
34
|
+
#Generate an unique wallet address to accept payments for an ERC-20 token from a buyer
|
35
|
+
result = api_instance.generate_wallet(wallet_create_input, opts)
|
36
36
|
p result
|
37
37
|
rescue BleumiPay::ApiError => e
|
38
|
-
puts "Exception when calling Erc20PaymentsApi->
|
38
|
+
puts "Exception when calling Erc20PaymentsApi->generate_wallet: #{e}"
|
39
39
|
end
|
40
40
|
```
|
41
41
|
|
@@ -44,8 +44,8 @@ end
|
|
44
44
|
|
45
45
|
Name | Type | Description | Notes
|
46
46
|
------------- | ------------- | ------------- | -------------
|
47
|
-
**wallet_create_input** | [**WalletCreateInput**](WalletCreateInput.md)| |
|
48
|
-
**chain** | [**EthNetwork**](.md)| Ethereum network in which wallet is to be created.
|
47
|
+
**wallet_create_input** | [**WalletCreateInput**](WalletCreateInput.md)| Specify the parameters for the wallet generation. |
|
48
|
+
**chain** | [**EthNetwork**](EthNetwork.md)| Ethereum network in which the wallet is to be created. Please refer to the [Supported Ethereum Networks](https://pay.bleumi.com/docs/#supported-ethereum-networks) |
|
49
49
|
|
50
50
|
### Return type
|
51
51
|
|
@@ -55,7 +55,7 @@ Name | Type | Description | Notes
|
|
55
55
|
|
56
56
|
> Wallet get_wallet(id)
|
57
57
|
|
58
|
-
|
58
|
+
This method retrieves a wallet.
|
59
59
|
|
60
60
|
### Example
|
61
61
|
|
@@ -69,7 +69,7 @@ BleumiPay.configure do |config|
|
|
69
69
|
end
|
70
70
|
|
71
71
|
api_instance = BleumiPay::Erc20PaymentsApi.new
|
72
|
-
id = '<ID>' # String |
|
72
|
+
id = '<ID>' # String | The ID of the wallet to get the details
|
73
73
|
|
74
74
|
begin
|
75
75
|
#Return a specific wallet
|
@@ -96,7 +96,15 @@ Name | Type | Description | Notes
|
|
96
96
|
|
97
97
|
> PaginatedWallets list_wallets(opts)
|
98
98
|
|
99
|
-
|
99
|
+
This method retrieves a list of wallets.
|
100
|
+
|
101
|
+
### Pagination
|
102
|
+
|
103
|
+
The list of wallets is returned as an array in the 'results' field. The list is restricted to a maximum of 100 wallets per page.
|
104
|
+
|
105
|
+
If there are more than 100 wallets generated for an ethereum network, a cursor is returned in the 'nextToken' field. Passing this as the 'nextToken' query parameter will fetch the next page.
|
106
|
+
|
107
|
+
When the value of 'nextToken' field is an empty string, there are no more wallets.
|
100
108
|
|
101
109
|
### Example
|
102
110
|
|
@@ -131,10 +139,10 @@ end
|
|
131
139
|
|
132
140
|
Name | Type | Description | Notes
|
133
141
|
------------- | ------------- | ------------- | -------------
|
134
|
-
**next_token** | **String**|
|
135
|
-
**sort_by** | **String**| Sort wallets by | [optional]
|
136
|
-
**start_at** | **String**| Get wallets from this timestamp | [optional]
|
137
|
-
**end_at** | **String**| Get wallets till this timestamp | [optional]
|
142
|
+
**next_token** | **String**| The token to fetch the next page, supply blank value to get the first page of wallet operations | [optional]
|
143
|
+
**sort_by** | **String**| Sort wallets by | [optional] 'createdAt' - results will be sorted by created time in ascending order. 'updatedAt' - results will be sorted by last updated time in ascending order.
|
144
|
+
**start_at** | **String**| Get wallets from this timestamp | [optional] Get wallets from this timestamp (UNIX). Will be compared to created or updated time based on the value of sortBy parameter.
|
145
|
+
**end_at** | **String**| Get wallets till this timestamp | [optional] Get wallets till this timestamp (UNIX). Will be compared to created or updated time based on the value of sortBy parameter.
|
138
146
|
|
139
147
|
### Return type
|
140
148
|
|
@@ -145,7 +153,7 @@ Name | Type | Description | Notes
|
|
145
153
|
|
146
154
|
> WalletOperationOutput settle_wallet(id, wallet_settle_operation_input)
|
147
155
|
|
148
|
-
|
156
|
+
This method settles a specific amount of an ERC-20 token of a wallet to the transferAddress specified during [Generate Wallet](#generate_wallet). And remaining balance (if any) will be refunded to the buyerAddress specified during [Generate Wallet](#generate_wallet).
|
149
157
|
|
150
158
|
### Example
|
151
159
|
|
@@ -178,8 +186,8 @@ end
|
|
178
186
|
|
179
187
|
Name | Type | Description | Notes
|
180
188
|
------------- | ------------- | ------------- | -------------
|
181
|
-
**id** | **String**| Unique
|
182
|
-
**wallet_settle_operation_input** | [**WalletSettleOperationInput**](WalletSettleOperationInput.md)|
|
189
|
+
**id** | **String**| Unique identifier of the wallet (specified during [Generate Wallet](#generatewallet)) to settle
|
190
|
+
**wallet_settle_operation_input** | [**WalletSettleOperationInput**](WalletSettleOperationInput.md)| Specify the token and amount to settle. |
|
183
191
|
|
184
192
|
### Return type
|
185
193
|
|
@@ -189,7 +197,7 @@ Name | Type | Description | Notes
|
|
189
197
|
|
190
198
|
> WalletOperationOutput refund_wallet(id, wallet_refund_operation_input)
|
191
199
|
|
192
|
-
|
200
|
+
This method refunds the balance of an ERC-20 token of a wallet to the buyerAddress specified during [Generate Wallet](#generate_wallet).
|
193
201
|
|
194
202
|
### Example
|
195
203
|
|
@@ -221,8 +229,8 @@ end
|
|
221
229
|
|
222
230
|
Name | Type | Description | Notes
|
223
231
|
------------- | ------------- | ------------- | -------------
|
224
|
-
**id** | **String**| Unique
|
225
|
-
**wallet_refund_operation_input** | [**WalletRefundOperationInput**](WalletRefundOperationInput.md)|
|
232
|
+
**id** | **String**| Unique identifier of the wallet (specified during [Generate Wallet](#generate_wallet)) to refund |
|
233
|
+
**wallet_refund_operation_input** | [**WalletRefundOperationInput**](WalletRefundOperationInput.md)| Specify the token to refund. |
|
226
234
|
|
227
235
|
### Return type
|
228
236
|
|
@@ -233,7 +241,7 @@ Name | Type | Description | Notes
|
|
233
241
|
|
234
242
|
> WalletOperation get_wallet_operation(id, txid)
|
235
243
|
|
236
|
-
|
244
|
+
This method retrieves an operation of a wallet.
|
237
245
|
|
238
246
|
### Example
|
239
247
|
|
@@ -264,8 +272,8 @@ end
|
|
264
272
|
|
265
273
|
Name | Type | Description | Notes
|
266
274
|
------------- | ------------- | ------------- | -------------
|
267
|
-
**id** | **String**| Unique
|
268
|
-
**txid** | **String**| ID of
|
275
|
+
**id** | **String**| Unique identifier of the wallet (specified during [Generate Wallet](#generate_wallet)) |
|
276
|
+
**txid** | **String**| Transaction ID of the operation (returned during [Refund Wallet](#refundwallet) / [Settle Wallet](#settlewallet)) to retrieve |
|
269
277
|
|
270
278
|
### Return type
|
271
279
|
|
@@ -273,11 +281,19 @@ Name | Type | Description | Notes
|
|
273
281
|
|
274
282
|
|
275
283
|
|
276
|
-
##
|
284
|
+
## list_wallet_operations
|
277
285
|
|
278
|
-
> PaginatedWalletOperations
|
286
|
+
> PaginatedWalletOperations list_wallet_operations(id, opts)
|
279
287
|
|
280
|
-
|
288
|
+
This method retrieves all operations of a wallet.
|
289
|
+
|
290
|
+
### Pagination
|
291
|
+
|
292
|
+
The list of operations is returned as an array in the 'results' field. The list is restricted to a maximum of 100 operations per page.
|
293
|
+
|
294
|
+
If there are more than 100 operations for a wallet, a cursor is passed in the 'nextToken' field. Passing this as the 'nextToken' query parameter will fetch the next page.
|
295
|
+
|
296
|
+
When the value of 'nextToken' field is an empty string, there are no more operations.
|
281
297
|
|
282
298
|
### Example
|
283
299
|
|
@@ -298,10 +314,10 @@ opts = {
|
|
298
314
|
|
299
315
|
begin
|
300
316
|
#Return the list of operations performed by the mechant on a specific wallet
|
301
|
-
result = api_instance.
|
317
|
+
result = api_instance.list_wallet_operations(id, opts)
|
302
318
|
p result
|
303
319
|
rescue BleumiPay::ApiError => e
|
304
|
-
puts "Exception when calling Erc20PaymentsApi->
|
320
|
+
puts "Exception when calling Erc20PaymentsApi->list_wallet_operations: #{e}"
|
305
321
|
end
|
306
322
|
```
|
307
323
|
|
@@ -310,8 +326,8 @@ end
|
|
310
326
|
|
311
327
|
Name | Type | Description | Notes
|
312
328
|
------------- | ------------- | ------------- | -------------
|
313
|
-
**id** | **String**| Unique
|
314
|
-
**next_token** | **String**|
|
329
|
+
**id** | **String**| Unique identifier of the wallet (specified during [Generate Wallet](#generate_wallet)) |
|
330
|
+
**next_token** | **String**| The token to fetch the next page, supply blank value to get the first page of wallet operations | [optional]
|
315
331
|
|
316
332
|
### Return type
|
317
333
|
|
data/docs/EthAddress.md
CHANGED
@@ -4,14 +4,5 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**addr** | **String** | Valid Ethereum address string should pass validation pattern |
|
8
|
-
|
9
|
-
## Code Sample
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'BleumiPay'
|
13
|
-
|
14
|
-
instance = BleumiPay::EthAddress.new(addr: null)
|
15
|
-
```
|
16
|
-
|
7
|
+
**addr** | **String** | Valid Ethereum address string should pass validation pattern: '^0x[a-fA-F0-9]{40}$'| Eg. 0x13e4ACeFE6a6700604929946E70E6443E4E73447
|
17
8
|
|
data/docs/EthNetwork.md
CHANGED
@@ -1,16 +1,9 @@
|
|
1
1
|
# BleumiPay::EthNetwork
|
2
2
|
|
3
|
-
##
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
|
8
|
-
## Code Sample
|
9
|
-
|
10
|
-
```ruby
|
11
|
-
require 'BleumiPay'
|
12
|
-
|
13
|
-
instance = BleumiPay::EthNetwork.new()
|
14
|
-
```
|
15
|
-
|
3
|
+
## Enum
|
16
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"`)
|
@@ -4,5 +4,5 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**results** | [**Array<WalletOperation>**](WalletOperation.md) |
|
8
|
-
**next_token** | **String** | Cursor to fetch next
|
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
CHANGED
@@ -4,5 +4,5 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**results** | [**Array<Wallet>**](Wallet.md) |
|
8
|
-
**next_token** | **String** | Cursor to fetch next page of results, empty if no more results |
|
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
CHANGED
@@ -4,26 +4,10 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**id** | **String** | Unique ID identifying the wallet
|
8
|
-
**chain** | **String** | Ethereum network
|
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
9
|
**addr** | **String** | Wallet address |
|
10
|
-
**balances** | [**Hash<String, WalletBalance>**](WalletBalance.md) |
|
11
|
-
**inputs** | [**WalletInputs**](WalletInputs.md) | |
|
12
|
-
**created_at** | **Integer** | UNIX timestamp
|
13
|
-
**updated_at** | **Integer** | UNIX timestamp
|
14
|
-
|
15
|
-
## Code Sample
|
16
|
-
|
17
|
-
```ruby
|
18
|
-
require 'BleumiPay'
|
19
|
-
|
20
|
-
instance = BleumiPay::Wallet.new(id: null,
|
21
|
-
chain: null,
|
22
|
-
addr: null,
|
23
|
-
balances: null,
|
24
|
-
inputs: null,
|
25
|
-
created_at: null,
|
26
|
-
updated_at: null)
|
27
|
-
```
|
28
|
-
|
29
|
-
|
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 |
|