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
@@ -56,4 +56,10 @@ describe 'WalletBalance' do
56
56
  end
57
57
  end
58
58
 
59
+ describe 'test attribute "safety"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
59
65
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bleumi_pay_sdk_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bleumi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-09 00:00:00.000000000 Z
11
+ date: 2020-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -70,8 +70,10 @@ dependencies:
70
70
  - - "~>"
71
71
  - !ruby/object:Gem::Version
72
72
  version: '3.6'
73
- description: A simple and powerful REST API to integrate ERC20 payments into your
74
- business or application
73
+ description: The Bleumi Pay SDK helps you integrate Algo, Algorand Standard Asset,
74
+ Ethereum, ERC-20, RSK, RSK ERC-20 & xDai payments and payouts into your business
75
+ or application. The SDK bundles 'Bleumi Pay API' into one SDK to ease implementation
76
+ and support.
75
77
  email:
76
78
  - info@bleumi.com
77
79
  executables: []
@@ -82,19 +84,24 @@ files:
82
84
  - LICENSE
83
85
  - README.md
84
86
  - Rakefile
87
+ - assets/images/BleumiPay.png
85
88
  - bleumi_pay_sdk_ruby.gemspec
89
+ - docs/AlgorandAddress.md
90
+ - docs/AlgorandBalance.md
91
+ - docs/AlgorandWalletAddress.md
92
+ - docs/AlgorandWalletInputs.md
86
93
  - docs/BadRequest.md
87
94
  - docs/Chain.md
88
95
  - docs/CheckoutToken.md
89
96
  - docs/CreateCheckoutUrlRequest.md
90
97
  - docs/CreateCheckoutUrlResponse.md
91
- - docs/CreatePaymentRequest.md
92
- - docs/CreatePaymentResponse.md
93
98
  - docs/CreatePayoutRequest.md
94
99
  - docs/CreatePayoutResponse.md
95
- - docs/EthAddress.md
100
+ - docs/EthereumAddress.md
101
+ - docs/EthereumBalance.md
102
+ - docs/EthereumWalletAddress.md
103
+ - docs/EthereumWalletInputs.md
96
104
  - docs/HostedCheckoutsApi.md
97
- - docs/NetworkBalance.md
98
105
  - docs/PaginatedPaymentOperations.md
99
106
  - docs/PaginatedPayments.md
100
107
  - docs/PaginatedPayoutItems.md
@@ -111,29 +118,34 @@ files:
111
118
  - docs/PayoutItem.md
112
119
  - docs/PayoutItemInputs.md
113
120
  - docs/PayoutsApi.md
114
- - docs/Token.md
121
+ - docs/RskAddress.md
122
+ - docs/RskBalance.md
115
123
  - docs/ValidateCheckoutRequest.md
116
124
  - docs/ValidateCheckoutResponse.md
117
- - docs/WalletAddress.md
118
125
  - docs/WalletBalance.md
119
126
  - lib/bleumi_pay_sdk_ruby.rb
120
127
  - lib/bleumi_pay_sdk_ruby/api/hosted_checkouts_api.rb
121
128
  - lib/bleumi_pay_sdk_ruby/api/payments_api.rb
122
129
  - lib/bleumi_pay_sdk_ruby/api/payouts_api.rb
130
+ - lib/bleumi_pay_sdk_ruby/api/request_validator.rb
123
131
  - lib/bleumi_pay_sdk_ruby/api_client.rb
124
132
  - lib/bleumi_pay_sdk_ruby/api_error.rb
125
133
  - lib/bleumi_pay_sdk_ruby/configuration.rb
134
+ - lib/bleumi_pay_sdk_ruby/models/algorand_address.rb
135
+ - lib/bleumi_pay_sdk_ruby/models/algorand_balance.rb
136
+ - lib/bleumi_pay_sdk_ruby/models/algorand_wallet_address.rb
137
+ - lib/bleumi_pay_sdk_ruby/models/algorand_wallet_inputs.rb
126
138
  - lib/bleumi_pay_sdk_ruby/models/bad_request.rb
127
139
  - lib/bleumi_pay_sdk_ruby/models/chain.rb
128
140
  - lib/bleumi_pay_sdk_ruby/models/checkout_token.rb
129
141
  - lib/bleumi_pay_sdk_ruby/models/create_checkout_url_request.rb
130
142
  - lib/bleumi_pay_sdk_ruby/models/create_checkout_url_response.rb
131
- - lib/bleumi_pay_sdk_ruby/models/create_payment_request.rb
132
- - lib/bleumi_pay_sdk_ruby/models/create_payment_response.rb
133
143
  - lib/bleumi_pay_sdk_ruby/models/create_payout_request.rb
134
144
  - lib/bleumi_pay_sdk_ruby/models/create_payout_response.rb
135
- - lib/bleumi_pay_sdk_ruby/models/eth_address.rb
136
- - lib/bleumi_pay_sdk_ruby/models/network_balance.rb
145
+ - lib/bleumi_pay_sdk_ruby/models/ethereum_address.rb
146
+ - lib/bleumi_pay_sdk_ruby/models/ethereum_balance.rb
147
+ - lib/bleumi_pay_sdk_ruby/models/ethereum_wallet_address.rb
148
+ - lib/bleumi_pay_sdk_ruby/models/ethereum_wallet_inputs.rb
137
149
  - lib/bleumi_pay_sdk_ruby/models/paginated_payment_operations.rb
138
150
  - lib/bleumi_pay_sdk_ruby/models/paginated_payments.rb
139
151
  - lib/bleumi_pay_sdk_ruby/models/paginated_payout_items.rb
@@ -148,10 +160,10 @@ files:
148
160
  - lib/bleumi_pay_sdk_ruby/models/payout.rb
149
161
  - lib/bleumi_pay_sdk_ruby/models/payout_item.rb
150
162
  - lib/bleumi_pay_sdk_ruby/models/payout_item_inputs.rb
151
- - lib/bleumi_pay_sdk_ruby/models/token.rb
163
+ - lib/bleumi_pay_sdk_ruby/models/rsk_address.rb
164
+ - lib/bleumi_pay_sdk_ruby/models/rsk_balance.rb
152
165
  - lib/bleumi_pay_sdk_ruby/models/validate_checkout_request.rb
153
166
  - lib/bleumi_pay_sdk_ruby/models/validate_checkout_response.rb
154
- - lib/bleumi_pay_sdk_ruby/models/wallet_address.rb
155
167
  - lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb
156
168
  - lib/bleumi_pay_sdk_ruby/version.rb
157
169
  - spec/api/hosted_checkouts_api_spec.rb
@@ -159,17 +171,21 @@ files:
159
171
  - spec/api/payouts_api_spec.rb
160
172
  - spec/api_client_spec.rb
161
173
  - spec/configuration_spec.rb
174
+ - spec/models/algorand_address_spec.rb
175
+ - spec/models/algorand_balance_spec.rb
176
+ - spec/models/algorand_wallet_address_spec.rb
177
+ - spec/models/algorand_wallet_inputs_spec.rb
162
178
  - spec/models/bad_request_spec.rb
163
179
  - spec/models/chain_spec.rb
164
180
  - spec/models/checkout_token_spec.rb
165
181
  - spec/models/create_checkout_url_request_spec.rb
166
182
  - spec/models/create_checkout_url_response_spec.rb
167
- - spec/models/create_payment_request_spec.rb
168
- - spec/models/create_payment_response_spec.rb
169
183
  - spec/models/create_payout_request_spec.rb
170
184
  - spec/models/create_payout_response_spec.rb
171
- - spec/models/eth_address_spec.rb
172
- - spec/models/network_balance_spec.rb
185
+ - spec/models/ethereum_address_spec.rb
186
+ - spec/models/ethereum_balance_spec.rb
187
+ - spec/models/ethereum_wallet_address_spec.rb
188
+ - spec/models/ethereum_wallet_inputs_spec.rb
173
189
  - spec/models/paginated_payment_operations_spec.rb
174
190
  - spec/models/paginated_payments_spec.rb
175
191
  - spec/models/paginated_payout_items_spec.rb
@@ -184,10 +200,10 @@ files:
184
200
  - spec/models/payout_item_inputs_spec.rb
185
201
  - spec/models/payout_item_spec.rb
186
202
  - spec/models/payout_spec.rb
187
- - spec/models/token_spec.rb
203
+ - spec/models/rsk_address_spec.rb
204
+ - spec/models/rsk_balance_spec.rb
188
205
  - spec/models/validate_checkout_request_spec.rb
189
206
  - spec/models/validate_checkout_response_spec.rb
190
- - spec/models/wallet_address_spec.rb
191
207
  - spec/models/wallet_balance_spec.rb
192
208
  - spec/spec_helper.rb
193
209
  homepage: https://pay.bleumi.com/
@@ -221,32 +237,36 @@ test_files:
221
237
  - spec/configuration_spec.rb
222
238
  - spec/models/bad_request_spec.rb
223
239
  - spec/models/validate_checkout_request_spec.rb
224
- - spec/models/token_spec.rb
240
+ - spec/models/algorand_wallet_address_spec.rb
225
241
  - spec/models/payment_operation_inputs_spec.rb
226
242
  - spec/models/payment_refund_request_spec.rb
227
243
  - spec/models/checkout_token_spec.rb
244
+ - spec/models/algorand_address_spec.rb
228
245
  - spec/models/payment_addresses_spec.rb
229
- - spec/models/create_payment_response_spec.rb
230
246
  - spec/models/payout_item_inputs_spec.rb
231
- - spec/models/network_balance_spec.rb
232
247
  - spec/models/payment_operation_spec.rb
233
- - spec/models/wallet_address_spec.rb
248
+ - spec/models/algorand_balance_spec.rb
249
+ - spec/models/rsk_balance_spec.rb
250
+ - spec/models/ethereum_balance_spec.rb
251
+ - spec/models/ethereum_wallet_inputs_spec.rb
234
252
  - spec/models/wallet_balance_spec.rb
235
253
  - spec/models/create_payout_request_spec.rb
236
254
  - spec/models/paginated_payment_operations_spec.rb
237
255
  - spec/models/payment_operation_response_spec.rb
256
+ - spec/models/rsk_address_spec.rb
238
257
  - spec/models/create_checkout_url_request_spec.rb
239
258
  - spec/models/validate_checkout_response_spec.rb
240
259
  - spec/models/payment_settle_request_spec.rb
241
260
  - spec/models/create_payout_response_spec.rb
261
+ - spec/models/ethereum_wallet_address_spec.rb
242
262
  - spec/models/payout_item_spec.rb
243
263
  - spec/models/create_checkout_url_response_spec.rb
264
+ - spec/models/ethereum_address_spec.rb
244
265
  - spec/models/payment_spec.rb
245
266
  - spec/models/paginated_payout_items_spec.rb
246
- - spec/models/create_payment_request_spec.rb
267
+ - spec/models/algorand_wallet_inputs_spec.rb
247
268
  - spec/models/payment_balances_spec.rb
248
269
  - spec/models/paginated_payments_spec.rb
249
270
  - spec/models/payout_spec.rb
250
271
  - spec/models/chain_spec.rb
251
- - spec/models/eth_address_spec.rb
252
272
  - spec/spec_helper.rb
@@ -1,19 +0,0 @@
1
- # BleumiPay::CreatePaymentRequest
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
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
-
11
- ## Example
12
-
13
- ```json
14
- {
15
- "id": "1",
16
- "buyerAddress": "0xD15BDD17175825742A5904b21008dd3A019a060E",
17
- "transferAddress": "0x7Dc30B85084aA1608e5C1Ce39c804Be177e40A07"
18
- }
19
- ```
@@ -1,15 +0,0 @@
1
- # BleumiPay::CreatePaymentResponse
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **addr** | **String** | Wallet address | The unique wallet address generated
8
-
9
- ## Example
10
-
11
- ```json
12
- {
13
- "addr": "0xbea2f9d56c3cc7f2c7e17d294200dd75708eecd8"
14
- }
15
- ```
@@ -1,13 +0,0 @@
1
- # BleumiPay::EthAddress
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **addr** | **String** | Valid Ethereum address string should pass validation pattern: '^0x[a-fA-F0-9]{40}$' |
8
-
9
- ## Example
10
-
11
- ```json
12
- 0x13e4ACeFE6a6700604929946E70E6443E4E73447
13
- ```
@@ -1,29 +0,0 @@
1
- # BleumiPay::NetworkBalance
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **mainnet** | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in MainNet | [optional]
8
- **xdai** | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in xDAI | [optional]
9
- **goerli** | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in Goerli TestNet | [optional]
10
- **kovan** | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in Kovan TestNet | [optional]
11
- **rinkeby** | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in Rinkeby TestNet | [optional]
12
- **ropsten** | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in Ropsten TestNet | [optional]
13
- **xdai_testnet** | [**Hash&lt;String, WalletBalance&gt;**](WalletBalance.md) | A dictionary which gives the token balances in xDAI TestNet | [optional]
14
-
15
- ## Example
16
-
17
- ```json
18
- {
19
- "xdai_testnet": {
20
- "XDAIT": {
21
- "balance": "1",
22
- "token_decimals": 15,
23
- "blockNum": "1698324",
24
- "token_balance": "1000000000000000"
25
- }
26
- }
27
- }
28
-
29
- ```
@@ -1,15 +0,0 @@
1
- # BleumiPay::Token
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **addr** | **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 |
8
-
9
- ## Example
10
-
11
- ```json
12
- {
13
- "addr": "0x84df8548086ec9025e9c93297058bed706e90ddd"
14
- }
15
- ```
@@ -1,14 +0,0 @@
1
- # BleumiPay::WalletAddress
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **addr** | **String** | Wallet address for the payment in the network |
8
- ## Example
9
-
10
- ```json
11
- {
12
- "addr": "0xbe1fa332f24ba568108ba55a25eccf93d882f54e"
13
- }
14
- ```
@@ -1,208 +0,0 @@
1
- =begin
2
- #Bleumi Pay API
3
-
4
- #A simple and powerful REST API to integrate ERC-20, Ethereum, xDai payments and/or payouts into your business or application
5
-
6
- The version of the OpenAPI document: 1.0.0
7
- Contact: info@bleumi.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module BleumiPay
16
- class EthAddress
17
- # Valid Ethereum address string should pass validation pattern
18
- attr_accessor :addr
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :'addr' => :'addr'
24
- }
25
- end
26
-
27
- # Attribute type mapping.
28
- def self.openapi_types
29
- {
30
- :'addr' => :'String'
31
- }
32
- end
33
-
34
- def eth_address?(str)
35
- # We use !! to convert the return value to a boolean
36
- !!(str =~ /^0x[a-fA-F0-9]{40}$/)
37
- end
38
-
39
- # Initializes the object
40
- # @param [Hash] attributes Model attributes in the form of hash
41
- def initialize(value)
42
-
43
- if (!eth_address?(value))
44
- fail ArgumentError, "`#{value}` The input argument must be valid Ethereum Address `BleumiPay::EthAddress` initialize method"
45
- end
46
-
47
- self.addr = value
48
-
49
- end
50
-
51
- # validation for updating addr using setter of addr
52
- def addr=(new_addr)
53
- if (!eth_address?(new_addr))
54
- fail ArgumentError, "`#{new_addr}` The input argument must be valid Ethereum Address `BleumiPay::EthAddress` initialize method"
55
- end
56
- @addr = new_addr
57
- end
58
-
59
- # Show invalid properties with the reasons. Usually used together with valid?
60
- # @return Array for valid properties with the reasons
61
- def list_invalid_properties
62
- invalid_properties = Array.new
63
- if @addr.nil?
64
- invalid_properties.push('invalid value for "addr", addr cannot be nil.')
65
- end
66
-
67
- invalid_properties
68
- end
69
-
70
- # Check to see if the all the properties in the model are valid
71
- # @return true if the model is valid
72
- def valid?
73
- return false if @addr.nil?
74
- true
75
- end
76
-
77
- # Checks equality by comparing each attribute.
78
- # @param [Object] Object to be compared
79
- def ==(o)
80
- return true if self.equal?(o)
81
- self.class == o.class &&
82
- addr == o.addr
83
- end
84
-
85
- # @see the `==` method
86
- # @param [Object] Object to be compared
87
- def eql?(o)
88
- self == o
89
- end
90
-
91
- # Calculates hash code according to all attributes.
92
- # @return [Integer] Hash code
93
- def hash
94
- [addr].hash
95
- end
96
-
97
- # Builds the object from hash
98
- # @param [Hash] attributes Model attributes in the form of hash
99
- # @return [Object] Returns the model itself
100
- def self.build_from_hash(attributes)
101
- new.build_from_hash(attributes)
102
- end
103
-
104
- # Builds the object from hash
105
- # @param [Hash] attributes Model attributes in the form of hash
106
- # @return [Object] Returns the model itself
107
- def build_from_hash(attributes)
108
- return nil unless attributes.is_a?(Hash)
109
- self.class.openapi_types.each_pair do |key, type|
110
- if type =~ /\AArray<(.*)>/i
111
- # check to ensure the input is an array given that the attribute
112
- # is documented as an array but the input is not
113
- if attributes[self.class.attribute_map[key]].is_a?(Array)
114
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
115
- end
116
- elsif !attributes[self.class.attribute_map[key]].nil?
117
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
- end # or else data not found in attributes(hash), not an issue as the data can be optional
119
- end
120
-
121
- self
122
- end
123
-
124
- # Deserializes the data based on type
125
- # @param string type Data type
126
- # @param string value Value to be deserialized
127
- # @return [Object] Deserialized data
128
- def _deserialize(type, value)
129
- case type.to_sym
130
- when :DateTime
131
- DateTime.parse(value)
132
- when :Date
133
- Date.parse(value)
134
- when :String
135
- value.to_s
136
- when :Integer
137
- value.to_i
138
- when :Float
139
- value.to_f
140
- when :Boolean
141
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
- true
143
- else
144
- false
145
- end
146
- when :Object
147
- # generic object (usually a Hash), return directly
148
- value
149
- when /\AArray<(?<inner_type>.+)>\z/
150
- inner_type = Regexp.last_match[:inner_type]
151
- value.map { |v| _deserialize(inner_type, v) }
152
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
- k_type = Regexp.last_match[:k_type]
154
- v_type = Regexp.last_match[:v_type]
155
- {}.tap do |hash|
156
- value.each do |k, v|
157
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
- end
159
- end
160
- else # model
161
- BleumiPay.const_get(type).build_from_hash(value)
162
- end
163
- end
164
-
165
- # Returns the string representation of the object
166
- # @return [String] String presentation of the object
167
- def to_s
168
- to_hash.to_s
169
- end
170
-
171
- # to_body is an alias to to_hash (backward compatibility)
172
- # @return [Hash] Returns the object in the form of hash
173
- def to_body
174
- to_hash
175
- end
176
-
177
- # Returns the object in the form of hash
178
- # @return [Hash] Returns the object in the form of hash
179
- def to_hash
180
- # hash = {}
181
- # self.class.attribute_map.each_pair do |attr, param|
182
- # value = self.send(attr)
183
- # next if value.nil?
184
- # hash[param] = _to_hash(value)
185
- # end
186
- # hash
187
- addr
188
- end
189
-
190
- # Outputs non-array value in the form of hash
191
- # For object, use to_hash. Otherwise, just return the value
192
- # @param [Object] value Any valid value
193
- # @return [Hash] Returns the value in the form of hash
194
- def _to_hash(value)
195
- if value.is_a?(Array)
196
- value.compact.map { |v| _to_hash(v) }
197
- elsif value.is_a?(Hash)
198
- {}.tap do |hash|
199
- value.each { |k, v| hash[k] = _to_hash(v) }
200
- end
201
- elsif value.respond_to? :to_hash
202
- value.to_hash
203
- else
204
- value
205
- end
206
- end
207
- end
208
- end