bleumi_pay_sdk_ruby 1.0.2 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb14b4320f3d028617902cc9113626a5d0e973c71fdad64009b29a47cb6e20dc
4
- data.tar.gz: f5b85bbaf36c6df463c51d32305a55f79257c2bc36a8d693bcac99ef08d195b6
3
+ metadata.gz: 2516d7bc08d49d915d4ee4c530a9928635d54a5ffefead3092129d401ab27afe
4
+ data.tar.gz: 9a95feecb24b512e60e14e1a7f6da2a84e4f65ebb7a001eebd49d3544306eceb
5
5
  SHA512:
6
- metadata.gz: d4ea80d9397c9c777ab8f10111345c12786576d56be488c9db150a42b916b6e20eb62d82ced47e4f9e398e7d57f962c1419504e08ee75712b2024f1305f5e528
7
- data.tar.gz: 5b3424cdfefe5b8b7e3592ee3266bf5d0193f90d4541f456a174dc30f10066eb8d2cfaa5cc821e87f17a1416758f6ea2336720fae891650c7ce0590e155b1103
6
+ metadata.gz: f17f1028e071ebd35c5ba82c7043e7c62a3da57c5ee4fae50da9b14d7b5e28ce24f501d50587229013f138e2ab9ecf73039885f61621ecb76ae780c5a641a1c2
7
+ data.tar.gz: c57949398c04c9dffe9dd0124c3d22de9bb70da39c8ba1ad6b9a4f03d885c0dbc27109b98141ee1e2b8e750082b70d7f88b4eb79198ff51e515979d71389c127
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem 'rake', '~> 12.0.0'
6
+ gem 'rake', '~> 13.0.1'
7
7
  gem 'pry-byebug'
8
8
  gem 'rubocop', '~> 0.66.0'
9
9
  end
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
- <img src="https://pay.bleumi.com/wp-content/uploads/2019/04/logo_dark_bleumi_invoice_6797x1122.png" height="30">
1
+ <img src="./assets/images/BleumiPay.png" height="30">
2
2
 
3
3
  # Bleumi Pay SDK for Ruby
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 ECR-20 payments 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 helps you integrate Algo, Algorand Standard Asset, Ethereum, ERC-20, RSK, RSK ERC-20 & xDai payments and 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 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.
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
 
@@ -36,42 +36,40 @@ Add the following in the Gemfile:
36
36
 
37
37
  gem 'bleumi_pay_sdk_ruby', :git => 'https://github.com/bleumi/bleumi_pay_sdk_ruby.git'
38
38
 
39
-
40
39
  ### Run Sample Code
41
40
 
42
- The following code generates a wallet to accept payment from the buyer specific for the ECR-20 Token.
41
+ The following code generates an unique checkout URL to accept payment from the buyer:
42
+
43
43
 
44
44
  ```ruby
45
- # Load the gem
45
+ # load the gem
46
46
  require 'bleumi_pay_sdk_ruby'
47
-
48
- # Setup authorization
47
+ # setup authorization
49
48
  BleumiPay.configure do |config|
50
49
  # Configure API key authorization: ApiKeyAuth
51
50
  config.api_key['x-api-key'] = '<YOUR_API_KEY>'
52
51
  end
53
52
 
54
- api_instance = BleumiPay::Erc20PaymentsApi.new
55
- wallet_create_input = BleumiPay::WalletCreateInput.new # WalletCreateInput |
56
- opts = {
57
- chain: BleumiPay::EthNetwork::ROPSTEN # EthNetwork | Ethereum network in which wallet is to be created.
58
- }
59
-
60
- buyer_address = BleumiPay::EthAddress.new('<BUYER_ADDR>') # Replace <BUYER_ADDR> with the Buyer's Enthereum Network Address
61
- transfer_address = BleumiPay::EthAddress.new('<MERCHANT_ADDR>') # Replace <MERCHANT_ADDR> with the Merchant's Enthereum Network Address
62
-
63
- wallet_create_input.id = '<ID>'
64
- wallet_create_input.buyer_address = buyer_address
65
- wallet_create_input.transfer_address = transfer_address
53
+ api_instance = BleumiPay::HostedCheckoutsApi.new
54
+ create_checkout_url_request = BleumiPay::CreateCheckoutUrlRequest.new # CreateCheckoutUrlRequest | Specify checkout URL creation parameters.
66
55
 
67
56
  begin
68
- #Generate an unique wallet address to accept payments for an ERC-20 token from a buyer
69
- result = api_instance.generate_wallet(wallet_create_input, opts)
57
+
58
+ create_checkout_url_request = BleumiPay::CreateCheckoutUrlRequest.new # CreatePayoutRequest | Specify payout creation parameters.
59
+ create_checkout_url_request.id = '<ID>' # Eg. 1
60
+ create_checkout_url_request.currency = "<CURRENCY>" # Eg. USD
61
+ create_checkout_url_request.amount = "<AMOUNT>" # Eg. 10
62
+ create_checkout_url_request.success_url = "<SUCCESS_URL>" # Eg. https://demo.store/api/completeOrder
63
+ create_checkout_url_request.cancel_url = "<CANCEL_URL>" # Eg. https://demo.store/api/cancelOrder
64
+ create_checkout_url_request.token = '<TOKEN>' # 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. | Optional
65
+ create_checkout_url_request.chain = BleumiPay::Chain::GOERLI # Replace with any Chain as required
66
+
67
+ #Generate a unique checkout URL to accept payment.
68
+ result = api_instance.create_checkout_url(create_checkout_url_request)
70
69
  p result
71
70
  rescue BleumiPay::ApiError => e
72
- puts "Exception when calling Erc20PaymentsApi->generate_wallet: #{e}"
71
+ puts "Exception when calling HostedCheckoutsApi->create_checkout_url: #{e}"
73
72
  end
74
-
75
73
  ```
76
74
 
77
75
  More examples can be found under each method in [SDK Classes](#sdk-classes) section.
@@ -80,31 +78,53 @@ More examples can be found under each method in [SDK Classes](#sdk-classes) sect
80
78
 
81
79
  Class | Method | HTTP request | Description
82
80
  ------------ | ------------- | ------------- | -------------
83
- Erc20PaymentsApi | [**generate_wallet**](docs/Erc20PaymentsApi.md#generate_wallet) | **POST** /v1/payment/eth/wallet | Generates an unique wallet address to accept payments for an ERC-20 token.
84
- Erc20PaymentsApi | [**get_wallet**](docs/Erc20PaymentsApi.md#get_wallet) | **GET** /v1/payment/eth/wallet/{id} | Retrieve a wallet.
85
- Erc20PaymentsApi | [**list_wallets**](docs/Erc20PaymentsApi.md#list_wallets) | **GET** /v1/payment/eth/wallet | Retrieve all wallets.
86
- Erc20PaymentsApi | [**settle_wallet**](docs/Erc20PaymentsApi.md#settle_wallet) | **POST** /v1/payment/eth/wallet/{id}/settle | This method settles a specific amount of an ERC-20 token of a wallet to the transferAddress specified during [Generate Wallet](/docs/Erc20PaymentsApi.md#generatewallet)
87
- Erc20PaymentsApi | [**refund_wallet**](docs/Erc20PaymentsApi.md#refund_wallet) | **POST** /v1/payment/eth/wallet/{id}/refund | This method refunds the balance of an ERC-20 token of a wallet to the buyerAddress specified during [Generate Wallet](/docs/Erc20PaymentsApi.md#generatewallet).
88
- Erc20PaymentsApi | [**get_wallet_operation**](docs/Erc20PaymentsApi.md#get_wallet_operation) | **GET** /v1/payment/eth/wallet/{id}/operation/{txid} | Retrieve an operation of a wallet
89
- Erc20PaymentsApi | [**list_wallet_operations**](docs/Erc20PaymentsApi.md#list_wallet_operations) | **GET** /v1/payment/eth/wallet/{id}/operation | Retrieve all operations of a wallet.
81
+ BleumiPay::HostedCheckoutsApi | [**create_checkout_url**](docs/HostedCheckoutsApi.md#create_checkout_url) | **POST** /v1/payment/hc | Generate a unique checkout URL to accept payment.
82
+ BleumiPay::HostedCheckoutsApi | [**list_tokens**](docs/HostedCheckoutsApi.md#list_tokens) | **GET** /v1/payment/hc/tokens | Retrieve all tokens configured for the Hosted Checkout in your account in the [Bleumi Pay Dashboard](https://pay.bleumi.com/app/).
83
+ BleumiPay::HostedCheckoutsApi | [**validate_checkout_payment**](docs/HostedCheckoutsApi.md#validate_checkout_payment) | **POST** /v1/payment/hc/validate | Validate the GET parameters passed by Hosted Checkout in successUrl upon successfully completing payment.
84
+ BleumiPay::PaymentsApi | [**get_payment**](docs/PaymentsApi.md#get_payment) | **GET** /v1/payment/{id} | Retrieve the wallet addresses & token balances for a given payment
85
+ BleumiPay::PaymentsApi | [**list_payments**](docs/PaymentsApi.md#list_payments) | **GET** /v1/payment | Retrieve all payments created.
86
+ BleumiPay::PaymentsApi | [**settle_payment**](docs/PaymentsApi.md#settle_payment) | **POST** /v1/payment/{id}/settle | Settle a specific amount of a token for a given payment to the transferAddress and remaining balance (if any) will be refunded to the buyerAddress
87
+ BleumiPay::PaymentsApi | [**refund_payment**](docs/PaymentsApi.md#refund_payment) | **POST** /v1/payment/{id}/refund | Refund the balance of a token for a given payment to the buyerAddress
88
+ BleumiPay::PaymentsApi | [**get_payment_operation**](docs/PaymentsApi.md#get_payment_operation) | **GET** /v1/payment/{id}/operation/{txid} | Retrieve a payment operation for a specific payment.
89
+ BleumiPay::PaymentsApi | [**list_payment_operations**](docs/PaymentsApi.md#list_payment_operations) | **GET** /v1/payment/{id}/operation | Retrieve all payment operations for a specific payment.
90
+ BleumiPay::PayoutsApi | [**create_payout**](docs/PayoutsApi.md#create_payout) | **POST** /v1/payout | Create a payout.
91
+ *BleumiPay::PayoutsApi* | [**list_payouts**](docs/PayoutsApi.md#list_payouts) | **GET** /v1/payout | Returns a list of payouts
92
+
90
93
 
91
94
  ## Documentation for Models
92
95
 
93
- - [BadRequest](docs/BadRequest.md)
94
- - [EthAddress](docs/EthAddress.md)
95
- - [EthNetwork](docs/EthNetwork.md)
96
- - [PaginatedWalletOperations](docs/PaginatedWalletOperations.md)
97
- - [PaginatedWallets](docs/PaginatedWallets.md)
98
- - [Wallet](docs/Wallet.md)
99
- - [WalletBalance](docs/WalletBalance.md)
100
- - [WalletCreateInput](docs/WalletCreateInput.md)
101
- - [WalletCreateOutput](docs/WalletCreateOutput.md)
102
- - [WalletInputs](docs/WalletInputs.md)
103
- - [WalletOperation](docs/WalletOperation.md)
104
- - [WalletOperationInputs](docs/WalletOperationInputs.md)
105
- - [WalletOperationOutput](docs/WalletOperationOutput.md)
106
- - [WalletRefundOperationInput](docs/WalletRefundOperationInput.md)
107
- - [WalletSettleOperationInput](docs/WalletSettleOperationInput.md)
96
+ - [BleumiPay::AlgorandBalance](docs/AlgorandBalance.md)
97
+ - [BleumiPay::AlgorandWalletAddress](docs/AlgorandWalletAddress.md)
98
+ - [BleumiPay::AlgorandWalletInputs](docs/AlgorandWalletInputs.md)
99
+ - [BleumiPay::BadRequest](docs/BadRequest.md)
100
+ - [BleumiPay::Chain](docs/Chain.md)
101
+ - [BleumiPay::CheckoutToken](docs/CheckoutToken.md)
102
+ - [BleumiPay::CreateCheckoutUrlRequest](docs/CreateCheckoutUrlRequest.md)
103
+ - [BleumiPay::CreateCheckoutUrlResponse](docs/CreateCheckoutUrlResponse.md)
104
+ - [BleumiPay::CreatePayoutRequest](docs/CreatePayoutRequest.md)
105
+ - [BleumiPay::CreatePayoutResponse](docs/CreatePayoutResponse.md)
106
+ - [BleumiPay::EthereumBalance](docs/EthereumBalance.md)
107
+ - [BleumiPay::EthereumWalletAddress](docs/EthereumWalletAddress.md)
108
+ - [BleumiPay::EthereumWalletInputs](docs/EthereumWalletInputs.md)
109
+ - [BleumiPay::PaginatedPaymentOperations](docs/PaginatedPaymentOperations.md)
110
+ - [BleumiPay::PaginatedPayments](docs/PaginatedPayments.md)
111
+ - [BleumiPay::PaginatedPayoutItems](docs/PaginatedPayoutItems.md)
112
+ - [BleumiPay::Payment](docs/Payment.md)
113
+ - [BleumiPay::PaymentAddresses](docs/PaymentAddresses.md)
114
+ - [BleumiPay::PaymentBalances](docs/PaymentBalances.md)
115
+ - [BleumiPay::PaymentOperation](docs/PaymentOperation.md)
116
+ - [BleumiPay::PaymentOperationInputs](docs/PaymentOperationInputs.md)
117
+ - [BleumiPay::PaymentOperationResponse](docs/PaymentOperationResponse.md)
118
+ - [BleumiPay::PaymentRefundRequest](docs/PaymentRefundRequest.md)
119
+ - [BleumiPay::PaymentSettleRequest](docs/PaymentSettleRequest.md)
120
+ - [BleumiPay::Payout](docs/Payout.md)
121
+ - [BleumiPay::PayoutItem](docs/PayoutItem.md)
122
+ - [BleumiPay::PayoutItemInputs](docs/PayoutItemInputs.md)
123
+ - [BleumiPay::RskBalance](docs/RskBalance.md)
124
+ - [BleumiPay::ValidateCheckoutRequest](docs/ValidateCheckoutRequest.md)
125
+ - [BleumiPay::ValidateCheckoutResponse](docs/ValidateCheckoutResponse.md)
126
+ - [BleumiPay::WalletBalance](docs/WalletBalance.md)
127
+
108
128
 
109
129
  ## Limitations
110
130
 
@@ -114,4 +134,4 @@ Erc20PaymentsApi | [**list_wallet_operations**](docs/Erc20PaymentsApi.md#list_wa
114
134
 
115
135
  Copyright 2019 Bleumi, Inc.
116
136
 
117
- Code licensed under the [MIT License](LICENSE).
137
+ Code licensed under the [MIT License](LICENSE).
@@ -1,14 +1,14 @@
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 ERC20 payments 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
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Contact: info@bleumi.com
10
10
  Generated by: https://openapi-generator.tech
11
- OpenAPI Generator version: 4.2.0
11
+ OpenAPI Generator version: 4.2.3
12
12
 
13
13
  =end
14
14
 
@@ -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 = "The Bleumi Pay SDK helps you integrate Algo, Algorand Standard Asset, Ethereum, ERC-20, RSK, RSK ERC-20 & xDai payments and payouts into your business or application. The SDK bundles 'Bleumi Pay API' into one SDK to ease implementation and support."
27
27
  s.license = "MIT"
28
28
  s.required_ruby_version = ">= 1.9"
29
29
 
@@ -36,5 +36,4 @@ Gem::Specification.new do |s|
36
36
  s.test_files = `find spec/*`.split("\n")
37
37
  s.executables = []
38
38
  s.require_paths = ["lib"]
39
- s.metadata = { "source_code_uri" => "https://github.com/bleumi/bleumi-pay-sdk-ruby" }
40
39
  end
@@ -0,0 +1,28 @@
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
+ "safety": "high",
22
+ "token_decimals": 6
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ ```
@@ -0,0 +1,24 @@
1
+ # BleumiPay::AlgorandWalletAddress
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **addr** | **String** | Wallet address for the payment in the network |
8
+ **inputs** | [**AlgorandWalletInputs**](AlgorandWalletInputs.md) | Inputs used for the wallet creation |
9
+
10
+
11
+ ## Example
12
+
13
+ ```json
14
+ {
15
+ "addr": "BEGKKXKFVAIU2PJK274A6GJDQK7J323RLEPMRRFKSDARTX2LFYR6S6VNLM",
16
+ "inputs": {
17
+ "buyer": "W5XU4IWCTVBTYXSYIGJYXEPXH2O5S6RPHLF4JK25NEPYT3RACD4Z3EBS4A",
18
+ "merchant": "CQRMTAHZJA3SIEOTEMZXCAIZKUWE2CCLBCFYQI4NINU43IOTEWT4LOT4IY",
19
+ "salt": "dbc9d66dca9185c04c8fb6dc201db8f572ICevWSmBwaIL+TZExKWDigc4PDAQwy125SrvxoMHoWHNbS79Dp+w==",
20
+ "gas": "CQRMTAHZJA3SIEOTEMZXCAIZKUWE2CCLBCFYQI4NINU43IOTEWT4LOT4IY",
21
+ "programBytes": "ASYGIBQiyYD5SDckEdMjM3EBGVUsTQhLCIuII41Dac2h0yWnILdvTiLCnUM8XlhBk4uR9z6d2XovOsvEq11pH4nuIBD5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3BheQVheGZlciBdtOnkjuxx1Dec/b84B7gMkevLMHGQmt2Q5eDcnAU/KzEHKBIxBykSETEJKhIxCSgSMQkpEhExCSgSEREQMQ8rEhAxFCgSMRQpEhExFSoSMRUoEjEVKRIRERAxDycEEhARMQUBJwUSEDEUMQASEQ=="
22
+ }
23
+ }
24
+ ```
@@ -0,0 +1,23 @@
1
+ # BleumiPay::AlgorandWalletInputs
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **buyer** | **String** | Buyer Address |
8
+ **merchant** | **String** | Merchant Address |
9
+ **salt** | **String** | Salt |
10
+ **gas** | **String** | Gas account Address |
11
+ **program_bytes** | **String** | Program Bytes |
12
+
13
+ ## Example
14
+
15
+ ```json
16
+ {
17
+ "buyer": "W5XU4IWCTVBTYXSYIGJYXEPXH2O5S6RPHLF4JK25NEPYT3RACD4Z3EBS4A",
18
+ "merchant": "CQRMTAHZJA3SIEOTEMZXCAIZKUWE2CCLBCFYQI4NINU43IOTEWT4LOT4IY",
19
+ "salt": "dbc9d66dca9185c04c8fb6dc201db8f572ICevWSmBwaIL+TZExKWDigc4PDAQwy125SrvxoMHoWHNbS79Dp+w==",
20
+ "gas": "CQRMTAHZJA3SIEOTEMZXCAIZKUWE2CCLBCFYQI4NINU43IOTEWT4LOT4IY",
21
+ "programBytes": "ASYGIBQiyYD5SDckEdMjM3EBGVUsTQhLCIuII41Dac2h0yWnILdvTiLCnUM8XlhBk4uR9z6d2XovOsvEq11pH4nuIBD5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3BheQVheGZlciBdtOnkjuxx1Dec/b84B7gMkevLMHGQmt2Q5eDcnAU/KzEHKBIxBykSETEJKhIxCSgSMQkpEhExCSgSEREQMQ8rEhAxFCgSMRQpEhExFSoSMRUoEjEVKRIRERAxDycEEhARMQUBJwUSEDEUMQASEQ=="
22
+ }
23
+ ```
@@ -4,5 +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
+
@@ -0,0 +1,14 @@
1
+ # BleumiPay::Chain
2
+
3
+ Network enumeration. Please refer to the [Supported Networks](https://pay.bleumi.com/docs/#supported-networks).
4
+
5
+ ## Enum
6
+
7
+ * `MAINNET` (value: `"mainnet"`)
8
+ * `GOERLI` (value: `"goerli"`)
9
+ * `XDAI` (value: `"xdai"`)
10
+ * `XDAI_TESTNET` (value: `"xdai_testnet"`)
11
+ * `ALG_MAINNET` (value: `"alg_mainnet"`)
12
+ * `ALG_TESTNET` (value: `"alg_testnet"`)
13
+ * `RSK` (value: `"rsk"`)
14
+ * `RSK_TESTNET` (value: `"rsk_testnet"`)
@@ -0,0 +1,28 @@
1
+ # BleumiPay::CheckoutToken
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **network** | **String** | The network in which the token is defined |
8
+ **chain** | **String** | The chain in which the token is defined |
9
+ **addr** | **String** | The address of the token |
10
+ **name** | **String** | Name of the token |
11
+ **symbol** | **String** | Symbol of the token |
12
+ **currency** | **string** | Currency of the token |
13
+ **decimals** | **Integer** | Token decimal places |
14
+
15
+
16
+ ## Example
17
+
18
+ ```json
19
+ {
20
+ "network": "ethereum",
21
+ "chain": "goerli",
22
+ "transferAddress": "0xd15bdd17175825742a5904b21008dd3a019a060e",
23
+ "name": "USD p18",
24
+ "symbol": "USD18",
25
+ "currency": "USD",
26
+ "decimals": 18
27
+ }
28
+ ```
@@ -0,0 +1,28 @@
1
+ # BleumiPay::CreateCheckoutUrlRequest
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
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
+ **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
+ **amount** | **String** | Token amount for this payment |
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
+ **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) |
13
+ **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>RBTC</b> - for R-BTC <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 Tokens. Please refer to [ERC-20 Tokens](https://pay.bleumi.com/docs/#erc-20) for contract address; <br/> <b> &lt;contract address of RSK ERC-20 token&gt;</b> - for RSK ERC-20 Tokens. Please refer to [RSK ERC-20 Tokens](https://pay.bugnet.work/docs/#rsk-tokens-erc-20) for contract address;|
14
+ **base64_transform** <br>(Optional)| **Boolean** | Base64 encode hmac_input GET parameter passed to the successUrl |
15
+
16
+ ## Example
17
+
18
+ ```json
19
+ {
20
+ "id": "4",
21
+ "currency": "USD",
22
+ "amount": "10",
23
+ "cancelUrl": "https://demo.store/api/cancelOrder",
24
+ "successUrl": "https://demo.store/api/completeOrder",
25
+ "token":"0x115615dbd0f835344725146fa6343219315f15e5",
26
+ "chain":"goerli"
27
+ }
28
+ ```
@@ -0,0 +1,17 @@
1
+ # BleumiPay::CreateCheckoutUrlResponse
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **id** | **String** | Unique identifier generated for this checkout URL |
8
+ **url** | **String** | URL for buyer to complete payment |
9
+
10
+ ## Example
11
+
12
+ ```json
13
+ {
14
+ "id": "TBCItOjmR52dFo1a6JxCqQ",
15
+ "url": "https://pay.bleumi.io/?id=TBCItOjmR52dFo1a6JxCqQ"
16
+ }
17
+ ```
@@ -0,0 +1,19 @@
1
+ # BleumiPay::CreatePaymentRequest
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **id** | **String** | Unique ID identifying the payment |
8
+ **buyer_address** | **String** | Address of buyer. Refund operations on this wallet will use this address. You can set this to your address to manually handle refunds (outside of Bleumi Pay) to your buyer. <br/> <b>Warning!</b> - This address must be able to receive payments from smart contracts.|
9
+ **transfer_address** | **String** | Your deposit address. Settle operations on this wallet will use this address. <br/> <b>Warning!</b> - This address must be able to receive payments from smart contracts.|
10
+ **token** <br> (Optional) | **String** | (Only for Algorand Standard Asset) Asset id which will be used for payment. |
11
+ ## Example
12
+
13
+ ```json
14
+ {
15
+ "id": "1",
16
+ "buyerAddress": "0xD15BDD17175825742A5904b21008dd3A019a060E",
17
+ "transferAddress": "0x7Dc30B85084aA1608e5C1Ce39c804Be177e40A07"
18
+ }
19
+ ```
@@ -0,0 +1,15 @@
1
+ # BleumiPay::CreatePaymentResponse
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **addr** | **String** | Address of the newly created payment |
8
+
9
+ ## Example
10
+
11
+ ```json
12
+ {
13
+ "addr": "0xbea2f9d56c3cc7f2c7e17d294200dd75708eecd8"
14
+ }
15
+ ```
@@ -0,0 +1,28 @@
1
+ # BleumiPay::CreatePayoutRequest
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **txid** | **String** | Unique identifier for this payout |
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>RBTC</b> - for R-BTC <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 Tokens. Please refer to [ERC-20 Tokens](https://pay.bleumi.com/docs/#erc-20) for contract address; <br/> <b> &lt;contract address of RSK ERC-20 token&gt;</b> - for RSK ERC-20 Tokens. Please refer to [RSK ERC-20 Tokens](https://pay.bugnet.work/docs/#rsk-tokens-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
+ "txid": "12345-6789",
16
+ "token": "0x84df8548086EC9025E9C93297058Bed706E90DDD",
17
+ "payouts": [
18
+ {
19
+ "transferAddress": "0xD15BDD17175825742A5904b21008dd3A019a060E",
20
+ "amount": "1"
21
+ },
22
+ {
23
+ "transferAddress": "0x7Dc30B85084aA1608e5C1Ce39c804Be177e40A07",
24
+ "amount": "1"
25
+ }
26
+ ]
27
+ }
28
+ ```