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.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +160 -191
  3. data/Rakefile +2 -0
  4. data/devdraft-1.0.0.gem +0 -0
  5. data/{devdraft_ai_sdk.gemspec → devdraft.gemspec} +15 -11
  6. data/docs/APIHealthApi.md +82 -30
  7. data/docs/AggregatedBalanceResponse.md +19 -6
  8. data/docs/AllBalancesResponse.md +19 -6
  9. data/docs/AppBalancesApi.md +125 -65
  10. data/docs/BridgeFiatPaymentRail.md +15 -0
  11. data/docs/BridgePaymentRail.md +12 -3
  12. data/docs/CreateBankPaymentIntentDto.md +49 -21
  13. data/docs/CreateCustomerDto.md +25 -9
  14. data/docs/CreateDirectBankTransferDto.md +29 -11
  15. data/docs/CreateDirectWalletTransferDto.md +21 -7
  16. data/docs/CreateExternalBankTransferDto.md +40 -0
  17. data/docs/CreateExternalStablecoinTransferDto.md +28 -0
  18. data/docs/CreateInvoiceDto.md +45 -19
  19. data/docs/CreateLiquidationAddressDto.md +43 -18
  20. data/docs/CreatePaymentLinkDto.md +53 -28
  21. data/docs/CreateStablePaymentIntentDto.md +43 -18
  22. data/docs/CreateStablecoinConversionDto.md +23 -8
  23. data/docs/CreateTaxDto.md +26 -0
  24. data/docs/CreateWebhookDto.md +23 -8
  25. data/docs/CustomerStatus.md +12 -3
  26. data/docs/CustomerType.md +15 -0
  27. data/docs/CustomersApi.md +187 -114
  28. data/docs/DestinationCurrency.md +12 -3
  29. data/docs/ExchangeRateResponseDto.md +25 -9
  30. data/docs/ExchangeRatesApi.md +130 -72
  31. data/docs/FiatCurrency.md +12 -3
  32. data/docs/HealthResponseDto.md +25 -9
  33. data/docs/InvoiceProductDto.md +17 -5
  34. data/docs/InvoicesApi.md +177 -104
  35. data/docs/LiquidationAddressResponseDto.md +41 -17
  36. data/docs/LiquidationAddressesApi.md +115 -61
  37. data/docs/PaymentIntentsApi.md +93 -57
  38. data/docs/PaymentLinkProductDto.md +17 -5
  39. data/docs/PaymentLinksApi.md +175 -102
  40. data/docs/PaymentRequestDto.md +21 -7
  41. data/docs/PaymentResponseDto.md +23 -8
  42. data/docs/ProductsApi.md +307 -194
  43. data/docs/PublicHealthResponseDto.md +19 -6
  44. data/docs/RefundResponseDto.md +23 -8
  45. data/docs/StableCoinCurrency.md +12 -3
  46. data/docs/TaxControllerCreate201Response.md +30 -0
  47. data/docs/TaxControllerDeleteWithoutId400Response.md +22 -0
  48. data/docs/TaxControllerUpdateWithoutId400Response.md +22 -0
  49. data/docs/TaxesApi.md +374 -122
  50. data/docs/TestPaymentsApi.md +150 -60
  51. data/docs/TransfersApi.md +274 -72
  52. data/docs/UpdateCustomerDto.md +25 -9
  53. data/docs/UpdateTaxDto.md +26 -0
  54. data/docs/UpdateWebhookDto.md +23 -8
  55. data/docs/WalletsApi.md +44 -24
  56. data/docs/WebhookResponseDto.md +29 -11
  57. data/docs/WebhooksApi.md +225 -134
  58. data/git_push.sh +41 -28
  59. data/lib/devdraft/api/api_health_api.rb +32 -16
  60. data/lib/devdraft/api/app_balances_api.rb +45 -22
  61. data/lib/devdraft/api/customers_api.rb +124 -71
  62. data/lib/devdraft/api/exchange_rates_api.rb +49 -26
  63. data/lib/devdraft/api/invoices_api.rb +89 -53
  64. data/lib/devdraft/api/liquidation_addresses_api.rb +70 -44
  65. data/lib/devdraft/api/payment_intents_api.rb +62 -40
  66. data/lib/devdraft/api/payment_links_api.rb +85 -49
  67. data/lib/devdraft/api/products_api.rb +214 -216
  68. data/lib/devdraft/api/taxes_api.rb +257 -66
  69. data/lib/devdraft/api/test_payments_api.rb +70 -44
  70. data/lib/devdraft/api/transfers_api.rb +206 -46
  71. data/lib/devdraft/api/wallets_api.rb +18 -9
  72. data/lib/devdraft/api/webhooks_api.rb +109 -66
  73. data/lib/devdraft/api_client.rb +76 -71
  74. data/lib/devdraft/api_error.rb +5 -4
  75. data/lib/devdraft/api_model_base.rb +88 -0
  76. data/lib/devdraft/configuration.rb +121 -18
  77. data/lib/devdraft/models/aggregated_balance_response.rb +68 -101
  78. data/lib/devdraft/models/all_balances_response.rb +76 -99
  79. data/lib/devdraft/models/bridge_fiat_payment_rail.rb +45 -0
  80. data/lib/devdraft/models/bridge_payment_rail.rb +36 -24
  81. data/lib/devdraft/models/create_bank_payment_intent_dto.rb +191 -114
  82. data/lib/devdraft/models/create_customer_dto.rb +123 -113
  83. data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +105 -104
  84. data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +89 -100
  85. data/lib/devdraft/models/create_external_bank_transfer_dto.rb +505 -0
  86. data/lib/devdraft/models/create_external_stablecoin_transfer_dto.rb +266 -0
  87. data/lib/devdraft/models/create_invoice_dto.rb +151 -121
  88. data/lib/devdraft/models/create_liquidation_address_dto.rb +195 -115
  89. data/lib/devdraft/models/create_payment_link_dto.rb +192 -214
  90. data/lib/devdraft/models/create_stable_payment_intent_dto.rb +324 -111
  91. data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +102 -101
  92. data/lib/devdraft/models/create_tax_dto.rb +281 -0
  93. data/lib/devdraft/models/create_webhook_dto.rb +104 -101
  94. data/lib/devdraft/models/customer_status.rb +23 -10
  95. data/lib/devdraft/models/customer_type.rb +45 -0
  96. data/lib/devdraft/models/destination_currency.rb +27 -15
  97. data/lib/devdraft/models/exchange_rate_response_dto.rb +103 -102
  98. data/lib/devdraft/models/fiat_currency.rb +22 -10
  99. data/lib/devdraft/models/health_response_dto.rb +99 -106
  100. data/lib/devdraft/models/invoice_product_dto.rb +63 -98
  101. data/lib/devdraft/models/liquidation_address_response_dto.rb +147 -110
  102. data/lib/devdraft/models/payment_link_product_dto.rb +70 -98
  103. data/lib/devdraft/models/payment_request_dto.rb +77 -100
  104. data/lib/devdraft/models/payment_response_dto.rb +102 -101
  105. data/lib/devdraft/models/public_health_response_dto.rb +68 -101
  106. data/lib/devdraft/models/refund_response_dto.rb +102 -101
  107. data/lib/devdraft/models/stable_coin_currency.rb +21 -9
  108. data/lib/devdraft/models/tax_controller_create201_response.rb +201 -0
  109. data/lib/devdraft/models/tax_controller_delete_without_id400_response.rb +165 -0
  110. data/lib/devdraft/models/tax_controller_update_without_id400_response.rb +165 -0
  111. data/lib/devdraft/models/update_customer_dto.rb +117 -113
  112. data/lib/devdraft/models/update_tax_dto.rb +256 -0
  113. data/lib/devdraft/models/update_webhook_dto.rb +70 -101
  114. data/lib/devdraft/models/webhook_response_dto.rb +140 -103
  115. data/lib/devdraft/version.rb +6 -5
  116. data/lib/devdraft.rb +18 -27
  117. data/spec/api/api_health_api_spec.rb +10 -9
  118. data/spec/api/app_balances_api_spec.rb +11 -10
  119. data/spec/api/customers_api_spec.rb +25 -24
  120. data/spec/api/exchange_rates_api_spec.rb +11 -10
  121. data/spec/api/invoices_api_spec.rb +16 -15
  122. data/spec/api/liquidation_addresses_api_spec.rb +13 -12
  123. data/spec/api/payment_intents_api_spec.rb +12 -11
  124. data/spec/api/payment_links_api_spec.rb +14 -13
  125. data/spec/api/products_api_spec.rb +41 -40
  126. data/spec/api/taxes_api_spec.rb +51 -21
  127. data/spec/api/test_payments_api_spec.rb +14 -13
  128. data/spec/api/transfers_api_spec.rb +36 -13
  129. data/spec/api/wallets_api_spec.rb +9 -8
  130. data/spec/api/webhooks_api_spec.rb +20 -19
  131. data/spec/models/aggregated_balance_response_spec.rb +15 -19
  132. data/spec/models/all_balances_response_spec.rb +14 -18
  133. data/spec/models/bridge_fiat_payment_rail_spec.rb +30 -0
  134. data/spec/models/bridge_payment_rail_spec.rb +11 -15
  135. data/spec/models/create_bank_payment_intent_dto_spec.rb +29 -33
  136. data/spec/models/create_customer_dto_spec.rb +17 -25
  137. data/spec/models/create_direct_bank_transfer_dto_spec.rb +19 -23
  138. data/spec/models/create_direct_wallet_transfer_dto_spec.rb +15 -19
  139. data/spec/models/create_external_bank_transfer_dto_spec.rb +102 -0
  140. data/spec/models/create_external_stablecoin_transfer_dto_spec.rb +66 -0
  141. data/spec/models/create_invoice_dto_spec.rb +31 -35
  142. data/spec/models/create_liquidation_address_dto_spec.rb +28 -32
  143. data/spec/models/create_payment_link_dto_spec.rb +34 -76
  144. data/spec/models/create_stable_payment_intent_dto_spec.rb +26 -30
  145. data/spec/models/create_stablecoin_conversion_dto_spec.rb +16 -20
  146. data/spec/models/create_tax_dto_spec.rb +60 -0
  147. data/spec/models/create_webhook_dto_spec.rb +16 -20
  148. data/spec/models/customer_status_spec.rb +11 -15
  149. data/spec/models/customer_type_spec.rb +30 -0
  150. data/spec/models/destination_currency_spec.rb +11 -15
  151. data/spec/models/exchange_rate_response_dto_spec.rb +17 -21
  152. data/spec/models/fiat_currency_spec.rb +11 -15
  153. data/spec/models/health_response_dto_spec.rb +19 -23
  154. data/spec/models/invoice_product_dto_spec.rb +13 -17
  155. data/spec/models/liquidation_address_response_dto_spec.rb +25 -29
  156. data/spec/models/payment_link_product_dto_spec.rb +13 -17
  157. data/spec/models/payment_request_dto_spec.rb +15 -19
  158. data/spec/models/payment_response_dto_spec.rb +16 -20
  159. data/spec/models/public_health_response_dto_spec.rb +15 -19
  160. data/spec/models/refund_response_dto_spec.rb +16 -20
  161. data/spec/models/stable_coin_currency_spec.rb +11 -15
  162. data/spec/models/tax_controller_create201_response_spec.rb +72 -0
  163. data/spec/models/tax_controller_delete_without_id400_response_spec.rb +48 -0
  164. data/spec/models/tax_controller_update_without_id400_response_spec.rb +48 -0
  165. data/spec/models/update_customer_dto_spec.rb +17 -25
  166. data/spec/models/update_tax_dto_spec.rb +60 -0
  167. data/spec/models/update_webhook_dto_spec.rb +16 -20
  168. data/spec/models/webhook_response_dto_spec.rb +19 -23
  169. data/spec/spec_helper.rb +5 -4
  170. metadata +49 -116
  171. data/docs/AllOfAllBalancesResponseEurc.md +0 -9
  172. data/docs/AllOfAllBalancesResponseUsdc.md +0 -9
  173. data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +0 -6
  174. data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +0 -6
  175. data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +0 -6
  176. data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +0 -6
  177. data/docs/AllOfCreateCustomerDtoStatus.md +0 -6
  178. data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +0 -6
  179. data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +0 -6
  180. data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +0 -6
  181. data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +0 -6
  182. data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +0 -6
  183. data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +0 -6
  184. data/docs/AllOfUpdateCustomerDtoStatus.md +0 -6
  185. data/docs/CreateProductDto.md +0 -18
  186. data/docs/CreateTaxInput.md +0 -6
  187. data/docs/UpdatePaymentLinkDto.md +0 -6
  188. data/docs/UpdatePreferenceInput.md +0 -6
  189. data/docs/UpdateProductDto.md +0 -18
  190. data/docs/UpdateTaxInput.md +0 -6
  191. data/example.rb +0 -94
  192. data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +0 -283
  193. data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +0 -283
  194. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +0 -202
  195. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +0 -202
  196. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +0 -202
  197. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +0 -202
  198. data/lib/devdraft/models/all_of_create_customer_dto_status.rb +0 -202
  199. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +0 -202
  200. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +0 -202
  201. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +0 -202
  202. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +0 -202
  203. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +0 -202
  204. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +0 -202
  205. data/lib/devdraft/models/all_of_update_customer_dto_status.rb +0 -202
  206. data/lib/devdraft/models/create_product_dto.rb +0 -370
  207. data/lib/devdraft/models/create_tax_input.rb +0 -197
  208. data/lib/devdraft/models/update_payment_link_dto.rb +0 -197
  209. data/lib/devdraft/models/update_preference_input.rb +0 -197
  210. data/lib/devdraft/models/update_product_dto.rb +0 -355
  211. data/lib/devdraft/models/update_tax_input.rb +0 -197
  212. data/spec/api_client_spec.rb +0 -225
  213. data/spec/base_object_spec.rb +0 -109
  214. data/spec/configuration_spec.rb +0 -41
  215. data/spec/models/all_of_all_balances_response_eurc_spec.rb +0 -56
  216. data/spec/models/all_of_all_balances_response_usdc_spec.rb +0 -56
  217. data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +0 -34
  218. data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +0 -34
  219. data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +0 -34
  220. data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +0 -34
  221. data/spec/models/all_of_create_customer_dto_status_spec.rb +0 -34
  222. data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +0 -34
  223. data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +0 -34
  224. data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +0 -34
  225. data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +0 -34
  226. data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +0 -34
  227. data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +0 -34
  228. data/spec/models/all_of_update_customer_dto_status_spec.rb +0 -34
  229. data/spec/models/create_product_dto_spec.rb +0 -110
  230. data/spec/models/create_tax_input_spec.rb +0 -34
  231. data/spec/models/update_payment_link_dto_spec.rb +0 -34
  232. data/spec/models/update_preference_input_spec.rb +0 -34
  233. data/spec/models/update_product_dto_spec.rb +0 -110
  234. 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 spec version: 1.0.0
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 DevDraftAI
15
- class AggregatedBalanceResponse
16
+ module Devdraft
17
+ class AggregatedBalanceResponse < ApiModelBase
16
18
  # The stablecoin currency
17
19
  attr_accessor :currency
18
20
 
@@ -53,12 +55,22 @@ module DevDraftAI
53
55
  }
54
56
  end
55
57
 
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
56
68
  # Attribute type mapping.
57
69
  def self.openapi_types
58
70
  {
59
- :'currency' => :'Object',
60
- :'total_balance' => :'Object',
61
- :'balances' => :'Object'
71
+ :'currency' => :'String',
72
+ :'total_balance' => :'String',
73
+ :'balances' => :'Array<Object>'
62
74
  }
63
75
  end
64
76
 
@@ -67,40 +79,48 @@ module DevDraftAI
67
79
  Set.new([
68
80
  ])
69
81
  end
70
-
82
+
71
83
  # Initializes the object
72
84
  # @param [Hash] attributes Model attributes in the form of hash
73
85
  def initialize(attributes = {})
74
86
  if (!attributes.is_a?(Hash))
75
- fail ArgumentError, "The input argument (attributes) must be a hash in `DevDraftAI::AggregatedBalanceResponse` initialize method"
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::AggregatedBalanceResponse` initialize method"
76
88
  end
77
89
 
78
90
  # check to see if the attribute exists and convert string to symbol for hash key
91
+ acceptable_attribute_map = self.class.acceptable_attribute_map
79
92
  attributes = attributes.each_with_object({}) { |(k, v), h|
80
- if (!self.class.attribute_map.key?(k.to_sym))
81
- fail ArgumentError, "`#{k}` is not a valid attribute in `DevDraftAI::AggregatedBalanceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
93
+ if (!acceptable_attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Devdraft::AggregatedBalanceResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
95
  end
83
96
  h[k.to_sym] = v
84
97
  }
85
98
 
86
99
  if attributes.key?(:'currency')
87
100
  self.currency = attributes[:'currency']
101
+ else
102
+ self.currency = nil
88
103
  end
89
104
 
90
105
  if attributes.key?(:'total_balance')
91
106
  self.total_balance = attributes[:'total_balance']
107
+ else
108
+ self.total_balance = nil
92
109
  end
93
110
 
94
111
  if attributes.key?(:'balances')
95
112
  if (value = attributes[:'balances']).is_a?(Array)
96
113
  self.balances = value
97
114
  end
115
+ else
116
+ self.balances = nil
98
117
  end
99
118
  end
100
119
 
101
120
  # Show invalid properties with the reasons. Usually used together with valid?
102
121
  # @return Array for valid properties with the reasons
103
122
  def list_invalid_properties
123
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
124
  invalid_properties = Array.new
105
125
  if @currency.nil?
106
126
  invalid_properties.push('invalid value for "currency", currency cannot be nil.')
@@ -120,8 +140,9 @@ module DevDraftAI
120
140
  # Check to see if the all the properties in the model are valid
121
141
  # @return true if the model is valid
122
142
  def valid?
143
+ warn '[DEPRECATED] the `valid?` method is obsolete'
123
144
  return false if @currency.nil?
124
- currency_validator = EnumAttributeValidator.new('Object', ['usdc', 'eurc'])
145
+ currency_validator = EnumAttributeValidator.new('String', ["usdc", "eurc"])
125
146
  return false unless currency_validator.valid?(@currency)
126
147
  return false if @total_balance.nil?
127
148
  return false if @balances.nil?
@@ -131,13 +152,33 @@ module DevDraftAI
131
152
  # Custom attribute writer method checking allowed values (enum).
132
153
  # @param [Object] currency Object to be assigned
133
154
  def currency=(currency)
134
- validator = EnumAttributeValidator.new('Object', ['usdc', 'eurc'])
155
+ validator = EnumAttributeValidator.new('String', ["usdc", "eurc"])
135
156
  unless validator.valid?(currency)
136
157
  fail ArgumentError, "invalid value for \"currency\", must be one of #{validator.allowable_values}."
137
158
  end
138
159
  @currency = currency
139
160
  end
140
161
 
162
+ # Custom attribute writer method with validation
163
+ # @param [Object] total_balance Value to be assigned
164
+ def total_balance=(total_balance)
165
+ if total_balance.nil?
166
+ fail ArgumentError, 'total_balance cannot be nil'
167
+ end
168
+
169
+ @total_balance = total_balance
170
+ end
171
+
172
+ # Custom attribute writer method with validation
173
+ # @param [Object] balances Value to be assigned
174
+ def balances=(balances)
175
+ if balances.nil?
176
+ fail ArgumentError, 'balances cannot be nil'
177
+ end
178
+
179
+ @balances = balances
180
+ end
181
+
141
182
  # Checks equality by comparing each attribute.
142
183
  # @param [Object] Object to be compared
143
184
  def ==(o)
@@ -164,82 +205,23 @@ module DevDraftAI
164
205
  # @param [Hash] attributes Model attributes in the form of hash
165
206
  # @return [Object] Returns the model itself
166
207
  def self.build_from_hash(attributes)
167
- new.build_from_hash(attributes)
168
- end
169
-
170
- # Builds the object from hash
171
- # @param [Hash] attributes Model attributes in the form of hash
172
- # @return [Object] Returns the model itself
173
- def build_from_hash(attributes)
174
208
  return nil unless attributes.is_a?(Hash)
175
- self.class.openapi_types.each_pair do |key, type|
176
- if type =~ /\AArray<(.*)>/i
209
+ attributes = attributes.transform_keys(&:to_sym)
210
+ transformed_hash = {}
211
+ openapi_types.each_pair do |key, type|
212
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
213
+ transformed_hash["#{key}"] = nil
214
+ elsif type =~ /\AArray<(.*)>/i
177
215
  # check to ensure the input is an array given that the attribute
178
216
  # is documented as an array but the input is not
179
- if attributes[self.class.attribute_map[key]].is_a?(Array)
180
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
181
- end
182
- elsif !attributes[self.class.attribute_map[key]].nil?
183
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
184
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
185
- self.send("#{key}=", nil)
186
- end
187
- end
188
-
189
- self
190
- end
191
-
192
- # Deserializes the data based on type
193
- # @param string type Data type
194
- # @param string value Value to be deserialized
195
- # @return [Object] Deserialized data
196
- def _deserialize(type, value)
197
- case type.to_sym
198
- when :DateTime
199
- DateTime.parse(value)
200
- when :Date
201
- Date.parse(value)
202
- when :String
203
- value.to_s
204
- when :Integer
205
- value.to_i
206
- when :Float
207
- value.to_f
208
- when :Boolean
209
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
210
- true
211
- else
212
- false
213
- end
214
- when :Object
215
- # generic object (usually a Hash), return directly
216
- value
217
- when /\AArray<(?<inner_type>.+)>\z/
218
- inner_type = Regexp.last_match[:inner_type]
219
- value.map { |v| _deserialize(inner_type, v) }
220
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
221
- k_type = Regexp.last_match[:k_type]
222
- v_type = Regexp.last_match[:v_type]
223
- {}.tap do |hash|
224
- value.each do |k, v|
225
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
217
+ if attributes[attribute_map[key]].is_a?(Array)
218
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
226
219
  end
220
+ elsif !attributes[attribute_map[key]].nil?
221
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
227
222
  end
228
- else # model
229
- DevDraftAI.const_get(type).build_from_hash(value)
230
223
  end
231
- end
232
-
233
- # Returns the string representation of the object
234
- # @return [String] String presentation of the object
235
- def to_s
236
- to_hash.to_s
237
- end
238
-
239
- # to_body is an alias to to_hash (backward compatibility)
240
- # @return [Hash] Returns the object in the form of hash
241
- def to_body
242
- to_hash
224
+ new(transformed_hash)
243
225
  end
244
226
 
245
227
  # Returns the object in the form of hash
@@ -258,21 +240,6 @@ module DevDraftAI
258
240
  hash
259
241
  end
260
242
 
261
- # Outputs non-array value in the form of hash
262
- # For object, use to_hash. Otherwise, just return the value
263
- # @param [Object] value Any valid value
264
- # @return [Hash] Returns the value in the form of hash
265
- def _to_hash(value)
266
- if value.is_a?(Array)
267
- value.compact.map { |v| _to_hash(v) }
268
- elsif value.is_a?(Hash)
269
- {}.tap do |hash|
270
- value.each { |k, v| hash[k] = _to_hash(v) }
271
- end
272
- elsif value.respond_to? :to_hash
273
- value.to_hash
274
- else
275
- value
276
- end
277
- end end
243
+ end
244
+
278
245
  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 spec version: 1.0.0
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 DevDraftAI
15
- class AllBalancesResponse
16
+ module Devdraft
17
+ class AllBalancesResponse < ApiModelBase
16
18
  # USDC balance aggregation
17
19
  attr_accessor :usdc
18
20
 
@@ -31,12 +33,22 @@ module DevDraftAI
31
33
  }
32
34
  end
33
35
 
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
34
46
  # Attribute type mapping.
35
47
  def self.openapi_types
36
48
  {
37
- :'usdc' => :'Object',
38
- :'eurc' => :'Object',
39
- :'total_usd_value' => :'Object'
49
+ :'usdc' => :'AggregatedBalanceResponse',
50
+ :'eurc' => :'AggregatedBalanceResponse',
51
+ :'total_usd_value' => :'String'
40
52
  }
41
53
  end
42
54
 
@@ -45,38 +57,46 @@ module DevDraftAI
45
57
  Set.new([
46
58
  ])
47
59
  end
48
-
60
+
49
61
  # Initializes the object
50
62
  # @param [Hash] attributes Model attributes in the form of hash
51
63
  def initialize(attributes = {})
52
64
  if (!attributes.is_a?(Hash))
53
- fail ArgumentError, "The input argument (attributes) must be a hash in `DevDraftAI::AllBalancesResponse` initialize method"
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::AllBalancesResponse` initialize method"
54
66
  end
55
67
 
56
68
  # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
57
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
58
- if (!self.class.attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `DevDraftAI::AllBalancesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Devdraft::AllBalancesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
60
73
  end
61
74
  h[k.to_sym] = v
62
75
  }
63
76
 
64
77
  if attributes.key?(:'usdc')
65
78
  self.usdc = attributes[:'usdc']
79
+ else
80
+ self.usdc = nil
66
81
  end
67
82
 
68
83
  if attributes.key?(:'eurc')
69
84
  self.eurc = attributes[:'eurc']
85
+ else
86
+ self.eurc = nil
70
87
  end
71
88
 
72
89
  if attributes.key?(:'total_usd_value')
73
90
  self.total_usd_value = attributes[:'total_usd_value']
91
+ else
92
+ self.total_usd_value = nil
74
93
  end
75
94
  end
76
95
 
77
96
  # Show invalid properties with the reasons. Usually used together with valid?
78
97
  # @return Array for valid properties with the reasons
79
98
  def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
80
100
  invalid_properties = Array.new
81
101
  if @usdc.nil?
82
102
  invalid_properties.push('invalid value for "usdc", usdc cannot be nil.')
@@ -96,12 +116,43 @@ module DevDraftAI
96
116
  # Check to see if the all the properties in the model are valid
97
117
  # @return true if the model is valid
98
118
  def valid?
119
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
120
  return false if @usdc.nil?
100
121
  return false if @eurc.nil?
101
122
  return false if @total_usd_value.nil?
102
123
  true
103
124
  end
104
125
 
126
+ # Custom attribute writer method with validation
127
+ # @param [Object] usdc Value to be assigned
128
+ def usdc=(usdc)
129
+ if usdc.nil?
130
+ fail ArgumentError, 'usdc cannot be nil'
131
+ end
132
+
133
+ @usdc = usdc
134
+ end
135
+
136
+ # Custom attribute writer method with validation
137
+ # @param [Object] eurc Value to be assigned
138
+ def eurc=(eurc)
139
+ if eurc.nil?
140
+ fail ArgumentError, 'eurc cannot be nil'
141
+ end
142
+
143
+ @eurc = eurc
144
+ end
145
+
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] total_usd_value Value to be assigned
148
+ def total_usd_value=(total_usd_value)
149
+ if total_usd_value.nil?
150
+ fail ArgumentError, 'total_usd_value cannot be nil'
151
+ end
152
+
153
+ @total_usd_value = total_usd_value
154
+ end
155
+
105
156
  # Checks equality by comparing each attribute.
106
157
  # @param [Object] Object to be compared
107
158
  def ==(o)
@@ -128,82 +179,23 @@ module DevDraftAI
128
179
  # @param [Hash] attributes Model attributes in the form of hash
129
180
  # @return [Object] Returns the model itself
130
181
  def self.build_from_hash(attributes)
131
- new.build_from_hash(attributes)
132
- end
133
-
134
- # Builds the object from hash
135
- # @param [Hash] attributes Model attributes in the form of hash
136
- # @return [Object] Returns the model itself
137
- def build_from_hash(attributes)
138
182
  return nil unless attributes.is_a?(Hash)
139
- self.class.openapi_types.each_pair do |key, type|
140
- if type =~ /\AArray<(.*)>/i
183
+ attributes = attributes.transform_keys(&:to_sym)
184
+ transformed_hash = {}
185
+ openapi_types.each_pair do |key, type|
186
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
187
+ transformed_hash["#{key}"] = nil
188
+ elsif type =~ /\AArray<(.*)>/i
141
189
  # check to ensure the input is an array given that the attribute
142
190
  # is documented as an array but the input is not
143
- if attributes[self.class.attribute_map[key]].is_a?(Array)
144
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
145
- end
146
- elsif !attributes[self.class.attribute_map[key]].nil?
147
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
148
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
- self.send("#{key}=", nil)
150
- end
151
- end
152
-
153
- self
154
- end
155
-
156
- # Deserializes the data based on type
157
- # @param string type Data type
158
- # @param string value Value to be deserialized
159
- # @return [Object] Deserialized data
160
- def _deserialize(type, value)
161
- case type.to_sym
162
- when :DateTime
163
- DateTime.parse(value)
164
- when :Date
165
- Date.parse(value)
166
- when :String
167
- value.to_s
168
- when :Integer
169
- value.to_i
170
- when :Float
171
- value.to_f
172
- when :Boolean
173
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
174
- true
175
- else
176
- false
177
- end
178
- when :Object
179
- # generic object (usually a Hash), return directly
180
- value
181
- when /\AArray<(?<inner_type>.+)>\z/
182
- inner_type = Regexp.last_match[:inner_type]
183
- value.map { |v| _deserialize(inner_type, v) }
184
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
185
- k_type = Regexp.last_match[:k_type]
186
- v_type = Regexp.last_match[:v_type]
187
- {}.tap do |hash|
188
- value.each do |k, v|
189
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
191
+ if attributes[attribute_map[key]].is_a?(Array)
192
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
190
193
  end
194
+ elsif !attributes[attribute_map[key]].nil?
195
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
191
196
  end
192
- else # model
193
- DevDraftAI.const_get(type).build_from_hash(value)
194
197
  end
195
- end
196
-
197
- # Returns the string representation of the object
198
- # @return [String] String presentation of the object
199
- def to_s
200
- to_hash.to_s
201
- end
202
-
203
- # to_body is an alias to to_hash (backward compatibility)
204
- # @return [Hash] Returns the object in the form of hash
205
- def to_body
206
- to_hash
198
+ new(transformed_hash)
207
199
  end
208
200
 
209
201
  # Returns the object in the form of hash
@@ -222,21 +214,6 @@ module DevDraftAI
222
214
  hash
223
215
  end
224
216
 
225
- # Outputs non-array value in the form of hash
226
- # For object, use to_hash. Otherwise, just return the value
227
- # @param [Object] value Any valid value
228
- # @return [Hash] Returns the value in the form of hash
229
- def _to_hash(value)
230
- if value.is_a?(Array)
231
- value.compact.map { |v| _to_hash(v) }
232
- elsif value.is_a?(Hash)
233
- {}.tap do |hash|
234
- value.each { |k, v| hash[k] = _to_hash(v) }
235
- end
236
- elsif value.respond_to? :to_hash
237
- value.to_hash
238
- else
239
- value
240
- end
241
- end end
217
+ end
218
+
242
219
  end
@@ -0,0 +1,45 @@
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 BridgeFiatPaymentRail
18
+ ACH = "ach".freeze
19
+ ACH_PUSH = "ach_push".freeze
20
+ ACH_SAME_DAY = "ach_same_day".freeze
21
+ WIRE = "wire".freeze
22
+ SEPA = "sepa".freeze
23
+ SWIFT = "swift".freeze
24
+ SPEI = "spei".freeze
25
+
26
+ def self.all_vars
27
+ @all_vars ||= [ACH, ACH_PUSH, ACH_SAME_DAY, WIRE, SEPA, SWIFT, SPEI].freeze
28
+ end
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def self.build_from_hash(value)
34
+ new.build_from_hash(value)
35
+ end
36
+
37
+ # Builds the enum from string
38
+ # @param [String] The enum value in the form of the string
39
+ # @return [String] The enum value
40
+ def build_from_hash(value)
41
+ return value if BridgeFiatPaymentRail.all_vars.include?(value)
42
+ raise "Invalid ENUM value #{value} for class #BridgeFiatPaymentRail"
43
+ end
44
+ end
45
+ end
@@ -3,41 +3,53 @@
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 spec version: 1.0.0
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 DevDraftAI
16
+ module Devdraft
15
17
  class BridgePaymentRail
16
- ETHEREUM = 'ethereum'.freeze
17
- SOLANA = 'solana'.freeze
18
- POLYGON = 'polygon'.freeze
19
- AVALANCHE_C_CHAIN = 'avalanche_c_chain'.freeze
20
- BASE = 'base'.freeze
21
- ARBITRUM = 'arbitrum'.freeze
22
- OPTIMISM = 'optimism'.freeze
23
- STELLAR = 'stellar'.freeze
24
- TRON = 'tron'.freeze
25
- BRIDGE_WALLET = 'bridge_wallet'.freeze
26
- WIRE = 'wire'.freeze
27
- ACH = 'ach'.freeze
28
- ACH_PUSH = 'ach_push'.freeze
29
- ACH_SAME_DAY = 'ach_same_day'.freeze
30
- SEPA = 'sepa'.freeze
31
- SWIFT = 'swift'.freeze
32
- SPEI = 'spei'.freeze
18
+ ETHEREUM = "ethereum".freeze
19
+ SOLANA = "solana".freeze
20
+ POLYGON = "polygon".freeze
21
+ AVALANCHE_C_CHAIN = "avalanche_c_chain".freeze
22
+ BASE = "base".freeze
23
+ ARBITRUM = "arbitrum".freeze
24
+ OPTIMISM = "optimism".freeze
25
+ STELLAR = "stellar".freeze
26
+ TRON = "tron".freeze
27
+ BRIDGE_WALLET = "bridge_wallet".freeze
28
+ WIRE = "wire".freeze
29
+ ACH = "ach".freeze
30
+ ACH_PUSH = "ach_push".freeze
31
+ ACH_SAME_DAY = "ach_same_day".freeze
32
+ SEPA = "sepa".freeze
33
+ SWIFT = "swift".freeze
34
+ SPEI = "spei".freeze
35
+
36
+ def self.all_vars
37
+ @all_vars ||= [ETHEREUM, SOLANA, POLYGON, AVALANCHE_C_CHAIN, BASE, ARBITRUM, OPTIMISM, STELLAR, TRON, BRIDGE_WALLET, WIRE, ACH, ACH_PUSH, ACH_SAME_DAY, SEPA, SWIFT, SPEI].freeze
38
+ end
39
+
40
+ # Builds the enum from string
41
+ # @param [String] The enum value in the form of the string
42
+ # @return [String] The enum value
43
+ def self.build_from_hash(value)
44
+ new.build_from_hash(value)
45
+ end
33
46
 
34
47
  # Builds the enum from string
35
48
  # @param [String] The enum value in the form of the string
36
49
  # @return [String] The enum value
37
50
  def build_from_hash(value)
38
- constantValues = BridgePaymentRail.constants.select { |c| BridgePaymentRail::const_get(c) == value }
39
- raise "Invalid ENUM value #{value} for class #BridgePaymentRail" if constantValues.empty?
40
- value
51
+ return value if BridgePaymentRail.all_vars.include?(value)
52
+ raise "Invalid ENUM value #{value} for class #BridgePaymentRail"
41
53
  end
42
54
  end
43
55
  end