bleumi_pay_sdk_ruby 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +22 -22
  4. data/bleumi_pay_sdk_ruby.gemspec +1 -1
  5. data/docs/AlgorandBalance.md +1 -0
  6. data/docs/Chain.md +2 -0
  7. data/docs/CreateCheckoutUrlRequest.md +2 -4
  8. data/docs/CreatePayoutRequest.md +1 -1
  9. data/docs/EthereumBalance.md +1 -0
  10. data/docs/HostedCheckoutsApi.md +12 -17
  11. data/docs/PaginatedPayments.md +4 -0
  12. data/docs/Payment.md +2 -0
  13. data/docs/PaymentAddresses.md +13 -31
  14. data/docs/PaymentBalances.md +13 -25
  15. data/docs/PaymentOperationInputs.md +1 -2
  16. data/docs/PaymentRefundRequest.md +1 -2
  17. data/docs/PaymentSettleRequest.md +1 -1
  18. data/docs/PaymentsApi.md +4 -67
  19. data/docs/PayoutsApi.md +2 -2
  20. data/docs/RskBalance.md +28 -0
  21. data/docs/WalletBalance.md +14 -10
  22. data/hc_create.rb +40 -0
  23. data/hc_list.rb +17 -0
  24. data/hc_validate.rb +22 -0
  25. data/lib/bleumi_pay_sdk_ruby.rb +1 -0
  26. data/lib/bleumi_pay_sdk_ruby/api/payouts_api.rb +5 -13
  27. data/lib/bleumi_pay_sdk_ruby/api/request_validator.rb +40 -16
  28. data/lib/bleumi_pay_sdk_ruby/api_client.rb +7 -5
  29. data/lib/bleumi_pay_sdk_ruby/models/chain.rb +2 -0
  30. data/lib/bleumi_pay_sdk_ruby/models/payment_addresses.rb +15 -4
  31. data/lib/bleumi_pay_sdk_ruby/models/payment_balances.rb +13 -4
  32. data/lib/bleumi_pay_sdk_ruby/models/rsk_balance.rb +219 -0
  33. data/lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb +19 -4
  34. data/lib/bleumi_pay_sdk_ruby/version.rb +1 -1
  35. data/po_create.rb +39 -0
  36. data/po_list.rb +23 -0
  37. data/py_create.rb +48 -0
  38. data/py_get.rb +18 -0
  39. data/py_getop.rb +19 -0
  40. data/py_list.rb +24 -0
  41. data/py_listops.rb +21 -0
  42. data/py_refund.rb +43 -0
  43. data/py_settle.rb +43 -0
  44. data/spec/api_client_spec.rb +1 -1
  45. data/spec/models/payment_addresses_spec.rb +6 -0
  46. data/spec/models/payment_balances_spec.rb +6 -0
  47. data/spec/models/rsk_balance_spec.rb +47 -0
  48. data/spec/models/wallet_balance_spec.rb +6 -0
  49. metadata +22 -4
@@ -1,6 +1,6 @@
1
1
  # BleumiPay::PayoutsApi
2
2
 
3
- Payouts are available only for the Ethereum and xDAI 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.
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
4
 
5
5
  ## create_payout
6
6
 
@@ -41,7 +41,7 @@ begin
41
41
  payouts = [payout1, payout2]
42
42
 
43
43
  create_payout_request.txid = '<TXID>' # str | Replace with unique payout ID
44
- create_payout_request.token = '<TOKEN>' # str | Replace <TOKEN> with Token. Eg. ETH or ECR-20 token contract address or XDAI or XDAIT
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
45
  create_payout_request.payouts = payouts # setting the payouts array to the payout create request
46
46
 
47
47
  #Create a payout.
@@ -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
+ ```
@@ -5,17 +5,21 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **balance** | **String** | Token balance for the wallet |
8
- **token_balance** | **String** | Token balance for the wallet in Network format |
8
+ **token_balance** | **String** | Token balance for the wallet in Ethereum format |
9
9
  **token_decimals** | **Integer** | Token decimal places |
10
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
+ ```
11
24
 
12
- ## Example
13
25
 
14
- ```json
15
- {
16
- "balance": "1",
17
- "token_decimals": 15,
18
- "blockNum": "1698324",
19
- "token_balance": "1000000000000000"
20
- }
21
- ```
@@ -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
@@ -46,6 +46,7 @@ require 'bleumi_pay_sdk_ruby/models/payment_settle_request'
46
46
  require 'bleumi_pay_sdk_ruby/models/payout'
47
47
  require 'bleumi_pay_sdk_ruby/models/payout_item'
48
48
  require 'bleumi_pay_sdk_ruby/models/payout_item_inputs'
49
+ require 'bleumi_pay_sdk_ruby/models/rsk_balance'
49
50
  require 'bleumi_pay_sdk_ruby/models/validate_checkout_request'
50
51
  require 'bleumi_pay_sdk_ruby/models/validate_checkout_response'
51
52
  require 'bleumi_pay_sdk_ruby/models/wallet_balance'
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #Bleumi Pay REST API
2
+ #Bleumi Pay API
3
3
 
4
- #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai, Algorand payments and/or payouts into your business or application
4
+ #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai 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
@@ -15,16 +15,14 @@ require 'cgi'
15
15
  module BleumiPay
16
16
  class PayoutsApi
17
17
  attr_accessor :api_client
18
- attr_accessor :request_validator
19
18
 
20
- def initialize(api_client = ApiClient.default, request_validator = RequestValidator.default)
19
+ def initialize(api_client = ApiClient.default)
21
20
  @api_client = api_client
22
- @request_validator = request_validator
23
21
  end
24
22
  # Create a payout.
25
23
  # @param create_payout_request [CreatePayoutRequest] Request body - used to specify payout creation parameters.
26
24
  # @param [Hash] opts the optional parameters
27
- # @option opts [Chain] :chain Network in which payment is to be created. Please refer documentation for Supported Networks
25
+ # @option opts [Chain] :chain Ethereum network in which payment is to be created. Please refer documentation for Supported Networks
28
26
  # @return [CreatePayoutResponse]
29
27
  def create_payout(create_payout_request, opts = {})
30
28
  data, _status_code, _headers = create_payout_with_http_info(create_payout_request, opts)
@@ -34,7 +32,7 @@ module BleumiPay
34
32
  # Create a payout.
35
33
  # @param create_payout_request [CreatePayoutRequest] Request body - used to specify payout creation parameters.
36
34
  # @param [Hash] opts the optional parameters
37
- # @option opts [Chain] :chain Network in which payment is to be created. Please refer documentation for Supported Networks
35
+ # @option opts [Chain] :chain Ethereum network in which payment is to be created. Please refer documentation for Supported Networks
38
36
  # @return [Array<(CreatePayoutResponse, Integer, Hash)>] CreatePayoutResponse data, response status code and response headers
39
37
  def create_payout_with_http_info(create_payout_request, opts = {})
40
38
  if @api_client.config.debugging
@@ -44,12 +42,6 @@ module BleumiPay
44
42
  if @api_client.config.client_side_validation && create_payout_request.nil?
45
43
  fail ArgumentError, "Missing the required parameter 'create_payout_request' when calling PayoutsApi.create_payout"
46
44
  end
47
- # verify the values in the request body are valid
48
- chain = opts[:'chain'] if !opts[:'chain'].nil?
49
- msg = @request_validator.validate_create_payout_request(create_payout_request, chain)
50
- if (@request_validator.is_not_empty(msg))
51
- fail ArgumentError, "`#{msg}` when calling PayoutsApi.create_payout"
52
- end
53
45
  # resource path
54
46
  local_var_path = '/v1/payout'
55
47
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #Bleumi Pay REST API
2
+ #Bleumi Pay API
3
3
 
4
- #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai, Algorand payments and/or payouts into your business or application
4
+ #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai payments and/or payouts into your business or application
5
5
 
6
6
  Contact: info@bleumi.com
7
7
 
@@ -23,6 +23,11 @@ module BleumiPay
23
23
  !!(str =~ /^[A-Z2-7+=*]{58}$/)
24
24
  end
25
25
 
26
+ def algo_token?(str)
27
+ # We use !! to convert the return value to a boolean
28
+ !!(str =~ /^[0-9]*$/)
29
+ end
30
+
26
31
  def is_not_empty(str)
27
32
  if (str == nil || str == "") then
28
33
  return false
@@ -37,9 +42,22 @@ module BleumiPay
37
42
  return nil
38
43
  end
39
44
 
40
- def check_alg_addr(name, input)
41
- if !((algo_address?(input))||(input == "ALGO")) then
42
- return "`#{name}` is not a valid Algorand address"
45
+ def check_rsk_addr(name, input)
46
+ if !((eth_address?(input))||(input == "RBTC")) then
47
+ return "`#{name}` is not a valid RSK address"
48
+ end
49
+ return nil
50
+ end
51
+
52
+ def check_alg_addr(name, input, is_token)
53
+ if (is_token)
54
+ if !((algo_token?(input))||(input == "ALGO")) then
55
+ return "`#{name}` is not a valid Algorand token"
56
+ end
57
+ else
58
+ if !(algo_address?(input)) then
59
+ return "`#{name}` is not a valid Algorand address"
60
+ end
43
61
  end
44
62
  return nil
45
63
  end
@@ -48,6 +66,10 @@ module BleumiPay
48
66
  return ((chain == "alg_mainnet")||(chain == "alg_testnet"))
49
67
  end
50
68
 
69
+ def is_rsk_network(chain)
70
+ return ((chain == "rsk")||(chain == "rsk_testnet"))
71
+ end
72
+
51
73
  def check_req_param(name, input)
52
74
  if (input == nil || input == "")
53
75
  return "Missing required parameter `#{name}`"
@@ -55,7 +77,7 @@ module BleumiPay
55
77
  return nil
56
78
  end
57
79
 
58
- def check_network_addr(name, input, chain, mandatory)
80
+ def check_network_addr(name, input, chain, mandatory, is_token)
59
81
  if mandatory then
60
82
  msg = check_req_param(name, input)
61
83
  if is_not_empty(msg) then
@@ -65,7 +87,9 @@ module BleumiPay
65
87
  if is_not_empty(input) then
66
88
  msg = nil
67
89
  if is_algo_network(chain) then
68
- msg = check_alg_addr(name, input)
90
+ msg = check_alg_addr(name, input, is_token)
91
+ elsif is_rsk_network(chain) then
92
+ msg = check_rsk_addr(name, input)
69
93
  else
70
94
  msg = check_eth_addr(name, input)
71
95
  end
@@ -83,19 +107,19 @@ module BleumiPay
83
107
  return msg
84
108
  end
85
109
  # check if buyer_address is valid address in the network
86
- msg = check_network_addr("BuyerAddress", params.buyer_address, chain, mandatory=true)
110
+ msg = check_network_addr("BuyerAddress", params.buyer_address, chain, mandatory=true, is_token=false)
87
111
  if is_not_empty(msg) then
88
112
  return msg
89
113
  end
90
114
  # check if transfer_address is valid address in the network
91
- msg = check_network_addr("TransferAddress", params.transfer_address, chain, mandatory=true)
115
+ msg = check_network_addr("TransferAddress", params.transfer_address, chain, mandatory=true, is_token=false)
92
116
  if is_not_empty(msg) then
93
117
  return msg
94
118
  end
95
119
 
96
120
  # check if token is valid address in the network (if provided)
97
121
  if is_not_empty(params.token) then
98
- msg = check_network_addr("Token", params.token, chain, mandatory=false)
122
+ msg = check_network_addr("Token", params.token, chain, mandatory=false, is_token=true)
99
123
  if is_not_empty(msg) then
100
124
  return msg
101
125
  end
@@ -110,7 +134,7 @@ module BleumiPay
110
134
  return msg
111
135
  end
112
136
  # check if token is valid address in the network
113
- msg = check_network_addr("Token", params.token, chain, mandatory=true)
137
+ msg = check_network_addr("Token", params.token, chain, mandatory=true, is_token=true)
114
138
  if is_not_empty(msg) then
115
139
  return msg
116
140
  end
@@ -124,7 +148,7 @@ module BleumiPay
124
148
  return msg
125
149
  end
126
150
  # check if token is valid address in the network
127
- msg = check_network_addr("Token", params.token, chain, mandatory=true)
151
+ msg = check_network_addr("Token", params.token, chain, mandatory=true, is_token=true)
128
152
  if is_not_empty(msg) then
129
153
  return msg
130
154
  end
@@ -177,14 +201,14 @@ module BleumiPay
177
201
  end
178
202
 
179
203
  # check if token is valid address in the network (if provided)
180
- msg = check_network_addr("Token", params.token, params.chain, mandatory=false)
204
+ msg = check_network_addr("Token", params.token, params.chain, mandatory=false, is_token=true)
181
205
  if is_not_empty(msg) then
182
206
  return msg
183
207
  end
184
208
 
185
209
  # check if buyer_address is valid address in the network (if provided)
186
210
  if is_not_empty(params.buyer_address) then
187
- msg = check_network_addr("BuyerAddress", params.buyer_address, params.chain, mandatory=false)
211
+ msg = check_network_addr("BuyerAddress", params.buyer_address, params.chain, mandatory=false, is_token=false)
188
212
  if is_not_empty(msg) then
189
213
  return msg
190
214
  end
@@ -227,7 +251,7 @@ module BleumiPay
227
251
  return msg
228
252
  end
229
253
  # check if token is valid address in the network
230
- msg = check_network_addr("Token", params.token, chain, mandatory=true)
254
+ msg = check_network_addr("Token", params.token, chain, mandatory=true, is_token=true)
231
255
  if is_not_empty(msg) then
232
256
  return msg
233
257
  end
@@ -239,7 +263,7 @@ module BleumiPay
239
263
 
240
264
  for payout in payouts
241
265
  # check if payout.transfer_address is valid address in the network
242
- msg = check_network_addr("TransferAddress", payout.transfer_address, chain, mandatory=true)
266
+ msg = check_network_addr("TransferAddress", payout.transfer_address, chain, mandatory=true, is_token=false)
243
267
  if is_not_empty(msg) then
244
268
  return msg
245
269
  end
@@ -269,11 +269,13 @@ module BleumiPay
269
269
  tempfile.write(chunk)
270
270
  end
271
271
  request.on_complete do |response|
272
- tempfile.close if tempfile
273
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
274
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
275
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
276
- "explicitly with `tempfile.delete`"
272
+ if tempfile
273
+ tempfile.close
274
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
275
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
276
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
277
+ "explicitly with `tempfile.delete`"
278
+ end
277
279
  end
278
280
  end
279
281
 
@@ -20,6 +20,8 @@ module BleumiPay
20
20
  XDAI_TESTNET = "xdai_testnet".freeze
21
21
  ALG_MAINNET = "alg_mainnet".freeze
22
22
  ALG_TESTNET = "alg_testnet".freeze
23
+ RSK = "rsk".freeze
24
+ RSK_TESTNET = "rsk_testnet".freeze
23
25
 
24
26
  # Builds the enum from string
25
27
  # @param [String] The enum value in the form of the string
@@ -19,11 +19,14 @@ module BleumiPay
19
19
 
20
20
  attr_accessor :algorand
21
21
 
22
+ attr_accessor :rsk
23
+
22
24
  # Attribute mapping from ruby-style variable name to JSON key.
23
25
  def self.attribute_map
24
26
  {
25
27
  :'ethereum' => :'ethereum',
26
- :'algorand' => :'algorand'
28
+ :'algorand' => :'algorand',
29
+ :'rsk' => :'rsk'
27
30
  }
28
31
  end
29
32
 
@@ -31,7 +34,8 @@ module BleumiPay
31
34
  def self.openapi_types
32
35
  {
33
36
  :'ethereum' => :'Hash<String, EthereumWalletAddress>',
34
- :'algorand' => :'Hash<String, AlgorandWalletAddress>'
37
+ :'algorand' => :'Hash<String, AlgorandWalletAddress>',
38
+ :'rsk' => :'Hash<String, EthereumWalletAddress>'
35
39
  }
36
40
  end
37
41
 
@@ -67,6 +71,12 @@ module BleumiPay
67
71
  self.algorand = value
68
72
  end
69
73
  end
74
+
75
+ if attributes.key?(:'rsk')
76
+ if (value = attributes[:'rsk']).is_a?(Hash)
77
+ self.rsk = value
78
+ end
79
+ end
70
80
  end
71
81
 
72
82
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -88,7 +98,8 @@ module BleumiPay
88
98
  return true if self.equal?(o)
89
99
  self.class == o.class &&
90
100
  ethereum == o.ethereum &&
91
- algorand == o.algorand
101
+ algorand == o.algorand &&
102
+ rsk == o.rsk
92
103
  end
93
104
 
94
105
  # @see the `==` method
@@ -100,7 +111,7 @@ module BleumiPay
100
111
  # Calculates hash code according to all attributes.
101
112
  # @return [Integer] Hash code
102
113
  def hash
103
- [ethereum, algorand].hash
114
+ [ethereum, algorand, rsk].hash
104
115
  end
105
116
 
106
117
  # Builds the object from hash