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
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Devdraft AI Payment & Business Management API
|
|
3
|
+
|
|
4
|
+
# A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Devdraft
|
|
17
|
+
class UpdateTaxDto < ApiModelBase
|
|
18
|
+
# Tax name for identification and display purposes
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# Detailed description of what this tax covers
|
|
22
|
+
attr_accessor :description
|
|
23
|
+
|
|
24
|
+
# Tax rate as a percentage (0-100)
|
|
25
|
+
attr_accessor :percentage
|
|
26
|
+
|
|
27
|
+
# Whether this tax is currently active and can be applied
|
|
28
|
+
attr_accessor :active
|
|
29
|
+
|
|
30
|
+
# Array of app IDs where this tax should be available
|
|
31
|
+
attr_accessor :app_ids
|
|
32
|
+
|
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'name' => :'name',
|
|
37
|
+
:'description' => :'description',
|
|
38
|
+
:'percentage' => :'percentage',
|
|
39
|
+
:'active' => :'active',
|
|
40
|
+
:'app_ids' => :'appIds'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns all the JSON keys this model knows about
|
|
50
|
+
def self.acceptable_attributes
|
|
51
|
+
acceptable_attribute_map.values
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute type mapping.
|
|
55
|
+
def self.openapi_types
|
|
56
|
+
{
|
|
57
|
+
:'name' => :'String',
|
|
58
|
+
:'description' => :'String',
|
|
59
|
+
:'percentage' => :'Float',
|
|
60
|
+
:'active' => :'Boolean',
|
|
61
|
+
:'app_ids' => :'Array<String>'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# List of attributes with nullable: true
|
|
66
|
+
def self.openapi_nullable
|
|
67
|
+
Set.new([
|
|
68
|
+
])
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::UpdateTaxDto` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Devdraft::UpdateTaxDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
83
|
+
end
|
|
84
|
+
h[k.to_sym] = v
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'name')
|
|
88
|
+
self.name = attributes[:'name']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'description')
|
|
92
|
+
self.description = attributes[:'description']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'percentage')
|
|
96
|
+
self.percentage = attributes[:'percentage']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'active')
|
|
100
|
+
self.active = attributes[:'active']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'app_ids')
|
|
104
|
+
if (value = attributes[:'app_ids']).is_a?(Array)
|
|
105
|
+
self.app_ids = value
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
111
|
+
# @return Array for valid properties with the reasons
|
|
112
|
+
def list_invalid_properties
|
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
114
|
+
invalid_properties = Array.new
|
|
115
|
+
if !@name.nil? && @name.to_s.length > 100
|
|
116
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if !@description.nil? && @description.to_s.length > 255
|
|
120
|
+
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 255.')
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if !@percentage.nil? && @percentage > 100
|
|
124
|
+
invalid_properties.push('invalid value for "percentage", must be smaller than or equal to 100.')
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if !@percentage.nil? && @percentage < 0
|
|
128
|
+
invalid_properties.push('invalid value for "percentage", must be greater than or equal to 0.')
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
invalid_properties
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Check to see if the all the properties in the model are valid
|
|
135
|
+
# @return true if the model is valid
|
|
136
|
+
def valid?
|
|
137
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
138
|
+
return false if !@name.nil? && @name.to_s.length > 100
|
|
139
|
+
return false if !@description.nil? && @description.to_s.length > 255
|
|
140
|
+
return false if !@percentage.nil? && @percentage > 100
|
|
141
|
+
return false if !@percentage.nil? && @percentage < 0
|
|
142
|
+
true
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Custom attribute writer method with validation
|
|
146
|
+
# @param [Object] name Value to be assigned
|
|
147
|
+
def name=(name)
|
|
148
|
+
if name.nil?
|
|
149
|
+
fail ArgumentError, 'name cannot be nil'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if name.to_s.length > 100
|
|
153
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100.'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
@name = name
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Custom attribute writer method with validation
|
|
160
|
+
# @param [Object] description Value to be assigned
|
|
161
|
+
def description=(description)
|
|
162
|
+
if description.nil?
|
|
163
|
+
fail ArgumentError, 'description cannot be nil'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if description.to_s.length > 255
|
|
167
|
+
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 255.'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
@description = description
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] percentage Value to be assigned
|
|
175
|
+
def percentage=(percentage)
|
|
176
|
+
if percentage.nil?
|
|
177
|
+
fail ArgumentError, 'percentage cannot be nil'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if percentage > 100
|
|
181
|
+
fail ArgumentError, 'invalid value for "percentage", must be smaller than or equal to 100.'
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if percentage < 0
|
|
185
|
+
fail ArgumentError, 'invalid value for "percentage", must be greater than or equal to 0.'
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
@percentage = percentage
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Checks equality by comparing each attribute.
|
|
192
|
+
# @param [Object] Object to be compared
|
|
193
|
+
def ==(o)
|
|
194
|
+
return true if self.equal?(o)
|
|
195
|
+
self.class == o.class &&
|
|
196
|
+
name == o.name &&
|
|
197
|
+
description == o.description &&
|
|
198
|
+
percentage == o.percentage &&
|
|
199
|
+
active == o.active &&
|
|
200
|
+
app_ids == o.app_ids
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# @see the `==` method
|
|
204
|
+
# @param [Object] Object to be compared
|
|
205
|
+
def eql?(o)
|
|
206
|
+
self == o
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Calculates hash code according to all attributes.
|
|
210
|
+
# @return [Integer] Hash code
|
|
211
|
+
def hash
|
|
212
|
+
[name, description, percentage, active, app_ids].hash
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Builds the object from hash
|
|
216
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
217
|
+
# @return [Object] Returns the model itself
|
|
218
|
+
def self.build_from_hash(attributes)
|
|
219
|
+
return nil unless attributes.is_a?(Hash)
|
|
220
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
221
|
+
transformed_hash = {}
|
|
222
|
+
openapi_types.each_pair do |key, type|
|
|
223
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
224
|
+
transformed_hash["#{key}"] = nil
|
|
225
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
226
|
+
# check to ensure the input is an array given that the attribute
|
|
227
|
+
# is documented as an array but the input is not
|
|
228
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
229
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
230
|
+
end
|
|
231
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
232
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
new(transformed_hash)
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Returns the object in the form of hash
|
|
239
|
+
# @return [Hash] Returns the object in the form of hash
|
|
240
|
+
def to_hash
|
|
241
|
+
hash = {}
|
|
242
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
243
|
+
value = self.send(attr)
|
|
244
|
+
if value.nil?
|
|
245
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
246
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
hash[param] = _to_hash(value)
|
|
250
|
+
end
|
|
251
|
+
hash
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
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 UpdateWebhookDto
|
|
16
|
+
module Devdraft
|
|
17
|
+
class UpdateWebhookDto < ApiModelBase
|
|
16
18
|
# Name of the webhook for identification purposes
|
|
17
19
|
attr_accessor :name
|
|
18
20
|
|
|
@@ -39,14 +41,24 @@ module DevDraftAI
|
|
|
39
41
|
}
|
|
40
42
|
end
|
|
41
43
|
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns all the JSON keys this model knows about
|
|
50
|
+
def self.acceptable_attributes
|
|
51
|
+
acceptable_attribute_map.values
|
|
52
|
+
end
|
|
53
|
+
|
|
42
54
|
# Attribute type mapping.
|
|
43
55
|
def self.openapi_types
|
|
44
56
|
{
|
|
45
|
-
:'name' => :'
|
|
46
|
-
:'url' => :'
|
|
47
|
-
:'is_active' => :'
|
|
48
|
-
:'signing_secret' => :'
|
|
49
|
-
:'encrypted' => :'
|
|
57
|
+
:'name' => :'String',
|
|
58
|
+
:'url' => :'String',
|
|
59
|
+
:'is_active' => :'Boolean',
|
|
60
|
+
:'signing_secret' => :'String',
|
|
61
|
+
:'encrypted' => :'Boolean'
|
|
50
62
|
}
|
|
51
63
|
end
|
|
52
64
|
|
|
@@ -55,18 +67,19 @@ module DevDraftAI
|
|
|
55
67
|
Set.new([
|
|
56
68
|
])
|
|
57
69
|
end
|
|
58
|
-
|
|
70
|
+
|
|
59
71
|
# Initializes the object
|
|
60
72
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
73
|
def initialize(attributes = {})
|
|
62
74
|
if (!attributes.is_a?(Hash))
|
|
63
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::UpdateWebhookDto` initialize method"
|
|
64
76
|
end
|
|
65
77
|
|
|
66
78
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
80
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
-
if (!
|
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Devdraft::UpdateWebhookDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
83
|
end
|
|
71
84
|
h[k.to_sym] = v
|
|
72
85
|
}
|
|
@@ -99,16 +112,46 @@ module DevDraftAI
|
|
|
99
112
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
100
113
|
# @return Array for valid properties with the reasons
|
|
101
114
|
def list_invalid_properties
|
|
115
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
102
116
|
invalid_properties = Array.new
|
|
117
|
+
if !@name.nil? && @name.to_s.length > 100
|
|
118
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if !@name.nil? && @name.to_s.length < 3
|
|
122
|
+
invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 3.')
|
|
123
|
+
end
|
|
124
|
+
|
|
103
125
|
invalid_properties
|
|
104
126
|
end
|
|
105
127
|
|
|
106
128
|
# Check to see if the all the properties in the model are valid
|
|
107
129
|
# @return true if the model is valid
|
|
108
130
|
def valid?
|
|
131
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
132
|
+
return false if !@name.nil? && @name.to_s.length > 100
|
|
133
|
+
return false if !@name.nil? && @name.to_s.length < 3
|
|
109
134
|
true
|
|
110
135
|
end
|
|
111
136
|
|
|
137
|
+
# Custom attribute writer method with validation
|
|
138
|
+
# @param [Object] name Value to be assigned
|
|
139
|
+
def name=(name)
|
|
140
|
+
if name.nil?
|
|
141
|
+
fail ArgumentError, 'name cannot be nil'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if name.to_s.length > 100
|
|
145
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100.'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if name.to_s.length < 3
|
|
149
|
+
fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 3.'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
@name = name
|
|
153
|
+
end
|
|
154
|
+
|
|
112
155
|
# Checks equality by comparing each attribute.
|
|
113
156
|
# @param [Object] Object to be compared
|
|
114
157
|
def ==(o)
|
|
@@ -137,82 +180,23 @@ module DevDraftAI
|
|
|
137
180
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
138
181
|
# @return [Object] Returns the model itself
|
|
139
182
|
def self.build_from_hash(attributes)
|
|
140
|
-
new.build_from_hash(attributes)
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
# Builds the object from hash
|
|
144
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
|
-
# @return [Object] Returns the model itself
|
|
146
|
-
def build_from_hash(attributes)
|
|
147
183
|
return nil unless attributes.is_a?(Hash)
|
|
148
|
-
|
|
149
|
-
|
|
184
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
185
|
+
transformed_hash = {}
|
|
186
|
+
openapi_types.each_pair do |key, type|
|
|
187
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
188
|
+
transformed_hash["#{key}"] = nil
|
|
189
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
150
190
|
# check to ensure the input is an array given that the attribute
|
|
151
191
|
# is documented as an array but the input is not
|
|
152
|
-
if attributes[
|
|
153
|
-
|
|
154
|
-
end
|
|
155
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
156
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
157
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
158
|
-
self.send("#{key}=", nil)
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
self
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
# Deserializes the data based on type
|
|
166
|
-
# @param string type Data type
|
|
167
|
-
# @param string value Value to be deserialized
|
|
168
|
-
# @return [Object] Deserialized data
|
|
169
|
-
def _deserialize(type, value)
|
|
170
|
-
case type.to_sym
|
|
171
|
-
when :DateTime
|
|
172
|
-
DateTime.parse(value)
|
|
173
|
-
when :Date
|
|
174
|
-
Date.parse(value)
|
|
175
|
-
when :String
|
|
176
|
-
value.to_s
|
|
177
|
-
when :Integer
|
|
178
|
-
value.to_i
|
|
179
|
-
when :Float
|
|
180
|
-
value.to_f
|
|
181
|
-
when :Boolean
|
|
182
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
183
|
-
true
|
|
184
|
-
else
|
|
185
|
-
false
|
|
186
|
-
end
|
|
187
|
-
when :Object
|
|
188
|
-
# generic object (usually a Hash), return directly
|
|
189
|
-
value
|
|
190
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
191
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
192
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
193
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
194
|
-
k_type = Regexp.last_match[:k_type]
|
|
195
|
-
v_type = Regexp.last_match[:v_type]
|
|
196
|
-
{}.tap do |hash|
|
|
197
|
-
value.each do |k, v|
|
|
198
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
192
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
193
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
199
194
|
end
|
|
195
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
196
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
200
197
|
end
|
|
201
|
-
else # model
|
|
202
|
-
DevDraftAI.const_get(type).build_from_hash(value)
|
|
203
198
|
end
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
# Returns the string representation of the object
|
|
207
|
-
# @return [String] String presentation of the object
|
|
208
|
-
def to_s
|
|
209
|
-
to_hash.to_s
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
213
|
-
# @return [Hash] Returns the object in the form of hash
|
|
214
|
-
def to_body
|
|
215
|
-
to_hash
|
|
199
|
+
new(transformed_hash)
|
|
216
200
|
end
|
|
217
201
|
|
|
218
202
|
# Returns the object in the form of hash
|
|
@@ -231,21 +215,6 @@ module DevDraftAI
|
|
|
231
215
|
hash
|
|
232
216
|
end
|
|
233
217
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
# @param [Object] value Any valid value
|
|
237
|
-
# @return [Hash] Returns the value in the form of hash
|
|
238
|
-
def _to_hash(value)
|
|
239
|
-
if value.is_a?(Array)
|
|
240
|
-
value.compact.map { |v| _to_hash(v) }
|
|
241
|
-
elsif value.is_a?(Hash)
|
|
242
|
-
{}.tap do |hash|
|
|
243
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
244
|
-
end
|
|
245
|
-
elsif value.respond_to? :to_hash
|
|
246
|
-
value.to_hash
|
|
247
|
-
else
|
|
248
|
-
value
|
|
249
|
-
end
|
|
250
|
-
end end
|
|
218
|
+
end
|
|
219
|
+
|
|
251
220
|
end
|