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.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +67 -47
  4. data/bleumi_pay_sdk_ruby.gemspec +4 -5
  5. data/docs/AlgorandBalance.md +28 -0
  6. data/docs/AlgorandWalletAddress.md +24 -0
  7. data/docs/AlgorandWalletInputs.md +23 -0
  8. data/docs/BadRequest.md +2 -1
  9. data/docs/Chain.md +14 -0
  10. data/docs/CheckoutToken.md +28 -0
  11. data/docs/CreateCheckoutUrlRequest.md +28 -0
  12. data/docs/CreateCheckoutUrlResponse.md +17 -0
  13. data/docs/CreatePaymentRequest.md +19 -0
  14. data/docs/CreatePaymentResponse.md +15 -0
  15. data/docs/CreatePayoutRequest.md +28 -0
  16. data/docs/CreatePayoutResponse.md +15 -0
  17. data/docs/EthereumBalance.md +30 -0
  18. data/docs/EthereumWalletAddress.md +23 -0
  19. data/docs/EthereumWalletInputs.md +23 -0
  20. data/docs/HostedCheckoutsApi.md +197 -0
  21. data/docs/PaginatedPaymentOperations.md +28 -0
  22. data/docs/PaginatedPayments.md +95 -0
  23. data/docs/PaginatedPayoutItems.md +59 -0
  24. data/docs/Payment.md +67 -0
  25. data/docs/PaymentAddresses.md +21 -0
  26. data/docs/PaymentBalances.md +21 -0
  27. data/docs/PaymentOperation.md +46 -0
  28. data/docs/PaymentOperationInputs.md +31 -0
  29. data/docs/PaymentOperationResponse.md +15 -0
  30. data/docs/PaymentRefundRequest.md +14 -0
  31. data/docs/PaymentSettleRequest.md +17 -0
  32. data/docs/PaymentsApi.md +368 -0
  33. data/docs/Payout.md +18 -0
  34. data/docs/PayoutItem.md +39 -0
  35. data/docs/PayoutItemInputs.md +28 -0
  36. data/docs/PayoutsApi.md +137 -0
  37. data/docs/RskBalance.md +28 -0
  38. data/docs/ValidateCheckoutRequest.md +21 -0
  39. data/docs/ValidateCheckoutResponse.md +15 -0
  40. data/docs/WalletBalance.md +18 -4
  41. data/hc_create.rb +40 -0
  42. data/hc_list.rb +17 -0
  43. data/hc_validate.rb +22 -0
  44. data/lib/bleumi_pay_sdk_ruby.rb +38 -17
  45. data/lib/bleumi_pay_sdk_ruby/api/hosted_checkouts_api.rb +212 -0
  46. data/lib/bleumi_pay_sdk_ruby/api/payments_api.rb +517 -0
  47. data/lib/bleumi_pay_sdk_ruby/api/payouts_api.rb +157 -0
  48. data/lib/bleumi_pay_sdk_ruby/api/request_validator.rb +288 -0
  49. data/lib/bleumi_pay_sdk_ruby/api_client.rb +11 -9
  50. data/lib/bleumi_pay_sdk_ruby/api_error.rb +3 -3
  51. data/lib/bleumi_pay_sdk_ruby/configuration.rb +4 -4
  52. data/lib/bleumi_pay_sdk_ruby/models/algorand_balance.rb +219 -0
  53. data/lib/bleumi_pay_sdk_ruby/models/algorand_wallet_address.rb +221 -0
  54. data/lib/bleumi_pay_sdk_ruby/models/algorand_wallet_inputs.rb +247 -0
  55. data/lib/bleumi_pay_sdk_ruby/models/bad_request.rb +15 -5
  56. data/lib/bleumi_pay_sdk_ruby/models/{eth_network.rb → chain.rb} +12 -9
  57. data/lib/bleumi_pay_sdk_ruby/models/checkout_token.rb +302 -0
  58. data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_request.rb +312 -0
  59. data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_response.rb +227 -0
  60. data/lib/bleumi_pay_sdk_ruby/models/{wallet_create_input.rb → create_payment_request.rb} +33 -11
  61. data/lib/bleumi_pay_sdk_ruby/models/{wallet_create_output.rb → create_payment_response.rb} +19 -23
  62. data/lib/bleumi_pay_sdk_ruby/models/create_payout_request.rb +244 -0
  63. data/lib/bleumi_pay_sdk_ruby/models/create_payout_response.rb +212 -0
  64. data/lib/bleumi_pay_sdk_ruby/models/ethereum_balance.rb +241 -0
  65. data/lib/bleumi_pay_sdk_ruby/models/ethereum_wallet_address.rb +221 -0
  66. data/lib/bleumi_pay_sdk_ruby/models/{wallet_inputs.rb → ethereum_wallet_inputs.rb} +35 -50
  67. data/lib/bleumi_pay_sdk_ruby/models/paginated_payment_operations.rb +224 -0
  68. data/lib/bleumi_pay_sdk_ruby/models/{paginated_wallet_operations.rb → paginated_payments.rb} +19 -9
  69. data/lib/bleumi_pay_sdk_ruby/models/{paginated_wallets.rb → paginated_payout_items.rb} +19 -9
  70. data/lib/bleumi_pay_sdk_ruby/models/{wallet.rb → payment.rb} +31 -54
  71. data/lib/bleumi_pay_sdk_ruby/models/payment_addresses.rb +231 -0
  72. data/lib/bleumi_pay_sdk_ruby/models/payment_balances.rb +225 -0
  73. data/lib/bleumi_pay_sdk_ruby/models/{wallet_operation.rb → payment_operation.rb} +44 -18
  74. data/lib/bleumi_pay_sdk_ruby/models/{wallet_operation_inputs.rb → payment_operation_inputs.rb} +38 -12
  75. data/lib/bleumi_pay_sdk_ruby/models/{wallet_operation_output.rb → payment_operation_response.rb} +18 -8
  76. data/lib/bleumi_pay_sdk_ruby/models/{wallet_refund_operation_input.rb → payment_refund_request.rb} +18 -8
  77. data/lib/bleumi_pay_sdk_ruby/models/{wallet_settle_operation_input.rb → payment_settle_request.rb} +18 -8
  78. data/lib/bleumi_pay_sdk_ruby/models/payout.rb +237 -0
  79. data/lib/bleumi_pay_sdk_ruby/models/payout_item.rb +286 -0
  80. data/lib/bleumi_pay_sdk_ruby/models/payout_item_inputs.rb +244 -0
  81. data/lib/bleumi_pay_sdk_ruby/models/rsk_balance.rb +219 -0
  82. data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_request.rb +257 -0
  83. data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_response.rb +212 -0
  84. data/lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb +37 -12
  85. data/lib/bleumi_pay_sdk_ruby/version.rb +4 -4
  86. data/po_create.rb +39 -0
  87. data/po_list.rb +23 -0
  88. data/py_create.rb +48 -0
  89. data/py_get.rb +18 -0
  90. data/py_getop.rb +19 -0
  91. data/py_list.rb +24 -0
  92. data/py_listops.rb +21 -0
  93. data/py_refund.rb +43 -0
  94. data/py_settle.rb +43 -0
  95. data/spec/api/hosted_checkouts_api_spec.rb +67 -0
  96. data/spec/api/payments_api_spec.rb +123 -0
  97. data/spec/api/payouts_api_spec.rb +61 -0
  98. data/spec/api_client_spec.rb +226 -0
  99. data/spec/configuration_spec.rb +42 -0
  100. data/spec/models/algorand_balance_spec.rb +47 -0
  101. data/spec/models/algorand_wallet_address_spec.rb +47 -0
  102. data/spec/models/algorand_wallet_inputs_spec.rb +65 -0
  103. data/spec/models/bad_request_spec.rb +47 -0
  104. data/spec/models/chain_spec.rb +35 -0
  105. data/spec/models/checkout_token_spec.rb +77 -0
  106. data/spec/models/create_checkout_url_request_spec.rb +89 -0
  107. data/spec/models/create_checkout_url_response_spec.rb +47 -0
  108. data/spec/models/create_payment_request_spec.rb +59 -0
  109. data/spec/models/create_payment_response_spec.rb +41 -0
  110. data/spec/models/create_payout_request_spec.rb +53 -0
  111. data/spec/models/create_payout_response_spec.rb +41 -0
  112. data/spec/models/ethereum_balance_spec.rb +59 -0
  113. data/spec/models/ethereum_wallet_address_spec.rb +47 -0
  114. data/spec/models/ethereum_wallet_inputs_spec.rb +65 -0
  115. data/spec/models/paginated_payment_operations_spec.rb +47 -0
  116. data/spec/models/paginated_payments_spec.rb +47 -0
  117. data/spec/models/paginated_payout_items_spec.rb +47 -0
  118. data/spec/models/payment_addresses_spec.rb +53 -0
  119. data/spec/models/payment_balances_spec.rb +53 -0
  120. data/spec/models/payment_operation_inputs_spec.rb +65 -0
  121. data/spec/models/payment_operation_response_spec.rb +41 -0
  122. data/spec/models/payment_operation_spec.rb +71 -0
  123. data/spec/models/payment_refund_request_spec.rb +41 -0
  124. data/spec/models/payment_settle_request_spec.rb +47 -0
  125. data/spec/models/payment_spec.rb +65 -0
  126. data/spec/models/payout_item_inputs_spec.rb +53 -0
  127. data/spec/models/payout_item_spec.rb +71 -0
  128. data/spec/models/payout_spec.rb +53 -0
  129. data/spec/models/rsk_balance_spec.rb +47 -0
  130. data/spec/models/validate_checkout_request_spec.rb +59 -0
  131. data/spec/models/validate_checkout_response_spec.rb +41 -0
  132. data/spec/models/wallet_balance_spec.rb +65 -0
  133. data/spec/spec_helper.rb +111 -0
  134. metadata +180 -49
  135. data/docs/Erc20PaymentsApi.md +0 -334
  136. data/docs/EthAddress.md +0 -8
  137. data/docs/EthNetwork.md +0 -9
  138. data/docs/PaginatedWalletOperations.md +0 -8
  139. data/docs/PaginatedWallets.md +0 -8
  140. data/docs/Wallet.md +0 -13
  141. data/docs/WalletCreateInput.md +0 -9
  142. data/docs/WalletCreateOutput.md +0 -10
  143. data/docs/WalletInputs.md +0 -11
  144. data/docs/WalletOperation.md +0 -11
  145. data/docs/WalletOperationInputs.md +0 -10
  146. data/docs/WalletOperationOutput.md +0 -8
  147. data/docs/WalletRefundOperationInput.md +0 -7
  148. data/docs/WalletSettleOperationInput.md +0 -8
  149. data/lib/bleumi_pay_sdk_ruby/api/erc20_payments_api.rb +0 -482
  150. data/lib/bleumi_pay_sdk_ruby/models/eth_address.rb +0 -208
@@ -0,0 +1,18 @@
1
+ # BleumiPay::Payout
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **transfer_address** | **String** | Address of receiver. This address must be able to receive payments from smart contracts. |
8
+ **amount** | **String** | Amount of token to transfer |
9
+ **authorization** <br> (Optional)| **String** | (Only for Algorand) Base64 serialization of an encoded LogicSig signed by the source of the payout |
10
+
11
+ ## Example
12
+
13
+ ```json
14
+ {
15
+ "transferAddress": "0xD15BDD17175825742A5904b21008dd3A019a060E",
16
+ "amount": "1"
17
+ }
18
+ ```
@@ -0,0 +1,39 @@
1
+ # BleumiPay::PayoutItem
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **txid** | **String** | Unique identifier for this payout |
8
+ **status** | **Boolean** | <b>null</b> - Operation in progress </br> <b>true</b> - Operation confirmed by network </br> <b>false</b> - Operation rejected by network </br> |
9
+ **hash** | **String** | Transaction hash of the operation submitted to the network. This field is blank when the operation is in progress. |
10
+ **created_at** | **Integer** | UNIX timestamp when the payout was created |
11
+ **updated_at** | **Integer** | UNIX timestamp when the lastest operation was performed |
12
+ **inputs** | [**PayoutItemInputs**](PayoutItemInputs.md) | Inputs provided for this payout creation |
13
+
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "txid": "12345-6789-10",
20
+ "status": false,
21
+ "hash": "<N/A>",
22
+ "createdAt": 1574501464,
23
+ "updatedAt": 1574501769,
24
+ "inputs": {
25
+ "salt": "0x6f3b4b923b133a82dddef57139b6bbd622e7343128983518557cd13201c5462b",
26
+ "token": "0x84df8548086ec9025e9c93297058bed706e90ddd",
27
+ "payouts": [
28
+ {
29
+ "transferAddress": "0xD15BDD17175825742A5904b21008dd3A019a060E",
30
+ "amount": "15"
31
+ },
32
+ {
33
+ "transferAddress": "0x7Dc30B85084aA1608e5C1Ce39c804Be177e40A07",
34
+ "amount": "21"
35
+ }
36
+ ]
37
+ }
38
+ }
39
+ ```
@@ -0,0 +1,28 @@
1
+ # BleumiPay::PayoutItemInputs
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **salt** | **String** | Unique identifier generated for the txid of the payout (specified during Create a Payout). |
8
+ **token** | **String** | Token used for the payout | <b>ETH</b> - for Ethereum <br/> <b>XDAI</b> - for xDai <br/> <b>XDAIT</b> - for xDai Testnet <br/> <b>ALGO</b> - for Algo <br/> <b>&lt;asset id&gt;</b> - for Algorand Standard Asset payouts <br/> <b> &lt;contract address of ERC-20 token&gt;</b> - for ERC-20 payouts; Please refer to [ERC-20 Tokens](https://pay.bleumi.com/docs/#erc-20) for contract address; |
9
+ **payouts** | [**Array&lt;Payout&gt;**](Payout.md) | Array of payments to be made in this payout. This is an atomic transaction (i.e. either all payments are processed or all of them are rejected). |
10
+
11
+ ## Example
12
+
13
+ ```json
14
+ {
15
+ "salt": "0x6f3b4b923b133a82dddef57139b6bbd622e7343128983518557cd13201c5462b",
16
+ "token": "0x84df8548086ec9025e9c93297058bed706e90ddd",
17
+ "payouts": [
18
+ {
19
+ "transferAddress": "0xD15BDD17175825742A5904b21008dd3A019a060E",
20
+ "amount": "15"
21
+ },
22
+ {
23
+ "amount": "21",
24
+ "transferAddress": "0x7Dc30B85084aA1608e5C1Ce39c804Be177e40A07"
25
+ }
26
+ ]
27
+ }
28
+ ```
@@ -0,0 +1,137 @@
1
+ # BleumiPay::PayoutsApi
2
+
3
+ Payouts are available only for the Ethereum, xDAI and RSK networks today and require you to set up a Private Payment Processor and link it to your account. Please contact support@bleumi.com if you want to enable payouts for your account.
4
+
5
+ ## create_payout
6
+
7
+ > CreatePayoutResponse create_payout(create_payout_request, opts)
8
+
9
+ This method makes a payout from your Private Payment Processor.
10
+
11
+ ### Example
12
+
13
+ ```ruby
14
+ # load the gem
15
+ require 'bleumi_pay_sdk_ruby'
16
+ # setup authorization
17
+ BleumiPay.configure do |config|
18
+ # Configure API key authorization: ApiKeyAuth
19
+ config.api_key['x-api-key'] = '<YOUR_API_KEY>'
20
+ end
21
+
22
+ api_instance = BleumiPay::PayoutsApi.new
23
+
24
+ opts = {
25
+ chain: BleumiPay::Chain::GOERLI # Chain | Network in which payment is to be created.
26
+ }
27
+
28
+ begin
29
+
30
+ create_payout_request = BleumiPay::CreatePayoutRequest.new # CreatePayoutRequest | Request body - used to specify payout creation parameters.
31
+ # This example shows 2 payouts being created
32
+ # Creating Payout-1
33
+ payout1 = BleumiPay::Payout.new
34
+ payout1.amount = '<PAYOUT_AMT_1>' # str | Replace <PAYOUT_AMT_1> with the 1st payout's amount
35
+ payout1.transfer_address = '<PAYOUT_ADDR_1>' # str | Replace <PAYOUT_ADDR_1> with the 1st payout's receiver's address
36
+ # Creating Payout-2
37
+ payout2 = BleumiPay::Payout.new
38
+ payout2.amount = '<PAYOUT_AMT_2>' # str | Replace <PAYOUT_AMT_2> with the 2nd payout's amount
39
+ payout2.transfer_address = '<PAYOUT_ADDR_2>' # str | Replace <PAYOUT_ADDR_2> with the 2nd payout's receiver's address
40
+ # Creating a payouts array with both the payouts created above
41
+ payouts = [payout1, payout2]
42
+
43
+ create_payout_request.txid = '<TXID>' # str | Replace with unique payout ID
44
+ create_payout_request.token = '<TOKEN>' # str | Replace <TOKEN> by anyone of the following values: 'ETH' or 'XDAI' or 'XDAIT' or ECR-20 Contract Address or 'RBTC' or RSK ECR-20 Contract Address or 'Asset ID' of Algorand Standard Asset.
45
+ create_payout_request.payouts = payouts # setting the payouts array to the payout create request
46
+
47
+ #Create a payout.
48
+ result = api_instance.create_payout(create_payout_request, opts)
49
+ p result
50
+ rescue BleumiPay::ApiError => e
51
+ puts "Exception when calling create_payout: #{e}"
52
+ end
53
+ ```
54
+
55
+ ### Parameters
56
+
57
+
58
+ Name | Type | Description | Notes
59
+ ------------- | ------------- | ------------- | -------------
60
+ **create_payout_request** | [**CreatePayoutRequest**](CreatePayoutRequest.md)| Specify payout creation parameters. |
61
+ **chain** | [**Chain**](Chain.md)| Network in which the payout is to be made. Please refer documentation for [Supported Networks](https://pay.bleumi.com/docs/#supported-networks) |
62
+
63
+
64
+ ### Return type
65
+
66
+ [**CreatePayoutResponse**](CreatePayoutResponse.md)
67
+
68
+ Field | Type | Description
69
+ ----- | ----- | -----
70
+ salt | string | Unique id generated for the given txid
71
+
72
+ ### 400 Errors
73
+
74
+ The following table is a list of possible error codes that can be returned, along with additional information about how to resolve them for a response with 400 status code.
75
+
76
+ errorCode <br> <i>errorMessage</i> | Description
77
+ ---- | ----
78
+ ValidationError <br> <i>&lt;details&gt;</i> | Details on input which does not conform to the above schema
79
+ ValidationError <br> <i>invalid_token</i> | Provided token is not valid for the specified 'chain'
80
+ ValidationError <br> <i>no_gas_accounts</i> | No active gas accounts present in your account. Please activate at least one gas account from the <a href="https://pay.bleumi.com/app/" target="_blank">Bleumi Pay Dashboard</a>.
81
+ ValidationError <br> <i>txid_already_exists</i> | The 'txid' provided has been used previously
82
+ ValidationError <br> <i>not_whitelisted&#124;&lt;addr&gt;</i> | The &lt;addr&gt; provided has not been whitelisted in your Private Payment Processor
83
+ ValidationError <br> <i>payouts_requires_private_payment_processor</i> | Private Payment Processor is not set up and linked to your account
84
+
85
+
86
+ ## list_payouts
87
+
88
+ > PaginatedPayoutItems list_payouts(opts)
89
+
90
+ The list of payouts is returned as an array in the 'results' field. The list is restricted to a maximum of 10 payouts per page.
91
+
92
+ If there are more than 10 payouts, a cursor is returned in the 'nextToken' field. Passing this as the 'nextToken' query parameter will fetch the next page.
93
+
94
+ When the value of 'nextToken' field is an empty string, there are no more payouts.
95
+
96
+ ### Example
97
+
98
+ ```ruby
99
+ # load the gem
100
+ require 'bleumi_pay_sdk_ruby'
101
+ # setup authorization
102
+ BleumiPay.configure do |config|
103
+ # Configure API key authorization: ApiKeyAuth
104
+ config.api_key['x-api-key'] = '<YOUR_API_KEY>'
105
+ end
106
+
107
+ api_instance = BleumiPay::PayoutsApi.new
108
+ opts = {
109
+ next_token: '', # String | Cursor to start results from
110
+ sort_by: '<SORT_BY>', # String | Sort payouts by (optional) | Eg. "createdAt"
111
+ start_at: '<START_TIMESTAMP>', # String | Get payouts from this timestamp (optional) | Eg. 1577836800 for 1-JAN-2020
112
+ end_at: '' # String | Get payouts till this timestamp (optional)
113
+ }
114
+
115
+ begin
116
+ #Returns a list of payouts
117
+ result = api_instance.list_payouts(opts)
118
+ p result
119
+ rescue BleumiPay::ApiError => e
120
+ puts "Exception when calling list_payouts: #{e}"
121
+ end
122
+ ```
123
+
124
+ ### Parameters
125
+
126
+
127
+ Name | Type | Description | Notes
128
+ ------------- | ------------- | ------------- | -------------
129
+ **next_token** | **String**| Cursor to start results from | [optional]
130
+ **sort_by** | **String**| Sort payouts by | [optional] 'createdAt' - results will be sorted by created time in ascending order. <br>'updatedAt' - results will be sorted by last updated time in ascending order.
131
+ **start_at** | **String**| Get payouts from this timestamp (unix) | [optional]
132
+ **end_at** | **String**| Get payouts till this timestamp (unix) | [optional]
133
+
134
+ ### Return type
135
+
136
+ [**PaginatedPayoutItems**](PaginatedPayoutItems.md)
137
+
@@ -0,0 +1,28 @@
1
+ # BleumiPay::RskBalance
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **rsk** <br>(Optional) | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in RSK MainNet |
8
+ **rsk_testnet** <br>(Optional) | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in RSK TestNet |
9
+
10
+ ## Example - TestNet
11
+
12
+ ```json
13
+ {
14
+ "balances": {
15
+ "rsk": {
16
+ "rsk_testnet": {
17
+ "0x1efeabf46ca3270a9a41d324350692664f1ea105": {
18
+ "blockNum": "889362",
19
+ "token_balance": "300",
20
+ "balance": "3",
21
+ "safety": "high",
22
+ "token_decimals": 2
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ ```
@@ -0,0 +1,21 @@
1
+ # BleumiPay::ValidateCheckoutRequest
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **hmac_input** | **String** | Payment Details. Passed as GET parameter in successUrl. |
8
+ **hmac_key_id** | **String** | KeyId used to generate the HMAC. Passed as GET parameter in successUrl. |
9
+ **hmac_alg** | **String** | Algorithm used to generate the HMAC. Passed as GET parameter in successUrl. |
10
+ **hmac_value** | **String** | HMAC passed as GET parameter in successUrl. |
11
+
12
+ ## Example
13
+
14
+ ```json
15
+ {
16
+ "hmac_input": "goerli|0xbe98e68c0ffbead18f94882b0f5d15eb31930cee|0x84df8548086ec9025e9c93297058bed706e90ddd|10|12",
17
+ "hmac_keyId": "v1",
18
+ "hmac_alg": "HMAC-SHA256-HEX",
19
+ "hmac_value": "e842bb5f3f62319864293ecb7ccc01674a0af08e4e74a01ab16b2157c3fce5d6"
20
+ }
21
+ ```
@@ -0,0 +1,15 @@
1
+ # BleumiPay::ValidateCheckoutResponse
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **valid** | **Boolean** | <b>true</b> - The data has been generated by Bleumi Pay <br/> <b>false</b> - The data has not been generated by Bleumi Pay, the payment must be treated as unpaid |
8
+
9
+ ## Example
10
+
11
+ ```json
12
+ {
13
+ "valid": true
14
+ }
15
+ ```
@@ -4,8 +4,22 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **balance** | **String** | ERC-20 token balance for the wallet |
8
- **token_balance** | **String** | ERC-20 token balance for the wallet (in Ethereum format) |
9
- **token_decimals** | **Integer** | ERC-20 token decimal places |
10
- **block_num** | **String** | Block in which the ERC-20 token balance was last updated. <br>'0' - No incoming/outgoing transactions recorded. |
7
+ **balance** | **String** | Token balance for the wallet |
8
+ **token_balance** | **String** | Token balance for the wallet in Ethereum format |
9
+ **token_decimals** | **Integer** | Token decimal places |
10
+ **block_num** | **String** | Block in which the balance was last updated |
11
+ **safety** | **String** | Safety level indicator |
12
+
13
+ ## Code Sample
14
+
15
+ ```ruby
16
+ require 'BleumiPay'
17
+
18
+ instance = BleumiPay::WalletBalance.new(balance: null,
19
+ token_balance: null,
20
+ token_decimals: null,
21
+ block_num: null,
22
+ safety: null)
23
+ ```
24
+
11
25
 
@@ -0,0 +1,40 @@
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
@@ -0,0 +1,17 @@
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
@@ -0,0 +1,22 @@
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
@@ -1,12 +1,12 @@
1
1
  =begin
2
- #Bleumi Pay API
2
+ #Bleumi Pay REST API
3
3
 
4
- #A simple and powerful REST API to integrate ERC20 payments into your business or application
4
+ #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai, Algorand payments and/or payouts into your business or application
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: info@bleumi.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.0
9
+ OpenAPI Generator version: 4.2.2
10
10
 
11
11
  =end
12
12
 
@@ -17,24 +17,45 @@ require 'bleumi_pay_sdk_ruby/version'
17
17
  require 'bleumi_pay_sdk_ruby/configuration'
18
18
 
19
19
  # Models
20
+ require 'bleumi_pay_sdk_ruby/models/algorand_balance'
21
+ require 'bleumi_pay_sdk_ruby/models/algorand_wallet_address'
22
+ require 'bleumi_pay_sdk_ruby/models/algorand_wallet_inputs'
20
23
  require 'bleumi_pay_sdk_ruby/models/bad_request'
21
- require 'bleumi_pay_sdk_ruby/models/eth_address'
22
- require 'bleumi_pay_sdk_ruby/models/eth_network'
23
- require 'bleumi_pay_sdk_ruby/models/paginated_wallet_operations'
24
- require 'bleumi_pay_sdk_ruby/models/paginated_wallets'
25
- require 'bleumi_pay_sdk_ruby/models/wallet'
24
+ require 'bleumi_pay_sdk_ruby/models/chain'
25
+ require 'bleumi_pay_sdk_ruby/models/checkout_token'
26
+ require 'bleumi_pay_sdk_ruby/models/create_checkout_url_request'
27
+ require 'bleumi_pay_sdk_ruby/models/create_checkout_url_response'
28
+ require 'bleumi_pay_sdk_ruby/models/create_payment_request'
29
+ require 'bleumi_pay_sdk_ruby/models/create_payment_response'
30
+ require 'bleumi_pay_sdk_ruby/models/create_payout_request'
31
+ require 'bleumi_pay_sdk_ruby/models/create_payout_response'
32
+ require 'bleumi_pay_sdk_ruby/models/ethereum_balance'
33
+ require 'bleumi_pay_sdk_ruby/models/ethereum_wallet_address'
34
+ require 'bleumi_pay_sdk_ruby/models/ethereum_wallet_inputs'
35
+ require 'bleumi_pay_sdk_ruby/models/paginated_payment_operations'
36
+ require 'bleumi_pay_sdk_ruby/models/paginated_payments'
37
+ require 'bleumi_pay_sdk_ruby/models/paginated_payout_items'
38
+ require 'bleumi_pay_sdk_ruby/models/payment'
39
+ require 'bleumi_pay_sdk_ruby/models/payment_addresses'
40
+ require 'bleumi_pay_sdk_ruby/models/payment_balances'
41
+ require 'bleumi_pay_sdk_ruby/models/payment_operation'
42
+ require 'bleumi_pay_sdk_ruby/models/payment_operation_inputs'
43
+ require 'bleumi_pay_sdk_ruby/models/payment_operation_response'
44
+ require 'bleumi_pay_sdk_ruby/models/payment_refund_request'
45
+ require 'bleumi_pay_sdk_ruby/models/payment_settle_request'
46
+ require 'bleumi_pay_sdk_ruby/models/payout'
47
+ require 'bleumi_pay_sdk_ruby/models/payout_item'
48
+ require 'bleumi_pay_sdk_ruby/models/payout_item_inputs'
49
+ require 'bleumi_pay_sdk_ruby/models/rsk_balance'
50
+ require 'bleumi_pay_sdk_ruby/models/validate_checkout_request'
51
+ require 'bleumi_pay_sdk_ruby/models/validate_checkout_response'
26
52
  require 'bleumi_pay_sdk_ruby/models/wallet_balance'
27
- require 'bleumi_pay_sdk_ruby/models/wallet_create_input'
28
- require 'bleumi_pay_sdk_ruby/models/wallet_create_output'
29
- require 'bleumi_pay_sdk_ruby/models/wallet_inputs'
30
- require 'bleumi_pay_sdk_ruby/models/wallet_operation'
31
- require 'bleumi_pay_sdk_ruby/models/wallet_operation_inputs'
32
- require 'bleumi_pay_sdk_ruby/models/wallet_operation_output'
33
- require 'bleumi_pay_sdk_ruby/models/wallet_refund_operation_input'
34
- require 'bleumi_pay_sdk_ruby/models/wallet_settle_operation_input'
35
53
 
36
54
  # APIs
37
- require 'bleumi_pay_sdk_ruby/api/erc20_payments_api'
55
+ require 'bleumi_pay_sdk_ruby/api/hosted_checkouts_api'
56
+ require 'bleumi_pay_sdk_ruby/api/payments_api'
57
+ require 'bleumi_pay_sdk_ruby/api/payouts_api'
58
+ require 'bleumi_pay_sdk_ruby/api/request_validator'
38
59
 
39
60
  module BleumiPay
40
61
  class << self