bleumi_pay_sdk_ruby 1.0.6 → 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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +22 -22
  4. data/bleumi_pay_sdk_ruby.gemspec +1 -1
  5. data/docs/AlgorandBalance.md +1 -0
  6. data/docs/Chain.md +2 -0
  7. data/docs/CreateCheckoutUrlRequest.md +2 -4
  8. data/docs/CreatePayoutRequest.md +1 -1
  9. data/docs/EthereumBalance.md +1 -0
  10. data/docs/HostedCheckoutsApi.md +12 -17
  11. data/docs/PaginatedPayments.md +4 -0
  12. data/docs/Payment.md +2 -0
  13. data/docs/PaymentAddresses.md +13 -31
  14. data/docs/PaymentBalances.md +13 -25
  15. data/docs/PaymentOperationInputs.md +1 -2
  16. data/docs/PaymentRefundRequest.md +1 -2
  17. data/docs/PaymentSettleRequest.md +1 -1
  18. data/docs/PaymentsApi.md +4 -67
  19. data/docs/PayoutsApi.md +2 -2
  20. data/docs/RskBalance.md +28 -0
  21. data/docs/WalletBalance.md +14 -10
  22. data/hc_create.rb +40 -0
  23. data/hc_list.rb +17 -0
  24. data/hc_validate.rb +22 -0
  25. data/lib/bleumi_pay_sdk_ruby.rb +1 -0
  26. data/lib/bleumi_pay_sdk_ruby/api/payouts_api.rb +5 -13
  27. data/lib/bleumi_pay_sdk_ruby/api/request_validator.rb +40 -16
  28. data/lib/bleumi_pay_sdk_ruby/api_client.rb +7 -5
  29. data/lib/bleumi_pay_sdk_ruby/models/chain.rb +2 -0
  30. data/lib/bleumi_pay_sdk_ruby/models/payment_addresses.rb +15 -4
  31. data/lib/bleumi_pay_sdk_ruby/models/payment_balances.rb +13 -4
  32. data/lib/bleumi_pay_sdk_ruby/models/rsk_balance.rb +219 -0
  33. data/lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb +19 -4
  34. data/lib/bleumi_pay_sdk_ruby/version.rb +1 -1
  35. data/po_create.rb +39 -0
  36. data/po_list.rb +23 -0
  37. data/py_create.rb +48 -0
  38. data/py_get.rb +18 -0
  39. data/py_getop.rb +19 -0
  40. data/py_list.rb +24 -0
  41. data/py_listops.rb +21 -0
  42. data/py_refund.rb +43 -0
  43. data/py_settle.rb +43 -0
  44. data/spec/api_client_spec.rb +1 -1
  45. data/spec/models/payment_addresses_spec.rb +6 -0
  46. data/spec/models/payment_balances_spec.rb +6 -0
  47. data/spec/models/rsk_balance_spec.rb +47 -0
  48. data/spec/models/wallet_balance_spec.rb +6 -0
  49. metadata +22 -4
@@ -0,0 +1,18 @@
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
@@ -0,0 +1,19 @@
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
@@ -0,0 +1,24 @@
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
@@ -0,0 +1,21 @@
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
+ 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
@@ -0,0 +1,43 @@
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 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
+ # RSK
23
+ # USD p18 - 0xB3A4A821434bDFbE55872C240D3888c412c68B9B
24
+ # USD p6 - 0xb9F624160Bb2755aa25366cc307ED27e39A4f296
25
+ # USD p2 - 0x1efEaBf46Ca3270A9a41D324350692664f1eA105
26
+ # EUR p2 - 0xd7a5c209194AC2E8e3E6Ca1dbF3C55484adb06e1
27
+ # Chain: RSK_TESTNET
28
+ refundTokenAddresss = '0xb9F624160Bb2755aa25366cc307ED27e39A4f296'
29
+ opts = {
30
+ chain: BleumiPay::Chain::RSK_TESTNET # Chain | RSK network in which payment is to be created. Please refer documentation for Supported Networks
31
+ }
32
+
33
+ payment_refund_request = BleumiPay::PaymentRefundRequest.new # PaymentRefundRequest | Request body - used to specify the token to refund.
34
+
35
+ payment_refund_request.token = refundTokenAddresss
36
+
37
+ begin
38
+ #Refund wallet
39
+ result = api_instance.refund_payment(id, payment_refund_request, opts)
40
+ p result
41
+ rescue BleumiPay::ApiError => e
42
+ puts "Exception when calling PaymentsApi->refund_payment: #{e}"
43
+ end
@@ -0,0 +1,43 @@
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 = '17' # 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
+ # RSK
22
+ # USD p18 - 0xB3A4A821434bDFbE55872C240D3888c412c68B9B
23
+ # USD p6 - 0xb9F624160Bb2755aa25366cc307ED27e39A4f296
24
+ # USD p2 - 0x1efEaBf46Ca3270A9a41D324350692664f1eA105
25
+ # EUR p2 - 0xd7a5c209194AC2E8e3E6Ca1dbF3C55484adb06e1
26
+ # Chain: RSK_TESTNET
27
+ settleToken = '0xb9F624160Bb2755aa25366cc307ED27e39A4f296'
28
+ opts = {
29
+ chain: BleumiPay::Chain::RSK_TESTNET # Chain | RSK network in which payment is to be created. Please refer documentation for Supported Networks
30
+ }
31
+
32
+
33
+ payment_settle_request = BleumiPay::PaymentSettleRequest.new # WalletSettleOperationInput | Request body - used to specify the amount to settle.
34
+ payment_settle_request.amount = '10'
35
+ payment_settle_request.token = settleToken
36
+
37
+ begin
38
+ #Settle a wallet, amount received will be transferred even if less than payment amount
39
+ result = api_instance.settle_payment(id, payment_settle_request, opts)
40
+ p result
41
+ rescue BleumiPay::ApiError => e
42
+ puts "Exception when calling PaymentsApi->settle_payment: #{e}"
43
+ end
@@ -156,7 +156,7 @@ describe BleumiPay::ApiClient do
156
156
  end
157
157
 
158
158
  it 'fails for invalid collection format' do
159
- expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
159
+ expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
160
160
  end
161
161
  end
162
162
 
@@ -44,4 +44,10 @@ describe 'PaymentAddresses' do
44
44
  end
45
45
  end
46
46
 
47
+ describe 'test attribute "rsk"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
47
53
  end
@@ -44,4 +44,10 @@ describe 'PaymentBalances' do
44
44
  end
45
45
  end
46
46
 
47
+ describe 'test attribute "rsk"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
47
53
  end
@@ -0,0 +1,47 @@
1
+ =begin
2
+ #Bleumi Pay API
3
+
4
+ #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai payments and/or payouts 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.2
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for BleumiPay::RskBalance
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'RskBalance' do
21
+ before do
22
+ # run before each test
23
+ @instance = BleumiPay::RskBalance.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of RskBalance' do
31
+ it 'should create an instance of RskBalance' do
32
+ expect(@instance).to be_instance_of(BleumiPay::RskBalance)
33
+ end
34
+ end
35
+ describe 'test attribute "rsk"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "rsk_testnet"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
@@ -56,4 +56,10 @@ describe 'WalletBalance' do
56
56
  end
57
57
  end
58
58
 
59
+ describe 'test attribute "safety"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
59
65
  end
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.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bleumi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-09 00:00:00.000000000 Z
11
+ date: 2020-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -70,8 +70,10 @@ dependencies:
70
70
  - - "~>"
71
71
  - !ruby/object:Gem::Version
72
72
  version: '3.6'
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.
73
+ description: The Bleumi Pay SDK helps you integrate Algo, Algorand Standard Asset,
74
+ Ethereum, ERC-20, RSK, RSK ERC-20 & xDai payments and payouts into your business
75
+ or application. The SDK bundles 'Bleumi Pay API' into one SDK to ease implementation
76
+ and support.
75
77
  email:
76
78
  - info@bleumi.com
77
79
  executables: []
@@ -115,9 +117,13 @@ files:
115
117
  - docs/PayoutItem.md
116
118
  - docs/PayoutItemInputs.md
117
119
  - docs/PayoutsApi.md
120
+ - docs/RskBalance.md
118
121
  - docs/ValidateCheckoutRequest.md
119
122
  - docs/ValidateCheckoutResponse.md
120
123
  - docs/WalletBalance.md
124
+ - hc_create.rb
125
+ - hc_list.rb
126
+ - hc_validate.rb
121
127
  - lib/bleumi_pay_sdk_ruby.rb
122
128
  - lib/bleumi_pay_sdk_ruby/api/hosted_checkouts_api.rb
123
129
  - lib/bleumi_pay_sdk_ruby/api/payments_api.rb
@@ -155,10 +161,20 @@ files:
155
161
  - lib/bleumi_pay_sdk_ruby/models/payout.rb
156
162
  - lib/bleumi_pay_sdk_ruby/models/payout_item.rb
157
163
  - lib/bleumi_pay_sdk_ruby/models/payout_item_inputs.rb
164
+ - lib/bleumi_pay_sdk_ruby/models/rsk_balance.rb
158
165
  - lib/bleumi_pay_sdk_ruby/models/validate_checkout_request.rb
159
166
  - lib/bleumi_pay_sdk_ruby/models/validate_checkout_response.rb
160
167
  - lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb
161
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
162
178
  - spec/api/hosted_checkouts_api_spec.rb
163
179
  - spec/api/payments_api_spec.rb
164
180
  - spec/api/payouts_api_spec.rb
@@ -193,6 +209,7 @@ files:
193
209
  - spec/models/payout_item_inputs_spec.rb
194
210
  - spec/models/payout_item_spec.rb
195
211
  - spec/models/payout_spec.rb
212
+ - spec/models/rsk_balance_spec.rb
196
213
  - spec/models/validate_checkout_request_spec.rb
197
214
  - spec/models/validate_checkout_response_spec.rb
198
215
  - spec/models/wallet_balance_spec.rb
@@ -237,6 +254,7 @@ test_files:
237
254
  - spec/models/payout_item_inputs_spec.rb
238
255
  - spec/models/payment_operation_spec.rb
239
256
  - spec/models/algorand_balance_spec.rb
257
+ - spec/models/rsk_balance_spec.rb
240
258
  - spec/models/ethereum_balance_spec.rb
241
259
  - spec/models/ethereum_wallet_inputs_spec.rb
242
260
  - spec/models/wallet_balance_spec.rb