bleumi_pay_sdk_ruby 1.0.2 → 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.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +67 -47
- data/bleumi_pay_sdk_ruby.gemspec +4 -5
- data/docs/AlgorandBalance.md +28 -0
- data/docs/AlgorandWalletAddress.md +24 -0
- data/docs/AlgorandWalletInputs.md +23 -0
- data/docs/BadRequest.md +2 -1
- data/docs/Chain.md +14 -0
- data/docs/CheckoutToken.md +28 -0
- data/docs/CreateCheckoutUrlRequest.md +28 -0
- data/docs/CreateCheckoutUrlResponse.md +17 -0
- data/docs/CreatePaymentRequest.md +19 -0
- data/docs/CreatePaymentResponse.md +15 -0
- data/docs/CreatePayoutRequest.md +28 -0
- data/docs/CreatePayoutResponse.md +15 -0
- data/docs/EthereumBalance.md +30 -0
- data/docs/EthereumWalletAddress.md +23 -0
- data/docs/EthereumWalletInputs.md +23 -0
- data/docs/HostedCheckoutsApi.md +197 -0
- data/docs/PaginatedPaymentOperations.md +28 -0
- data/docs/PaginatedPayments.md +95 -0
- data/docs/PaginatedPayoutItems.md +59 -0
- data/docs/Payment.md +67 -0
- data/docs/PaymentAddresses.md +21 -0
- data/docs/PaymentBalances.md +21 -0
- data/docs/PaymentOperation.md +46 -0
- data/docs/PaymentOperationInputs.md +31 -0
- data/docs/PaymentOperationResponse.md +15 -0
- data/docs/PaymentRefundRequest.md +14 -0
- data/docs/PaymentSettleRequest.md +17 -0
- data/docs/PaymentsApi.md +368 -0
- data/docs/Payout.md +18 -0
- data/docs/PayoutItem.md +39 -0
- data/docs/PayoutItemInputs.md +28 -0
- data/docs/PayoutsApi.md +137 -0
- data/docs/RskBalance.md +28 -0
- data/docs/ValidateCheckoutRequest.md +21 -0
- data/docs/ValidateCheckoutResponse.md +15 -0
- data/docs/WalletBalance.md +18 -4
- data/hc_create.rb +40 -0
- data/hc_list.rb +17 -0
- data/hc_validate.rb +22 -0
- data/lib/bleumi_pay_sdk_ruby.rb +38 -17
- data/lib/bleumi_pay_sdk_ruby/api/hosted_checkouts_api.rb +212 -0
- data/lib/bleumi_pay_sdk_ruby/api/payments_api.rb +517 -0
- data/lib/bleumi_pay_sdk_ruby/api/payouts_api.rb +157 -0
- data/lib/bleumi_pay_sdk_ruby/api/request_validator.rb +288 -0
- data/lib/bleumi_pay_sdk_ruby/api_client.rb +11 -9
- data/lib/bleumi_pay_sdk_ruby/api_error.rb +3 -3
- data/lib/bleumi_pay_sdk_ruby/configuration.rb +4 -4
- data/lib/bleumi_pay_sdk_ruby/models/algorand_balance.rb +219 -0
- data/lib/bleumi_pay_sdk_ruby/models/algorand_wallet_address.rb +221 -0
- data/lib/bleumi_pay_sdk_ruby/models/algorand_wallet_inputs.rb +247 -0
- data/lib/bleumi_pay_sdk_ruby/models/bad_request.rb +15 -5
- data/lib/bleumi_pay_sdk_ruby/models/{eth_network.rb → chain.rb} +12 -9
- data/lib/bleumi_pay_sdk_ruby/models/checkout_token.rb +302 -0
- data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_request.rb +312 -0
- data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_response.rb +227 -0
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_create_input.rb → create_payment_request.rb} +33 -11
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_create_output.rb → create_payment_response.rb} +19 -23
- data/lib/bleumi_pay_sdk_ruby/models/create_payout_request.rb +244 -0
- data/lib/bleumi_pay_sdk_ruby/models/create_payout_response.rb +212 -0
- data/lib/bleumi_pay_sdk_ruby/models/ethereum_balance.rb +241 -0
- data/lib/bleumi_pay_sdk_ruby/models/ethereum_wallet_address.rb +221 -0
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_inputs.rb → ethereum_wallet_inputs.rb} +35 -50
- data/lib/bleumi_pay_sdk_ruby/models/paginated_payment_operations.rb +224 -0
- data/lib/bleumi_pay_sdk_ruby/models/{paginated_wallet_operations.rb → paginated_payments.rb} +19 -9
- data/lib/bleumi_pay_sdk_ruby/models/{paginated_wallets.rb → paginated_payout_items.rb} +19 -9
- data/lib/bleumi_pay_sdk_ruby/models/{wallet.rb → payment.rb} +31 -54
- data/lib/bleumi_pay_sdk_ruby/models/payment_addresses.rb +231 -0
- data/lib/bleumi_pay_sdk_ruby/models/payment_balances.rb +225 -0
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_operation.rb → payment_operation.rb} +44 -18
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_operation_inputs.rb → payment_operation_inputs.rb} +38 -12
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_operation_output.rb → payment_operation_response.rb} +18 -8
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_refund_operation_input.rb → payment_refund_request.rb} +18 -8
- data/lib/bleumi_pay_sdk_ruby/models/{wallet_settle_operation_input.rb → payment_settle_request.rb} +18 -8
- data/lib/bleumi_pay_sdk_ruby/models/payout.rb +237 -0
- data/lib/bleumi_pay_sdk_ruby/models/payout_item.rb +286 -0
- data/lib/bleumi_pay_sdk_ruby/models/payout_item_inputs.rb +244 -0
- data/lib/bleumi_pay_sdk_ruby/models/rsk_balance.rb +219 -0
- data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_request.rb +257 -0
- data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_response.rb +212 -0
- data/lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb +37 -12
- data/lib/bleumi_pay_sdk_ruby/version.rb +4 -4
- data/po_create.rb +39 -0
- data/po_list.rb +23 -0
- data/py_create.rb +48 -0
- data/py_get.rb +18 -0
- data/py_getop.rb +19 -0
- data/py_list.rb +24 -0
- data/py_listops.rb +21 -0
- data/py_refund.rb +43 -0
- data/py_settle.rb +43 -0
- data/spec/api/hosted_checkouts_api_spec.rb +67 -0
- data/spec/api/payments_api_spec.rb +123 -0
- data/spec/api/payouts_api_spec.rb +61 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/algorand_balance_spec.rb +47 -0
- data/spec/models/algorand_wallet_address_spec.rb +47 -0
- data/spec/models/algorand_wallet_inputs_spec.rb +65 -0
- data/spec/models/bad_request_spec.rb +47 -0
- data/spec/models/chain_spec.rb +35 -0
- data/spec/models/checkout_token_spec.rb +77 -0
- data/spec/models/create_checkout_url_request_spec.rb +89 -0
- data/spec/models/create_checkout_url_response_spec.rb +47 -0
- data/spec/models/create_payment_request_spec.rb +59 -0
- data/spec/models/create_payment_response_spec.rb +41 -0
- data/spec/models/create_payout_request_spec.rb +53 -0
- data/spec/models/create_payout_response_spec.rb +41 -0
- data/spec/models/ethereum_balance_spec.rb +59 -0
- data/spec/models/ethereum_wallet_address_spec.rb +47 -0
- data/spec/models/ethereum_wallet_inputs_spec.rb +65 -0
- data/spec/models/paginated_payment_operations_spec.rb +47 -0
- data/spec/models/paginated_payments_spec.rb +47 -0
- data/spec/models/paginated_payout_items_spec.rb +47 -0
- data/spec/models/payment_addresses_spec.rb +53 -0
- data/spec/models/payment_balances_spec.rb +53 -0
- data/spec/models/payment_operation_inputs_spec.rb +65 -0
- data/spec/models/payment_operation_response_spec.rb +41 -0
- data/spec/models/payment_operation_spec.rb +71 -0
- data/spec/models/payment_refund_request_spec.rb +41 -0
- data/spec/models/payment_settle_request_spec.rb +47 -0
- data/spec/models/payment_spec.rb +65 -0
- data/spec/models/payout_item_inputs_spec.rb +53 -0
- data/spec/models/payout_item_spec.rb +71 -0
- data/spec/models/payout_spec.rb +53 -0
- data/spec/models/rsk_balance_spec.rb +47 -0
- data/spec/models/validate_checkout_request_spec.rb +59 -0
- data/spec/models/validate_checkout_response_spec.rb +41 -0
- data/spec/models/wallet_balance_spec.rb +65 -0
- data/spec/spec_helper.rb +111 -0
- metadata +180 -49
- data/docs/Erc20PaymentsApi.md +0 -334
- data/docs/EthAddress.md +0 -8
- data/docs/EthNetwork.md +0 -9
- data/docs/PaginatedWalletOperations.md +0 -8
- data/docs/PaginatedWallets.md +0 -8
- data/docs/Wallet.md +0 -13
- data/docs/WalletCreateInput.md +0 -9
- data/docs/WalletCreateOutput.md +0 -10
- data/docs/WalletInputs.md +0 -11
- data/docs/WalletOperation.md +0 -11
- data/docs/WalletOperationInputs.md +0 -10
- data/docs/WalletOperationOutput.md +0 -8
- data/docs/WalletRefundOperationInput.md +0 -7
- data/docs/WalletSettleOperationInput.md +0 -8
- data/lib/bleumi_pay_sdk_ruby/api/erc20_payments_api.rb +0 -482
- data/lib/bleumi_pay_sdk_ruby/models/eth_address.rb +0 -208
data/lib/bleumi_pay_sdk_ruby/models/{paginated_wallet_operations.rb → paginated_payments.rb}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#Bleumi Pay API
|
|
2
|
+
#Bleumi Pay REST API
|
|
3
3
|
|
|
4
|
-
#A simple and powerful REST API to integrate
|
|
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
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.2.
|
|
9
|
+
OpenAPI Generator version: 4.2.2
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module BleumiPay
|
|
16
|
-
class
|
|
17
|
-
# List of
|
|
16
|
+
class PaginatedPayments
|
|
17
|
+
# List of payments in the current page
|
|
18
18
|
attr_accessor :results
|
|
19
19
|
|
|
20
20
|
# Cursor to fetch next page of results, empty if no more results
|
|
@@ -31,22 +31,28 @@ module BleumiPay
|
|
|
31
31
|
# Attribute type mapping.
|
|
32
32
|
def self.openapi_types
|
|
33
33
|
{
|
|
34
|
-
:'results' => :'Array<
|
|
34
|
+
:'results' => :'Array<Payment>',
|
|
35
35
|
:'next_token' => :'String'
|
|
36
36
|
}
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
+
# List of attributes with nullable: true
|
|
40
|
+
def self.openapi_nullable
|
|
41
|
+
Set.new([
|
|
42
|
+
])
|
|
43
|
+
end
|
|
44
|
+
|
|
39
45
|
# Initializes the object
|
|
40
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
41
47
|
def initialize(attributes = {})
|
|
42
48
|
if (!attributes.is_a?(Hash))
|
|
43
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `BleumiPay::
|
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BleumiPay::PaginatedPayments` initialize method"
|
|
44
50
|
end
|
|
45
51
|
|
|
46
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
47
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
48
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
49
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `BleumiPay::
|
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BleumiPay::PaginatedPayments`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
50
56
|
end
|
|
51
57
|
h[k.to_sym] = v
|
|
52
58
|
}
|
|
@@ -187,7 +193,11 @@ module BleumiPay
|
|
|
187
193
|
hash = {}
|
|
188
194
|
self.class.attribute_map.each_pair do |attr, param|
|
|
189
195
|
value = self.send(attr)
|
|
190
|
-
|
|
196
|
+
if value.nil?
|
|
197
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
198
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
199
|
+
end
|
|
200
|
+
|
|
191
201
|
hash[param] = _to_hash(value)
|
|
192
202
|
end
|
|
193
203
|
hash
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#Bleumi Pay API
|
|
2
|
+
#Bleumi Pay REST API
|
|
3
3
|
|
|
4
|
-
#A simple and powerful REST API to integrate
|
|
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
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.2.
|
|
9
|
+
OpenAPI Generator version: 4.2.2
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module BleumiPay
|
|
16
|
-
class
|
|
17
|
-
# List of
|
|
16
|
+
class PaginatedPayoutItems
|
|
17
|
+
# List of payouts of the payment in the current page
|
|
18
18
|
attr_accessor :results
|
|
19
19
|
|
|
20
20
|
# Cursor to fetch next page of results, empty if no more results
|
|
@@ -31,22 +31,28 @@ module BleumiPay
|
|
|
31
31
|
# Attribute type mapping.
|
|
32
32
|
def self.openapi_types
|
|
33
33
|
{
|
|
34
|
-
:'results' => :'Array<
|
|
34
|
+
:'results' => :'Array<PayoutItem>',
|
|
35
35
|
:'next_token' => :'String'
|
|
36
36
|
}
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
+
# List of attributes with nullable: true
|
|
40
|
+
def self.openapi_nullable
|
|
41
|
+
Set.new([
|
|
42
|
+
])
|
|
43
|
+
end
|
|
44
|
+
|
|
39
45
|
# Initializes the object
|
|
40
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
41
47
|
def initialize(attributes = {})
|
|
42
48
|
if (!attributes.is_a?(Hash))
|
|
43
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `BleumiPay::
|
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BleumiPay::PaginatedPayoutItems` initialize method"
|
|
44
50
|
end
|
|
45
51
|
|
|
46
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
47
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
48
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
49
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `BleumiPay::
|
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BleumiPay::PaginatedPayoutItems`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
50
56
|
end
|
|
51
57
|
h[k.to_sym] = v
|
|
52
58
|
}
|
|
@@ -187,7 +193,11 @@ module BleumiPay
|
|
|
187
193
|
hash = {}
|
|
188
194
|
self.class.attribute_map.each_pair do |attr, param|
|
|
189
195
|
value = self.send(attr)
|
|
190
|
-
|
|
196
|
+
if value.nil?
|
|
197
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
198
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
199
|
+
end
|
|
200
|
+
|
|
191
201
|
hash[param] = _to_hash(value)
|
|
192
202
|
end
|
|
193
203
|
hash
|
|
@@ -1,34 +1,27 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#Bleumi Pay API
|
|
2
|
+
#Bleumi Pay REST API
|
|
3
3
|
|
|
4
|
-
#A simple and powerful REST API to integrate
|
|
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
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.2.
|
|
9
|
+
OpenAPI Generator version: 4.2.2
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module BleumiPay
|
|
16
|
-
class
|
|
17
|
-
# Unique ID identifying the
|
|
16
|
+
class Payment
|
|
17
|
+
# Unique ID identifying the payment; specified when it was created by your system
|
|
18
18
|
attr_accessor :id
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
attr_accessor :chain
|
|
20
|
+
attr_accessor :addresses
|
|
22
21
|
|
|
23
|
-
# Wallet address
|
|
24
|
-
attr_accessor :addr
|
|
25
|
-
|
|
26
|
-
# The current token balance
|
|
27
22
|
attr_accessor :balances
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
# UNIX timestamp when the wallet was created
|
|
24
|
+
# UNIX timestamp when the payment was created
|
|
32
25
|
attr_accessor :created_at
|
|
33
26
|
|
|
34
27
|
# UNIX timestamp when the lastest operation was performed
|
|
@@ -38,10 +31,8 @@ module BleumiPay
|
|
|
38
31
|
def self.attribute_map
|
|
39
32
|
{
|
|
40
33
|
:'id' => :'id',
|
|
41
|
-
:'
|
|
42
|
-
:'addr' => :'addr',
|
|
34
|
+
:'addresses' => :'addresses',
|
|
43
35
|
:'balances' => :'balances',
|
|
44
|
-
:'inputs' => :'inputs',
|
|
45
36
|
:'created_at' => :'createdAt',
|
|
46
37
|
:'updated_at' => :'updatedAt'
|
|
47
38
|
}
|
|
@@ -51,26 +42,30 @@ module BleumiPay
|
|
|
51
42
|
def self.openapi_types
|
|
52
43
|
{
|
|
53
44
|
:'id' => :'String',
|
|
54
|
-
:'
|
|
55
|
-
:'
|
|
56
|
-
:'balances' => :'Hash<String, WalletBalance>',
|
|
57
|
-
:'inputs' => :'WalletInputs',
|
|
45
|
+
:'addresses' => :'PaymentAddresses',
|
|
46
|
+
:'balances' => :'PaymentBalances',
|
|
58
47
|
:'created_at' => :'Integer',
|
|
59
48
|
:'updated_at' => :'Integer'
|
|
60
49
|
}
|
|
61
50
|
end
|
|
62
51
|
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
63
58
|
# Initializes the object
|
|
64
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
60
|
def initialize(attributes = {})
|
|
66
61
|
if (!attributes.is_a?(Hash))
|
|
67
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `BleumiPay::
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BleumiPay::Payment` initialize method"
|
|
68
63
|
end
|
|
69
64
|
|
|
70
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
66
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
67
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
73
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `BleumiPay::
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BleumiPay::Payment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
74
69
|
end
|
|
75
70
|
h[k.to_sym] = v
|
|
76
71
|
}
|
|
@@ -79,22 +74,12 @@ module BleumiPay
|
|
|
79
74
|
self.id = attributes[:'id']
|
|
80
75
|
end
|
|
81
76
|
|
|
82
|
-
if attributes.key?(:'
|
|
83
|
-
self.
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
if attributes.key?(:'addr')
|
|
87
|
-
self.addr = attributes[:'addr']
|
|
77
|
+
if attributes.key?(:'addresses')
|
|
78
|
+
self.addresses = attributes[:'addresses']
|
|
88
79
|
end
|
|
89
80
|
|
|
90
81
|
if attributes.key?(:'balances')
|
|
91
|
-
|
|
92
|
-
self.balances = value
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
if attributes.key?(:'inputs')
|
|
97
|
-
self.inputs = attributes[:'inputs']
|
|
82
|
+
self.balances = attributes[:'balances']
|
|
98
83
|
end
|
|
99
84
|
|
|
100
85
|
if attributes.key?(:'created_at')
|
|
@@ -114,22 +99,14 @@ module BleumiPay
|
|
|
114
99
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
115
100
|
end
|
|
116
101
|
|
|
117
|
-
if @
|
|
118
|
-
invalid_properties.push('invalid value for "
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
if @addr.nil?
|
|
122
|
-
invalid_properties.push('invalid value for "addr", addr cannot be nil.')
|
|
102
|
+
if @addresses.nil?
|
|
103
|
+
invalid_properties.push('invalid value for "addresses", addresses cannot be nil.')
|
|
123
104
|
end
|
|
124
105
|
|
|
125
106
|
if @balances.nil?
|
|
126
107
|
invalid_properties.push('invalid value for "balances", balances cannot be nil.')
|
|
127
108
|
end
|
|
128
109
|
|
|
129
|
-
if @inputs.nil?
|
|
130
|
-
invalid_properties.push('invalid value for "inputs", inputs cannot be nil.')
|
|
131
|
-
end
|
|
132
|
-
|
|
133
110
|
if @created_at.nil?
|
|
134
111
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
135
112
|
end
|
|
@@ -145,10 +122,8 @@ module BleumiPay
|
|
|
145
122
|
# @return true if the model is valid
|
|
146
123
|
def valid?
|
|
147
124
|
return false if @id.nil?
|
|
148
|
-
return false if @
|
|
149
|
-
return false if @addr.nil?
|
|
125
|
+
return false if @addresses.nil?
|
|
150
126
|
return false if @balances.nil?
|
|
151
|
-
return false if @inputs.nil?
|
|
152
127
|
return false if @created_at.nil?
|
|
153
128
|
return false if @updated_at.nil?
|
|
154
129
|
true
|
|
@@ -160,10 +135,8 @@ module BleumiPay
|
|
|
160
135
|
return true if self.equal?(o)
|
|
161
136
|
self.class == o.class &&
|
|
162
137
|
id == o.id &&
|
|
163
|
-
|
|
164
|
-
addr == o.addr &&
|
|
138
|
+
addresses == o.addresses &&
|
|
165
139
|
balances == o.balances &&
|
|
166
|
-
inputs == o.inputs &&
|
|
167
140
|
created_at == o.created_at &&
|
|
168
141
|
updated_at == o.updated_at
|
|
169
142
|
end
|
|
@@ -177,7 +150,7 @@ module BleumiPay
|
|
|
177
150
|
# Calculates hash code according to all attributes.
|
|
178
151
|
# @return [Integer] Hash code
|
|
179
152
|
def hash
|
|
180
|
-
[id,
|
|
153
|
+
[id, addresses, balances, created_at, updated_at].hash
|
|
181
154
|
end
|
|
182
155
|
|
|
183
156
|
# Builds the object from hash
|
|
@@ -266,7 +239,11 @@ module BleumiPay
|
|
|
266
239
|
hash = {}
|
|
267
240
|
self.class.attribute_map.each_pair do |attr, param|
|
|
268
241
|
value = self.send(attr)
|
|
269
|
-
|
|
242
|
+
if value.nil?
|
|
243
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
244
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
245
|
+
end
|
|
246
|
+
|
|
270
247
|
hash[param] = _to_hash(value)
|
|
271
248
|
end
|
|
272
249
|
hash
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Bleumi Pay REST API
|
|
3
|
+
|
|
4
|
+
#A simple and powerful REST API to integrate ERC-20, Ethereum, xDai, Algorand 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
|
+
# Payment addresses
|
|
17
|
+
class PaymentAddresses
|
|
18
|
+
attr_accessor :ethereum
|
|
19
|
+
|
|
20
|
+
attr_accessor :algorand
|
|
21
|
+
|
|
22
|
+
attr_accessor :rsk
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'ethereum' => :'ethereum',
|
|
28
|
+
:'algorand' => :'algorand',
|
|
29
|
+
:'rsk' => :'rsk'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Attribute type mapping.
|
|
34
|
+
def self.openapi_types
|
|
35
|
+
{
|
|
36
|
+
:'ethereum' => :'Hash<String, EthereumWalletAddress>',
|
|
37
|
+
:'algorand' => :'Hash<String, AlgorandWalletAddress>',
|
|
38
|
+
:'rsk' => :'Hash<String, EthereumWalletAddress>'
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# List of attributes with nullable: true
|
|
43
|
+
def self.openapi_nullable
|
|
44
|
+
Set.new([
|
|
45
|
+
])
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Initializes the object
|
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
50
|
+
def initialize(attributes = {})
|
|
51
|
+
if (!attributes.is_a?(Hash))
|
|
52
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BleumiPay::PaymentAddresses` initialize method"
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
57
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
58
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BleumiPay::PaymentAddresses`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
59
|
+
end
|
|
60
|
+
h[k.to_sym] = v
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if attributes.key?(:'ethereum')
|
|
64
|
+
if (value = attributes[:'ethereum']).is_a?(Hash)
|
|
65
|
+
self.ethereum = value
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
if attributes.key?(:'algorand')
|
|
70
|
+
if (value = attributes[:'algorand']).is_a?(Hash)
|
|
71
|
+
self.algorand = value
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'rsk')
|
|
76
|
+
if (value = attributes[:'rsk']).is_a?(Hash)
|
|
77
|
+
self.rsk = value
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
83
|
+
# @return Array for valid properties with the reasons
|
|
84
|
+
def list_invalid_properties
|
|
85
|
+
invalid_properties = Array.new
|
|
86
|
+
invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Checks equality by comparing each attribute.
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def ==(o)
|
|
98
|
+
return true if self.equal?(o)
|
|
99
|
+
self.class == o.class &&
|
|
100
|
+
ethereum == o.ethereum &&
|
|
101
|
+
algorand == o.algorand &&
|
|
102
|
+
rsk == o.rsk
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @see the `==` method
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def eql?(o)
|
|
108
|
+
self == o
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Calculates hash code according to all attributes.
|
|
112
|
+
# @return [Integer] Hash code
|
|
113
|
+
def hash
|
|
114
|
+
[ethereum, algorand, rsk].hash
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Builds the object from hash
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
# @return [Object] Returns the model itself
|
|
120
|
+
def self.build_from_hash(attributes)
|
|
121
|
+
new.build_from_hash(attributes)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
130
|
+
if type =~ /\AArray<(.*)>/i
|
|
131
|
+
# check to ensure the input is an array given that the attribute
|
|
132
|
+
# is documented as an array but the input is not
|
|
133
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
134
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
135
|
+
end
|
|
136
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
137
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
138
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
self
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Deserializes the data based on type
|
|
145
|
+
# @param string type Data type
|
|
146
|
+
# @param string value Value to be deserialized
|
|
147
|
+
# @return [Object] Deserialized data
|
|
148
|
+
def _deserialize(type, value)
|
|
149
|
+
case type.to_sym
|
|
150
|
+
when :DateTime
|
|
151
|
+
DateTime.parse(value)
|
|
152
|
+
when :Date
|
|
153
|
+
Date.parse(value)
|
|
154
|
+
when :String
|
|
155
|
+
value.to_s
|
|
156
|
+
when :Integer
|
|
157
|
+
value.to_i
|
|
158
|
+
when :Float
|
|
159
|
+
value.to_f
|
|
160
|
+
when :Boolean
|
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
162
|
+
true
|
|
163
|
+
else
|
|
164
|
+
false
|
|
165
|
+
end
|
|
166
|
+
when :Object
|
|
167
|
+
# generic object (usually a Hash), return directly
|
|
168
|
+
value
|
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
|
175
|
+
{}.tap do |hash|
|
|
176
|
+
value.each do |k, v|
|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
else # model
|
|
181
|
+
BleumiPay.const_get(type).build_from_hash(value)
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Returns the string representation of the object
|
|
186
|
+
# @return [String] String presentation of the object
|
|
187
|
+
def to_s
|
|
188
|
+
to_hash.to_s
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
|
193
|
+
def to_body
|
|
194
|
+
to_hash
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Returns the object in the form of hash
|
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
|
199
|
+
def to_hash
|
|
200
|
+
hash = {}
|
|
201
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
202
|
+
value = self.send(attr)
|
|
203
|
+
if value.nil?
|
|
204
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
205
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
hash[param] = _to_hash(value)
|
|
209
|
+
end
|
|
210
|
+
hash
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Outputs non-array value in the form of hash
|
|
214
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
215
|
+
# @param [Object] value Any valid value
|
|
216
|
+
# @return [Hash] Returns the value in the form of hash
|
|
217
|
+
def _to_hash(value)
|
|
218
|
+
if value.is_a?(Array)
|
|
219
|
+
value.compact.map { |v| _to_hash(v) }
|
|
220
|
+
elsif value.is_a?(Hash)
|
|
221
|
+
{}.tap do |hash|
|
|
222
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
223
|
+
end
|
|
224
|
+
elsif value.respond_to? :to_hash
|
|
225
|
+
value.to_hash
|
|
226
|
+
else
|
|
227
|
+
value
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|