bleumi_pay_sdk_ruby 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -7
  3. data/bleumi_pay_sdk_ruby.gemspec +3 -3
  4. data/docs/AlgorandBalance.md +27 -0
  5. data/docs/BadRequest.md +1 -1
  6. data/docs/Chain.md +4 -3
  7. data/docs/CheckoutToken.md +6 -3
  8. data/docs/CreateCheckoutUrlRequest.md +7 -7
  9. data/docs/CreatePaymentRequest.md +3 -3
  10. data/docs/CreatePaymentResponse.md +1 -1
  11. data/docs/CreatePayoutRequest.md +1 -1
  12. data/docs/CreatePayoutResponse.md +1 -1
  13. data/docs/EthereumBalance.md +29 -0
  14. data/docs/HostedCheckoutsApi.md +26 -12
  15. data/docs/PaginatedPaymentOperations.md +2 -3
  16. data/docs/PaginatedPayments.md +3 -3
  17. data/docs/PaginatedPayoutItems.md +1 -1
  18. data/docs/Payment.md +0 -1
  19. data/docs/PaymentAddresses.md +2 -1
  20. data/docs/PaymentBalances.md +2 -1
  21. data/docs/PaymentOperation.md +2 -2
  22. data/docs/PaymentOperationInputs.md +4 -4
  23. data/docs/PaymentRefundRequest.md +1 -2
  24. data/docs/PaymentSettleRequest.md +1 -1
  25. data/docs/PaymentsApi.md +17 -15
  26. data/docs/Payout.md +2 -1
  27. data/docs/PayoutItem.md +1 -1
  28. data/docs/PayoutItemInputs.md +1 -1
  29. data/docs/PayoutsApi.md +10 -10
  30. data/docs/ValidateCheckoutRequest.md +1 -1
  31. data/docs/WalletAddress.md +1 -0
  32. data/docs/WalletBalance.md +1 -1
  33. data/lib/bleumi_pay_sdk_ruby.rb +5 -5
  34. data/lib/bleumi_pay_sdk_ruby/api/hosted_checkouts_api.rb +17 -5
  35. data/lib/bleumi_pay_sdk_ruby/api/payments_api.rb +46 -17
  36. data/lib/bleumi_pay_sdk_ruby/api/payouts_api.rb +14 -6
  37. data/lib/bleumi_pay_sdk_ruby/api/request_validator.rb +264 -0
  38. data/lib/bleumi_pay_sdk_ruby/api_client.rb +3 -3
  39. data/lib/bleumi_pay_sdk_ruby/api_error.rb +2 -2
  40. data/lib/bleumi_pay_sdk_ruby/configuration.rb +3 -3
  41. data/lib/bleumi_pay_sdk_ruby/models/{token.rb → algorand_balance.rb} +43 -38
  42. data/lib/bleumi_pay_sdk_ruby/models/bad_request.rb +3 -3
  43. data/lib/bleumi_pay_sdk_ruby/models/chain.rb +4 -5
  44. data/lib/bleumi_pay_sdk_ruby/models/checkout_token.rb +28 -13
  45. data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_request.rb +19 -7
  46. data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_response.rb +2 -2
  47. data/lib/bleumi_pay_sdk_ruby/models/create_payment_request.rb +17 -5
  48. data/lib/bleumi_pay_sdk_ruby/models/create_payment_response.rb +2 -2
  49. data/lib/bleumi_pay_sdk_ruby/models/create_payout_request.rb +4 -3
  50. data/lib/bleumi_pay_sdk_ruby/models/create_payout_response.rb +2 -2
  51. data/lib/bleumi_pay_sdk_ruby/models/{network_balance.rb → ethereum_balance.rb} +13 -46
  52. data/lib/bleumi_pay_sdk_ruby/models/paginated_payment_operations.rb +2 -2
  53. data/lib/bleumi_pay_sdk_ruby/models/paginated_payments.rb +2 -2
  54. data/lib/bleumi_pay_sdk_ruby/models/paginated_payout_items.rb +2 -2
  55. data/lib/bleumi_pay_sdk_ruby/models/payment.rb +2 -2
  56. data/lib/bleumi_pay_sdk_ruby/models/payment_addresses.rb +17 -6
  57. data/lib/bleumi_pay_sdk_ruby/models/payment_balances.rb +15 -6
  58. data/lib/bleumi_pay_sdk_ruby/models/payment_operation.rb +4 -3
  59. data/lib/bleumi_pay_sdk_ruby/models/payment_operation_inputs.rb +3 -3
  60. data/lib/bleumi_pay_sdk_ruby/models/payment_operation_response.rb +2 -2
  61. data/lib/bleumi_pay_sdk_ruby/models/payment_refund_request.rb +3 -3
  62. data/lib/bleumi_pay_sdk_ruby/models/payment_settle_request.rb +3 -3
  63. data/lib/bleumi_pay_sdk_ruby/models/payout.rb +16 -6
  64. data/lib/bleumi_pay_sdk_ruby/models/payout_item.rb +2 -2
  65. data/lib/bleumi_pay_sdk_ruby/models/payout_item_inputs.rb +2 -2
  66. data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_request.rb +2 -2
  67. data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_response.rb +2 -2
  68. data/lib/bleumi_pay_sdk_ruby/models/wallet_address.rb +2 -2
  69. data/lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb +2 -2
  70. data/lib/bleumi_pay_sdk_ruby/version.rb +3 -3
  71. data/py_create.rb +38 -0
  72. data/spec/api/payments_api_spec.rb +2 -2
  73. data/spec/models/algorand_balance_spec.rb +47 -0
  74. data/spec/models/ethereum_balance_spec.rb +59 -0
  75. metadata +14 -10
  76. data/docs/EthAddress.md +0 -13
  77. data/docs/NetworkBalance.md +0 -29
  78. data/docs/Token.md +0 -15
  79. data/lib/bleumi_pay_sdk_ruby/models/eth_address.rb +0 -208
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc384aaf481786ccd3546ddc5358d31d94d13b150b7d6e1452d2516f0a0e84e6
4
- data.tar.gz: e3733fd251abb802c79ade9ac224baf851550fcf6551efed73e9b84332bee38f
3
+ metadata.gz: df66597183308a5e8db2403cc46d9b99e3cd6c7ee4c152559bec829be7e03f12
4
+ data.tar.gz: 5dee66c56de52ff9314a3e8d5fcabd03b2284a7dcc1241ae6399895e5302d8ff
5
5
  SHA512:
6
- metadata.gz: e8960f23b98ec45fc14766ca95b1438c60cdf19f0c187164605d3f1ca8c79e2d7a5ece991317a4593c21b1029658067b2c8cbbbf94eed3e657faaac099f4b28a
7
- data.tar.gz: 654e9d7eb14a69596378ecd0fdc092271322cc08e7a697f607216cc872c054ccb51cb4a8c86e7bbf1c55e5bbaa79555c3cc465c6b5d9ea75f51e61617bc18262
6
+ metadata.gz: 800fc069330aabb76b0295f2f278da76e573b780263637566fe6ed2f388bf8217a611818647400307fcaca948f68d34fdf8e52cedd54bc2648d570626832bc81
7
+ data.tar.gz: 2a1ca5c7dbe3281fc55308ed0041fe5c18e35996319fb86c94be84a4b22e5891592562caf6402783758225a837c8078bba7f69a8ba4c8261b1992d2a294419d9
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
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)
6
6
 
7
- The Bleumi Pay SDK is a one-stop shop to help you integrate ERC-20, Ethereum, 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.
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
9
  bleumi-pay-sdk-ruby is a Ruby library that provides an interface between your Rubu=y 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
 
@@ -53,14 +53,14 @@ end
53
53
  api_instance = BleumiPay::PayoutsApi.new
54
54
  create_payment_request = BleumiPay::CreatePaymentRequest.new # CreatePaymentRequest |
55
55
  opts = {
56
- chain: BleumiPay::Chain.new # Chain | Ethereum network in which payment is to be created. Please refer documentation for Supported Networks
56
+ chain: BleumiPay::Chain::GOERLI # Chain | Network in which payment is to be created. Please refer documentation for Supported Networks
57
57
  }
58
58
 
59
59
  begin
60
60
 
61
61
  create_payment_request.id = '<ID>'
62
- create_payment_request.buyer_address = BleumiPay::EthAddress.new('<BUYER_ADDR>') # Replace <BUYER_ADDR> with the Buyer's Enthereum Network Address
63
- create_payment_request.transfer_address = BleumiPay::EthAddress.new('<MERCHANT_ADDR>') # Replace <MERCHANT_ADDR> with the Merchant's Enthereum Network Address
62
+ create_payment_request.buyer_address = '<BUYER_ADDR>' # Replace <BUYER_ADDR> with the Buyer's Network Address
63
+ create_payment_request.transfer_address = '<MERCHANT_ADDR>' # Replace <MERCHANT_ADDR> with the Merchant's Network Address
64
64
 
65
65
  #Create a payout.
66
66
  result = api_instance.create_payment(create_payment_request, opts)
@@ -92,6 +92,7 @@ BleumiPay::PayoutsApi | [**create_payout**](docs/PayoutsApi.md#create_payout) |
92
92
 
93
93
  ## Documentation for Models
94
94
 
95
+ - [BleumiPay::AlgorandBalance](docs/AlgorandBalance.md)
95
96
  - [BleumiPay::BadRequest](docs/BadRequest.md)
96
97
  - [BleumiPay::Chain](docs/Chain.md)
97
98
  - [BleumiPay::CheckoutToken](docs/CheckoutToken.md)
@@ -101,8 +102,7 @@ BleumiPay::PayoutsApi | [**create_payout**](docs/PayoutsApi.md#create_payout) |
101
102
  - [BleumiPay::CreatePaymentResponse](docs/CreatePaymentResponse.md)
102
103
  - [BleumiPay::CreatePayoutRequest](docs/CreatePayoutRequest.md)
103
104
  - [BleumiPay::CreatePayoutResponse](docs/CreatePayoutResponse.md)
104
- - [BleumiPay::EthAddress](docs/EthAddress.md)
105
- - [BleumiPay::NetworkBalance](docs/NetworkBalance.md)
105
+ - [BleumiPay::EthereumBalance](docs/EthereumBalance.md)
106
106
  - [BleumiPay::PaginatedPaymentOperations](docs/PaginatedPaymentOperations.md)
107
107
  - [BleumiPay::PaginatedPayments](docs/PaginatedPayments.md)
108
108
  - [BleumiPay::PaginatedPayoutItems](docs/PaginatedPayoutItems.md)
@@ -117,7 +117,6 @@ BleumiPay::PayoutsApi | [**create_payout**](docs/PayoutsApi.md#create_payout) |
117
117
  - [BleumiPay::Payout](docs/Payout.md)
118
118
  - [BleumiPay::PayoutItem](docs/PayoutItem.md)
119
119
  - [BleumiPay::PayoutItemInputs](docs/PayoutItemInputs.md)
120
- - [BleumiPay::Token](docs/Token.md)
121
120
  - [BleumiPay::ValidateCheckoutRequest](docs/ValidateCheckoutRequest.md)
122
121
  - [BleumiPay::ValidateCheckoutResponse](docs/ValidateCheckoutResponse.md)
123
122
  - [BleumiPay::WalletAddress](docs/WalletAddress.md)
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  =begin
4
- #Bleumi Pay API
4
+ #Bleumi Pay REST API
5
5
 
6
- #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai payments and/or payouts into your business or application
6
+ #A simple and powerful REST API to integrate Algorand, Ethereum, ERC-20 and xDai payments and/or payouts into your business or application
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Contact: info@bleumi.com
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.email = ["info@bleumi.com"]
24
24
  s.homepage = "https://pay.bleumi.com/"
25
25
  s.summary = "Bleumi Pay API Ruby Gem"
26
- s.description = "A simple and powerful REST API to integrate ERC20 payments into your business or application"
26
+ s.description = "A simple and powerful REST API to integrate Algorand, Ethereum, ERC-20 and xDai payments into your business or application"
27
27
  s.license = "MIT"
28
28
  s.required_ruby_version = ">= 1.9"
29
29
 
@@ -0,0 +1,27 @@
1
+ # BleumiPay::AlgorandBalance
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **alg_mainnet** <br>(Optional)| [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the Wallet balances in each Algorand MainNet |
8
+ **alg_testnet** <br>(Optional)| [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the Wallet balances in each Algorand TestNet |
9
+
10
+ ## Example - Algorand TestNet
11
+
12
+ ```json
13
+ {
14
+ "balances": {
15
+ "algorand": {
16
+ "alg_testnet": {
17
+ "ALGO": {
18
+ "blockNum": "4457461",
19
+ "token_balance": "10000000",
20
+ "balance": "10",
21
+ "token_decimals": 6
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
27
+ ```
@@ -4,6 +4,6 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **error_code** | **String** | Code for error class. Complete list of error codes is available [here](https://pay.bleumi.com/docs/#errors) |
7
+ **error_code** | **String** | Code for error class. Complete list of error codes is available here. |
8
8
  **error_message** | **String** | Error description | [optional]
9
9
 
@@ -1,11 +1,12 @@
1
1
  # BleumiPay::Chain
2
2
 
3
+ Network enumeration. Please refer to the [Supported Networks](https://pay.bleumi.com/docs/#supported-networks).
4
+
3
5
  ## Enum
4
6
 
5
7
  * `MAINNET` (value: `"mainnet"`)
6
- * `ROPSTEN` (value: `"ropsten"`)
7
8
  * `GOERLI` (value: `"goerli"`)
8
- * `KOVAN` (value: `"kovan"`)
9
- * `RINKEBY` (value: `"rinkeby"`)
10
9
  * `XDAI` (value: `"xdai"`)
11
10
  * `XDAI_TESTNET` (value: `"xdai_testnet"`)
11
+ * `ALG_MAINNET` (value: `"alg_mainnet"`)
12
+ * `ALG_TESTNET` (value: `"alg_testnet"`)
@@ -4,17 +4,20 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
+ **network** | **String** | The network in which the token is defined |
7
8
  **chain** | **String** | The chain in which the token is defined |
8
- **transfer_address** | **String** | The destination address when payments are received in this token |
9
+ **addr** | **String** | The address of the token |
9
10
  **name** | **String** | Name of the token |
10
11
  **symbol** | **String** | Symbol of the token |
11
- **decimals** | **String** | The decimal places supported |
12
+ **decimals** | **Integer** | Token decimal places |
13
+
12
14
 
13
15
  ## Example
14
16
 
15
17
  ```json
16
18
  {
17
- "chain": "ropsten",
19
+ "network": "ethereum",
20
+ "chain": "goerli",
18
21
  "transferAddress": "0xd15bdd17175825742a5904b21008dd3a019a060e",
19
22
  "name": "USD p18",
20
23
  "symbol": "USD18",
@@ -4,15 +4,15 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **id** | **String** | Unique identifier for this payment. <br> <b>Warning!</b> - Do not reuse this id with the [Create a Payment](PaymentApi.md#create_payment) endpoint. |
7
+ **id** | **String** | Unique identifier for this payment. <br> <b>Warning!</b> - Do not reuse this id with the [Create a Payment](https://pay.bleumi.com/docs/#create-a-payment) endpoint. |
8
8
  **currency** | **String** | Currency Code<br><br> When you configure custom tokens for the Hosted Checkout in your account in the <a href="https://pay.bleumi.com/app/" target="_blank">Bleumi Pay Dashboard</a>, please use:<br> - ISO 4217 Alphabetic Code for fiat, gold, silver, etc.<br> - Token Symbol for crypto |
9
9
  **amount** | **String** | Token amount for this payment |
10
10
  **cancel_url** | **String** | Buyer will be redirected to this URL upon canceling the payment. |
11
- **success_url** | **String** | Buyer will be redirected to this URL upon successfully completing the payment and the following data is passed as GET parameters, <ul style="font-weight: 500"><li><b>id</b> - Unique identifier of the checkout URL</li><li><b>hmac.input</b> - Payment parameters used to generate HMAC. The format is described below.</li><li><b>hmac.keyId</b> - Key ID used to generate HMAC</li><li><b>hmac.alg</b> - Algorithm used to generate HMAC</li><li><b>hmac.value</b> - HMAC generated for hmac.input</li></ul>
12
- **BuyerAddress**<br>(Optional) | [**EthAddress**](EthAddress.md) | Refund address for this payment.
13
- You can set this to your address to manually handle refunds (outside of Bleumi Pay) to your buyer. | [optional]
14
- **token**<br>(Optional) | [**Token**](Token.md) | If this field is not specified, a list of tokens configured for the provided currency code for the Hosted Checkout in your account in the <a href="https://pay.bleumi.com/app/" target="_blank">Bleumi Pay Dashboard</a> is sent to the buyer. The buyer can complete the payment using any one of token from this list. <br><br> Set the token which must be used by the buyer for this payment. The token provided must be set in your portal for the provided currency code. The token is assumed to be 1:1 with the currency unit. <br><br> <b>ETH</b> - for Ethereum<br> <b>XDAI</b> - for xDai<br> <b>XDAIT</b> - for xDai Testnet<br> <b>&lt;contract address of ERC-20 token&gt;</b> - for ERC-20; Please refer to [ERC-20 Tokens](https://pay.bleumi.com/docs/#erc-20) for contract address; | [optional]
15
- **Chain**<br>(Optional) | [**Chain**](Chain.md) | (Required if specifying 'token') Network in which the hosted checkout is to be created. Please refer to the [Supported Networks.](https://pay.bleumi.com/docs/#supported-networks) | [optional]
11
+ **success_url** | **String** | Buyer will be redirected to this URL upon successfully completing the payment and the following data is passed as GET parameters, <ul style="font-weight: 500"><li><b>id</b> - Unique identifier of the checkout URL</li><li><b>hmac_input</b> - Payment parameters used to generate HMAC. The format is described below.</li> <li><b>hmac_keyId</b> - Key ID used to generate HMAC</li> <li><b>hmac_alg</b> - Algorithm used to generate HMAC</li> <li><b>hmac_value</b> - HMAC generated for hmac.input</li></ul> |
12
+ **buyer_address** <br>(Optional)| **String** | Address of buyer. Refund operations on this payment will use this address. You can set this to your address to manually handle refunds (outside of Bleumi Pay) to your buyer. This address must be able to receive payments from smart contracts. |
13
+ **chain** <br>(Optional)| [**Chain**](Chain.md) | (Required if specifying 'token') Network in which the hosted checkout is to be created. Please refer to the [Supported Networks.](https://pay.bleumi.com/docs/#supported-networks) |
14
+ **token** <br>(Optional)| **String** | If this field is not specified, a list of tokens configured for the provided currency code for the Hosted Checkout in your account in the <a href="https://pay.bleumi.com/app/" target="_blank">Bleumi Pay Dashboard</a> is sent to the buyer. The buyer can complete the payment using any one of token from this list. <br><br> Set the token which must be used by the buyer for this payment. The token provided must be set in your portal for the provided currency code. The token is assumed to be 1:1 with the currency unit. <br><br> <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<br> <b>&lt;contract address of ERC-20 token&gt;</b> - for ERC-20; Please refer to [ERC-20 Tokens](https://pay.bleumi.com/docs/#erc-20) for contract address; |
15
+ **base64_transform** <br>(Optional)| **Boolean** | Base64 encode hmac_input GET parameter passed to the successUrl |
16
16
 
17
17
  ## Example
18
18
 
@@ -24,7 +24,7 @@ You can set this to your address to manually handle refunds (outside of Bleumi P
24
24
  "cancelUrl": "https://demo.store/api/cancelOrder",
25
25
  "successUrl": "https://demo.store/api/completeOrder",
26
26
  "token":"0x115615dbd0f835344725146fa6343219315f15e5",
27
- "chain":"ropsten",
27
+ "chain":"goerli",
28
28
  "buyerAddress":"0x713883BF69B786f0A7aB6E2248a70C50577F6b34"
29
29
  }
30
30
  ```
@@ -5,9 +5,9 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **id** | **String** | Unique ID identifying the payment |
8
- **buyer_address** | [**EthAddress**](EthAddress.md) | 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** | [**EthAddress**](EthAddress.md) | 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
-
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
11
  ## Example
12
12
 
13
13
  ```json
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **addr** | **String** | Wallet address | The unique wallet address generated
7
+ **addr** | **String** | Address of the newly created payment |
8
8
 
9
9
  ## Example
10
10
 
@@ -5,7 +5,7 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **txid** | **String** | Unique identifier for this payout |
8
- **token** | [**Token**](Token.md) | <b>ETH</b> - for Ethereum <br/> <b>XDAI</b> - for xDai <br/> <b>XDAIT</b> - for xDai Testnet <br/> <b> &lt;contract address of ERC-20 token&gt;</b> - for ERC-20 Tokens |
8
+ **token** | **String** | <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 Please refer to [ERC-20 Tokens](https://pay.bleumi.com/docs/#erc-20) for contract address; |
9
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
10
 
11
11
  ## Example
@@ -10,6 +10,6 @@ Name | Type | Description | Notes
10
10
 
11
11
  ```json
12
12
  {
13
- "salt": "0x09d6f6e0c0c781a6c49153db62c72e4d8b159f742a42e8c4cfb18fc2b9c44224"
13
+ "addr": "0xbea2f9d56c3cc7f2c7e17d294200dd75708eecd8"
14
14
  }
15
15
  ```
@@ -0,0 +1,29 @@
1
+ # BleumiPay::EthereumBalance
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **mainnet** <br>(Optional) | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in Ethereum MainNet |
8
+ **goerli** <br>(Optional) | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in Ethereum Goerli TestNet |
9
+ **xdai** <br>(Optional) | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in xDAI |
10
+ **xdai_testnet** <br>(Optional) | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in xDAI TestNet |
11
+
12
+ ## Example - Goerli - TestNet
13
+
14
+ ```json
15
+ {
16
+ "balances": {
17
+ "ethereum": {
18
+ "goerli": {
19
+ "0x115615dbd0f835344725146fa6343219315f15e5": {
20
+ "blockNum": "2049977",
21
+ "token_balance": "10000000",
22
+ "balance": "10",
23
+ "token_decimals": 6
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
29
+ ```
@@ -29,9 +29,9 @@ create_checkout_url_request.currency = "<CURRENCY>" # Eg. USD
29
29
  create_checkout_url_request.amount = "<AMOUNT>" # Eg. 10
30
30
  create_checkout_url_request.success_url = "<SUCCESS_URL>" # Eg. https://demo.store/api/completeOrder
31
31
  create_checkout_url_request.cancel_url = "<CANCEL_URL>" # Eg. https://demo.store/api/cancelOrder
32
- create_checkout_url_request.token = BleumiPay::Token.new('<TOKEN>') # Replace <TOKEN> with ETH or XDAI or ERC-20 Token Contract Address or XDAIT
33
- create_checkout_url_request.chain = BleumiPay::Chain::ROPSTEN #
34
- create_checkout_url_request.buyer_address = BleumiPay::EthAddress.new('<BUYER_ADDR>') # Replace <BUYER_ADDR> with the buyer's Ethereum Address
32
+ create_checkout_url_request.token = '<TOKEN>' # Replace <TOKEN> with ETH or XDAI or ERC-20 Token Contract Address or XDAIT
33
+ create_checkout_url_request.chain = BleumiPay::Chain::GOERLI #
34
+ create_checkout_url_request.buyer_address = '<BUYER_ADDR>' # Replace <BUYER_ADDR> with the buyer's Ethereum Address
35
35
 
36
36
 
37
37
  #Generate a unique checkout URL to accept payment.
@@ -62,11 +62,25 @@ url | string | URL for buyer to complete payment
62
62
 
63
63
  The hmac.input GET parameter passed to successUrl contains payment parameters as a pipe ('|') separated string in the following order,
64
64
  <ul style="font-weight: 500">
65
- <li><b>Chain</b> - Please refer documentation for <a href="https://pay.bleumi.com/docs/#supported-networks" target="_blank">Supported Networks</a> </li>
66
- <li><b>Wallet Address</b></li>
67
- <li><b>Token</b><br> <i>ETH</i> - for Ethereum<br> <i>XDAI</i> - for xDai<br> <i>XDAIT</i> - for xDai Testnet<br> <i>&lt;contract address of ERC-20 token&gt;</i> - for ERC-20; Please refer to [ERC-20 Tokens](/docs/#erc-20) for contract address;</li>
68
- <li><b>Amount</b> - Token amount for the payment</li>
69
- <li><b>Number of block confirmations</b><br> <i>12</i> - for ETH<br> <i>0</i> - for XDAI<br> <i>0</i> - for XDAIT<br> <i>12</i> - for ERC-20</li></li>
65
+ <li><b>Chain</b> - Please refer documentation for <a href="https://pay.bleumi.com/docs/#supported-networks" target="_blank">Supported Networks</a> </li>
66
+ <li><b>Wallet Address</b></li>
67
+ <li><b>Token</b><br>
68
+ <i>ETH</i> - for Ethereum<br>
69
+ <i>XDAI</i> - for xDai<br>
70
+ <i>XDAIT</i> - for xDai Testnet<br>
71
+ <i>ALGO</i> - for Algo <br>
72
+ <i>&lt;asset id&gt;</i> - for Algorand Standard Asset <br>
73
+ <i>&lt;contract address of ERC-20 token&gt;</i> - for ERC-20; Please refer to <a href="https://pay.bleumi.com/docs/#erc-20" target="_blank">ERC-20 Tokens</a> for contract address; </li>
74
+ <li><b>Amount</b> - Token amount for the payment</li>
75
+ <li><b>Number of block confirmations</b><br>
76
+ <i>12</i> - for ETH<br>
77
+ <i>0</i> - for XDAI<br>
78
+ <i>0</i> - for XDAIT<br>
79
+ <i>0</i> - for ALGO<br>
80
+ <i>0</i> - for Algorand Standard Asset<br>
81
+ <i>12</i> - for ERC-20<br>
82
+ </li>
83
+ </li>
70
84
  </ul>
71
85
 
72
86
  <aside class="notice">
@@ -88,7 +102,7 @@ ValidationError <br> <i>invalid_token</i> | The token provided is not valid for
88
102
 
89
103
  ## list_tokens
90
104
 
91
- > CheckoutTokens list_tokens
105
+ > Array&lt;CheckoutToken&gt; list_tokens
92
106
 
93
107
  Retrieve all tokens configured for the Hosted Checkout in your account in the [Bleumi Pay Dashboard](https://pay.bleumi.com/app/).
94
108
 
@@ -120,7 +134,7 @@ This endpoint does not need any parameter.
120
134
 
121
135
  ### Return type
122
136
 
123
- [**CheckoutTokens**](CheckoutTokens.md)
137
+ [**Array&lt;CheckoutToken&gt;**](CheckoutToken.md)
124
138
 
125
139
 
126
140
  ### 400 Errors
@@ -155,9 +169,9 @@ api_instance = BleumiPay::HostedCheckoutsApi.new
155
169
  begin
156
170
  validate_checkout_request = BleumiPay::ValidateCheckoutRequest.new # ValidateCheckoutRequest | Specify validation of checkout parameters.
157
171
  validate_checkout_request.hmac_alg = '<ALD>' # Eg. HMAC-SHA256-HEX
158
- validate_checkout_request.hmac_input = '<INPUT>' # Eg. ropsten|0xbe33cde200e113f4847c66e9498f2c30e81635ad|0x115615dbd0f835344725146fa6343219315f15e5|10|12
172
+ validate_checkout_request.hmac_input = '<INPUT>' # Eg. goerli|0xbeaea438bc2e19d097906b597219c288e8eb7b2e|0x115615dbd0f835344725146fa6343219315f15e5|10|12
159
173
  validate_checkout_request.hmac_key_id = '<VER>' # Eg. v1
160
- validate_checkout_request.hmac_value = '<HMAC_VALUE>' # Eg. 0d910e8dfd087dd0d0b7c3f6504f7f4316b507afc81c09e844cfeee0f3dbaef6
174
+ validate_checkout_request.hmac_value = '<HMAC_VALUE>' # Eg. bdf82eb42efac09150d62ac1bcadd2fd0f64852ded2b571567c905217adf246a
161
175
  #Validate the GET parameters passed by Hosted Checkout in successUrl upon successfully completing payment.
162
176
  result = api_instance.validate_checkout_payment(validate_checkout_request)
163
177
  p result
@@ -5,8 +5,7 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **results** | [**Array&lt;PaymentOperation&gt;**](PaymentOperation.md) | List of operations of the payment in the current page |
8
- **next_token** | **String** | Cursor to fetch next page of results, empty if no more results | [optional]
9
-
8
+ **next_token** <br> (Optional) | **String** | Cursor to fetch next page of results, empty if no more results |
10
9
 
11
10
  ## Example
12
11
 
@@ -26,4 +25,4 @@ Name | Type | Description | Notes
26
25
  }
27
26
  ]
28
27
  }
29
- ```
28
+ ```
@@ -5,7 +5,7 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **results** | [**Array&lt;Payment&gt;**](Payment.md) | List of payments in the current page |
8
- **next_token** | **String** | Cursor to fetch next page of results, empty if no more results | [optional]
8
+ **next_token** <br> (Optional) | **String** | Cursor to fetch next page of results, empty if no more results |
9
9
 
10
10
  ## Example
11
11
 
@@ -16,14 +16,14 @@ Name | Type | Description | Notes
16
16
  "id": "2",
17
17
  "addresses": {
18
18
  "ethereum": {
19
- "ropsten": {
19
+ "goerli": {
20
20
  "addr": "0xbe02daaf993b29302c2e983b63eca1465c227245"
21
21
  }
22
22
  }
23
23
  },
24
24
  "balances": {
25
25
  "ethereum": {
26
- "ropsten": {
26
+ "goerli": {
27
27
  "0x84df8548086ec9025e9c93297058bed706e90ddd": {
28
28
  "blockNum": "6831652",
29
29
  "token_balance": "0",
@@ -5,7 +5,7 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **results** | [**Array&lt;PayoutItem&gt;**](PayoutItem.md) | List of payouts of the payment in the current page |
8
- **next_token** | **String** | Cursor to fetch next page of results, empty if no more results | [optional]
8
+ **next_token** (Optional) | **String** | Cursor to fetch next page of results, empty if no more results |
9
9
 
10
10
  ## Example
11
11
 
@@ -10,7 +10,6 @@ Name | Type | Description | Notes
10
10
  **created_at** | **Integer** | UNIX timestamp when the payment was created |
11
11
  **updated_at** | **Integer** | UNIX timestamp when the lastest operation was performed |
12
12
 
13
-
14
13
  ## Example
15
14
 
16
15
  ```json
@@ -4,7 +4,8 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **ethereum** | [**Hash&lt;String, WalletAddress&gt;**](WalletAddress.md) | A dictionary which gives the address of the wallet generated for each network | [optional]
7
+ **ethereum** | [**Hash&lt;String, WalletAddress&gt;**](WalletAddress.md) | A dictionary which gives the address of the wallet generated for each Ethereum network |
8
+ **algorand** | [**Hash&lt;String, WalletAddress&gt;**](WalletAddress.md) | A dictionary which gives the address of the wallet generated for each Algorand network |
8
9
 
9
10
  ## Example
10
11
 
@@ -4,7 +4,8 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **ethereum** | [**Hash&lt;String, NetworkBalance&gt;**](NetworkBalance.md) | A dictionary which gives the token balances in each network | [optional]
7
+ **ethereum** <br> (Optional) | [**EthereumBalance**](EthereumBalance.md) | A dictionary which gives the token balances in each Ethereum network |
8
+ **algorand** <br> (Optional) | [**AlgorandBalance**](AlgorandBalance.md) | A dictionary which gives the token balances in each Algorand network |
8
9
 
9
10
  ## Example
10
11
 
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **txid** | **String** | Transaction ID of the operation | [optional]
8
8
  **chain** | **String** | Network in which the operation was carried out |
9
- **func_name** | **String** | Name of the function invoked on the Payment Processor.<br/><br/>Functions available:<br/> - createAndSettleWallet<br/> - createAndRefundWallet
9
+ **func_name** | **String** | Name of the function invoked on the Payment Processor.<br/><br/>Functions available:<br/> - createAndSettleWallet<br/> - createAndRefundWallet
10
10
  **status** | **Boolean** | <b>null</b> - operation in progress <br/> <b>true</b> - operation completed successfuly <br/> <b>false</b> - operation failed to process |
11
11
  **inputs** | [**PaymentOperationInputs**](PaymentOperationInputs.md) | The inputs provided during this operation creation |
12
12
  **hash** | **String** | Transaction hash of operation submitted to the network. This field is blank when operation is in progress. |
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
16
16
  ```json
17
17
  {
18
18
  "txid": "1574828863297",
19
- "chain": "ropsten",
19
+ "chain": "goerli",
20
20
  "funcName": "createAndSettleWallet",
21
21
  "inputs": {
22
22
  "addr": "0xbec374e0acb4b7b6fde45b11287e61beb108e868",
@@ -5,10 +5,10 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **addr** | **String** | Address of the wallet |
8
- **amount** | **String** | Amount (Only for settle operation) |
9
- **token** | **String** | <b>ETH</b> - for Ethereum <br/> <b>XDAI</b> - for xDai <br/> <b>XDAIT</b> - for xDai Testnet <br/> <b> &lt;contract address of ERC-20 token&gt;</b> - for ERC-20 Tokens |
10
- **token_amount** | **String** | Token amount to be settled in network format (Only for settle operation) |
11
- **token_decimals** | **Integer** | Token decimal places (Only for settle operation) |
8
+ **amount** <br> (Optional) | **String** | Amount (Only for settle operation) |
9
+ **token** | **String** | <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 <br/> <b> &lt;contract address of ERC-20 token&gt;</b> - for ERC-20; Please refer to [ERC-20 Tokens](https://pay.bleumi.com/docs/#erc-20) for contract address; |
10
+ **token_amount** <br> (Optional) | **String** | Token amount to be settled in network format (Only for settle operation) |
11
+ **token_decimals** <br> (Optional) | **Integer** | Token decimal places (Only for settle operation) |
12
12
 
13
13
  ## Settle Operation Example
14
14