bleumi_pay_sdk_ruby 1.0.7 → 1.0.8
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/README.md +3 -0
- data/assets/images/BleumiPay.png +0 -0
- data/docs/AlgorandAddress.md +28 -0
- data/docs/CreateCheckoutUrlRequest.md +3 -2
- data/docs/EthereumAddress.md +29 -0
- data/docs/HostedCheckoutsApi.md +4 -3
- data/docs/PaginatedPayments.md +59 -55
- data/docs/Payment.md +18 -35
- data/docs/PaymentAddresses.md +35 -12
- data/docs/PaymentBalances.md +28 -13
- data/docs/RskAddress.md +29 -0
- data/docs/ValidateCheckoutRequest.md +2 -2
- data/lib/bleumi_pay_sdk_ruby.rb +3 -2
- data/lib/bleumi_pay_sdk_ruby/api/payments_api.rb +0 -73
- data/lib/bleumi_pay_sdk_ruby/api/payouts_api.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/api/request_validator.rb +5 -32
- data/lib/bleumi_pay_sdk_ruby/models/algorand_address.rb +219 -0
- data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_request.rb +8 -8
- data/lib/bleumi_pay_sdk_ruby/models/{create_payment_request.rb → ethereum_address.rb} +38 -49
- data/lib/bleumi_pay_sdk_ruby/models/payment_addresses.rb +6 -12
- data/lib/bleumi_pay_sdk_ruby/models/{create_payment_response.rb → rsk_address.rb} +25 -18
- data/lib/bleumi_pay_sdk_ruby/version.rb +1 -1
- data/spec/api/payments_api_spec.rb +0 -12
- data/spec/models/algorand_address_spec.rb +47 -0
- data/spec/models/create_checkout_url_request_spec.rb +1 -1
- data/spec/models/{create_payment_request_spec.rb → ethereum_address_spec.rb} +10 -10
- data/spec/models/{create_payment_response_spec.rb → rsk_address_spec.rb} +13 -7
- metadata +15 -22
- data/docs/CreatePaymentRequest.md +0 -19
- data/docs/CreatePaymentResponse.md +0 -15
- data/hc_create.rb +0 -40
- data/hc_list.rb +0 -17
- data/hc_validate.rb +0 -22
- data/po_create.rb +0 -39
- data/po_list.rb +0 -23
- data/py_create.rb +0 -48
- data/py_get.rb +0 -18
- data/py_getop.rb +0 -19
- data/py_list.rb +0 -24
- data/py_listops.rb +0 -21
- data/py_refund.rb +0 -43
- data/py_settle.rb +0 -43
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bleumi_pay_sdk_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bleumi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -84,7 +84,9 @@ files:
|
|
84
84
|
- LICENSE
|
85
85
|
- README.md
|
86
86
|
- Rakefile
|
87
|
+
- assets/images/BleumiPay.png
|
87
88
|
- bleumi_pay_sdk_ruby.gemspec
|
89
|
+
- docs/AlgorandAddress.md
|
88
90
|
- docs/AlgorandBalance.md
|
89
91
|
- docs/AlgorandWalletAddress.md
|
90
92
|
- docs/AlgorandWalletInputs.md
|
@@ -93,10 +95,9 @@ files:
|
|
93
95
|
- docs/CheckoutToken.md
|
94
96
|
- docs/CreateCheckoutUrlRequest.md
|
95
97
|
- docs/CreateCheckoutUrlResponse.md
|
96
|
-
- docs/CreatePaymentRequest.md
|
97
|
-
- docs/CreatePaymentResponse.md
|
98
98
|
- docs/CreatePayoutRequest.md
|
99
99
|
- docs/CreatePayoutResponse.md
|
100
|
+
- docs/EthereumAddress.md
|
100
101
|
- docs/EthereumBalance.md
|
101
102
|
- docs/EthereumWalletAddress.md
|
102
103
|
- docs/EthereumWalletInputs.md
|
@@ -117,13 +118,11 @@ files:
|
|
117
118
|
- docs/PayoutItem.md
|
118
119
|
- docs/PayoutItemInputs.md
|
119
120
|
- docs/PayoutsApi.md
|
121
|
+
- docs/RskAddress.md
|
120
122
|
- docs/RskBalance.md
|
121
123
|
- docs/ValidateCheckoutRequest.md
|
122
124
|
- docs/ValidateCheckoutResponse.md
|
123
125
|
- docs/WalletBalance.md
|
124
|
-
- hc_create.rb
|
125
|
-
- hc_list.rb
|
126
|
-
- hc_validate.rb
|
127
126
|
- lib/bleumi_pay_sdk_ruby.rb
|
128
127
|
- lib/bleumi_pay_sdk_ruby/api/hosted_checkouts_api.rb
|
129
128
|
- lib/bleumi_pay_sdk_ruby/api/payments_api.rb
|
@@ -132,6 +131,7 @@ files:
|
|
132
131
|
- lib/bleumi_pay_sdk_ruby/api_client.rb
|
133
132
|
- lib/bleumi_pay_sdk_ruby/api_error.rb
|
134
133
|
- lib/bleumi_pay_sdk_ruby/configuration.rb
|
134
|
+
- lib/bleumi_pay_sdk_ruby/models/algorand_address.rb
|
135
135
|
- lib/bleumi_pay_sdk_ruby/models/algorand_balance.rb
|
136
136
|
- lib/bleumi_pay_sdk_ruby/models/algorand_wallet_address.rb
|
137
137
|
- lib/bleumi_pay_sdk_ruby/models/algorand_wallet_inputs.rb
|
@@ -140,10 +140,9 @@ files:
|
|
140
140
|
- lib/bleumi_pay_sdk_ruby/models/checkout_token.rb
|
141
141
|
- lib/bleumi_pay_sdk_ruby/models/create_checkout_url_request.rb
|
142
142
|
- lib/bleumi_pay_sdk_ruby/models/create_checkout_url_response.rb
|
143
|
-
- lib/bleumi_pay_sdk_ruby/models/create_payment_request.rb
|
144
|
-
- lib/bleumi_pay_sdk_ruby/models/create_payment_response.rb
|
145
143
|
- lib/bleumi_pay_sdk_ruby/models/create_payout_request.rb
|
146
144
|
- lib/bleumi_pay_sdk_ruby/models/create_payout_response.rb
|
145
|
+
- lib/bleumi_pay_sdk_ruby/models/ethereum_address.rb
|
147
146
|
- lib/bleumi_pay_sdk_ruby/models/ethereum_balance.rb
|
148
147
|
- lib/bleumi_pay_sdk_ruby/models/ethereum_wallet_address.rb
|
149
148
|
- lib/bleumi_pay_sdk_ruby/models/ethereum_wallet_inputs.rb
|
@@ -161,25 +160,18 @@ files:
|
|
161
160
|
- lib/bleumi_pay_sdk_ruby/models/payout.rb
|
162
161
|
- lib/bleumi_pay_sdk_ruby/models/payout_item.rb
|
163
162
|
- lib/bleumi_pay_sdk_ruby/models/payout_item_inputs.rb
|
163
|
+
- lib/bleumi_pay_sdk_ruby/models/rsk_address.rb
|
164
164
|
- lib/bleumi_pay_sdk_ruby/models/rsk_balance.rb
|
165
165
|
- lib/bleumi_pay_sdk_ruby/models/validate_checkout_request.rb
|
166
166
|
- lib/bleumi_pay_sdk_ruby/models/validate_checkout_response.rb
|
167
167
|
- lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb
|
168
168
|
- lib/bleumi_pay_sdk_ruby/version.rb
|
169
|
-
- po_create.rb
|
170
|
-
- po_list.rb
|
171
|
-
- py_create.rb
|
172
|
-
- py_get.rb
|
173
|
-
- py_getop.rb
|
174
|
-
- py_list.rb
|
175
|
-
- py_listops.rb
|
176
|
-
- py_refund.rb
|
177
|
-
- py_settle.rb
|
178
169
|
- spec/api/hosted_checkouts_api_spec.rb
|
179
170
|
- spec/api/payments_api_spec.rb
|
180
171
|
- spec/api/payouts_api_spec.rb
|
181
172
|
- spec/api_client_spec.rb
|
182
173
|
- spec/configuration_spec.rb
|
174
|
+
- spec/models/algorand_address_spec.rb
|
183
175
|
- spec/models/algorand_balance_spec.rb
|
184
176
|
- spec/models/algorand_wallet_address_spec.rb
|
185
177
|
- spec/models/algorand_wallet_inputs_spec.rb
|
@@ -188,10 +180,9 @@ files:
|
|
188
180
|
- spec/models/checkout_token_spec.rb
|
189
181
|
- spec/models/create_checkout_url_request_spec.rb
|
190
182
|
- spec/models/create_checkout_url_response_spec.rb
|
191
|
-
- spec/models/create_payment_request_spec.rb
|
192
|
-
- spec/models/create_payment_response_spec.rb
|
193
183
|
- spec/models/create_payout_request_spec.rb
|
194
184
|
- spec/models/create_payout_response_spec.rb
|
185
|
+
- spec/models/ethereum_address_spec.rb
|
195
186
|
- spec/models/ethereum_balance_spec.rb
|
196
187
|
- spec/models/ethereum_wallet_address_spec.rb
|
197
188
|
- spec/models/ethereum_wallet_inputs_spec.rb
|
@@ -209,6 +200,7 @@ files:
|
|
209
200
|
- spec/models/payout_item_inputs_spec.rb
|
210
201
|
- spec/models/payout_item_spec.rb
|
211
202
|
- spec/models/payout_spec.rb
|
203
|
+
- spec/models/rsk_address_spec.rb
|
212
204
|
- spec/models/rsk_balance_spec.rb
|
213
205
|
- spec/models/validate_checkout_request_spec.rb
|
214
206
|
- spec/models/validate_checkout_response_spec.rb
|
@@ -249,8 +241,8 @@ test_files:
|
|
249
241
|
- spec/models/payment_operation_inputs_spec.rb
|
250
242
|
- spec/models/payment_refund_request_spec.rb
|
251
243
|
- spec/models/checkout_token_spec.rb
|
244
|
+
- spec/models/algorand_address_spec.rb
|
252
245
|
- spec/models/payment_addresses_spec.rb
|
253
|
-
- spec/models/create_payment_response_spec.rb
|
254
246
|
- spec/models/payout_item_inputs_spec.rb
|
255
247
|
- spec/models/payment_operation_spec.rb
|
256
248
|
- spec/models/algorand_balance_spec.rb
|
@@ -261,6 +253,7 @@ test_files:
|
|
261
253
|
- spec/models/create_payout_request_spec.rb
|
262
254
|
- spec/models/paginated_payment_operations_spec.rb
|
263
255
|
- spec/models/payment_operation_response_spec.rb
|
256
|
+
- spec/models/rsk_address_spec.rb
|
264
257
|
- spec/models/create_checkout_url_request_spec.rb
|
265
258
|
- spec/models/validate_checkout_response_spec.rb
|
266
259
|
- spec/models/payment_settle_request_spec.rb
|
@@ -268,10 +261,10 @@ test_files:
|
|
268
261
|
- spec/models/ethereum_wallet_address_spec.rb
|
269
262
|
- spec/models/payout_item_spec.rb
|
270
263
|
- spec/models/create_checkout_url_response_spec.rb
|
264
|
+
- spec/models/ethereum_address_spec.rb
|
271
265
|
- spec/models/payment_spec.rb
|
272
266
|
- spec/models/paginated_payout_items_spec.rb
|
273
267
|
- spec/models/algorand_wallet_inputs_spec.rb
|
274
|
-
- spec/models/create_payment_request_spec.rb
|
275
268
|
- spec/models/payment_balances_spec.rb
|
276
269
|
- spec/models/paginated_payments_spec.rb
|
277
270
|
- spec/models/payout_spec.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# BleumiPay::CreatePaymentRequest
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**id** | **String** | Unique ID identifying the payment |
|
8
|
-
**buyer_address** | **String** | Address of buyer. Refund operations on this wallet will use this address. You can set this to your address to manually handle refunds (outside of Bleumi Pay) to your buyer. <br/> <b>Warning!</b> - This address must be able to receive payments from smart contracts.|
|
9
|
-
**transfer_address** | **String** | Your deposit address. Settle operations on this wallet will use this address. <br/> <b>Warning!</b> - This address must be able to receive payments from smart contracts.|
|
10
|
-
**token** <br> (Optional) | **String** | (Only for Algorand Standard Asset) Asset id which will be used for payment. |
|
11
|
-
## Example
|
12
|
-
|
13
|
-
```json
|
14
|
-
{
|
15
|
-
"id": "1",
|
16
|
-
"buyerAddress": "0xD15BDD17175825742A5904b21008dd3A019a060E",
|
17
|
-
"transferAddress": "0x7Dc30B85084aA1608e5C1Ce39c804Be177e40A07"
|
18
|
-
}
|
19
|
-
```
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# BleumiPay::CreatePaymentResponse
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**addr** | **String** | Address of the newly created payment |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```json
|
12
|
-
{
|
13
|
-
"addr": "0xbea2f9d56c3cc7f2c7e17d294200dd75708eecd8"
|
14
|
-
}
|
15
|
-
```
|
data/hc_create.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# Load the gem
|
2
|
-
require 'bleumi_pay_sdk_ruby'
|
3
|
-
|
4
|
-
# Setup authorization
|
5
|
-
BleumiPay.configure do |config|
|
6
|
-
# Configure API key authorization: ApiKeyAuth
|
7
|
-
config.api_key['x-api-key'] = 'gCix0pemxoUt76Ufef16jwvbV6cC7H60HdryEJj0'
|
8
|
-
end
|
9
|
-
|
10
|
-
api_instance = BleumiPay::HostedCheckoutsApi.new
|
11
|
-
|
12
|
-
create_checkout_url_request = BleumiPay::CreateCheckoutUrlRequest.new # CreatePayoutRequest | Specify payout creation parameters.
|
13
|
-
create_checkout_url_request.id = '17'
|
14
|
-
create_checkout_url_request.currency = 'USD'
|
15
|
-
create_checkout_url_request.amount = '10'
|
16
|
-
create_checkout_url_request.success_url = 'https://demo.store/api/completeOrder'
|
17
|
-
create_checkout_url_request.cancel_url = 'https://demo.store/api/cancelOrder'
|
18
|
-
# create_checkout_url_request.token = '0x115615DbD0f835344725146Fa6343219315F15E5'
|
19
|
-
# create_checkout_url_request.chain = BleumiPay::Chain::GOERLI
|
20
|
-
|
21
|
-
# create_checkout_url_request.currency = 'ALGO'
|
22
|
-
# create_checkout_url_request.token = 'ALGO'
|
23
|
-
# create_checkout_url_request.chain = BleumiPay::Chain::ALG_TESTNET
|
24
|
-
|
25
|
-
# RSK
|
26
|
-
# USD p18 - 0xB3A4A821434bDFbE55872C240D3888c412c68B9B
|
27
|
-
# USD p6 - 0xb9F624160Bb2755aa25366cc307ED27e39A4f296
|
28
|
-
# USD p2 - 0x1efEaBf46Ca3270A9a41D324350692664f1eA105
|
29
|
-
# EUR p2 - 0xd7a5c209194AC2E8e3E6Ca1dbF3C55484adb06e1
|
30
|
-
# Chain: RSK_TESTNET
|
31
|
-
create_checkout_url_request.token = '0xb9F624160Bb2755aa25366cc307ED27e39A4f296'
|
32
|
-
create_checkout_url_request.chain = BleumiPay::Chain::RSK_TESTNET
|
33
|
-
|
34
|
-
begin
|
35
|
-
#Create an unique wallet address to accept payments for an ERC-20 token from a buyer
|
36
|
-
result = api_instance.create_checkout_url(create_checkout_url_request)
|
37
|
-
p result
|
38
|
-
rescue BleumiPay::ApiError => e
|
39
|
-
puts "Exception when calling HostedCheckoutsApi->create_checkout_url: #{e}"
|
40
|
-
end
|
data/hc_list.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# load the gem
|
2
|
-
require 'bleumi_pay_sdk_ruby'
|
3
|
-
# setup authorization
|
4
|
-
BleumiPay.configure do |config|
|
5
|
-
# Configure API key authorization: ApiKeyAuth
|
6
|
-
config.api_key['x-api-key'] = 'gCix0pemxoUt76Ufef16jwvbV6cC7H60HdryEJj0'
|
7
|
-
end
|
8
|
-
|
9
|
-
api_instance = BleumiPay::HostedCheckoutsApi.new
|
10
|
-
|
11
|
-
begin
|
12
|
-
#Retrieve all tokens configured for the Hosted Checkout in your account in the Bleumi Pay Dashboard
|
13
|
-
result = api_instance.list_tokens
|
14
|
-
p result
|
15
|
-
rescue BleumiPay::ApiError => e
|
16
|
-
puts "Exception when calling HostedCheckoutsApi->list_tokens: #{e}"
|
17
|
-
end
|
data/hc_validate.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# load the gem
|
2
|
-
require 'bleumi_pay_sdk_ruby'
|
3
|
-
# setup authorization
|
4
|
-
BleumiPay.configure do |config|
|
5
|
-
# Configure API key authorization: ApiKeyAuth
|
6
|
-
config.api_key['x-api-key'] = 'gCix0pemxoUt76Ufef16jwvbV6cC7H60HdryEJj0'
|
7
|
-
end
|
8
|
-
|
9
|
-
api_instance = BleumiPay::HostedCheckoutsApi.new
|
10
|
-
|
11
|
-
begin
|
12
|
-
validate_checkout_request = BleumiPay::ValidateCheckoutRequest.new # WalletSettleOperationInput | Request body - used to specify the amount to settle.
|
13
|
-
validate_checkout_request.hmac_alg = 'HMAC-SHA256-HEX'
|
14
|
-
validate_checkout_request.hmac_input = 'goerli|0xbeaa3c30fc4a89e31caec6e2c8e89d3138f3bc18|0x115615dbd0f835344725146fa6343219315f15e5|10|0'
|
15
|
-
validate_checkout_request.hmac_key_id = 'v1'
|
16
|
-
validate_checkout_request.hmac_value = '205e429e51618e377046a0e8452d94b364e6938ea04362d466418548f3871f30'
|
17
|
-
#Settle a wallet, amount received will be transferred even if less than payment amount
|
18
|
-
result = api_instance.validate_checkout_payment(validate_checkout_request)
|
19
|
-
p result
|
20
|
-
rescue BleumiPay::ApiError => e
|
21
|
-
puts "Exception when calling HostedCheckoutsApi->validate_checkout_payment: #{e}"
|
22
|
-
end
|
data/po_create.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
# Load the gem
|
2
|
-
require 'bleumi_pay_sdk_ruby'
|
3
|
-
|
4
|
-
# Setup authorization
|
5
|
-
BleumiPay.configure do |config|
|
6
|
-
# Configure API key authorization: ApiKeyAuth
|
7
|
-
config.api_key['x-api-key'] = 'gCix0pemxoUt76Ufef16jwvbV6cC7H60HdryEJj0'
|
8
|
-
end
|
9
|
-
|
10
|
-
api_instance = BleumiPay::PayoutsApi.new
|
11
|
-
|
12
|
-
opts = {
|
13
|
-
chain: BleumiPay::Chain::GOERLI # Chain | Ethereum network in which payment is to be created.
|
14
|
-
}
|
15
|
-
|
16
|
-
create_payout_request = BleumiPay::CreatePayoutRequest.new # CreatePayoutRequest | Specify payout creation parameters.
|
17
|
-
create_payout_request = BleumiPay::CreatePayoutRequest.new # CreatePayoutRequest | Request body - used to specify payout creation parameters.
|
18
|
-
# This example shows 2 payouts being created
|
19
|
-
# Creating Payout-1
|
20
|
-
payout1 = BleumiPay::Payout.new
|
21
|
-
payout1.amount = '1' # str | Replace <PAYOUT_AMT_1> with the 1st payout's amount
|
22
|
-
payout1.transfer_address = '0x5db2d6542d55B2aEC1f10D0C0Df3B0169Bf41E41' # str | Replace <PAYOUT_ADDR_1> with the 1st payout's receiver's address
|
23
|
-
# Creating Payout-2
|
24
|
-
payout2 = BleumiPay::Payout.new
|
25
|
-
payout2.amount = '1' # str | Replace <PAYOUT_AMT_2> with the 2nd payout's amount
|
26
|
-
payout2.transfer_address = '0x195797609aDcF24b9ca3a105D221293fCA0c476F' # str | Replace <PAYOUT_ADDR_2> with the 2nd payout's receiver's address
|
27
|
-
# Creating a payouts array with both the payouts created above
|
28
|
-
payouts = [payout1, payout2]
|
29
|
-
|
30
|
-
create_payout_request.txid = '3' # str | Replace with unique payout ID
|
31
|
-
create_payout_request.token = '0x115615DbD0f835344725146Fa6343219315F15E5' # str | Replace <TOKEN> with Token. Eg. ETH or ECR-20 token contract address or XDAI or XDAIT
|
32
|
-
create_payout_request.payouts = payouts # setting the payouts array to the payout create request
|
33
|
-
begin
|
34
|
-
#Create an unique wallet address to accept payments for an ERC-20 token from a buyer
|
35
|
-
result = api_instance.create_payout(create_payout_request, opts)
|
36
|
-
p result
|
37
|
-
rescue BleumiPay::ApiError => e
|
38
|
-
puts "Exception when calling PayoutsApi->create_payout: #{e}"
|
39
|
-
end
|
data/po_list.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# load the gem
|
2
|
-
require 'bleumi_pay_sdk_ruby'
|
3
|
-
# setup authorization
|
4
|
-
BleumiPay.configure do |config|
|
5
|
-
# Configure API key authorization: ApiKeyAuth
|
6
|
-
config.api_key['x-api-key'] = 'gCix0pemxoUt76Ufef16jwvbV6cC7H60HdryEJj0'
|
7
|
-
end
|
8
|
-
|
9
|
-
api_instance = BleumiPay::PayoutsApi.new
|
10
|
-
opts = {
|
11
|
-
next_token: '', # String | Cursor to start results from
|
12
|
-
sort_by: 'createdAt', # String | Sort wallets by
|
13
|
-
start_at: '1577836800', # String | Get wallets from this timestamp
|
14
|
-
end_at: '' # String | Get wallets till this timestamp
|
15
|
-
}
|
16
|
-
|
17
|
-
begin
|
18
|
-
#Returns a list of wallets
|
19
|
-
result = api_instance.list_payouts(opts)
|
20
|
-
p result
|
21
|
-
rescue BleumiPay::ApiError => e
|
22
|
-
puts "Exception when calling PayoutsApi->list_payouts: #{e}"
|
23
|
-
end
|
data/py_create.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
# Load the gem
|
2
|
-
require 'bleumi_pay_sdk_ruby'
|
3
|
-
|
4
|
-
# Setup authorization
|
5
|
-
BleumiPay.configure do |config|
|
6
|
-
# Configure API key authorization: ApiKeyAuth
|
7
|
-
config.api_key['x-api-key'] = 'gCix0pemxoUt76Ufef16jwvbV6cC7H60HdryEJj0'
|
8
|
-
end
|
9
|
-
|
10
|
-
api_instance = BleumiPay::PaymentsApi.new
|
11
|
-
|
12
|
-
create_payment_request = BleumiPay::CreatePaymentRequest.new # CreatePayoutRequest | Specify payout creation parameters.
|
13
|
-
# opts = {
|
14
|
-
# chain: BleumiPay::Chain::GOERLI # Chain | Ethereum network in which payment is to be created. Please refer documentation for Supported Networks
|
15
|
-
# }
|
16
|
-
buyer_address = '0x713883BF69B786f0A7aB6E2248a70C50577F6b34'
|
17
|
-
transfer_address = '0x5db2d6542d55B2aEC1f10D0C0Df3B0169Bf41E41'
|
18
|
-
# token = '0x115615DbD0f835344725146Fa6343219315F15E5-'
|
19
|
-
|
20
|
-
# opts = {
|
21
|
-
# chain: BleumiPay::Chain::ALG_TESTNET # Chain | Ethereum network in which payment is to be created. Please refer documentation for Supported Networks
|
22
|
-
# }
|
23
|
-
# buyer_address = 'W5XU4IWCTVBTYXSYIGJYXEPXH2O5S6RPHLF4JK25NEPYT3RACD4Z3EBS4A'
|
24
|
-
# transfer_address = 'CQRMTAHZJA3SIEOTEMZXCAIZKUWE2CCLBCFYQI4NINU43IOTEWT4LOT4IY'
|
25
|
-
|
26
|
-
# RSK
|
27
|
-
# USD p18 - 0xB3A4A821434bDFbE55872C240D3888c412c68B9B
|
28
|
-
# USD p6 - 0xb9F624160Bb2755aa25366cc307ED27e39A4f296
|
29
|
-
# USD p2 - 0x1efEaBf46Ca3270A9a41D324350692664f1eA105
|
30
|
-
# EUR p2 - 0xd7a5c209194AC2E8e3E6Ca1dbF3C55484adb06e1
|
31
|
-
# Chain: RSK_TESTNET
|
32
|
-
token = '0xb9F624160Bb2755aa25366cc307ED27e39A4f296'
|
33
|
-
opts = {
|
34
|
-
chain: BleumiPay::Chain::RSK_TESTNET # Chain | RSK network in which payment is to be created. Please refer documentation for Supported Networks
|
35
|
-
}
|
36
|
-
|
37
|
-
create_payment_request.id = '16'
|
38
|
-
create_payment_request.buyer_address = buyer_address
|
39
|
-
create_payment_request.transfer_address = transfer_address
|
40
|
-
create_payment_request.token = token
|
41
|
-
|
42
|
-
begin
|
43
|
-
#Create an unique wallet address to accept payments for an ERC-20 token from a buyer
|
44
|
-
result = api_instance.create_payment(create_payment_request, opts)
|
45
|
-
p result
|
46
|
-
rescue BleumiPay::ApiError => e
|
47
|
-
puts "Exception when calling create_payment: #{e}"
|
48
|
-
end
|
data/py_get.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# load the gem
|
2
|
-
require 'bleumi_pay_sdk_ruby'
|
3
|
-
# setup authorization
|
4
|
-
BleumiPay.configure do |config|
|
5
|
-
# Configure API key authorization: ApiKeyAuth
|
6
|
-
config.api_key['x-api-key'] = 'gCix0pemxoUt76Ufef16jwvbV6cC7H60HdryEJj0'
|
7
|
-
end
|
8
|
-
|
9
|
-
api_instance = BleumiPay::PaymentsApi.new
|
10
|
-
id = '16' # String | Unique ID identifying the wallet in your system
|
11
|
-
|
12
|
-
begin
|
13
|
-
#Return a specific wallet
|
14
|
-
result = api_instance.get_payment(id)
|
15
|
-
p result
|
16
|
-
rescue BleumiPay::ApiError => e
|
17
|
-
puts "Exception when calling PaymentsApi->get_payment: #{e}"
|
18
|
-
end
|
data/py_getop.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# load the gem
|
2
|
-
require 'bleumi_pay_sdk_ruby'
|
3
|
-
# setup authorization
|
4
|
-
BleumiPay.configure do |config|
|
5
|
-
# Configure API key authorization: ApiKeyAuth
|
6
|
-
config.api_key['x-api-key'] = 'gCix0pemxoUt76Ufef16jwvbV6cC7H60HdryEJj0'
|
7
|
-
end
|
8
|
-
|
9
|
-
api_instance = BleumiPay::PaymentsApi.new
|
10
|
-
id = '16' # String | Unique ID identifying the wallet in your system
|
11
|
-
txid = '1580382159243' # String | ID of a specific operation of the wallet
|
12
|
-
|
13
|
-
begin
|
14
|
-
#Return a specific operation of the wallet
|
15
|
-
result = api_instance.get_payment_operation(id, txid)
|
16
|
-
p result
|
17
|
-
rescue BleumiPay::ApiError => e
|
18
|
-
puts "Exception when calling PaymentsApi->get_payment_operation: #{e}"
|
19
|
-
end
|
data/py_list.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# load the gem
|
2
|
-
require 'bleumi_pay_sdk_ruby'
|
3
|
-
# setup authorization
|
4
|
-
BleumiPay.configure do |config|
|
5
|
-
# Configure API key authorization: ApiKeyAuth
|
6
|
-
config.api_key['x-api-key'] = 'gCix0pemxoUt76Ufef16jwvbV6cC7H60HdryEJj0'
|
7
|
-
end
|
8
|
-
|
9
|
-
api_instance = BleumiPay::PaymentsApi.new
|
10
|
-
opts = {
|
11
|
-
next_token: '', # String | Cursor to start results from. Eg. Cm0KEwoJY3JlYXRlZEF0EgYI/IjA8QUSUmoQc35wYXktZGV2LTIzNTkxMXI+CxIHQWNjb3VudCIkVWxvbTNlaVZaTFhqR3gyYWxCcnhDOG13UWx6MXxzYW5kYm94DAsSBldhbGxldCIBOQwYACAA
|
12
|
-
sort_by: 'createdAt', # String | Sort payments by
|
13
|
-
sort_order: 'ascending', # String | Sort Order for payments
|
14
|
-
start_at: '1577836800', # String | Get payments from this timestamp
|
15
|
-
end_at: nil # String | Get payments till this timestamp
|
16
|
-
}
|
17
|
-
|
18
|
-
begin
|
19
|
-
#Returns a list of wallets
|
20
|
-
result = api_instance.list_payments(opts)
|
21
|
-
p result
|
22
|
-
rescue BleumiPay::ApiError => e
|
23
|
-
puts "Exception when calling list_payments: #{e}"
|
24
|
-
end
|