bleumi_pay_sdk_ruby 1.0.3 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +31 -26
  4. data/assets/images/BleumiPay.png +0 -0
  5. data/bleumi_pay_sdk_ruby.gemspec +4 -4
  6. data/docs/AlgorandAddress.md +28 -0
  7. data/docs/AlgorandBalance.md +28 -0
  8. data/docs/AlgorandWalletAddress.md +24 -0
  9. data/docs/AlgorandWalletInputs.md +23 -0
  10. data/docs/BadRequest.md +1 -1
  11. data/docs/Chain.md +6 -3
  12. data/docs/CheckoutToken.md +8 -3
  13. data/docs/CreateCheckoutUrlRequest.md +7 -8
  14. data/docs/CreatePayoutRequest.md +1 -1
  15. data/docs/CreatePayoutResponse.md +1 -1
  16. data/docs/EthereumAddress.md +29 -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 +31 -23
  21. data/docs/PaginatedPaymentOperations.md +2 -3
  22. data/docs/PaginatedPayments.md +41 -10
  23. data/docs/PaginatedPayoutItems.md +1 -1
  24. data/docs/Payment.md +13 -7
  25. data/docs/PaymentAddresses.md +29 -7
  26. data/docs/PaymentBalances.md +20 -8
  27. data/docs/PaymentOperation.md +2 -2
  28. data/docs/PaymentOperationInputs.md +3 -4
  29. data/docs/PaymentRefundRequest.md +1 -3
  30. data/docs/PaymentSettleRequest.md +1 -1
  31. data/docs/PaymentsApi.md +15 -73
  32. data/docs/Payout.md +2 -1
  33. data/docs/PayoutItem.md +1 -1
  34. data/docs/PayoutItemInputs.md +1 -1
  35. data/docs/PayoutsApi.md +10 -10
  36. data/docs/RskAddress.md +29 -0
  37. data/docs/RskBalance.md +28 -0
  38. data/docs/ValidateCheckoutRequest.md +2 -2
  39. data/docs/WalletBalance.md +13 -9
  40. data/lib/bleumi_pay_sdk_ruby.rb +13 -8
  41. data/lib/bleumi_pay_sdk_ruby/api/hosted_checkouts_api.rb +17 -5
  42. data/lib/bleumi_pay_sdk_ruby/api/payments_api.rb +34 -78
  43. data/lib/bleumi_pay_sdk_ruby/api/payouts_api.rb +2 -2
  44. data/lib/bleumi_pay_sdk_ruby/api/request_validator.rb +261 -0
  45. data/lib/bleumi_pay_sdk_ruby/api_client.rb +10 -8
  46. data/lib/bleumi_pay_sdk_ruby/api_error.rb +2 -2
  47. data/lib/bleumi_pay_sdk_ruby/configuration.rb +3 -3
  48. data/lib/bleumi_pay_sdk_ruby/models/algorand_address.rb +219 -0
  49. data/lib/bleumi_pay_sdk_ruby/models/algorand_balance.rb +219 -0
  50. data/lib/bleumi_pay_sdk_ruby/models/{create_payment_response.rb → algorand_wallet_address.rb} +20 -11
  51. data/lib/bleumi_pay_sdk_ruby/models/algorand_wallet_inputs.rb +247 -0
  52. data/lib/bleumi_pay_sdk_ruby/models/bad_request.rb +3 -3
  53. data/lib/bleumi_pay_sdk_ruby/models/chain.rb +6 -5
  54. data/lib/bleumi_pay_sdk_ruby/models/checkout_token.rb +46 -16
  55. data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_request.rb +26 -13
  56. data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_response.rb +2 -2
  57. data/lib/bleumi_pay_sdk_ruby/models/create_payout_request.rb +4 -3
  58. data/lib/bleumi_pay_sdk_ruby/models/create_payout_response.rb +2 -2
  59. data/lib/bleumi_pay_sdk_ruby/models/{create_payment_request.rb → ethereum_address.rb} +39 -38
  60. data/lib/bleumi_pay_sdk_ruby/models/{network_balance.rb → ethereum_balance.rb} +13 -46
  61. data/lib/bleumi_pay_sdk_ruby/models/{wallet_address.rb → ethereum_wallet_address.rb} +19 -10
  62. data/lib/bleumi_pay_sdk_ruby/models/ethereum_wallet_inputs.rb +247 -0
  63. data/lib/bleumi_pay_sdk_ruby/models/paginated_payment_operations.rb +2 -2
  64. data/lib/bleumi_pay_sdk_ruby/models/paginated_payments.rb +2 -2
  65. data/lib/bleumi_pay_sdk_ruby/models/paginated_payout_items.rb +2 -2
  66. data/lib/bleumi_pay_sdk_ruby/models/payment.rb +2 -2
  67. data/lib/bleumi_pay_sdk_ruby/models/payment_addresses.rb +25 -9
  68. data/lib/bleumi_pay_sdk_ruby/models/payment_balances.rb +24 -6
  69. data/lib/bleumi_pay_sdk_ruby/models/payment_operation.rb +4 -3
  70. data/lib/bleumi_pay_sdk_ruby/models/payment_operation_inputs.rb +3 -3
  71. data/lib/bleumi_pay_sdk_ruby/models/payment_operation_response.rb +2 -2
  72. data/lib/bleumi_pay_sdk_ruby/models/payment_refund_request.rb +3 -3
  73. data/lib/bleumi_pay_sdk_ruby/models/payment_settle_request.rb +3 -3
  74. data/lib/bleumi_pay_sdk_ruby/models/payout.rb +16 -6
  75. data/lib/bleumi_pay_sdk_ruby/models/payout_item.rb +2 -2
  76. data/lib/bleumi_pay_sdk_ruby/models/payout_item_inputs.rb +2 -2
  77. data/lib/bleumi_pay_sdk_ruby/models/rsk_address.rb +219 -0
  78. data/lib/bleumi_pay_sdk_ruby/models/{token.rb → rsk_balance.rb} +41 -36
  79. data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_request.rb +2 -2
  80. data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_response.rb +2 -2
  81. data/lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb +21 -6
  82. data/lib/bleumi_pay_sdk_ruby/version.rb +3 -3
  83. data/spec/api/hosted_checkouts_api_spec.rb +1 -1
  84. data/spec/api/payments_api_spec.rb +6 -17
  85. data/spec/api_client_spec.rb +1 -1
  86. data/spec/models/{create_payment_response_spec.rb → algorand_address_spec.rb} +13 -7
  87. data/spec/models/{token_spec.rb → algorand_balance_spec.rb} +15 -9
  88. data/spec/models/algorand_wallet_address_spec.rb +47 -0
  89. data/spec/models/algorand_wallet_inputs_spec.rb +65 -0
  90. data/spec/models/checkout_token_spec.rb +13 -1
  91. data/spec/models/create_checkout_url_request_spec.rb +7 -1
  92. data/spec/models/{create_payment_request_spec.rb → ethereum_address_spec.rb} +15 -9
  93. data/spec/models/{network_balance_spec.rb → ethereum_balance_spec.rb} +9 -27
  94. data/spec/models/ethereum_wallet_address_spec.rb +47 -0
  95. data/spec/models/ethereum_wallet_inputs_spec.rb +65 -0
  96. data/spec/models/payment_addresses_spec.rb +12 -0
  97. data/spec/models/payment_balances_spec.rb +12 -0
  98. data/spec/models/payout_spec.rb +6 -0
  99. data/spec/models/{eth_address_spec.rb → rsk_address_spec.rb} +13 -7
  100. data/spec/models/{wallet_address_spec.rb → rsk_balance_spec.rb} +13 -7
  101. data/spec/models/wallet_balance_spec.rb +6 -0
  102. metadata +48 -28
  103. data/docs/CreatePaymentRequest.md +0 -19
  104. data/docs/CreatePaymentResponse.md +0 -15
  105. data/docs/EthAddress.md +0 -13
  106. data/docs/NetworkBalance.md +0 -29
  107. data/docs/Token.md +0 -15
  108. data/docs/WalletAddress.md +0 -14
  109. data/lib/bleumi_pay_sdk_ruby/models/eth_address.rb +0 -208
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #Bleumi Pay API
2
+ #Bleumi Pay REST API
3
3
 
4
- #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai payments and/or payouts 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
@@ -15,7 +15,7 @@ require 'date'
15
15
  module BleumiPay
16
16
  # Request does not meet API specifications
17
17
  class BadRequest
18
- # Code for error class. Complete list of error codes is available [here](https://pay.bleumi.com/docs/#errors)
18
+ # Code for error class. Complete list of error codes is available here.
19
19
  attr_accessor :error_code
20
20
 
21
21
  # Error description
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #Bleumi Pay API
2
+ #Bleumi Pay REST API
3
3
 
4
- #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai payments and/or payouts 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
@@ -15,12 +15,13 @@ require 'date'
15
15
  module BleumiPay
16
16
  class Chain
17
17
  MAINNET = "mainnet".freeze
18
- ROPSTEN = "ropsten".freeze
19
18
  GOERLI = "goerli".freeze
20
- KOVAN = "kovan".freeze
21
- RINKEBY = "rinkeby".freeze
22
19
  XDAI = "xdai".freeze
23
20
  XDAI_TESTNET = "xdai_testnet".freeze
21
+ ALG_MAINNET = "alg_mainnet".freeze
22
+ ALG_TESTNET = "alg_testnet".freeze
23
+ RSK = "rsk".freeze
24
+ RSK_TESTNET = "rsk_testnet".freeze
24
25
 
25
26
  # Builds the enum from string
26
27
  # @param [String] The enum value in the form of the string
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #Bleumi Pay API
2
+ #Bleumi Pay REST API
3
3
 
4
- #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai payments and/or payouts 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
@@ -14,11 +14,14 @@ require 'date'
14
14
 
15
15
  module BleumiPay
16
16
  class CheckoutToken
17
+ # The network in which the token is defined
18
+ attr_accessor :network
19
+
17
20
  # The chain in which the token is defined
18
21
  attr_accessor :chain
19
22
 
20
- # The destination address when payments are received in this token
21
- attr_accessor :transfer_address
23
+ # The address of the token
24
+ attr_accessor :addr
22
25
 
23
26
  # Name of the token
24
27
  attr_accessor :name
@@ -29,25 +32,32 @@ module BleumiPay
29
32
  # Token decimal places
30
33
  attr_accessor :decimals
31
34
 
35
+ # Currency code of the token
36
+ attr_accessor :currency
37
+
32
38
  # Attribute mapping from ruby-style variable name to JSON key.
33
39
  def self.attribute_map
34
40
  {
41
+ :'network' => :'network',
35
42
  :'chain' => :'chain',
36
- :'transfer_address' => :'transferAddress',
43
+ :'addr' => :'addr',
37
44
  :'name' => :'name',
38
45
  :'symbol' => :'symbol',
39
- :'decimals' => :'decimals'
46
+ :'decimals' => :'decimals',
47
+ :'currency' => :'currency'
40
48
  }
41
49
  end
42
50
 
43
51
  # Attribute type mapping.
44
52
  def self.openapi_types
45
53
  {
54
+ :'network' => :'String',
46
55
  :'chain' => :'String',
47
- :'transfer_address' => :'String',
56
+ :'addr' => :'String',
48
57
  :'name' => :'String',
49
58
  :'symbol' => :'String',
50
- :'decimals' => :'Integer'
59
+ :'decimals' => :'Integer',
60
+ :'currency' => :'String'
51
61
  }
52
62
  end
53
63
 
@@ -72,12 +82,16 @@ module BleumiPay
72
82
  h[k.to_sym] = v
73
83
  }
74
84
 
85
+ if attributes.key?(:'network')
86
+ self.network = attributes[:'network']
87
+ end
88
+
75
89
  if attributes.key?(:'chain')
76
90
  self.chain = attributes[:'chain']
77
91
  end
78
92
 
79
- if attributes.key?(:'transfer_address')
80
- self.transfer_address = attributes[:'transfer_address']
93
+ if attributes.key?(:'addr')
94
+ self.addr = attributes[:'addr']
81
95
  end
82
96
 
83
97
  if attributes.key?(:'name')
@@ -91,18 +105,26 @@ module BleumiPay
91
105
  if attributes.key?(:'decimals')
92
106
  self.decimals = attributes[:'decimals']
93
107
  end
108
+
109
+ if attributes.key?(:'currency')
110
+ self.currency = attributes[:'currency']
111
+ end
94
112
  end
95
113
 
96
114
  # Show invalid properties with the reasons. Usually used together with valid?
97
115
  # @return Array for valid properties with the reasons
98
116
  def list_invalid_properties
99
117
  invalid_properties = Array.new
118
+ if @network.nil?
119
+ invalid_properties.push('invalid value for "network", network cannot be nil.')
120
+ end
121
+
100
122
  if @chain.nil?
101
123
  invalid_properties.push('invalid value for "chain", chain cannot be nil.')
102
124
  end
103
125
 
104
- if @transfer_address.nil?
105
- invalid_properties.push('invalid value for "transfer_address", transfer_address cannot be nil.')
126
+ if @addr.nil?
127
+ invalid_properties.push('invalid value for "addr", addr cannot be nil.')
106
128
  end
107
129
 
108
130
  if @name.nil?
@@ -117,17 +139,23 @@ module BleumiPay
117
139
  invalid_properties.push('invalid value for "decimals", decimals cannot be nil.')
118
140
  end
119
141
 
142
+ if @currency.nil?
143
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
144
+ end
145
+
120
146
  invalid_properties
121
147
  end
122
148
 
123
149
  # Check to see if the all the properties in the model are valid
124
150
  # @return true if the model is valid
125
151
  def valid?
152
+ return false if @network.nil?
126
153
  return false if @chain.nil?
127
- return false if @transfer_address.nil?
154
+ return false if @addr.nil?
128
155
  return false if @name.nil?
129
156
  return false if @symbol.nil?
130
157
  return false if @decimals.nil?
158
+ return false if @currency.nil?
131
159
  true
132
160
  end
133
161
 
@@ -136,11 +164,13 @@ module BleumiPay
136
164
  def ==(o)
137
165
  return true if self.equal?(o)
138
166
  self.class == o.class &&
167
+ network == o.network &&
139
168
  chain == o.chain &&
140
- transfer_address == o.transfer_address &&
169
+ addr == o.addr &&
141
170
  name == o.name &&
142
171
  symbol == o.symbol &&
143
- decimals == o.decimals
172
+ decimals == o.decimals &&
173
+ currency == o.currency
144
174
  end
145
175
 
146
176
  # @see the `==` method
@@ -152,7 +182,7 @@ module BleumiPay
152
182
  # Calculates hash code according to all attributes.
153
183
  # @return [Integer] Hash code
154
184
  def hash
155
- [chain, transfer_address, name, symbol, decimals].hash
185
+ [network, chain, addr, name, symbol, decimals, currency].hash
156
186
  end
157
187
 
158
188
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #Bleumi Pay API
2
+ #Bleumi Pay REST API
3
3
 
4
- #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai payments and/or payouts 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
@@ -29,12 +29,18 @@ module BleumiPay
29
29
  # Buyer will be redirected to this URL upon successfully completing the payment.
30
30
  attr_accessor :success_url
31
31
 
32
- attr_accessor :buyer_address
32
+ # Payment transfer address (only used in case of Marketplace payments). Use this field to override the token's settlement address specified in the Bleumi Pay Dashboard for the payment.
33
+ attr_accessor :transfer_address
33
34
 
35
+ # (Required if specifying 'token') Network in which the hosted checkout is to be created. Please refer to the Supported Networks.
34
36
  attr_accessor :chain
35
37
 
38
+ # ETH - for Ethereum ; XDAI - for xDai ; XDAIT - for xDai Testnet ; ALGO - Algo; <asset id> - for Algorand Standard Asset; <contract address of ERC-20 token> - for ERC-20 Tokens;
36
39
  attr_accessor :token
37
40
 
41
+ # Base64 encode hmac_input GET parameter passed to the successUrl
42
+ attr_accessor :base64_transform
43
+
38
44
  # Attribute mapping from ruby-style variable name to JSON key.
39
45
  def self.attribute_map
40
46
  {
@@ -43,9 +49,10 @@ module BleumiPay
43
49
  :'amount' => :'amount',
44
50
  :'cancel_url' => :'cancelUrl',
45
51
  :'success_url' => :'successUrl',
46
- :'buyer_address' => :'buyerAddress',
52
+ :'transfer_address' => :'transferAddress',
47
53
  :'chain' => :'chain',
48
- :'token' => :'token'
54
+ :'token' => :'token',
55
+ :'base64_transform' => :'base64Transform'
49
56
  }
50
57
  end
51
58
 
@@ -57,9 +64,10 @@ module BleumiPay
57
64
  :'amount' => :'String',
58
65
  :'cancel_url' => :'String',
59
66
  :'success_url' => :'String',
60
- :'buyer_address' => :'EthAddress',
61
- :'chain' => :'Chain',
62
- :'token' => :'Token'
67
+ :'transfer_address' => :'String',
68
+ :'chain' => :'String',
69
+ :'token' => :'String',
70
+ :'base64_transform' => :'Boolean'
63
71
  }
64
72
  end
65
73
 
@@ -104,8 +112,8 @@ module BleumiPay
104
112
  self.success_url = attributes[:'success_url']
105
113
  end
106
114
 
107
- if attributes.key?(:'buyer_address')
108
- self.buyer_address = attributes[:'buyer_address']
115
+ if attributes.key?(:'transfer_address')
116
+ self.transfer_address = attributes[:'transfer_address']
109
117
  end
110
118
 
111
119
  if attributes.key?(:'chain')
@@ -115,6 +123,10 @@ module BleumiPay
115
123
  if attributes.key?(:'token')
116
124
  self.token = attributes[:'token']
117
125
  end
126
+
127
+ if attributes.key?(:'base64_transform')
128
+ self.base64_transform = attributes[:'base64_transform']
129
+ end
118
130
  end
119
131
 
120
132
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -165,9 +177,10 @@ module BleumiPay
165
177
  amount == o.amount &&
166
178
  cancel_url == o.cancel_url &&
167
179
  success_url == o.success_url &&
168
- buyer_address == o.buyer_address &&
180
+ transfer_address == o.transfer_address &&
169
181
  chain == o.chain &&
170
- token == o.token
182
+ token == o.token &&
183
+ base64_transform == o.base64_transform
171
184
  end
172
185
 
173
186
  # @see the `==` method
@@ -179,7 +192,7 @@ module BleumiPay
179
192
  # Calculates hash code according to all attributes.
180
193
  # @return [Integer] Hash code
181
194
  def hash
182
- [id, currency, amount, cancel_url, success_url, buyer_address, chain, token].hash
195
+ [id, currency, amount, cancel_url, success_url, transfer_address, chain, token, base64_transform].hash
183
196
  end
184
197
 
185
198
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #Bleumi Pay API
2
+ #Bleumi Pay REST API
3
3
 
4
- #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai payments and/or payouts 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
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #Bleumi Pay API
2
+ #Bleumi Pay REST API
3
3
 
4
- #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai payments and/or payouts 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
@@ -17,6 +17,7 @@ module BleumiPay
17
17
  # Unique identifier for this payout
18
18
  attr_accessor :txid
19
19
 
20
+ # ETH - for Ethereum ; XDAI - for xDai ; XDAIT - for xDai Testnet ; ALGO - Algo; <asset id> - for Algorand Standard Asset; <contract address of ERC-20 token> - for ERC-20 Tokens;
20
21
  attr_accessor :token
21
22
 
22
23
  # 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).
@@ -35,7 +36,7 @@ module BleumiPay
35
36
  def self.openapi_types
36
37
  {
37
38
  :'txid' => :'String',
38
- :'token' => :'Token',
39
+ :'token' => :'String',
39
40
  :'payouts' => :'Array<Payout>'
40
41
  }
41
42
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #Bleumi Pay API
2
+ #Bleumi Pay REST API
3
3
 
4
- #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai payments and/or payouts 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
@@ -13,29 +13,32 @@ OpenAPI Generator version: 4.2.2
13
13
  require 'date'
14
14
 
15
15
  module BleumiPay
16
- class CreatePaymentRequest
17
- # Unique ID identifying the payment
18
- attr_accessor :id
16
+ class EthereumAddress
17
+ attr_accessor :mainnet
19
18
 
20
- attr_accessor :buyer_address
19
+ attr_accessor :goerli
21
20
 
22
- attr_accessor :transfer_address
21
+ attr_accessor :xdai
22
+
23
+ attr_accessor :xdai_testnet
23
24
 
24
25
  # Attribute mapping from ruby-style variable name to JSON key.
25
26
  def self.attribute_map
26
27
  {
27
- :'id' => :'id',
28
- :'buyer_address' => :'buyerAddress',
29
- :'transfer_address' => :'transferAddress'
28
+ :'mainnet' => :'mainnet',
29
+ :'goerli' => :'goerli',
30
+ :'xdai' => :'xdai',
31
+ :'xdai_testnet' => :'xdai_testnet'
30
32
  }
31
33
  end
32
34
 
33
35
  # Attribute type mapping.
34
36
  def self.openapi_types
35
37
  {
36
- :'id' => :'String',
37
- :'buyer_address' => :'EthAddress',
38
- :'transfer_address' => :'EthAddress'
38
+ :'mainnet' => :'Hash<String, EthereumWalletAddress>',
39
+ :'goerli' => :'Hash<String, EthereumWalletAddress>',
40
+ :'xdai' => :'Hash<String, EthereumWalletAddress>',
41
+ :'xdai_testnet' => :'Hash<String, EthereumWalletAddress>'
39
42
  }
40
43
  end
41
44
 
@@ -49,27 +52,39 @@ module BleumiPay
49
52
  # @param [Hash] attributes Model attributes in the form of hash
50
53
  def initialize(attributes = {})
51
54
  if (!attributes.is_a?(Hash))
52
- fail ArgumentError, "The input argument (attributes) must be a hash in `BleumiPay::CreatePaymentRequest` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BleumiPay::EthereumAddress` initialize method"
53
56
  end
54
57
 
55
58
  # check to see if the attribute exists and convert string to symbol for hash key
56
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
57
60
  if (!self.class.attribute_map.key?(k.to_sym))
58
- fail ArgumentError, "`#{k}` is not a valid attribute in `BleumiPay::CreatePaymentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BleumiPay::EthereumAddress`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
62
  end
60
63
  h[k.to_sym] = v
61
64
  }
62
65
 
63
- if attributes.key?(:'id')
64
- self.id = attributes[:'id']
66
+ if attributes.key?(:'mainnet')
67
+ if (value = attributes[:'mainnet']).is_a?(Hash)
68
+ self.mainnet = value
69
+ end
65
70
  end
66
71
 
67
- if attributes.key?(:'buyer_address')
68
- self.buyer_address = attributes[:'buyer_address']
72
+ if attributes.key?(:'goerli')
73
+ if (value = attributes[:'goerli']).is_a?(Hash)
74
+ self.goerli = value
75
+ end
69
76
  end
70
77
 
71
- if attributes.key?(:'transfer_address')
72
- self.transfer_address = attributes[:'transfer_address']
78
+ if attributes.key?(:'xdai')
79
+ if (value = attributes[:'xdai']).is_a?(Hash)
80
+ self.xdai = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'xdai_testnet')
85
+ if (value = attributes[:'xdai_testnet']).is_a?(Hash)
86
+ self.xdai_testnet = value
87
+ end
73
88
  end
74
89
  end
75
90
 
@@ -77,27 +92,12 @@ module BleumiPay
77
92
  # @return Array for valid properties with the reasons
78
93
  def list_invalid_properties
79
94
  invalid_properties = Array.new
80
- if @id.nil?
81
- invalid_properties.push('invalid value for "id", id cannot be nil.')
82
- end
83
-
84
- if @buyer_address.nil?
85
- invalid_properties.push('invalid value for "buyer_address", buyer_address cannot be nil.')
86
- end
87
-
88
- if @transfer_address.nil?
89
- invalid_properties.push('invalid value for "transfer_address", transfer_address cannot be nil.')
90
- end
91
-
92
95
  invalid_properties
93
96
  end
94
97
 
95
98
  # Check to see if the all the properties in the model are valid
96
99
  # @return true if the model is valid
97
100
  def valid?
98
- return false if @id.nil?
99
- return false if @buyer_address.nil?
100
- return false if @transfer_address.nil?
101
101
  true
102
102
  end
103
103
 
@@ -106,9 +106,10 @@ module BleumiPay
106
106
  def ==(o)
107
107
  return true if self.equal?(o)
108
108
  self.class == o.class &&
109
- id == o.id &&
110
- buyer_address == o.buyer_address &&
111
- transfer_address == o.transfer_address
109
+ mainnet == o.mainnet &&
110
+ goerli == o.goerli &&
111
+ xdai == o.xdai &&
112
+ xdai_testnet == o.xdai_testnet
112
113
  end
113
114
 
114
115
  # @see the `==` method
@@ -120,7 +121,7 @@ module BleumiPay
120
121
  # Calculates hash code according to all attributes.
121
122
  # @return [Integer] Hash code
122
123
  def hash
123
- [id, buyer_address, transfer_address].hash
124
+ [mainnet, goerli, xdai, xdai_testnet].hash
124
125
  end
125
126
 
126
127
  # Builds the object from hash