bleumi_pay_sdk_ruby 1.0.5 → 1.0.6
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 +5 -2
- data/bleumi_pay_sdk_ruby.gemspec +2 -2
- data/lib/bleumi_pay_sdk_ruby/configuration.rb +3 -6
- data/lib/bleumi_pay_sdk_ruby/version.rb +1 -1
- metadata +4 -17
- data/hc_create.rb +0 -33
- 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 -38
- 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 -33
- data/py_settle.rb +0 -32
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc66c63b369f8b31f6efadf51a1fe953f53ed5c92efb33be6dd432ffd9ddd82d
|
|
4
|
+
data.tar.gz: a9f5da041c836a6668b4a2fcba3b678e5357e492925d948d91571e07c2dc9239
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad034fa51a5de8561679b7c04c3ce668867c7f6bbe179aa955b188bbc6cc4350d45d68c02745c22b1f9702afeb5501c4dbe826ccd819e6aa77d0e7419fec5820
|
|
7
|
+
data.tar.gz: 5b89ea7404b9a6160020206454d7ec59912ff49758260109fc8fccf478ebef4e7fbf953e5ed4007c0dbab9a6fadd34ffc1c39e490b8eac1d77bf80f3daef3ce6
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
The Bleumi Pay SDK is a one-stop shop to help you integrate Algorand, Ethereum, ERC-20 and xDai payments and/or payouts 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.
|
|
8
8
|
|
|
9
|
-
bleumi-pay-sdk-ruby is a Ruby library that provides an interface between your
|
|
9
|
+
bleumi-pay-sdk-ruby is a Ruby library that provides an interface between your Ruby application and [Bleumi Pay API](https://pay.bleumi.com/docs/#introduction). This tutorial covers the basics, including examples, needed to use the SDK.
|
|
10
10
|
|
|
11
11
|
## Getting Started
|
|
12
12
|
|
|
@@ -93,6 +93,8 @@ BleumiPay::PayoutsApi | [**create_payout**](docs/PayoutsApi.md#create_payout) |
|
|
|
93
93
|
## Documentation for Models
|
|
94
94
|
|
|
95
95
|
- [BleumiPay::AlgorandBalance](docs/AlgorandBalance.md)
|
|
96
|
+
- [BleumiPay::AlgorandWalletAddress](docs/AlgorandWalletAddress.md)
|
|
97
|
+
- [BleumiPay::AlgorandWalletInputs](docs/AlgorandWalletInputs.md)
|
|
96
98
|
- [BleumiPay::BadRequest](docs/BadRequest.md)
|
|
97
99
|
- [BleumiPay::Chain](docs/Chain.md)
|
|
98
100
|
- [BleumiPay::CheckoutToken](docs/CheckoutToken.md)
|
|
@@ -103,6 +105,8 @@ BleumiPay::PayoutsApi | [**create_payout**](docs/PayoutsApi.md#create_payout) |
|
|
|
103
105
|
- [BleumiPay::CreatePayoutRequest](docs/CreatePayoutRequest.md)
|
|
104
106
|
- [BleumiPay::CreatePayoutResponse](docs/CreatePayoutResponse.md)
|
|
105
107
|
- [BleumiPay::EthereumBalance](docs/EthereumBalance.md)
|
|
108
|
+
- [BleumiPay::EthereumWalletAddress](docs/EthereumWalletAddress.md)
|
|
109
|
+
- [BleumiPay::EthereumWalletInputs](docs/EthereumWalletInputs.md)
|
|
106
110
|
- [BleumiPay::PaginatedPaymentOperations](docs/PaginatedPaymentOperations.md)
|
|
107
111
|
- [BleumiPay::PaginatedPayments](docs/PaginatedPayments.md)
|
|
108
112
|
- [BleumiPay::PaginatedPayoutItems](docs/PaginatedPayoutItems.md)
|
|
@@ -119,7 +123,6 @@ BleumiPay::PayoutsApi | [**create_payout**](docs/PayoutsApi.md#create_payout) |
|
|
|
119
123
|
- [BleumiPay::PayoutItemInputs](docs/PayoutItemInputs.md)
|
|
120
124
|
- [BleumiPay::ValidateCheckoutRequest](docs/ValidateCheckoutRequest.md)
|
|
121
125
|
- [BleumiPay::ValidateCheckoutResponse](docs/ValidateCheckoutResponse.md)
|
|
122
|
-
- [BleumiPay::WalletAddress](docs/WalletAddress.md)
|
|
123
126
|
- [BleumiPay::WalletBalance](docs/WalletBalance.md)
|
|
124
127
|
|
|
125
128
|
|
data/bleumi_pay_sdk_ruby.gemspec
CHANGED
|
@@ -22,8 +22,8 @@ Gem::Specification.new do |s|
|
|
|
22
22
|
s.authors = ["Bleumi"]
|
|
23
23
|
s.email = ["info@bleumi.com"]
|
|
24
24
|
s.homepage = "https://pay.bleumi.com/"
|
|
25
|
-
s.summary = "
|
|
26
|
-
s.description = "
|
|
25
|
+
s.summary = "Bleumi Pay API Ruby Gem"
|
|
26
|
+
s.description = "The Bleumi Pay SDK is a one-stop shop to help you integrate Algorand, Ethereum, ERC-20 and xDai payments and/or payouts into your business."
|
|
27
27
|
s.license = "MIT"
|
|
28
28
|
s.required_ruby_version = ">= 1.9"
|
|
29
29
|
|
|
@@ -127,10 +127,8 @@ module BleumiPay
|
|
|
127
127
|
|
|
128
128
|
def initialize
|
|
129
129
|
@scheme = 'https'
|
|
130
|
-
|
|
131
|
-
@
|
|
132
|
-
# @base_path = ''
|
|
133
|
-
@base_path = '/prod/'
|
|
130
|
+
@host = 'api.pay.bleumi.com'
|
|
131
|
+
@base_path = ''
|
|
134
132
|
@api_key = {}
|
|
135
133
|
@api_key_prefix = {}
|
|
136
134
|
@timeout = 0
|
|
@@ -209,8 +207,7 @@ module BleumiPay
|
|
|
209
207
|
def server_settings
|
|
210
208
|
[
|
|
211
209
|
{
|
|
212
|
-
|
|
213
|
-
url: "ej8fsqadb7.execute-api.us-east-1.amazonaws.com/",
|
|
210
|
+
url: "https://api.pay.bleumi.com/",
|
|
214
211
|
description: "Bleumi Pay REST API",
|
|
215
212
|
}
|
|
216
213
|
]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bleumi
|
|
@@ -70,8 +70,8 @@ dependencies:
|
|
|
70
70
|
- - "~>"
|
|
71
71
|
- !ruby/object:Gem::Version
|
|
72
72
|
version: '3.6'
|
|
73
|
-
description:
|
|
74
|
-
|
|
73
|
+
description: The Bleumi Pay SDK is a one-stop shop to help you integrate Algorand,
|
|
74
|
+
Ethereum, ERC-20 and xDai payments and/or payouts into your business.
|
|
75
75
|
email:
|
|
76
76
|
- info@bleumi.com
|
|
77
77
|
executables: []
|
|
@@ -118,9 +118,6 @@ files:
|
|
|
118
118
|
- docs/ValidateCheckoutRequest.md
|
|
119
119
|
- docs/ValidateCheckoutResponse.md
|
|
120
120
|
- docs/WalletBalance.md
|
|
121
|
-
- hc_create.rb
|
|
122
|
-
- hc_list.rb
|
|
123
|
-
- hc_validate.rb
|
|
124
121
|
- lib/bleumi_pay_sdk_ruby.rb
|
|
125
122
|
- lib/bleumi_pay_sdk_ruby/api/hosted_checkouts_api.rb
|
|
126
123
|
- lib/bleumi_pay_sdk_ruby/api/payments_api.rb
|
|
@@ -162,15 +159,6 @@ files:
|
|
|
162
159
|
- lib/bleumi_pay_sdk_ruby/models/validate_checkout_response.rb
|
|
163
160
|
- lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb
|
|
164
161
|
- lib/bleumi_pay_sdk_ruby/version.rb
|
|
165
|
-
- po_create.rb
|
|
166
|
-
- po_list.rb
|
|
167
|
-
- py_create.rb
|
|
168
|
-
- py_get.rb
|
|
169
|
-
- py_getop.rb
|
|
170
|
-
- py_list.rb
|
|
171
|
-
- py_listops.rb
|
|
172
|
-
- py_refund.rb
|
|
173
|
-
- py_settle.rb
|
|
174
162
|
- spec/api/hosted_checkouts_api_spec.rb
|
|
175
163
|
- spec/api/payments_api_spec.rb
|
|
176
164
|
- spec/api/payouts_api_spec.rb
|
|
@@ -231,8 +219,7 @@ requirements: []
|
|
|
231
219
|
rubygems_version: 3.0.6
|
|
232
220
|
signing_key:
|
|
233
221
|
specification_version: 4
|
|
234
|
-
summary:
|
|
235
|
-
ERC-20 and xDai payments and/or payouts into your business.
|
|
222
|
+
summary: Bleumi Pay API Ruby Gem
|
|
236
223
|
test_files:
|
|
237
224
|
- spec/api/payments_api_spec.rb
|
|
238
225
|
- spec/api/hosted_checkouts_api_spec.rb
|
data/hc_create.rb
DELETED
|
@@ -1,33 +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'] = 'hwE7QJcJ1raJicN8K0jwca4eIKAiVne179CK8wro'
|
|
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 = '31'
|
|
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.token = 'ALGO'
|
|
22
|
-
# create_checkout_url_request.currency = 'ALGO'
|
|
23
|
-
# create_checkout_url_request.chain = BleumiPay::Chain::ALG_TESTNET
|
|
24
|
-
# create_checkout_url_request.buyer_address = '0x713883BF69B786f0A7aB6E2248a70C50577F6b34'
|
|
25
|
-
create_checkout_url_request.buyer_address = 'W5XU4IWCTVBTYXSYIGJYXEPXH2O5S6RPHLF4JK25NEPYT3RACD4Z3EBS4A'
|
|
26
|
-
|
|
27
|
-
begin
|
|
28
|
-
#Create an unique wallet address to accept payments for an ERC-20 token from a buyer
|
|
29
|
-
result = api_instance.create_checkout_url(create_checkout_url_request)
|
|
30
|
-
p result
|
|
31
|
-
rescue BleumiPay::ApiError => e
|
|
32
|
-
puts "Exception when calling HostedCheckoutsApi->create_checkout_url: #{e}"
|
|
33
|
-
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'] = 'hwE7QJcJ1raJicN8K0jwca4eIKAiVne179CK8wro'
|
|
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'] = 'hwE7QJcJ1raJicN8K0jwca4eIKAiVne179CK8wro'
|
|
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|0xbeaea438bc2e19d097906b597219c288e8eb7b2e|0x115615dbd0f835344725146fa6343219315f15e5|10|12'
|
|
15
|
-
validate_checkout_request.hmac_key_id = 'v1'
|
|
16
|
-
validate_checkout_request.hmac_value = 'bdf82eb42efac09150d62ac1bcadd2fd0f64852ded2b571567c905217adf246a'
|
|
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'] = 'hwE7QJcJ1raJicN8K0jwca4eIKAiVne179CK8wro'
|
|
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 = '29' # 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'] = 'hwE7QJcJ1raJicN8K0jwca4eIKAiVne179CK8wro'
|
|
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,38 +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'] = 'hwE7QJcJ1raJicN8K0jwca4eIKAiVne179CK8wro'
|
|
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
|
-
|
|
27
|
-
create_payment_request.id = '32'
|
|
28
|
-
create_payment_request.buyer_address = buyer_address
|
|
29
|
-
create_payment_request.transfer_address = transfer_address
|
|
30
|
-
# create_payment_request.token = token
|
|
31
|
-
|
|
32
|
-
begin
|
|
33
|
-
#Create an unique wallet address to accept payments for an ERC-20 token from a buyer
|
|
34
|
-
result = api_instance.create_payment(create_payment_request, opts)
|
|
35
|
-
p result
|
|
36
|
-
rescue BleumiPay::ApiError => e
|
|
37
|
-
puts "Exception when calling create_payment: #{e}"
|
|
38
|
-
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 = '66' # 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'] = 'hwE7QJcJ1raJicN8K0jwca4eIKAiVne179CK8wro'
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
api_instance = BleumiPay::PaymentsApi.new
|
|
10
|
-
id = '32' # 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'] = 'hwE7QJcJ1raJicN8K0jwca4eIKAiVne179CK8wro'
|
|
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
|
data/py_listops.rb
DELETED
|
@@ -1,21 +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'] = 'hwE7QJcJ1raJicN8K0jwca4eIKAiVne179CK8wro'
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
api_instance = BleumiPay::PaymentsApi.new
|
|
10
|
-
id = '25' # String | Unique ID identifying the wallet in your system
|
|
11
|
-
opts = {
|
|
12
|
-
next_token: '' # String | Cursor to start results from
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
begin
|
|
16
|
-
#Return the list of operations performed by the mechant on a specific wallet
|
|
17
|
-
result = api_instance.list_payment_operations(id, opts)
|
|
18
|
-
p result
|
|
19
|
-
rescue BleumiPay::ApiError => e
|
|
20
|
-
puts "Exception when calling list_payment_operations: #{e}"
|
|
21
|
-
end
|
data/py_refund.rb
DELETED
|
@@ -1,33 +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'] = 'hwE7QJcJ1raJicN8K0jwca4eIKAiVne179CK8wro'
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
api_instance = BleumiPay::PaymentsApi.new
|
|
10
|
-
id = '25' # String | Unique ID identifying this record in your system
|
|
11
|
-
|
|
12
|
-
opts = {
|
|
13
|
-
chain: BleumiPay::Chain::GOERLI # Chain | Ethereum network in which payment is to be created. Please refer documentation for Supported Networks
|
|
14
|
-
}
|
|
15
|
-
refundTokenAddresss = '0x115615DbD0f835344725146Fa6343219315F15E5'
|
|
16
|
-
|
|
17
|
-
# opts = {
|
|
18
|
-
# chain: BleumiPay::Chain::ALG_TESTNET # Chain | Ethereum network in which payment is to be created. Please refer documentation for Supported Networks
|
|
19
|
-
# }
|
|
20
|
-
# refundTokenAddresss = 'ALGO'
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
payment_refund_request = BleumiPay::PaymentRefundRequest.new # PaymentRefundRequest | Request body - used to specify the token to refund.
|
|
24
|
-
|
|
25
|
-
payment_refund_request.token = refundTokenAddresss
|
|
26
|
-
|
|
27
|
-
begin
|
|
28
|
-
#Refund wallet
|
|
29
|
-
result = api_instance.refund_payment(id, payment_refund_request, opts)
|
|
30
|
-
p result
|
|
31
|
-
rescue BleumiPay::ApiError => e
|
|
32
|
-
puts "Exception when calling PaymentsApi->refund_payment: #{e}"
|
|
33
|
-
end
|
data/py_settle.rb
DELETED
|
@@ -1,32 +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'] = 'hwE7QJcJ1raJicN8K0jwca4eIKAiVne179CK8wro'
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
api_instance = BleumiPay::PaymentsApi.new
|
|
10
|
-
id = '32' # String | Unique ID identifying this record in your system
|
|
11
|
-
# opts = {
|
|
12
|
-
# chain: BleumiPay::Chain::GOERLI # Chain | Ethereum network in which payment is to be created. Please refer documentation for Supported Networks
|
|
13
|
-
# }
|
|
14
|
-
# settleToken = '0x115615DbD0f835344725146Fa6343219315F15E5'
|
|
15
|
-
|
|
16
|
-
opts = {
|
|
17
|
-
chain: BleumiPay::Chain::ALG_TESTNET # Chain | Ethereum network in which payment is to be created. Please refer documentation for Supported Networks
|
|
18
|
-
}
|
|
19
|
-
settleToken = 'ALGO'
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
payment_settle_request = BleumiPay::PaymentSettleRequest.new # WalletSettleOperationInput | Request body - used to specify the amount to settle.
|
|
23
|
-
payment_settle_request.amount = '10'
|
|
24
|
-
payment_settle_request.token = settleToken
|
|
25
|
-
|
|
26
|
-
begin
|
|
27
|
-
#Settle a wallet, amount received will be transferred even if less than payment amount
|
|
28
|
-
result = api_instance.settle_payment(id, payment_settle_request, opts)
|
|
29
|
-
p result
|
|
30
|
-
rescue BleumiPay::ApiError => e
|
|
31
|
-
puts "Exception when calling PaymentsApi->settle_payment: #{e}"
|
|
32
|
-
end
|