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 InvoiceProductDto
|
|
16
|
+
module Devdraft
|
|
17
|
+
class InvoiceProductDto < ApiModelBase
|
|
16
18
|
# Product ID
|
|
17
19
|
attr_accessor :product_id
|
|
18
20
|
|
|
@@ -27,11 +29,21 @@ module DevDraftAI
|
|
|
27
29
|
}
|
|
28
30
|
end
|
|
29
31
|
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
30
42
|
# Attribute type mapping.
|
|
31
43
|
def self.openapi_types
|
|
32
44
|
{
|
|
33
|
-
:'product_id' => :'
|
|
34
|
-
:'quantity' => :'
|
|
45
|
+
:'product_id' => :'String',
|
|
46
|
+
:'quantity' => :'Float'
|
|
35
47
|
}
|
|
36
48
|
end
|
|
37
49
|
|
|
@@ -40,34 +52,40 @@ module DevDraftAI
|
|
|
40
52
|
Set.new([
|
|
41
53
|
])
|
|
42
54
|
end
|
|
43
|
-
|
|
55
|
+
|
|
44
56
|
# Initializes the object
|
|
45
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
46
58
|
def initialize(attributes = {})
|
|
47
59
|
if (!attributes.is_a?(Hash))
|
|
48
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::InvoiceProductDto` initialize method"
|
|
49
61
|
end
|
|
50
62
|
|
|
51
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
52
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
53
|
-
if (!
|
|
54
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Devdraft::InvoiceProductDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
55
68
|
end
|
|
56
69
|
h[k.to_sym] = v
|
|
57
70
|
}
|
|
58
71
|
|
|
59
72
|
if attributes.key?(:'product_id')
|
|
60
73
|
self.product_id = attributes[:'product_id']
|
|
74
|
+
else
|
|
75
|
+
self.product_id = nil
|
|
61
76
|
end
|
|
62
77
|
|
|
63
78
|
if attributes.key?(:'quantity')
|
|
64
79
|
self.quantity = attributes[:'quantity']
|
|
80
|
+
else
|
|
81
|
+
self.quantity = nil
|
|
65
82
|
end
|
|
66
83
|
end
|
|
67
84
|
|
|
68
85
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
69
86
|
# @return Array for valid properties with the reasons
|
|
70
87
|
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
71
89
|
invalid_properties = Array.new
|
|
72
90
|
if @product_id.nil?
|
|
73
91
|
invalid_properties.push('invalid value for "product_id", product_id cannot be nil.')
|
|
@@ -83,11 +101,32 @@ module DevDraftAI
|
|
|
83
101
|
# Check to see if the all the properties in the model are valid
|
|
84
102
|
# @return true if the model is valid
|
|
85
103
|
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
86
105
|
return false if @product_id.nil?
|
|
87
106
|
return false if @quantity.nil?
|
|
88
107
|
true
|
|
89
108
|
end
|
|
90
109
|
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] product_id Value to be assigned
|
|
112
|
+
def product_id=(product_id)
|
|
113
|
+
if product_id.nil?
|
|
114
|
+
fail ArgumentError, 'product_id cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@product_id = product_id
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] quantity Value to be assigned
|
|
122
|
+
def quantity=(quantity)
|
|
123
|
+
if quantity.nil?
|
|
124
|
+
fail ArgumentError, 'quantity cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@quantity = quantity
|
|
128
|
+
end
|
|
129
|
+
|
|
91
130
|
# Checks equality by comparing each attribute.
|
|
92
131
|
# @param [Object] Object to be compared
|
|
93
132
|
def ==(o)
|
|
@@ -113,82 +152,23 @@ module DevDraftAI
|
|
|
113
152
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
114
153
|
# @return [Object] Returns the model itself
|
|
115
154
|
def self.build_from_hash(attributes)
|
|
116
|
-
new.build_from_hash(attributes)
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
# Builds the object from hash
|
|
120
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
-
# @return [Object] Returns the model itself
|
|
122
|
-
def build_from_hash(attributes)
|
|
123
155
|
return nil unless attributes.is_a?(Hash)
|
|
124
|
-
|
|
125
|
-
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
162
|
# check to ensure the input is an array given that the attribute
|
|
127
163
|
# is documented as an array but the input is not
|
|
128
|
-
if attributes[
|
|
129
|
-
|
|
130
|
-
end
|
|
131
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
132
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
133
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
134
|
-
self.send("#{key}=", nil)
|
|
135
|
-
end
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
self
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
# Deserializes the data based on type
|
|
142
|
-
# @param string type Data type
|
|
143
|
-
# @param string value Value to be deserialized
|
|
144
|
-
# @return [Object] Deserialized data
|
|
145
|
-
def _deserialize(type, value)
|
|
146
|
-
case type.to_sym
|
|
147
|
-
when :DateTime
|
|
148
|
-
DateTime.parse(value)
|
|
149
|
-
when :Date
|
|
150
|
-
Date.parse(value)
|
|
151
|
-
when :String
|
|
152
|
-
value.to_s
|
|
153
|
-
when :Integer
|
|
154
|
-
value.to_i
|
|
155
|
-
when :Float
|
|
156
|
-
value.to_f
|
|
157
|
-
when :Boolean
|
|
158
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
159
|
-
true
|
|
160
|
-
else
|
|
161
|
-
false
|
|
162
|
-
end
|
|
163
|
-
when :Object
|
|
164
|
-
# generic object (usually a Hash), return directly
|
|
165
|
-
value
|
|
166
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
167
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
168
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
169
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
170
|
-
k_type = Regexp.last_match[:k_type]
|
|
171
|
-
v_type = Regexp.last_match[:v_type]
|
|
172
|
-
{}.tap do |hash|
|
|
173
|
-
value.each do |k, v|
|
|
174
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
175
166
|
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
176
169
|
end
|
|
177
|
-
else # model
|
|
178
|
-
DevDraftAI.const_get(type).build_from_hash(value)
|
|
179
170
|
end
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
# Returns the string representation of the object
|
|
183
|
-
# @return [String] String presentation of the object
|
|
184
|
-
def to_s
|
|
185
|
-
to_hash.to_s
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
189
|
-
# @return [Hash] Returns the object in the form of hash
|
|
190
|
-
def to_body
|
|
191
|
-
to_hash
|
|
171
|
+
new(transformed_hash)
|
|
192
172
|
end
|
|
193
173
|
|
|
194
174
|
# Returns the object in the form of hash
|
|
@@ -207,21 +187,6 @@ module DevDraftAI
|
|
|
207
187
|
hash
|
|
208
188
|
end
|
|
209
189
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
# @param [Object] value Any valid value
|
|
213
|
-
# @return [Hash] Returns the value in the form of hash
|
|
214
|
-
def _to_hash(value)
|
|
215
|
-
if value.is_a?(Array)
|
|
216
|
-
value.compact.map { |v| _to_hash(v) }
|
|
217
|
-
elsif value.is_a?(Hash)
|
|
218
|
-
{}.tap do |hash|
|
|
219
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
220
|
-
end
|
|
221
|
-
elsif value.respond_to? :to_hash
|
|
222
|
-
value.to_hash
|
|
223
|
-
else
|
|
224
|
-
value
|
|
225
|
-
end
|
|
226
|
-
end end
|
|
190
|
+
end
|
|
191
|
+
|
|
227
192
|
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 LiquidationAddressResponseDto
|
|
16
|
+
module Devdraft
|
|
17
|
+
class LiquidationAddressResponseDto < ApiModelBase
|
|
16
18
|
# Unique identifier for the liquidation address
|
|
17
19
|
attr_accessor :id
|
|
18
20
|
|
|
@@ -75,23 +77,33 @@ module DevDraftAI
|
|
|
75
77
|
}
|
|
76
78
|
end
|
|
77
79
|
|
|
80
|
+
# Returns attribute mapping this model knows about
|
|
81
|
+
def self.acceptable_attribute_map
|
|
82
|
+
attribute_map
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Returns all the JSON keys this model knows about
|
|
86
|
+
def self.acceptable_attributes
|
|
87
|
+
acceptable_attribute_map.values
|
|
88
|
+
end
|
|
89
|
+
|
|
78
90
|
# Attribute type mapping.
|
|
79
91
|
def self.openapi_types
|
|
80
92
|
{
|
|
81
|
-
:'id' => :'
|
|
82
|
-
:'state' => :'
|
|
83
|
-
:'customer_id' => :'
|
|
84
|
-
:'chain' => :'
|
|
85
|
-
:'currency' => :'
|
|
86
|
-
:'address' => :'
|
|
87
|
-
:'external_account_id' => :'
|
|
88
|
-
:'prefunded_account_id' => :'
|
|
89
|
-
:'bridge_wallet_id' => :'
|
|
90
|
-
:'destination_payment_rail' => :'
|
|
91
|
-
:'destination_currency' => :'
|
|
92
|
-
:'custom_developer_fee_percent' => :'
|
|
93
|
-
:'created_at' => :'
|
|
94
|
-
:'updated_at' => :'
|
|
93
|
+
:'id' => :'String',
|
|
94
|
+
:'state' => :'String',
|
|
95
|
+
:'customer_id' => :'String',
|
|
96
|
+
:'chain' => :'String',
|
|
97
|
+
:'currency' => :'String',
|
|
98
|
+
:'address' => :'String',
|
|
99
|
+
:'external_account_id' => :'String',
|
|
100
|
+
:'prefunded_account_id' => :'String',
|
|
101
|
+
:'bridge_wallet_id' => :'String',
|
|
102
|
+
:'destination_payment_rail' => :'String',
|
|
103
|
+
:'destination_currency' => :'String',
|
|
104
|
+
:'custom_developer_fee_percent' => :'String',
|
|
105
|
+
:'created_at' => :'String',
|
|
106
|
+
:'updated_at' => :'String'
|
|
95
107
|
}
|
|
96
108
|
end
|
|
97
109
|
|
|
@@ -100,44 +112,57 @@ module DevDraftAI
|
|
|
100
112
|
Set.new([
|
|
101
113
|
])
|
|
102
114
|
end
|
|
103
|
-
|
|
115
|
+
|
|
104
116
|
# Initializes the object
|
|
105
117
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
118
|
def initialize(attributes = {})
|
|
107
119
|
if (!attributes.is_a?(Hash))
|
|
108
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
|
120
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::LiquidationAddressResponseDto` initialize method"
|
|
109
121
|
end
|
|
110
122
|
|
|
111
123
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
124
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
112
125
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
113
|
-
if (!
|
|
114
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
|
126
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
127
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Devdraft::LiquidationAddressResponseDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
115
128
|
end
|
|
116
129
|
h[k.to_sym] = v
|
|
117
130
|
}
|
|
118
131
|
|
|
119
132
|
if attributes.key?(:'id')
|
|
120
133
|
self.id = attributes[:'id']
|
|
134
|
+
else
|
|
135
|
+
self.id = nil
|
|
121
136
|
end
|
|
122
137
|
|
|
123
138
|
if attributes.key?(:'state')
|
|
124
139
|
self.state = attributes[:'state']
|
|
140
|
+
else
|
|
141
|
+
self.state = nil
|
|
125
142
|
end
|
|
126
143
|
|
|
127
144
|
if attributes.key?(:'customer_id')
|
|
128
145
|
self.customer_id = attributes[:'customer_id']
|
|
146
|
+
else
|
|
147
|
+
self.customer_id = nil
|
|
129
148
|
end
|
|
130
149
|
|
|
131
150
|
if attributes.key?(:'chain')
|
|
132
151
|
self.chain = attributes[:'chain']
|
|
152
|
+
else
|
|
153
|
+
self.chain = nil
|
|
133
154
|
end
|
|
134
155
|
|
|
135
156
|
if attributes.key?(:'currency')
|
|
136
157
|
self.currency = attributes[:'currency']
|
|
158
|
+
else
|
|
159
|
+
self.currency = nil
|
|
137
160
|
end
|
|
138
161
|
|
|
139
162
|
if attributes.key?(:'address')
|
|
140
163
|
self.address = attributes[:'address']
|
|
164
|
+
else
|
|
165
|
+
self.address = nil
|
|
141
166
|
end
|
|
142
167
|
|
|
143
168
|
if attributes.key?(:'external_account_id')
|
|
@@ -166,16 +191,21 @@ module DevDraftAI
|
|
|
166
191
|
|
|
167
192
|
if attributes.key?(:'created_at')
|
|
168
193
|
self.created_at = attributes[:'created_at']
|
|
194
|
+
else
|
|
195
|
+
self.created_at = nil
|
|
169
196
|
end
|
|
170
197
|
|
|
171
198
|
if attributes.key?(:'updated_at')
|
|
172
199
|
self.updated_at = attributes[:'updated_at']
|
|
200
|
+
else
|
|
201
|
+
self.updated_at = nil
|
|
173
202
|
end
|
|
174
203
|
end
|
|
175
204
|
|
|
176
205
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
177
206
|
# @return Array for valid properties with the reasons
|
|
178
207
|
def list_invalid_properties
|
|
208
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
179
209
|
invalid_properties = Array.new
|
|
180
210
|
if @id.nil?
|
|
181
211
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
@@ -215,6 +245,7 @@ module DevDraftAI
|
|
|
215
245
|
# Check to see if the all the properties in the model are valid
|
|
216
246
|
# @return true if the model is valid
|
|
217
247
|
def valid?
|
|
248
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
218
249
|
return false if @id.nil?
|
|
219
250
|
return false if @state.nil?
|
|
220
251
|
return false if @customer_id.nil?
|
|
@@ -226,6 +257,86 @@ module DevDraftAI
|
|
|
226
257
|
true
|
|
227
258
|
end
|
|
228
259
|
|
|
260
|
+
# Custom attribute writer method with validation
|
|
261
|
+
# @param [Object] id Value to be assigned
|
|
262
|
+
def id=(id)
|
|
263
|
+
if id.nil?
|
|
264
|
+
fail ArgumentError, 'id cannot be nil'
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
@id = id
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Custom attribute writer method with validation
|
|
271
|
+
# @param [Object] state Value to be assigned
|
|
272
|
+
def state=(state)
|
|
273
|
+
if state.nil?
|
|
274
|
+
fail ArgumentError, 'state cannot be nil'
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
@state = state
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Custom attribute writer method with validation
|
|
281
|
+
# @param [Object] customer_id Value to be assigned
|
|
282
|
+
def customer_id=(customer_id)
|
|
283
|
+
if customer_id.nil?
|
|
284
|
+
fail ArgumentError, 'customer_id cannot be nil'
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
@customer_id = customer_id
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Custom attribute writer method with validation
|
|
291
|
+
# @param [Object] chain Value to be assigned
|
|
292
|
+
def chain=(chain)
|
|
293
|
+
if chain.nil?
|
|
294
|
+
fail ArgumentError, 'chain cannot be nil'
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
@chain = chain
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Custom attribute writer method with validation
|
|
301
|
+
# @param [Object] currency Value to be assigned
|
|
302
|
+
def currency=(currency)
|
|
303
|
+
if currency.nil?
|
|
304
|
+
fail ArgumentError, 'currency cannot be nil'
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
@currency = currency
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Custom attribute writer method with validation
|
|
311
|
+
# @param [Object] address Value to be assigned
|
|
312
|
+
def address=(address)
|
|
313
|
+
if address.nil?
|
|
314
|
+
fail ArgumentError, 'address cannot be nil'
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
@address = address
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# Custom attribute writer method with validation
|
|
321
|
+
# @param [Object] created_at Value to be assigned
|
|
322
|
+
def created_at=(created_at)
|
|
323
|
+
if created_at.nil?
|
|
324
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
@created_at = created_at
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Custom attribute writer method with validation
|
|
331
|
+
# @param [Object] updated_at Value to be assigned
|
|
332
|
+
def updated_at=(updated_at)
|
|
333
|
+
if updated_at.nil?
|
|
334
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
@updated_at = updated_at
|
|
338
|
+
end
|
|
339
|
+
|
|
229
340
|
# Checks equality by comparing each attribute.
|
|
230
341
|
# @param [Object] Object to be compared
|
|
231
342
|
def ==(o)
|
|
@@ -263,82 +374,23 @@ module DevDraftAI
|
|
|
263
374
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
264
375
|
# @return [Object] Returns the model itself
|
|
265
376
|
def self.build_from_hash(attributes)
|
|
266
|
-
new.build_from_hash(attributes)
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
# Builds the object from hash
|
|
270
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
271
|
-
# @return [Object] Returns the model itself
|
|
272
|
-
def build_from_hash(attributes)
|
|
273
377
|
return nil unless attributes.is_a?(Hash)
|
|
274
|
-
|
|
275
|
-
|
|
378
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
379
|
+
transformed_hash = {}
|
|
380
|
+
openapi_types.each_pair do |key, type|
|
|
381
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
382
|
+
transformed_hash["#{key}"] = nil
|
|
383
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
276
384
|
# check to ensure the input is an array given that the attribute
|
|
277
385
|
# is documented as an array but the input is not
|
|
278
|
-
if attributes[
|
|
279
|
-
|
|
386
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
387
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
280
388
|
end
|
|
281
|
-
elsif !attributes[
|
|
282
|
-
|
|
283
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
284
|
-
self.send("#{key}=", nil)
|
|
389
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
390
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
285
391
|
end
|
|
286
392
|
end
|
|
287
|
-
|
|
288
|
-
self
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
# Deserializes the data based on type
|
|
292
|
-
# @param string type Data type
|
|
293
|
-
# @param string value Value to be deserialized
|
|
294
|
-
# @return [Object] Deserialized data
|
|
295
|
-
def _deserialize(type, value)
|
|
296
|
-
case type.to_sym
|
|
297
|
-
when :DateTime
|
|
298
|
-
DateTime.parse(value)
|
|
299
|
-
when :Date
|
|
300
|
-
Date.parse(value)
|
|
301
|
-
when :String
|
|
302
|
-
value.to_s
|
|
303
|
-
when :Integer
|
|
304
|
-
value.to_i
|
|
305
|
-
when :Float
|
|
306
|
-
value.to_f
|
|
307
|
-
when :Boolean
|
|
308
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
309
|
-
true
|
|
310
|
-
else
|
|
311
|
-
false
|
|
312
|
-
end
|
|
313
|
-
when :Object
|
|
314
|
-
# generic object (usually a Hash), return directly
|
|
315
|
-
value
|
|
316
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
317
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
318
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
319
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
320
|
-
k_type = Regexp.last_match[:k_type]
|
|
321
|
-
v_type = Regexp.last_match[:v_type]
|
|
322
|
-
{}.tap do |hash|
|
|
323
|
-
value.each do |k, v|
|
|
324
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
325
|
-
end
|
|
326
|
-
end
|
|
327
|
-
else # model
|
|
328
|
-
DevDraftAI.const_get(type).build_from_hash(value)
|
|
329
|
-
end
|
|
330
|
-
end
|
|
331
|
-
|
|
332
|
-
# Returns the string representation of the object
|
|
333
|
-
# @return [String] String presentation of the object
|
|
334
|
-
def to_s
|
|
335
|
-
to_hash.to_s
|
|
336
|
-
end
|
|
337
|
-
|
|
338
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
339
|
-
# @return [Hash] Returns the object in the form of hash
|
|
340
|
-
def to_body
|
|
341
|
-
to_hash
|
|
393
|
+
new(transformed_hash)
|
|
342
394
|
end
|
|
343
395
|
|
|
344
396
|
# Returns the object in the form of hash
|
|
@@ -357,21 +409,6 @@ module DevDraftAI
|
|
|
357
409
|
hash
|
|
358
410
|
end
|
|
359
411
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
# @param [Object] value Any valid value
|
|
363
|
-
# @return [Hash] Returns the value in the form of hash
|
|
364
|
-
def _to_hash(value)
|
|
365
|
-
if value.is_a?(Array)
|
|
366
|
-
value.compact.map { |v| _to_hash(v) }
|
|
367
|
-
elsif value.is_a?(Hash)
|
|
368
|
-
{}.tap do |hash|
|
|
369
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
370
|
-
end
|
|
371
|
-
elsif value.respond_to? :to_hash
|
|
372
|
-
value.to_hash
|
|
373
|
-
else
|
|
374
|
-
value
|
|
375
|
-
end
|
|
376
|
-
end end
|
|
412
|
+
end
|
|
413
|
+
|
|
377
414
|
end
|