devdraft 1.0.2 → 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 +155 -253
- 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 -129
- 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 CreateLiquidationAddressDto
|
|
16
|
+
module Devdraft
|
|
17
|
+
class CreateLiquidationAddressDto < ApiModelBase
|
|
16
18
|
# The blockchain chain for the liquidation address
|
|
17
19
|
attr_accessor :chain
|
|
18
20
|
|
|
@@ -101,24 +103,34 @@ module DevDraftAI
|
|
|
101
103
|
}
|
|
102
104
|
end
|
|
103
105
|
|
|
106
|
+
# Returns attribute mapping this model knows about
|
|
107
|
+
def self.acceptable_attribute_map
|
|
108
|
+
attribute_map
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Returns all the JSON keys this model knows about
|
|
112
|
+
def self.acceptable_attributes
|
|
113
|
+
acceptable_attribute_map.values
|
|
114
|
+
end
|
|
115
|
+
|
|
104
116
|
# Attribute type mapping.
|
|
105
117
|
def self.openapi_types
|
|
106
118
|
{
|
|
107
|
-
:'chain' => :'
|
|
108
|
-
:'currency' => :'
|
|
109
|
-
:'address' => :'
|
|
110
|
-
:'external_account_id' => :'
|
|
111
|
-
:'prefunded_account_id' => :'
|
|
112
|
-
:'bridge_wallet_id' => :'
|
|
113
|
-
:'destination_payment_rail' => :'
|
|
114
|
-
:'destination_currency' => :'
|
|
115
|
-
:'destination_wire_message' => :'
|
|
116
|
-
:'destination_sepa_reference' => :'
|
|
117
|
-
:'destination_ach_reference' => :'
|
|
118
|
-
:'destination_address' => :'
|
|
119
|
-
:'destination_blockchain_memo' => :'
|
|
120
|
-
:'return_address' => :'
|
|
121
|
-
:'custom_developer_fee_percent' => :'
|
|
119
|
+
:'chain' => :'String',
|
|
120
|
+
:'currency' => :'String',
|
|
121
|
+
:'address' => :'String',
|
|
122
|
+
:'external_account_id' => :'String',
|
|
123
|
+
:'prefunded_account_id' => :'String',
|
|
124
|
+
:'bridge_wallet_id' => :'String',
|
|
125
|
+
:'destination_payment_rail' => :'BridgePaymentRail',
|
|
126
|
+
:'destination_currency' => :'DestinationCurrency',
|
|
127
|
+
:'destination_wire_message' => :'String',
|
|
128
|
+
:'destination_sepa_reference' => :'String',
|
|
129
|
+
:'destination_ach_reference' => :'String',
|
|
130
|
+
:'destination_address' => :'String',
|
|
131
|
+
:'destination_blockchain_memo' => :'String',
|
|
132
|
+
:'return_address' => :'String',
|
|
133
|
+
:'custom_developer_fee_percent' => :'String'
|
|
122
134
|
}
|
|
123
135
|
end
|
|
124
136
|
|
|
@@ -127,32 +139,39 @@ module DevDraftAI
|
|
|
127
139
|
Set.new([
|
|
128
140
|
])
|
|
129
141
|
end
|
|
130
|
-
|
|
142
|
+
|
|
131
143
|
# Initializes the object
|
|
132
144
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
133
145
|
def initialize(attributes = {})
|
|
134
146
|
if (!attributes.is_a?(Hash))
|
|
135
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
|
147
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::CreateLiquidationAddressDto` initialize method"
|
|
136
148
|
end
|
|
137
149
|
|
|
138
150
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
151
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
139
152
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
140
|
-
if (!
|
|
141
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
|
153
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
154
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Devdraft::CreateLiquidationAddressDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
142
155
|
end
|
|
143
156
|
h[k.to_sym] = v
|
|
144
157
|
}
|
|
145
158
|
|
|
146
159
|
if attributes.key?(:'chain')
|
|
147
160
|
self.chain = attributes[:'chain']
|
|
161
|
+
else
|
|
162
|
+
self.chain = nil
|
|
148
163
|
end
|
|
149
164
|
|
|
150
165
|
if attributes.key?(:'currency')
|
|
151
166
|
self.currency = attributes[:'currency']
|
|
167
|
+
else
|
|
168
|
+
self.currency = nil
|
|
152
169
|
end
|
|
153
170
|
|
|
154
171
|
if attributes.key?(:'address')
|
|
155
172
|
self.address = attributes[:'address']
|
|
173
|
+
else
|
|
174
|
+
self.address = nil
|
|
156
175
|
end
|
|
157
176
|
|
|
158
177
|
if attributes.key?(:'external_account_id')
|
|
@@ -207,6 +226,7 @@ module DevDraftAI
|
|
|
207
226
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
208
227
|
# @return Array for valid properties with the reasons
|
|
209
228
|
def list_invalid_properties
|
|
229
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
210
230
|
invalid_properties = Array.new
|
|
211
231
|
if @chain.nil?
|
|
212
232
|
invalid_properties.push('invalid value for "chain", chain cannot be nil.')
|
|
@@ -220,26 +240,62 @@ module DevDraftAI
|
|
|
220
240
|
invalid_properties.push('invalid value for "address", address cannot be nil.')
|
|
221
241
|
end
|
|
222
242
|
|
|
243
|
+
if !@external_account_id.nil? && @external_account_id.to_s.length > 42
|
|
244
|
+
invalid_properties.push('invalid value for "external_account_id", the character length must be smaller than or equal to 42.')
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if !@prefunded_account_id.nil? && @prefunded_account_id.to_s.length > 42
|
|
248
|
+
invalid_properties.push('invalid value for "prefunded_account_id", the character length must be smaller than or equal to 42.')
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
if !@bridge_wallet_id.nil? && @bridge_wallet_id.to_s.length > 42
|
|
252
|
+
invalid_properties.push('invalid value for "bridge_wallet_id", the character length must be smaller than or equal to 42.')
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if !@destination_wire_message.nil? && @destination_wire_message.to_s.length > 256
|
|
256
|
+
invalid_properties.push('invalid value for "destination_wire_message", the character length must be smaller than or equal to 256.')
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if !@destination_sepa_reference.nil? && @destination_sepa_reference.to_s.length > 140
|
|
260
|
+
invalid_properties.push('invalid value for "destination_sepa_reference", the character length must be smaller than or equal to 140.')
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
if !@destination_sepa_reference.nil? && @destination_sepa_reference.to_s.length < 6
|
|
264
|
+
invalid_properties.push('invalid value for "destination_sepa_reference", the character length must be greater than or equal to 6.')
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if !@destination_ach_reference.nil? && @destination_ach_reference.to_s.length > 10
|
|
268
|
+
invalid_properties.push('invalid value for "destination_ach_reference", the character length must be smaller than or equal to 10.')
|
|
269
|
+
end
|
|
270
|
+
|
|
223
271
|
invalid_properties
|
|
224
272
|
end
|
|
225
273
|
|
|
226
274
|
# Check to see if the all the properties in the model are valid
|
|
227
275
|
# @return true if the model is valid
|
|
228
276
|
def valid?
|
|
277
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
229
278
|
return false if @chain.nil?
|
|
230
|
-
chain_validator = EnumAttributeValidator.new('
|
|
279
|
+
chain_validator = EnumAttributeValidator.new('String', ["ethereum", "solana", "polygon", "avalanche_c_chain", "base", "arbitrum", "optimism", "stellar", "tron"])
|
|
231
280
|
return false unless chain_validator.valid?(@chain)
|
|
232
281
|
return false if @currency.nil?
|
|
233
|
-
currency_validator = EnumAttributeValidator.new('
|
|
282
|
+
currency_validator = EnumAttributeValidator.new('String', ["usdc", "eurc", "dai", "pyusd", "usdt"])
|
|
234
283
|
return false unless currency_validator.valid?(@currency)
|
|
235
284
|
return false if @address.nil?
|
|
285
|
+
return false if !@external_account_id.nil? && @external_account_id.to_s.length > 42
|
|
286
|
+
return false if !@prefunded_account_id.nil? && @prefunded_account_id.to_s.length > 42
|
|
287
|
+
return false if !@bridge_wallet_id.nil? && @bridge_wallet_id.to_s.length > 42
|
|
288
|
+
return false if !@destination_wire_message.nil? && @destination_wire_message.to_s.length > 256
|
|
289
|
+
return false if !@destination_sepa_reference.nil? && @destination_sepa_reference.to_s.length > 140
|
|
290
|
+
return false if !@destination_sepa_reference.nil? && @destination_sepa_reference.to_s.length < 6
|
|
291
|
+
return false if !@destination_ach_reference.nil? && @destination_ach_reference.to_s.length > 10
|
|
236
292
|
true
|
|
237
293
|
end
|
|
238
294
|
|
|
239
295
|
# Custom attribute writer method checking allowed values (enum).
|
|
240
296
|
# @param [Object] chain Object to be assigned
|
|
241
297
|
def chain=(chain)
|
|
242
|
-
validator = EnumAttributeValidator.new('
|
|
298
|
+
validator = EnumAttributeValidator.new('String', ["ethereum", "solana", "polygon", "avalanche_c_chain", "base", "arbitrum", "optimism", "stellar", "tron"])
|
|
243
299
|
unless validator.valid?(chain)
|
|
244
300
|
fail ArgumentError, "invalid value for \"chain\", must be one of #{validator.allowable_values}."
|
|
245
301
|
end
|
|
@@ -249,13 +305,111 @@ module DevDraftAI
|
|
|
249
305
|
# Custom attribute writer method checking allowed values (enum).
|
|
250
306
|
# @param [Object] currency Object to be assigned
|
|
251
307
|
def currency=(currency)
|
|
252
|
-
validator = EnumAttributeValidator.new('
|
|
308
|
+
validator = EnumAttributeValidator.new('String', ["usdc", "eurc", "dai", "pyusd", "usdt"])
|
|
253
309
|
unless validator.valid?(currency)
|
|
254
310
|
fail ArgumentError, "invalid value for \"currency\", must be one of #{validator.allowable_values}."
|
|
255
311
|
end
|
|
256
312
|
@currency = currency
|
|
257
313
|
end
|
|
258
314
|
|
|
315
|
+
# Custom attribute writer method with validation
|
|
316
|
+
# @param [Object] address Value to be assigned
|
|
317
|
+
def address=(address)
|
|
318
|
+
if address.nil?
|
|
319
|
+
fail ArgumentError, 'address cannot be nil'
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
@address = address
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# Custom attribute writer method with validation
|
|
326
|
+
# @param [Object] external_account_id Value to be assigned
|
|
327
|
+
def external_account_id=(external_account_id)
|
|
328
|
+
if external_account_id.nil?
|
|
329
|
+
fail ArgumentError, 'external_account_id cannot be nil'
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
if external_account_id.to_s.length > 42
|
|
333
|
+
fail ArgumentError, 'invalid value for "external_account_id", the character length must be smaller than or equal to 42.'
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
@external_account_id = external_account_id
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# Custom attribute writer method with validation
|
|
340
|
+
# @param [Object] prefunded_account_id Value to be assigned
|
|
341
|
+
def prefunded_account_id=(prefunded_account_id)
|
|
342
|
+
if prefunded_account_id.nil?
|
|
343
|
+
fail ArgumentError, 'prefunded_account_id cannot be nil'
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
if prefunded_account_id.to_s.length > 42
|
|
347
|
+
fail ArgumentError, 'invalid value for "prefunded_account_id", the character length must be smaller than or equal to 42.'
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
@prefunded_account_id = prefunded_account_id
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# Custom attribute writer method with validation
|
|
354
|
+
# @param [Object] bridge_wallet_id Value to be assigned
|
|
355
|
+
def bridge_wallet_id=(bridge_wallet_id)
|
|
356
|
+
if bridge_wallet_id.nil?
|
|
357
|
+
fail ArgumentError, 'bridge_wallet_id cannot be nil'
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
if bridge_wallet_id.to_s.length > 42
|
|
361
|
+
fail ArgumentError, 'invalid value for "bridge_wallet_id", the character length must be smaller than or equal to 42.'
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
@bridge_wallet_id = bridge_wallet_id
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
# Custom attribute writer method with validation
|
|
368
|
+
# @param [Object] destination_wire_message Value to be assigned
|
|
369
|
+
def destination_wire_message=(destination_wire_message)
|
|
370
|
+
if destination_wire_message.nil?
|
|
371
|
+
fail ArgumentError, 'destination_wire_message cannot be nil'
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
if destination_wire_message.to_s.length > 256
|
|
375
|
+
fail ArgumentError, 'invalid value for "destination_wire_message", the character length must be smaller than or equal to 256.'
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
@destination_wire_message = destination_wire_message
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# Custom attribute writer method with validation
|
|
382
|
+
# @param [Object] destination_sepa_reference Value to be assigned
|
|
383
|
+
def destination_sepa_reference=(destination_sepa_reference)
|
|
384
|
+
if destination_sepa_reference.nil?
|
|
385
|
+
fail ArgumentError, 'destination_sepa_reference cannot be nil'
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
if destination_sepa_reference.to_s.length > 140
|
|
389
|
+
fail ArgumentError, 'invalid value for "destination_sepa_reference", the character length must be smaller than or equal to 140.'
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
if destination_sepa_reference.to_s.length < 6
|
|
393
|
+
fail ArgumentError, 'invalid value for "destination_sepa_reference", the character length must be greater than or equal to 6.'
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
@destination_sepa_reference = destination_sepa_reference
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
# Custom attribute writer method with validation
|
|
400
|
+
# @param [Object] destination_ach_reference Value to be assigned
|
|
401
|
+
def destination_ach_reference=(destination_ach_reference)
|
|
402
|
+
if destination_ach_reference.nil?
|
|
403
|
+
fail ArgumentError, 'destination_ach_reference cannot be nil'
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
if destination_ach_reference.to_s.length > 10
|
|
407
|
+
fail ArgumentError, 'invalid value for "destination_ach_reference", the character length must be smaller than or equal to 10.'
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
@destination_ach_reference = destination_ach_reference
|
|
411
|
+
end
|
|
412
|
+
|
|
259
413
|
# Checks equality by comparing each attribute.
|
|
260
414
|
# @param [Object] Object to be compared
|
|
261
415
|
def ==(o)
|
|
@@ -294,82 +448,23 @@ module DevDraftAI
|
|
|
294
448
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
295
449
|
# @return [Object] Returns the model itself
|
|
296
450
|
def self.build_from_hash(attributes)
|
|
297
|
-
new.build_from_hash(attributes)
|
|
298
|
-
end
|
|
299
|
-
|
|
300
|
-
# Builds the object from hash
|
|
301
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
302
|
-
# @return [Object] Returns the model itself
|
|
303
|
-
def build_from_hash(attributes)
|
|
304
451
|
return nil unless attributes.is_a?(Hash)
|
|
305
|
-
|
|
306
|
-
|
|
452
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
453
|
+
transformed_hash = {}
|
|
454
|
+
openapi_types.each_pair do |key, type|
|
|
455
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
456
|
+
transformed_hash["#{key}"] = nil
|
|
457
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
307
458
|
# check to ensure the input is an array given that the attribute
|
|
308
459
|
# is documented as an array but the input is not
|
|
309
|
-
if attributes[
|
|
310
|
-
|
|
460
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
461
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
311
462
|
end
|
|
312
|
-
elsif !attributes[
|
|
313
|
-
|
|
314
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
315
|
-
self.send("#{key}=", nil)
|
|
463
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
464
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
316
465
|
end
|
|
317
466
|
end
|
|
318
|
-
|
|
319
|
-
self
|
|
320
|
-
end
|
|
321
|
-
|
|
322
|
-
# Deserializes the data based on type
|
|
323
|
-
# @param string type Data type
|
|
324
|
-
# @param string value Value to be deserialized
|
|
325
|
-
# @return [Object] Deserialized data
|
|
326
|
-
def _deserialize(type, value)
|
|
327
|
-
case type.to_sym
|
|
328
|
-
when :DateTime
|
|
329
|
-
DateTime.parse(value)
|
|
330
|
-
when :Date
|
|
331
|
-
Date.parse(value)
|
|
332
|
-
when :String
|
|
333
|
-
value.to_s
|
|
334
|
-
when :Integer
|
|
335
|
-
value.to_i
|
|
336
|
-
when :Float
|
|
337
|
-
value.to_f
|
|
338
|
-
when :Boolean
|
|
339
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
340
|
-
true
|
|
341
|
-
else
|
|
342
|
-
false
|
|
343
|
-
end
|
|
344
|
-
when :Object
|
|
345
|
-
# generic object (usually a Hash), return directly
|
|
346
|
-
value
|
|
347
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
348
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
349
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
350
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
351
|
-
k_type = Regexp.last_match[:k_type]
|
|
352
|
-
v_type = Regexp.last_match[:v_type]
|
|
353
|
-
{}.tap do |hash|
|
|
354
|
-
value.each do |k, v|
|
|
355
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
356
|
-
end
|
|
357
|
-
end
|
|
358
|
-
else # model
|
|
359
|
-
DevDraftAI.const_get(type).build_from_hash(value)
|
|
360
|
-
end
|
|
361
|
-
end
|
|
362
|
-
|
|
363
|
-
# Returns the string representation of the object
|
|
364
|
-
# @return [String] String presentation of the object
|
|
365
|
-
def to_s
|
|
366
|
-
to_hash.to_s
|
|
367
|
-
end
|
|
368
|
-
|
|
369
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
370
|
-
# @return [Hash] Returns the object in the form of hash
|
|
371
|
-
def to_body
|
|
372
|
-
to_hash
|
|
467
|
+
new(transformed_hash)
|
|
373
468
|
end
|
|
374
469
|
|
|
375
470
|
# Returns the object in the form of hash
|
|
@@ -388,21 +483,6 @@ module DevDraftAI
|
|
|
388
483
|
hash
|
|
389
484
|
end
|
|
390
485
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
# @param [Object] value Any valid value
|
|
394
|
-
# @return [Hash] Returns the value in the form of hash
|
|
395
|
-
def _to_hash(value)
|
|
396
|
-
if value.is_a?(Array)
|
|
397
|
-
value.compact.map { |v| _to_hash(v) }
|
|
398
|
-
elsif value.is_a?(Hash)
|
|
399
|
-
{}.tap do |hash|
|
|
400
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
401
|
-
end
|
|
402
|
-
elsif value.respond_to? :to_hash
|
|
403
|
-
value.to_hash
|
|
404
|
-
else
|
|
405
|
-
value
|
|
406
|
-
end
|
|
407
|
-
end end
|
|
486
|
+
end
|
|
487
|
+
|
|
408
488
|
end
|