devdraft 1.0.1 → 1.0.3
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/README.md +160 -191
- data/Rakefile +2 -0
- data/devdraft-1.0.0.gem +0 -0
- data/{devdraft_ai_sdk.gemspec → devdraft.gemspec} +15 -11
- data/docs/APIHealthApi.md +82 -30
- data/docs/AggregatedBalanceResponse.md +19 -6
- data/docs/AllBalancesResponse.md +19 -6
- data/docs/AppBalancesApi.md +125 -65
- data/docs/BridgeFiatPaymentRail.md +15 -0
- data/docs/BridgePaymentRail.md +12 -3
- data/docs/CreateBankPaymentIntentDto.md +49 -21
- data/docs/CreateCustomerDto.md +25 -9
- data/docs/CreateDirectBankTransferDto.md +29 -11
- data/docs/CreateDirectWalletTransferDto.md +21 -7
- data/docs/CreateExternalBankTransferDto.md +40 -0
- data/docs/CreateExternalStablecoinTransferDto.md +28 -0
- data/docs/CreateInvoiceDto.md +45 -19
- data/docs/CreateLiquidationAddressDto.md +43 -18
- data/docs/CreatePaymentLinkDto.md +53 -28
- data/docs/CreateStablePaymentIntentDto.md +43 -18
- data/docs/CreateStablecoinConversionDto.md +23 -8
- data/docs/CreateTaxDto.md +26 -0
- data/docs/CreateWebhookDto.md +23 -8
- data/docs/CustomerStatus.md +12 -3
- data/docs/CustomerType.md +15 -0
- data/docs/CustomersApi.md +187 -114
- data/docs/DestinationCurrency.md +12 -3
- data/docs/ExchangeRateResponseDto.md +25 -9
- data/docs/ExchangeRatesApi.md +130 -72
- data/docs/FiatCurrency.md +12 -3
- data/docs/HealthResponseDto.md +25 -9
- data/docs/InvoiceProductDto.md +17 -5
- data/docs/InvoicesApi.md +177 -104
- data/docs/LiquidationAddressResponseDto.md +41 -17
- data/docs/LiquidationAddressesApi.md +115 -61
- data/docs/PaymentIntentsApi.md +93 -57
- data/docs/PaymentLinkProductDto.md +17 -5
- data/docs/PaymentLinksApi.md +175 -102
- data/docs/PaymentRequestDto.md +21 -7
- data/docs/PaymentResponseDto.md +23 -8
- data/docs/ProductsApi.md +307 -194
- data/docs/PublicHealthResponseDto.md +19 -6
- data/docs/RefundResponseDto.md +23 -8
- data/docs/StableCoinCurrency.md +12 -3
- data/docs/TaxControllerCreate201Response.md +30 -0
- data/docs/TaxControllerDeleteWithoutId400Response.md +22 -0
- data/docs/TaxControllerUpdateWithoutId400Response.md +22 -0
- data/docs/TaxesApi.md +374 -122
- data/docs/TestPaymentsApi.md +150 -60
- data/docs/TransfersApi.md +274 -72
- data/docs/UpdateCustomerDto.md +25 -9
- data/docs/UpdateTaxDto.md +26 -0
- data/docs/UpdateWebhookDto.md +23 -8
- data/docs/WalletsApi.md +44 -24
- data/docs/WebhookResponseDto.md +29 -11
- data/docs/WebhooksApi.md +225 -134
- data/git_push.sh +41 -28
- data/lib/devdraft/api/api_health_api.rb +32 -16
- data/lib/devdraft/api/app_balances_api.rb +45 -22
- data/lib/devdraft/api/customers_api.rb +124 -71
- data/lib/devdraft/api/exchange_rates_api.rb +49 -26
- data/lib/devdraft/api/invoices_api.rb +89 -53
- data/lib/devdraft/api/liquidation_addresses_api.rb +70 -44
- data/lib/devdraft/api/payment_intents_api.rb +62 -40
- data/lib/devdraft/api/payment_links_api.rb +85 -49
- data/lib/devdraft/api/products_api.rb +214 -216
- data/lib/devdraft/api/taxes_api.rb +257 -66
- data/lib/devdraft/api/test_payments_api.rb +70 -44
- data/lib/devdraft/api/transfers_api.rb +206 -46
- data/lib/devdraft/api/wallets_api.rb +18 -9
- data/lib/devdraft/api/webhooks_api.rb +109 -66
- data/lib/devdraft/api_client.rb +76 -71
- data/lib/devdraft/api_error.rb +5 -4
- data/lib/devdraft/api_model_base.rb +88 -0
- data/lib/devdraft/configuration.rb +121 -18
- data/lib/devdraft/models/aggregated_balance_response.rb +68 -101
- data/lib/devdraft/models/all_balances_response.rb +76 -99
- data/lib/devdraft/models/bridge_fiat_payment_rail.rb +45 -0
- data/lib/devdraft/models/bridge_payment_rail.rb +36 -24
- data/lib/devdraft/models/create_bank_payment_intent_dto.rb +191 -114
- data/lib/devdraft/models/create_customer_dto.rb +123 -113
- data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +105 -104
- data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +89 -100
- data/lib/devdraft/models/create_external_bank_transfer_dto.rb +505 -0
- data/lib/devdraft/models/create_external_stablecoin_transfer_dto.rb +266 -0
- data/lib/devdraft/models/create_invoice_dto.rb +151 -121
- data/lib/devdraft/models/create_liquidation_address_dto.rb +195 -115
- data/lib/devdraft/models/create_payment_link_dto.rb +192 -214
- data/lib/devdraft/models/create_stable_payment_intent_dto.rb +324 -111
- data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +102 -101
- data/lib/devdraft/models/create_tax_dto.rb +281 -0
- data/lib/devdraft/models/create_webhook_dto.rb +104 -101
- data/lib/devdraft/models/customer_status.rb +23 -10
- data/lib/devdraft/models/customer_type.rb +45 -0
- data/lib/devdraft/models/destination_currency.rb +27 -15
- data/lib/devdraft/models/exchange_rate_response_dto.rb +103 -102
- data/lib/devdraft/models/fiat_currency.rb +22 -10
- data/lib/devdraft/models/health_response_dto.rb +99 -106
- data/lib/devdraft/models/invoice_product_dto.rb +63 -98
- data/lib/devdraft/models/liquidation_address_response_dto.rb +147 -110
- data/lib/devdraft/models/payment_link_product_dto.rb +70 -98
- data/lib/devdraft/models/payment_request_dto.rb +77 -100
- data/lib/devdraft/models/payment_response_dto.rb +102 -101
- data/lib/devdraft/models/public_health_response_dto.rb +68 -101
- data/lib/devdraft/models/refund_response_dto.rb +102 -101
- data/lib/devdraft/models/stable_coin_currency.rb +21 -9
- data/lib/devdraft/models/tax_controller_create201_response.rb +201 -0
- data/lib/devdraft/models/tax_controller_delete_without_id400_response.rb +165 -0
- data/lib/devdraft/models/tax_controller_update_without_id400_response.rb +165 -0
- data/lib/devdraft/models/update_customer_dto.rb +117 -113
- data/lib/devdraft/models/update_tax_dto.rb +256 -0
- data/lib/devdraft/models/update_webhook_dto.rb +70 -101
- data/lib/devdraft/models/webhook_response_dto.rb +140 -103
- data/lib/devdraft/version.rb +6 -5
- data/lib/devdraft.rb +18 -27
- data/spec/api/api_health_api_spec.rb +10 -9
- data/spec/api/app_balances_api_spec.rb +11 -10
- data/spec/api/customers_api_spec.rb +25 -24
- data/spec/api/exchange_rates_api_spec.rb +11 -10
- data/spec/api/invoices_api_spec.rb +16 -15
- data/spec/api/liquidation_addresses_api_spec.rb +13 -12
- data/spec/api/payment_intents_api_spec.rb +12 -11
- data/spec/api/payment_links_api_spec.rb +14 -13
- data/spec/api/products_api_spec.rb +41 -40
- data/spec/api/taxes_api_spec.rb +51 -21
- data/spec/api/test_payments_api_spec.rb +14 -13
- data/spec/api/transfers_api_spec.rb +36 -13
- data/spec/api/wallets_api_spec.rb +9 -8
- data/spec/api/webhooks_api_spec.rb +20 -19
- data/spec/models/aggregated_balance_response_spec.rb +15 -19
- data/spec/models/all_balances_response_spec.rb +14 -18
- data/spec/models/bridge_fiat_payment_rail_spec.rb +30 -0
- data/spec/models/bridge_payment_rail_spec.rb +11 -15
- data/spec/models/create_bank_payment_intent_dto_spec.rb +29 -33
- data/spec/models/create_customer_dto_spec.rb +17 -25
- data/spec/models/create_direct_bank_transfer_dto_spec.rb +19 -23
- data/spec/models/create_direct_wallet_transfer_dto_spec.rb +15 -19
- data/spec/models/create_external_bank_transfer_dto_spec.rb +102 -0
- data/spec/models/create_external_stablecoin_transfer_dto_spec.rb +66 -0
- data/spec/models/create_invoice_dto_spec.rb +31 -35
- data/spec/models/create_liquidation_address_dto_spec.rb +28 -32
- data/spec/models/create_payment_link_dto_spec.rb +34 -76
- data/spec/models/create_stable_payment_intent_dto_spec.rb +26 -30
- data/spec/models/create_stablecoin_conversion_dto_spec.rb +16 -20
- data/spec/models/create_tax_dto_spec.rb +60 -0
- data/spec/models/create_webhook_dto_spec.rb +16 -20
- data/spec/models/customer_status_spec.rb +11 -15
- data/spec/models/customer_type_spec.rb +30 -0
- data/spec/models/destination_currency_spec.rb +11 -15
- data/spec/models/exchange_rate_response_dto_spec.rb +17 -21
- data/spec/models/fiat_currency_spec.rb +11 -15
- data/spec/models/health_response_dto_spec.rb +19 -23
- data/spec/models/invoice_product_dto_spec.rb +13 -17
- data/spec/models/liquidation_address_response_dto_spec.rb +25 -29
- data/spec/models/payment_link_product_dto_spec.rb +13 -17
- data/spec/models/payment_request_dto_spec.rb +15 -19
- data/spec/models/payment_response_dto_spec.rb +16 -20
- data/spec/models/public_health_response_dto_spec.rb +15 -19
- data/spec/models/refund_response_dto_spec.rb +16 -20
- data/spec/models/stable_coin_currency_spec.rb +11 -15
- data/spec/models/tax_controller_create201_response_spec.rb +72 -0
- data/spec/models/tax_controller_delete_without_id400_response_spec.rb +48 -0
- data/spec/models/tax_controller_update_without_id400_response_spec.rb +48 -0
- data/spec/models/update_customer_dto_spec.rb +17 -25
- data/spec/models/update_tax_dto_spec.rb +60 -0
- data/spec/models/update_webhook_dto_spec.rb +16 -20
- data/spec/models/webhook_response_dto_spec.rb +19 -23
- data/spec/spec_helper.rb +5 -4
- metadata +49 -116
- data/docs/AllOfAllBalancesResponseEurc.md +0 -9
- data/docs/AllOfAllBalancesResponseUsdc.md +0 -9
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +0 -6
- data/docs/AllOfCreateCustomerDtoStatus.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +0 -6
- data/docs/AllOfUpdateCustomerDtoStatus.md +0 -6
- data/docs/CreateProductDto.md +0 -18
- data/docs/CreateTaxInput.md +0 -6
- data/docs/UpdatePaymentLinkDto.md +0 -6
- data/docs/UpdatePreferenceInput.md +0 -6
- data/docs/UpdateProductDto.md +0 -18
- data/docs/UpdateTaxInput.md +0 -6
- data/example.rb +0 -94
- data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +0 -283
- data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +0 -283
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +0 -202
- data/lib/devdraft/models/all_of_update_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/create_product_dto.rb +0 -370
- data/lib/devdraft/models/create_tax_input.rb +0 -197
- data/lib/devdraft/models/update_payment_link_dto.rb +0 -197
- data/lib/devdraft/models/update_preference_input.rb +0 -197
- data/lib/devdraft/models/update_product_dto.rb +0 -355
- data/lib/devdraft/models/update_tax_input.rb +0 -197
- data/spec/api_client_spec.rb +0 -225
- data/spec/base_object_spec.rb +0 -109
- data/spec/configuration_spec.rb +0 -41
- data/spec/models/all_of_all_balances_response_eurc_spec.rb +0 -56
- data/spec/models/all_of_all_balances_response_usdc_spec.rb +0 -56
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_customer_dto_status_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +0 -34
- data/spec/models/all_of_update_customer_dto_status_spec.rb +0 -34
- data/spec/models/create_product_dto_spec.rb +0 -110
- data/spec/models/create_tax_input_spec.rb +0 -34
- data/spec/models/update_payment_link_dto_spec.rb +0 -34
- data/spec/models/update_preference_input_spec.rb +0 -34
- data/spec/models/update_product_dto_spec.rb +0 -110
- data/spec/models/update_tax_input_spec.rb +0 -34
|
@@ -3,16 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
# A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
7
10
|
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 3.0.65
|
|
10
11
|
=end
|
|
11
12
|
|
|
12
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
13
15
|
|
|
14
|
-
module
|
|
15
|
-
class CreateCustomerDto
|
|
16
|
+
module Devdraft
|
|
17
|
+
class CreateCustomerDto < ApiModelBase
|
|
16
18
|
# Customer's first name. Used for personalization and legal documentation.
|
|
17
19
|
attr_accessor :first_name
|
|
18
20
|
|
|
@@ -65,15 +67,25 @@ module DevDraftAI
|
|
|
65
67
|
}
|
|
66
68
|
end
|
|
67
69
|
|
|
70
|
+
# Returns attribute mapping this model knows about
|
|
71
|
+
def self.acceptable_attribute_map
|
|
72
|
+
attribute_map
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
|
76
|
+
def self.acceptable_attributes
|
|
77
|
+
acceptable_attribute_map.values
|
|
78
|
+
end
|
|
79
|
+
|
|
68
80
|
# Attribute type mapping.
|
|
69
81
|
def self.openapi_types
|
|
70
82
|
{
|
|
71
|
-
:'first_name' => :'
|
|
72
|
-
:'last_name' => :'
|
|
73
|
-
:'email' => :'
|
|
74
|
-
:'phone_number' => :'
|
|
75
|
-
:'customer_type' => :'
|
|
76
|
-
:'status' => :'
|
|
83
|
+
:'first_name' => :'String',
|
|
84
|
+
:'last_name' => :'String',
|
|
85
|
+
:'email' => :'String',
|
|
86
|
+
:'phone_number' => :'String',
|
|
87
|
+
:'customer_type' => :'CustomerType',
|
|
88
|
+
:'status' => :'CustomerStatus'
|
|
77
89
|
}
|
|
78
90
|
end
|
|
79
91
|
|
|
@@ -82,28 +94,33 @@ module DevDraftAI
|
|
|
82
94
|
Set.new([
|
|
83
95
|
])
|
|
84
96
|
end
|
|
85
|
-
|
|
97
|
+
|
|
86
98
|
# Initializes the object
|
|
87
99
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
88
100
|
def initialize(attributes = {})
|
|
89
101
|
if (!attributes.is_a?(Hash))
|
|
90
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
|
102
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::CreateCustomerDto` initialize method"
|
|
91
103
|
end
|
|
92
104
|
|
|
93
105
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
106
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
94
107
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
95
|
-
if (!
|
|
96
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
|
108
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
109
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Devdraft::CreateCustomerDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
97
110
|
end
|
|
98
111
|
h[k.to_sym] = v
|
|
99
112
|
}
|
|
100
113
|
|
|
101
114
|
if attributes.key?(:'first_name')
|
|
102
115
|
self.first_name = attributes[:'first_name']
|
|
116
|
+
else
|
|
117
|
+
self.first_name = nil
|
|
103
118
|
end
|
|
104
119
|
|
|
105
120
|
if attributes.key?(:'last_name')
|
|
106
121
|
self.last_name = attributes[:'last_name']
|
|
122
|
+
else
|
|
123
|
+
self.last_name = nil
|
|
107
124
|
end
|
|
108
125
|
|
|
109
126
|
if attributes.key?(:'email')
|
|
@@ -112,12 +129,12 @@ module DevDraftAI
|
|
|
112
129
|
|
|
113
130
|
if attributes.key?(:'phone_number')
|
|
114
131
|
self.phone_number = attributes[:'phone_number']
|
|
132
|
+
else
|
|
133
|
+
self.phone_number = nil
|
|
115
134
|
end
|
|
116
135
|
|
|
117
136
|
if attributes.key?(:'customer_type')
|
|
118
137
|
self.customer_type = attributes[:'customer_type']
|
|
119
|
-
else
|
|
120
|
-
self.customer_type = 'Individual'
|
|
121
138
|
end
|
|
122
139
|
|
|
123
140
|
if attributes.key?(:'status')
|
|
@@ -128,41 +145,108 @@ module DevDraftAI
|
|
|
128
145
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
129
146
|
# @return Array for valid properties with the reasons
|
|
130
147
|
def list_invalid_properties
|
|
148
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
131
149
|
invalid_properties = Array.new
|
|
132
150
|
if @first_name.nil?
|
|
133
151
|
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
|
134
152
|
end
|
|
135
153
|
|
|
154
|
+
if @first_name.to_s.length > 100
|
|
155
|
+
invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 100.')
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if @first_name.to_s.length < 1
|
|
159
|
+
invalid_properties.push('invalid value for "first_name", the character length must be greater than or equal to 1.')
|
|
160
|
+
end
|
|
161
|
+
|
|
136
162
|
if @last_name.nil?
|
|
137
163
|
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
|
138
164
|
end
|
|
139
165
|
|
|
166
|
+
if @last_name.to_s.length > 100
|
|
167
|
+
invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 100.')
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if @last_name.to_s.length < 1
|
|
171
|
+
invalid_properties.push('invalid value for "last_name", the character length must be greater than or equal to 1.')
|
|
172
|
+
end
|
|
173
|
+
|
|
140
174
|
if @phone_number.nil?
|
|
141
175
|
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
|
142
176
|
end
|
|
143
177
|
|
|
178
|
+
pattern = Regexp.new(/^[+]?[1-9]\d{1,14}$/)
|
|
179
|
+
if @phone_number !~ pattern
|
|
180
|
+
invalid_properties.push("invalid value for \"phone_number\", must conform to the pattern #{pattern}.")
|
|
181
|
+
end
|
|
182
|
+
|
|
144
183
|
invalid_properties
|
|
145
184
|
end
|
|
146
185
|
|
|
147
186
|
# Check to see if the all the properties in the model are valid
|
|
148
187
|
# @return true if the model is valid
|
|
149
188
|
def valid?
|
|
189
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
150
190
|
return false if @first_name.nil?
|
|
191
|
+
return false if @first_name.to_s.length > 100
|
|
192
|
+
return false if @first_name.to_s.length < 1
|
|
151
193
|
return false if @last_name.nil?
|
|
194
|
+
return false if @last_name.to_s.length > 100
|
|
195
|
+
return false if @last_name.to_s.length < 1
|
|
152
196
|
return false if @phone_number.nil?
|
|
153
|
-
|
|
154
|
-
return false unless customer_type_validator.valid?(@customer_type)
|
|
197
|
+
return false if @phone_number !~ Regexp.new(/^[+]?[1-9]\d{1,14}$/)
|
|
155
198
|
true
|
|
156
199
|
end
|
|
157
200
|
|
|
158
|
-
# Custom attribute writer method
|
|
159
|
-
# @param [Object]
|
|
160
|
-
def
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
201
|
+
# Custom attribute writer method with validation
|
|
202
|
+
# @param [Object] first_name Value to be assigned
|
|
203
|
+
def first_name=(first_name)
|
|
204
|
+
if first_name.nil?
|
|
205
|
+
fail ArgumentError, 'first_name cannot be nil'
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if first_name.to_s.length > 100
|
|
209
|
+
fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 100.'
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if first_name.to_s.length < 1
|
|
213
|
+
fail ArgumentError, 'invalid value for "first_name", the character length must be greater than or equal to 1.'
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
@first_name = first_name
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Custom attribute writer method with validation
|
|
220
|
+
# @param [Object] last_name Value to be assigned
|
|
221
|
+
def last_name=(last_name)
|
|
222
|
+
if last_name.nil?
|
|
223
|
+
fail ArgumentError, 'last_name cannot be nil'
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if last_name.to_s.length > 100
|
|
227
|
+
fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 100.'
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if last_name.to_s.length < 1
|
|
231
|
+
fail ArgumentError, 'invalid value for "last_name", the character length must be greater than or equal to 1.'
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
@last_name = last_name
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Custom attribute writer method with validation
|
|
238
|
+
# @param [Object] phone_number Value to be assigned
|
|
239
|
+
def phone_number=(phone_number)
|
|
240
|
+
if phone_number.nil?
|
|
241
|
+
fail ArgumentError, 'phone_number cannot be nil'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
pattern = Regexp.new(/^[+]?[1-9]\d{1,14}$/)
|
|
245
|
+
if phone_number !~ pattern
|
|
246
|
+
fail ArgumentError, "invalid value for \"phone_number\", must conform to the pattern #{pattern}."
|
|
164
247
|
end
|
|
165
|
-
|
|
248
|
+
|
|
249
|
+
@phone_number = phone_number
|
|
166
250
|
end
|
|
167
251
|
|
|
168
252
|
# Checks equality by comparing each attribute.
|
|
@@ -194,82 +278,23 @@ module DevDraftAI
|
|
|
194
278
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
195
279
|
# @return [Object] Returns the model itself
|
|
196
280
|
def self.build_from_hash(attributes)
|
|
197
|
-
new.build_from_hash(attributes)
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
# Builds the object from hash
|
|
201
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
202
|
-
# @return [Object] Returns the model itself
|
|
203
|
-
def build_from_hash(attributes)
|
|
204
281
|
return nil unless attributes.is_a?(Hash)
|
|
205
|
-
|
|
206
|
-
|
|
282
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
283
|
+
transformed_hash = {}
|
|
284
|
+
openapi_types.each_pair do |key, type|
|
|
285
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
286
|
+
transformed_hash["#{key}"] = nil
|
|
287
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
207
288
|
# check to ensure the input is an array given that the attribute
|
|
208
289
|
# is documented as an array but the input is not
|
|
209
|
-
if attributes[
|
|
210
|
-
|
|
211
|
-
end
|
|
212
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
213
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
214
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
215
|
-
self.send("#{key}=", nil)
|
|
216
|
-
end
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
self
|
|
220
|
-
end
|
|
221
|
-
|
|
222
|
-
# Deserializes the data based on type
|
|
223
|
-
# @param string type Data type
|
|
224
|
-
# @param string value Value to be deserialized
|
|
225
|
-
# @return [Object] Deserialized data
|
|
226
|
-
def _deserialize(type, value)
|
|
227
|
-
case type.to_sym
|
|
228
|
-
when :DateTime
|
|
229
|
-
DateTime.parse(value)
|
|
230
|
-
when :Date
|
|
231
|
-
Date.parse(value)
|
|
232
|
-
when :String
|
|
233
|
-
value.to_s
|
|
234
|
-
when :Integer
|
|
235
|
-
value.to_i
|
|
236
|
-
when :Float
|
|
237
|
-
value.to_f
|
|
238
|
-
when :Boolean
|
|
239
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
240
|
-
true
|
|
241
|
-
else
|
|
242
|
-
false
|
|
243
|
-
end
|
|
244
|
-
when :Object
|
|
245
|
-
# generic object (usually a Hash), return directly
|
|
246
|
-
value
|
|
247
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
248
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
249
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
250
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
251
|
-
k_type = Regexp.last_match[:k_type]
|
|
252
|
-
v_type = Regexp.last_match[:v_type]
|
|
253
|
-
{}.tap do |hash|
|
|
254
|
-
value.each do |k, v|
|
|
255
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
290
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
291
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
256
292
|
end
|
|
293
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
294
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
257
295
|
end
|
|
258
|
-
else # model
|
|
259
|
-
DevDraftAI.const_get(type).build_from_hash(value)
|
|
260
296
|
end
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
# Returns the string representation of the object
|
|
264
|
-
# @return [String] String presentation of the object
|
|
265
|
-
def to_s
|
|
266
|
-
to_hash.to_s
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
270
|
-
# @return [Hash] Returns the object in the form of hash
|
|
271
|
-
def to_body
|
|
272
|
-
to_hash
|
|
297
|
+
new(transformed_hash)
|
|
273
298
|
end
|
|
274
299
|
|
|
275
300
|
# Returns the object in the form of hash
|
|
@@ -288,21 +313,6 @@ module DevDraftAI
|
|
|
288
313
|
hash
|
|
289
314
|
end
|
|
290
315
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
# @param [Object] value Any valid value
|
|
294
|
-
# @return [Hash] Returns the value in the form of hash
|
|
295
|
-
def _to_hash(value)
|
|
296
|
-
if value.is_a?(Array)
|
|
297
|
-
value.compact.map { |v| _to_hash(v) }
|
|
298
|
-
elsif value.is_a?(Hash)
|
|
299
|
-
{}.tap do |hash|
|
|
300
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
301
|
-
end
|
|
302
|
-
elsif value.respond_to? :to_hash
|
|
303
|
-
value.to_hash
|
|
304
|
-
else
|
|
305
|
-
value
|
|
306
|
-
end
|
|
307
|
-
end end
|
|
316
|
+
end
|
|
317
|
+
|
|
308
318
|
end
|
|
@@ -3,16 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
# A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
7
10
|
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 3.0.65
|
|
10
11
|
=end
|
|
11
12
|
|
|
12
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
13
15
|
|
|
14
|
-
module
|
|
15
|
-
class CreateDirectBankTransferDto
|
|
16
|
+
module Devdraft
|
|
17
|
+
class CreateDirectBankTransferDto < ApiModelBase
|
|
16
18
|
# The ID of the bridge wallet to transfer from
|
|
17
19
|
attr_accessor :wallet_id
|
|
18
20
|
|
|
@@ -51,17 +53,27 @@ module DevDraftAI
|
|
|
51
53
|
}
|
|
52
54
|
end
|
|
53
55
|
|
|
56
|
+
# Returns attribute mapping this model knows about
|
|
57
|
+
def self.acceptable_attribute_map
|
|
58
|
+
attribute_map
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns all the JSON keys this model knows about
|
|
62
|
+
def self.acceptable_attributes
|
|
63
|
+
acceptable_attribute_map.values
|
|
64
|
+
end
|
|
65
|
+
|
|
54
66
|
# Attribute type mapping.
|
|
55
67
|
def self.openapi_types
|
|
56
68
|
{
|
|
57
|
-
:'wallet_id' => :'
|
|
58
|
-
:'payment_rail' => :'
|
|
59
|
-
:'destination_currency' => :'
|
|
60
|
-
:'source_currency' => :'
|
|
61
|
-
:'amount' => :'
|
|
62
|
-
:'wire_message' => :'
|
|
63
|
-
:'sepa_reference' => :'
|
|
64
|
-
:'ach_reference' => :'
|
|
69
|
+
:'wallet_id' => :'String',
|
|
70
|
+
:'payment_rail' => :'String',
|
|
71
|
+
:'destination_currency' => :'String',
|
|
72
|
+
:'source_currency' => :'String',
|
|
73
|
+
:'amount' => :'Float',
|
|
74
|
+
:'wire_message' => :'String',
|
|
75
|
+
:'sepa_reference' => :'String',
|
|
76
|
+
:'ach_reference' => :'String'
|
|
65
77
|
}
|
|
66
78
|
end
|
|
67
79
|
|
|
@@ -70,40 +82,51 @@ module DevDraftAI
|
|
|
70
82
|
Set.new([
|
|
71
83
|
])
|
|
72
84
|
end
|
|
73
|
-
|
|
85
|
+
|
|
74
86
|
# Initializes the object
|
|
75
87
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
76
88
|
def initialize(attributes = {})
|
|
77
89
|
if (!attributes.is_a?(Hash))
|
|
78
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::CreateDirectBankTransferDto` initialize method"
|
|
79
91
|
end
|
|
80
92
|
|
|
81
93
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
94
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
82
95
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
83
|
-
if (!
|
|
84
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
|
96
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Devdraft::CreateDirectBankTransferDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
85
98
|
end
|
|
86
99
|
h[k.to_sym] = v
|
|
87
100
|
}
|
|
88
101
|
|
|
89
102
|
if attributes.key?(:'wallet_id')
|
|
90
103
|
self.wallet_id = attributes[:'wallet_id']
|
|
104
|
+
else
|
|
105
|
+
self.wallet_id = nil
|
|
91
106
|
end
|
|
92
107
|
|
|
93
108
|
if attributes.key?(:'payment_rail')
|
|
94
109
|
self.payment_rail = attributes[:'payment_rail']
|
|
110
|
+
else
|
|
111
|
+
self.payment_rail = nil
|
|
95
112
|
end
|
|
96
113
|
|
|
97
114
|
if attributes.key?(:'destination_currency')
|
|
98
115
|
self.destination_currency = attributes[:'destination_currency']
|
|
116
|
+
else
|
|
117
|
+
self.destination_currency = nil
|
|
99
118
|
end
|
|
100
119
|
|
|
101
120
|
if attributes.key?(:'source_currency')
|
|
102
121
|
self.source_currency = attributes[:'source_currency']
|
|
122
|
+
else
|
|
123
|
+
self.source_currency = nil
|
|
103
124
|
end
|
|
104
125
|
|
|
105
126
|
if attributes.key?(:'amount')
|
|
106
127
|
self.amount = attributes[:'amount']
|
|
128
|
+
else
|
|
129
|
+
self.amount = nil
|
|
107
130
|
end
|
|
108
131
|
|
|
109
132
|
if attributes.key?(:'wire_message')
|
|
@@ -122,6 +145,7 @@ module DevDraftAI
|
|
|
122
145
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
123
146
|
# @return Array for valid properties with the reasons
|
|
124
147
|
def list_invalid_properties
|
|
148
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
125
149
|
invalid_properties = Array.new
|
|
126
150
|
if @wallet_id.nil?
|
|
127
151
|
invalid_properties.push('invalid value for "wallet_id", wallet_id cannot be nil.')
|
|
@@ -149,6 +173,7 @@ module DevDraftAI
|
|
|
149
173
|
# Check to see if the all the properties in the model are valid
|
|
150
174
|
# @return true if the model is valid
|
|
151
175
|
def valid?
|
|
176
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
152
177
|
return false if @wallet_id.nil?
|
|
153
178
|
return false if @payment_rail.nil?
|
|
154
179
|
return false if @destination_currency.nil?
|
|
@@ -157,6 +182,56 @@ module DevDraftAI
|
|
|
157
182
|
true
|
|
158
183
|
end
|
|
159
184
|
|
|
185
|
+
# Custom attribute writer method with validation
|
|
186
|
+
# @param [Object] wallet_id Value to be assigned
|
|
187
|
+
def wallet_id=(wallet_id)
|
|
188
|
+
if wallet_id.nil?
|
|
189
|
+
fail ArgumentError, 'wallet_id cannot be nil'
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
@wallet_id = wallet_id
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Custom attribute writer method with validation
|
|
196
|
+
# @param [Object] payment_rail Value to be assigned
|
|
197
|
+
def payment_rail=(payment_rail)
|
|
198
|
+
if payment_rail.nil?
|
|
199
|
+
fail ArgumentError, 'payment_rail cannot be nil'
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
@payment_rail = payment_rail
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Custom attribute writer method with validation
|
|
206
|
+
# @param [Object] destination_currency Value to be assigned
|
|
207
|
+
def destination_currency=(destination_currency)
|
|
208
|
+
if destination_currency.nil?
|
|
209
|
+
fail ArgumentError, 'destination_currency cannot be nil'
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
@destination_currency = destination_currency
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Custom attribute writer method with validation
|
|
216
|
+
# @param [Object] source_currency Value to be assigned
|
|
217
|
+
def source_currency=(source_currency)
|
|
218
|
+
if source_currency.nil?
|
|
219
|
+
fail ArgumentError, 'source_currency cannot be nil'
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
@source_currency = source_currency
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Custom attribute writer method with validation
|
|
226
|
+
# @param [Object] amount Value to be assigned
|
|
227
|
+
def amount=(amount)
|
|
228
|
+
if amount.nil?
|
|
229
|
+
fail ArgumentError, 'amount cannot be nil'
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
@amount = amount
|
|
233
|
+
end
|
|
234
|
+
|
|
160
235
|
# Checks equality by comparing each attribute.
|
|
161
236
|
# @param [Object] Object to be compared
|
|
162
237
|
def ==(o)
|
|
@@ -188,82 +263,23 @@ module DevDraftAI
|
|
|
188
263
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
189
264
|
# @return [Object] Returns the model itself
|
|
190
265
|
def self.build_from_hash(attributes)
|
|
191
|
-
new.build_from_hash(attributes)
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
# Builds the object from hash
|
|
195
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
196
|
-
# @return [Object] Returns the model itself
|
|
197
|
-
def build_from_hash(attributes)
|
|
198
266
|
return nil unless attributes.is_a?(Hash)
|
|
199
|
-
|
|
200
|
-
|
|
267
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
268
|
+
transformed_hash = {}
|
|
269
|
+
openapi_types.each_pair do |key, type|
|
|
270
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
271
|
+
transformed_hash["#{key}"] = nil
|
|
272
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
201
273
|
# check to ensure the input is an array given that the attribute
|
|
202
274
|
# is documented as an array but the input is not
|
|
203
|
-
if attributes[
|
|
204
|
-
|
|
205
|
-
end
|
|
206
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
207
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
208
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
209
|
-
self.send("#{key}=", nil)
|
|
210
|
-
end
|
|
211
|
-
end
|
|
212
|
-
|
|
213
|
-
self
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
# Deserializes the data based on type
|
|
217
|
-
# @param string type Data type
|
|
218
|
-
# @param string value Value to be deserialized
|
|
219
|
-
# @return [Object] Deserialized data
|
|
220
|
-
def _deserialize(type, value)
|
|
221
|
-
case type.to_sym
|
|
222
|
-
when :DateTime
|
|
223
|
-
DateTime.parse(value)
|
|
224
|
-
when :Date
|
|
225
|
-
Date.parse(value)
|
|
226
|
-
when :String
|
|
227
|
-
value.to_s
|
|
228
|
-
when :Integer
|
|
229
|
-
value.to_i
|
|
230
|
-
when :Float
|
|
231
|
-
value.to_f
|
|
232
|
-
when :Boolean
|
|
233
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
234
|
-
true
|
|
235
|
-
else
|
|
236
|
-
false
|
|
237
|
-
end
|
|
238
|
-
when :Object
|
|
239
|
-
# generic object (usually a Hash), return directly
|
|
240
|
-
value
|
|
241
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
242
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
243
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
244
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
245
|
-
k_type = Regexp.last_match[:k_type]
|
|
246
|
-
v_type = Regexp.last_match[:v_type]
|
|
247
|
-
{}.tap do |hash|
|
|
248
|
-
value.each do |k, v|
|
|
249
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
275
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
276
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
250
277
|
end
|
|
278
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
279
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
251
280
|
end
|
|
252
|
-
else # model
|
|
253
|
-
DevDraftAI.const_get(type).build_from_hash(value)
|
|
254
281
|
end
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
# Returns the string representation of the object
|
|
258
|
-
# @return [String] String presentation of the object
|
|
259
|
-
def to_s
|
|
260
|
-
to_hash.to_s
|
|
261
|
-
end
|
|
262
|
-
|
|
263
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
264
|
-
# @return [Hash] Returns the object in the form of hash
|
|
265
|
-
def to_body
|
|
266
|
-
to_hash
|
|
282
|
+
new(transformed_hash)
|
|
267
283
|
end
|
|
268
284
|
|
|
269
285
|
# Returns the object in the form of hash
|
|
@@ -282,21 +298,6 @@ module DevDraftAI
|
|
|
282
298
|
hash
|
|
283
299
|
end
|
|
284
300
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
# @param [Object] value Any valid value
|
|
288
|
-
# @return [Hash] Returns the value in the form of hash
|
|
289
|
-
def _to_hash(value)
|
|
290
|
-
if value.is_a?(Array)
|
|
291
|
-
value.compact.map { |v| _to_hash(v) }
|
|
292
|
-
elsif value.is_a?(Hash)
|
|
293
|
-
{}.tap do |hash|
|
|
294
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
295
|
-
end
|
|
296
|
-
elsif value.respond_to? :to_hash
|
|
297
|
-
value.to_hash
|
|
298
|
-
else
|
|
299
|
-
value
|
|
300
|
-
end
|
|
301
|
-
end end
|
|
301
|
+
end
|
|
302
|
+
|
|
302
303
|
end
|