conekta 6.0.0 → 6.0.1

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 (303) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +9 -1
  3. data/README.md +17 -10
  4. data/VERSION +1 -1
  5. data/conekta.gemspec +4 -3
  6. data/config-ruby.json +32 -0
  7. data/docs/BalancesApi.md +1 -1
  8. data/docs/ChargeOrderResponse.md +0 -2
  9. data/docs/ChargeRequest.md +0 -2
  10. data/docs/ChargeRequestPaymentMethod.md +2 -0
  11. data/docs/ChargeResponse.md +0 -2
  12. data/docs/ChargeUpdateRequest.md +18 -0
  13. data/docs/ChargesApi.md +76 -0
  14. data/docs/ChargesDataResponse.md +0 -2
  15. data/docs/Checkout.md +2 -2
  16. data/docs/CheckoutOrderTemplate.md +1 -1
  17. data/docs/CheckoutRequest.md +2 -2
  18. data/docs/CheckoutResponse.md +3 -3
  19. data/docs/Customer.md +1 -1
  20. data/docs/CustomerAddress.md +3 -3
  21. data/docs/CustomerFiscalEntitiesRequestAddress.md +3 -3
  22. data/docs/CustomerResponse.md +11 -9
  23. data/docs/CustomerShippingContacts.md +4 -2
  24. data/docs/CustomerShippingContactsAddress.md +2 -2
  25. data/docs/CustomerShippingContactsDataResponse.md +3 -1
  26. data/docs/CustomerShippingContactsResponse.md +3 -1
  27. data/docs/CustomerShippingContactsResponseAddress.md +2 -2
  28. data/docs/CustomerUpdateShippingContacts.md +1 -1
  29. data/docs/CustomersApi.md +2 -2
  30. data/docs/EventResponse.md +1 -1
  31. data/docs/FiscalEntityAddress.md +30 -0
  32. data/docs/LogResponse.md +5 -5
  33. data/docs/LogsResponseData.md +5 -5
  34. data/docs/{CustomerInfoResponse.md → OrderCustomerInfoResponse.md} +4 -2
  35. data/docs/OrderFiscalEntityAddressResponse.md +32 -0
  36. data/docs/{OrderResponseFiscalEntityAddressAllOf.md → OrderFiscalEntityAddressResponseAllOf.md} +2 -2
  37. data/docs/OrderFiscalEntityRequest.md +28 -0
  38. data/docs/OrderFiscalEntityResponse.md +34 -0
  39. data/docs/OrderNextActionResponse.md +20 -0
  40. data/docs/OrderNextActionResponseRedirectToUrl.md +20 -0
  41. data/docs/OrderRequest.md +7 -1
  42. data/docs/OrderResponse.md +3 -1
  43. data/docs/OrderResponseCustomerInfo.md +2 -0
  44. data/docs/OrderResponseShippingContact.md +3 -1
  45. data/docs/OrderTaxRequest.md +1 -1
  46. data/docs/OrderUpdateFiscalEntityRequest.md +28 -0
  47. data/docs/OrderUpdateRequest.md +2 -0
  48. data/docs/PaymentLinkApi.md +1 -1
  49. data/docs/Product.md +3 -3
  50. data/docs/ShippingRequest.md +1 -1
  51. data/docs/TokenResponseCheckout.md +1 -1
  52. data/docs/TransactionsApi.md +9 -3
  53. data/docs/UpdateCustomer.md +1 -1
  54. data/docs/WebhookLog.md +1 -1
  55. data/docs/WebhookResponse.md +1 -1
  56. data/docs/WebhookUpdateRequest.md +2 -2
  57. data/lib/conekta/api/antifraud_api.rb +1 -1
  58. data/lib/conekta/api/api_keys_api.rb +1 -1
  59. data/lib/conekta/api/balances_api.rb +2 -2
  60. data/lib/conekta/api/charges_api.rb +83 -1
  61. data/lib/conekta/api/companies_api.rb +1 -1
  62. data/lib/conekta/api/customers_api.rb +1 -1
  63. data/lib/conekta/api/discounts_api.rb +1 -1
  64. data/lib/conekta/api/events_api.rb +1 -1
  65. data/lib/conekta/api/logs_api.rb +1 -1
  66. data/lib/conekta/api/orders_api.rb +1 -1
  67. data/lib/conekta/api/payment_link_api.rb +1 -1
  68. data/lib/conekta/api/payment_methods_api.rb +1 -1
  69. data/lib/conekta/api/plans_api.rb +1 -1
  70. data/lib/conekta/api/products_api.rb +1 -1
  71. data/lib/conekta/api/shipping_contacts_api.rb +1 -1
  72. data/lib/conekta/api/shippings_api.rb +1 -1
  73. data/lib/conekta/api/subscriptions_api.rb +1 -1
  74. data/lib/conekta/api/taxes_api.rb +1 -1
  75. data/lib/conekta/api/tokens_api.rb +1 -1
  76. data/lib/conekta/api/transactions_api.rb +13 -4
  77. data/lib/conekta/api/transfers_api.rb +1 -1
  78. data/lib/conekta/api/webhook_keys_api.rb +1 -1
  79. data/lib/conekta/api/webhooks_api.rb +1 -1
  80. data/lib/conekta/api_client.rb +39 -36
  81. data/lib/conekta/api_error.rb +1 -1
  82. data/lib/conekta/configuration.rb +13 -10
  83. data/lib/conekta/models/api_key_create_response.rb +14 -19
  84. data/lib/conekta/models/api_key_create_response_all_of.rb +14 -19
  85. data/lib/conekta/models/api_key_request.rb +16 -19
  86. data/lib/conekta/models/api_key_response.rb +14 -19
  87. data/lib/conekta/models/api_key_response_on_delete.rb +14 -19
  88. data/lib/conekta/models/api_key_update_request.rb +14 -19
  89. data/lib/conekta/models/balance_common_field.rb +14 -19
  90. data/lib/conekta/models/balance_response.rb +14 -19
  91. data/lib/conekta/models/blacklist_rule_response.rb +14 -19
  92. data/lib/conekta/models/charge_data_payment_method_bank_transfer_response.rb +14 -19
  93. data/lib/conekta/models/charge_data_payment_method_card_response.rb +14 -43
  94. data/lib/conekta/models/charge_data_payment_method_cash_response.rb +14 -19
  95. data/lib/conekta/models/charge_order_response.rb +15 -29
  96. data/lib/conekta/models/charge_order_response_payment_method.rb +1 -1
  97. data/lib/conekta/models/charge_request.rb +17 -30
  98. data/lib/conekta/models/charge_request_payment_method.rb +27 -44
  99. data/lib/conekta/models/charge_response.rb +15 -29
  100. data/lib/conekta/models/charge_response_channel.rb +14 -19
  101. data/lib/conekta/models/charge_response_payment_method.rb +1 -1
  102. data/lib/conekta/models/charge_response_refunds.rb +18 -19
  103. data/lib/conekta/models/charge_response_refunds_all_of.rb +14 -19
  104. data/lib/conekta/models/charge_response_refunds_data.rb +22 -19
  105. data/lib/conekta/models/charge_update_request.rb +216 -0
  106. data/lib/conekta/models/charges_data_response.rb +15 -29
  107. data/lib/conekta/models/checkout.rb +26 -19
  108. data/lib/conekta/models/checkout_order_template.rb +23 -20
  109. data/lib/conekta/models/checkout_order_template_customer_info.rb +2 -2
  110. data/lib/conekta/models/checkout_request.rb +16 -19
  111. data/lib/conekta/models/checkout_response.rb +22 -19
  112. data/lib/conekta/models/checkouts_response.rb +18 -19
  113. data/lib/conekta/models/checkouts_response_all_of.rb +14 -19
  114. data/lib/conekta/models/company_fiscal_info_address_response.rb +14 -19
  115. data/lib/conekta/models/company_fiscal_info_response.rb +14 -19
  116. data/lib/conekta/models/company_payout_destination_response.rb +14 -19
  117. data/lib/conekta/models/company_response.rb +14 -19
  118. data/lib/conekta/models/create_customer_fiscal_entities_response.rb +22 -19
  119. data/lib/conekta/models/create_customer_fiscal_entities_response_all_of.rb +20 -19
  120. data/lib/conekta/models/create_customer_payment_methods_request.rb +2 -2
  121. data/lib/conekta/models/create_customer_payment_methods_response.rb +1 -1
  122. data/lib/conekta/models/create_risk_rules_data.rb +20 -19
  123. data/lib/conekta/models/customer.rb +25 -20
  124. data/lib/conekta/models/customer_address.rb +22 -19
  125. data/lib/conekta/models/customer_antifraud_info.rb +14 -19
  126. data/lib/conekta/models/customer_antifraud_info_response.rb +14 -19
  127. data/lib/conekta/models/customer_fiscal_entities_data_response.rb +22 -19
  128. data/lib/conekta/models/customer_fiscal_entities_request.rb +16 -19
  129. data/lib/conekta/models/customer_fiscal_entities_request_address.rb +22 -19
  130. data/lib/conekta/models/customer_fiscal_entities_response.rb +18 -19
  131. data/lib/conekta/models/customer_fiscal_entities_response_all_of.rb +14 -19
  132. data/lib/conekta/models/customer_info.rb +20 -19
  133. data/lib/conekta/models/customer_info_just_customer_id.rb +16 -19
  134. data/lib/conekta/models/customer_info_just_customer_id_response.rb +14 -19
  135. data/lib/conekta/models/customer_payment_method_request.rb +16 -19
  136. data/lib/conekta/models/customer_payment_methods.rb +14 -19
  137. data/lib/conekta/models/customer_payment_methods_data.rb +1 -1
  138. data/lib/conekta/models/customer_payment_methods_request.rb +2 -2
  139. data/lib/conekta/models/customer_payment_methods_response.rb +18 -19
  140. data/lib/conekta/models/customer_response.rb +67 -20
  141. data/lib/conekta/models/customer_response_shipping_contacts.rb +18 -19
  142. data/lib/conekta/models/customer_response_shipping_contacts_all_of.rb +14 -19
  143. data/lib/conekta/models/customer_shipping_contacts.rb +52 -24
  144. data/lib/conekta/models/customer_shipping_contacts_address.rb +14 -19
  145. data/lib/conekta/models/customer_shipping_contacts_data_response.rb +54 -20
  146. data/lib/conekta/models/customer_shipping_contacts_data_response_all_of.rb +20 -19
  147. data/lib/conekta/models/customer_shipping_contacts_response.rb +46 -20
  148. data/lib/conekta/models/customer_shipping_contacts_response_address.rb +15 -19
  149. data/lib/conekta/models/customer_update_fiscal_entities_request.rb +14 -19
  150. data/lib/conekta/models/customer_update_shipping_contacts.rb +14 -19
  151. data/lib/conekta/models/customers_response.rb +18 -19
  152. data/lib/conekta/models/customers_response_all_of.rb +14 -19
  153. data/lib/conekta/models/delete_api_keys_response.rb +14 -19
  154. data/lib/conekta/models/delete_api_keys_response_all_of.rb +14 -19
  155. data/lib/conekta/models/deleted_blacklist_rule_response.rb +14 -19
  156. data/lib/conekta/models/deleted_whitelist_rule_response.rb +14 -19
  157. data/lib/conekta/models/details.rb +14 -19
  158. data/lib/conekta/models/details_error.rb +14 -19
  159. data/lib/conekta/models/discount_lines_data_response.rb +26 -19
  160. data/lib/conekta/models/discount_lines_response.rb +26 -19
  161. data/lib/conekta/models/discount_lines_response_all_of.rb +20 -19
  162. data/lib/conekta/models/email_checkout_request.rb +16 -19
  163. data/lib/conekta/models/error.rb +14 -19
  164. data/lib/conekta/models/error_all_of.rb +14 -19
  165. data/lib/conekta/models/event_response.rb +19 -20
  166. data/lib/conekta/models/events_resend_response.rb +19 -20
  167. data/lib/conekta/models/fiscal_entity_address.rb +312 -0
  168. data/lib/conekta/models/get_api_keys_response.rb +18 -19
  169. data/lib/conekta/models/get_api_keys_response_all_of.rb +14 -19
  170. data/lib/conekta/models/get_charges_response.rb +18 -19
  171. data/lib/conekta/models/get_charges_response_all_of.rb +14 -19
  172. data/lib/conekta/models/get_companies_response.rb +18 -19
  173. data/lib/conekta/models/get_companies_response_all_of.rb +14 -19
  174. data/lib/conekta/models/get_customer_payment_method_data_response.rb +1 -1
  175. data/lib/conekta/models/get_events_response.rb +18 -19
  176. data/lib/conekta/models/get_events_response_all_of.rb +14 -19
  177. data/lib/conekta/models/get_order_discount_lines_response.rb +18 -19
  178. data/lib/conekta/models/get_order_discount_lines_response_all_of.rb +14 -19
  179. data/lib/conekta/models/get_orders_response.rb +20 -19
  180. data/lib/conekta/models/get_payment_method_response.rb +18 -19
  181. data/lib/conekta/models/get_payment_method_response_all_of.rb +14 -19
  182. data/lib/conekta/models/get_plans_response.rb +18 -19
  183. data/lib/conekta/models/get_plans_response_all_of.rb +14 -19
  184. data/lib/conekta/models/get_transactions_response.rb +18 -19
  185. data/lib/conekta/models/get_transactions_response_all_of.rb +14 -19
  186. data/lib/conekta/models/get_transfers_response.rb +18 -19
  187. data/lib/conekta/models/get_transfers_response_all_of.rb +14 -19
  188. data/lib/conekta/models/get_webhook_keys_response.rb +18 -19
  189. data/lib/conekta/models/get_webhook_keys_response_all_of.rb +14 -19
  190. data/lib/conekta/models/get_webhooks_response.rb +18 -19
  191. data/lib/conekta/models/get_webhooks_response_all_of.rb +14 -19
  192. data/lib/conekta/models/log_response.rb +20 -19
  193. data/lib/conekta/models/logs_response.rb +14 -19
  194. data/lib/conekta/models/logs_response_data.rb +14 -19
  195. data/lib/conekta/models/order_capture_request.rb +16 -19
  196. data/lib/conekta/models/{customer_info_response.rb → order_customer_info_response.rb} +29 -23
  197. data/lib/conekta/models/order_discount_lines_request.rb +20 -19
  198. data/lib/conekta/models/{order_response_fiscal_entity_address.rb → order_fiscal_entity_address_response.rb} +48 -34
  199. data/lib/conekta/models/{order_response_fiscal_entity_address_all_of.rb → order_fiscal_entity_address_response_all_of.rb} +17 -22
  200. data/lib/conekta/models/order_fiscal_entity_request.rb +295 -0
  201. data/lib/conekta/models/order_fiscal_entity_response.rb +347 -0
  202. data/lib/conekta/models/{order_response_fiscal_entity.rb → order_next_action_response.rb} +32 -53
  203. data/lib/conekta/models/order_next_action_response_redirect_to_url.rb +226 -0
  204. data/lib/conekta/models/order_refund_request.rb +18 -19
  205. data/lib/conekta/models/order_request.rb +58 -24
  206. data/lib/conekta/models/order_request_customer_info.rb +2 -2
  207. data/lib/conekta/models/order_response.rb +31 -22
  208. data/lib/conekta/models/order_response_charges.rb +18 -19
  209. data/lib/conekta/models/order_response_charges_all_of.rb +14 -19
  210. data/lib/conekta/models/order_response_checkout.rb +19 -20
  211. data/lib/conekta/models/order_response_customer_info.rb +27 -21
  212. data/lib/conekta/models/order_response_customer_info_all_of.rb +14 -19
  213. data/lib/conekta/models/order_response_discount_lines.rb +18 -19
  214. data/lib/conekta/models/order_response_discount_lines_all_of.rb +14 -19
  215. data/lib/conekta/models/order_response_products.rb +18 -19
  216. data/lib/conekta/models/order_response_products_all_of.rb +14 -19
  217. data/lib/conekta/models/order_response_shipping_contact.rb +46 -20
  218. data/lib/conekta/models/order_response_shipping_contact_all_of.rb +14 -19
  219. data/lib/conekta/models/order_tax_request.rb +23 -20
  220. data/lib/conekta/models/order_update_fiscal_entity_request.rb +295 -0
  221. data/lib/conekta/models/order_update_request.rb +29 -21
  222. data/lib/conekta/models/order_update_request_customer_info.rb +2 -2
  223. data/lib/conekta/models/orders_response.rb +16 -19
  224. data/lib/conekta/models/page.rb +14 -19
  225. data/lib/conekta/models/pagination.rb +18 -19
  226. data/lib/conekta/models/payment_method.rb +16 -19
  227. data/lib/conekta/models/payment_method_bank_transfer.rb +16 -19
  228. data/lib/conekta/models/payment_method_card.rb +16 -43
  229. data/lib/conekta/models/payment_method_card_request.rb +18 -19
  230. data/lib/conekta/models/payment_method_card_request_all_of.rb +14 -19
  231. data/lib/conekta/models/payment_method_card_response.rb +22 -19
  232. data/lib/conekta/models/payment_method_card_response_all_of.rb +14 -19
  233. data/lib/conekta/models/payment_method_cash.rb +16 -19
  234. data/lib/conekta/models/payment_method_cash_request.rb +16 -19
  235. data/lib/conekta/models/payment_method_cash_request_all_of.rb +14 -19
  236. data/lib/conekta/models/payment_method_cash_response.rb +22 -19
  237. data/lib/conekta/models/payment_method_cash_response_all_of.rb +14 -19
  238. data/lib/conekta/models/payment_method_response.rb +22 -19
  239. data/lib/conekta/models/payment_method_spei_recurrent.rb +22 -19
  240. data/lib/conekta/models/payment_method_spei_recurrent_all_of.rb +14 -19
  241. data/lib/conekta/models/payment_method_spei_request.rb +16 -19
  242. data/lib/conekta/models/plan_request.rb +27 -20
  243. data/lib/conekta/models/plan_response.rb +19 -20
  244. data/lib/conekta/models/plan_update_request.rb +24 -21
  245. data/lib/conekta/models/product.rb +30 -21
  246. data/lib/conekta/models/product_data_response.rb +30 -21
  247. data/lib/conekta/models/product_data_response_all_of.rb +14 -19
  248. data/lib/conekta/models/product_order_response.rb +30 -21
  249. data/lib/conekta/models/product_order_response_all_of.rb +14 -19
  250. data/lib/conekta/models/risk_rules.rb +14 -19
  251. data/lib/conekta/models/risk_rules_data.rb +14 -19
  252. data/lib/conekta/models/risk_rules_list.rb +18 -19
  253. data/lib/conekta/models/shipping_order_response.rb +21 -20
  254. data/lib/conekta/models/shipping_request.rb +21 -20
  255. data/lib/conekta/models/sms_checkout_request.rb +16 -19
  256. data/lib/conekta/models/subscription_events_response.rb +18 -19
  257. data/lib/conekta/models/subscription_request.rb +16 -19
  258. data/lib/conekta/models/subscription_response.rb +14 -19
  259. data/lib/conekta/models/subscription_update_request.rb +14 -19
  260. data/lib/conekta/models/token.rb +14 -19
  261. data/lib/conekta/models/token_card.rb +24 -19
  262. data/lib/conekta/models/token_checkout.rb +14 -19
  263. data/lib/conekta/models/token_response.rb +22 -19
  264. data/lib/conekta/models/token_response_checkout.rb +14 -19
  265. data/lib/conekta/models/transaction_response.rb +36 -19
  266. data/lib/conekta/models/transfer_destination_response.rb +14 -19
  267. data/lib/conekta/models/transfer_method_response.rb +14 -19
  268. data/lib/conekta/models/transfer_response.rb +19 -20
  269. data/lib/conekta/models/transfers_response.rb +19 -20
  270. data/lib/conekta/models/update_customer.rb +19 -20
  271. data/lib/conekta/models/update_customer_antifraud_info.rb +14 -19
  272. data/lib/conekta/models/update_customer_fiscal_entities_response.rb +22 -19
  273. data/lib/conekta/models/update_customer_fiscal_entities_response_all_of.rb +20 -19
  274. data/lib/conekta/models/update_customer_payment_methods_response.rb +1 -1
  275. data/lib/conekta/models/update_order_discount_lines_request.rb +19 -20
  276. data/lib/conekta/models/update_order_tax_request.rb +29 -22
  277. data/lib/conekta/models/update_order_tax_response.rb +25 -20
  278. data/lib/conekta/models/update_order_tax_response_all_of.rb +14 -19
  279. data/lib/conekta/models/update_payment_methods.rb +14 -19
  280. data/lib/conekta/models/update_product.rb +29 -22
  281. data/lib/conekta/models/webhook_key_create_response.rb +14 -19
  282. data/lib/conekta/models/webhook_key_delete_response.rb +14 -19
  283. data/lib/conekta/models/webhook_key_request.rb +14 -19
  284. data/lib/conekta/models/webhook_key_response.rb +14 -19
  285. data/lib/conekta/models/webhook_key_update_request.rb +14 -19
  286. data/lib/conekta/models/webhook_log.rb +19 -20
  287. data/lib/conekta/models/webhook_request.rb +16 -19
  288. data/lib/conekta/models/webhook_response.rb +14 -19
  289. data/lib/conekta/models/webhook_update_request.rb +24 -27
  290. data/lib/conekta/models/whitelistlist_rule_response.rb +14 -19
  291. data/lib/conekta/version.rb +2 -2
  292. data/lib/conekta.rb +11 -5
  293. data/spec/api/orders_api_spec.rb +27 -1
  294. data/spec/api_client_spec.rb +1 -1
  295. data/spec/configuration_spec.rb +1 -1
  296. data/spec/spec_helper.rb +1 -8
  297. data/ssl_data/ca_bundle.crt +4039 -0
  298. data/templates/ruby/CUSTOM_VERSION.mustache +1 -0
  299. data/templates/ruby/api_client.mustache +256 -0
  300. data/templates/ruby/configuration.mustache +481 -0
  301. metadata +46 -29
  302. data/docs/OrderResponseFiscalEntity.md +0 -24
  303. data/docs/OrderResponseFiscalEntityAddress.md +0 -34
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.1.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.1.0
10
10
 
11
11
  =end
12
12
 
@@ -123,18 +123,26 @@ module Conekta
123
123
 
124
124
  if attributes.key?(:'type')
125
125
  self.type = attributes[:'type']
126
+ else
127
+ self.type = nil
126
128
  end
127
129
 
128
130
  if attributes.key?(:'id')
129
131
  self.id = attributes[:'id']
132
+ else
133
+ self.id = nil
130
134
  end
131
135
 
132
136
  if attributes.key?(:'object')
133
137
  self.object = attributes[:'object']
138
+ else
139
+ self.object = nil
134
140
  end
135
141
 
136
142
  if attributes.key?(:'created_at')
137
143
  self.created_at = attributes[:'created_at']
144
+ else
145
+ self.created_at = nil
138
146
  end
139
147
 
140
148
  if attributes.key?(:'parent_id')
@@ -185,6 +193,7 @@ module Conekta
185
193
  # Show invalid properties with the reasons. Usually used together with valid?
186
194
  # @return Array for valid properties with the reasons
187
195
  def list_invalid_properties
196
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
188
197
  invalid_properties = Array.new
189
198
  if @type.nil?
190
199
  invalid_properties.push('invalid value for "type", type cannot be nil.')
@@ -208,6 +217,7 @@ module Conekta
208
217
  # Check to see if the all the properties in the model are valid
209
218
  # @return true if the model is valid
210
219
  def valid?
220
+ warn '[DEPRECATED] the `valid?` method is obsolete'
211
221
  return false if @type.nil?
212
222
  return false if @id.nil?
213
223
  return false if @object.nil?
@@ -253,37 +263,30 @@ module Conekta
253
263
  # @param [Hash] attributes Model attributes in the form of hash
254
264
  # @return [Object] Returns the model itself
255
265
  def self.build_from_hash(attributes)
256
- new.build_from_hash(attributes)
257
- end
258
-
259
- # Builds the object from hash
260
- # @param [Hash] attributes Model attributes in the form of hash
261
- # @return [Object] Returns the model itself
262
- def build_from_hash(attributes)
263
266
  return nil unless attributes.is_a?(Hash)
264
267
  attributes = attributes.transform_keys(&:to_sym)
265
- self.class.openapi_types.each_pair do |key, type|
266
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
267
- self.send("#{key}=", nil)
268
+ transformed_hash = {}
269
+ openapi_types.each_pair do |key, type|
270
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
271
+ transformed_hash["#{key}"] = nil
268
272
  elsif type =~ /\AArray<(.*)>/i
269
273
  # check to ensure the input is an array given that the attribute
270
274
  # is documented as an array but the input is not
271
- if attributes[self.class.attribute_map[key]].is_a?(Array)
272
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
275
+ if attributes[attribute_map[key]].is_a?(Array)
276
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
273
277
  end
274
- elsif !attributes[self.class.attribute_map[key]].nil?
275
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
278
+ elsif !attributes[attribute_map[key]].nil?
279
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
276
280
  end
277
281
  end
278
-
279
- self
282
+ new(transformed_hash)
280
283
  end
281
284
 
282
285
  # Deserializes the data based on type
283
286
  # @param string type Data type
284
287
  # @param string value Value to be deserialized
285
288
  # @return [Object] Deserialized data
286
- def _deserialize(type, value)
289
+ def self._deserialize(type, value)
287
290
  case type.to_sym
288
291
  when :Time
289
292
  Time.parse(value)
@@ -318,7 +321,7 @@ module Conekta
318
321
  else # model
319
322
  # models (e.g. Pet) or oneOf
320
323
  klass = Conekta.const_get(type)
321
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
324
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
322
325
  end
323
326
  end
324
327
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.1.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.1.0
10
10
 
11
11
  =end
12
12
 
@@ -138,6 +138,7 @@ module Conekta
138
138
  # Show invalid properties with the reasons. Usually used together with valid?
139
139
  # @return Array for valid properties with the reasons
140
140
  def list_invalid_properties
141
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
141
142
  invalid_properties = Array.new
142
143
  invalid_properties
143
144
  end
@@ -145,6 +146,7 @@ module Conekta
145
146
  # Check to see if the all the properties in the model are valid
146
147
  # @return true if the model is valid
147
148
  def valid?
149
+ warn '[DEPRECATED] the `valid?` method is obsolete'
148
150
  true
149
151
  end
150
152
 
@@ -181,37 +183,30 @@ module Conekta
181
183
  # @param [Hash] attributes Model attributes in the form of hash
182
184
  # @return [Object] Returns the model itself
183
185
  def self.build_from_hash(attributes)
184
- new.build_from_hash(attributes)
185
- end
186
-
187
- # Builds the object from hash
188
- # @param [Hash] attributes Model attributes in the form of hash
189
- # @return [Object] Returns the model itself
190
- def build_from_hash(attributes)
191
186
  return nil unless attributes.is_a?(Hash)
192
187
  attributes = attributes.transform_keys(&:to_sym)
193
- self.class.openapi_types.each_pair do |key, type|
194
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
195
- self.send("#{key}=", nil)
188
+ transformed_hash = {}
189
+ openapi_types.each_pair do |key, type|
190
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
191
+ transformed_hash["#{key}"] = nil
196
192
  elsif type =~ /\AArray<(.*)>/i
197
193
  # check to ensure the input is an array given that the attribute
198
194
  # is documented as an array but the input is not
199
- if attributes[self.class.attribute_map[key]].is_a?(Array)
200
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
195
+ if attributes[attribute_map[key]].is_a?(Array)
196
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
201
197
  end
202
- elsif !attributes[self.class.attribute_map[key]].nil?
203
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
198
+ elsif !attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
204
200
  end
205
201
  end
206
-
207
- self
202
+ new(transformed_hash)
208
203
  end
209
204
 
210
205
  # Deserializes the data based on type
211
206
  # @param string type Data type
212
207
  # @param string value Value to be deserialized
213
208
  # @return [Object] Deserialized data
214
- def _deserialize(type, value)
209
+ def self._deserialize(type, value)
215
210
  case type.to_sym
216
211
  when :Time
217
212
  Time.parse(value)
@@ -246,7 +241,7 @@ module Conekta
246
241
  else # model
247
242
  # models (e.g. Pet) or oneOf
248
243
  klass = Conekta.const_get(type)
249
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
244
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
250
245
  end
251
246
  end
252
247
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.1.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.1.0
10
10
 
11
11
  =end
12
12
 
@@ -110,6 +110,8 @@ module Conekta
110
110
 
111
111
  if attributes.key?(:'object')
112
112
  self.object = attributes[:'object']
113
+ else
114
+ self.object = nil
113
115
  end
114
116
 
115
117
  if attributes.key?(:'auth_code')
@@ -148,6 +150,7 @@ module Conekta
148
150
  # Show invalid properties with the reasons. Usually used together with valid?
149
151
  # @return Array for valid properties with the reasons
150
152
  def list_invalid_properties
153
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
151
154
  invalid_properties = Array.new
152
155
  if @object.nil?
153
156
  invalid_properties.push('invalid value for "object", object cannot be nil.')
@@ -159,6 +162,7 @@ module Conekta
159
162
  # Check to see if the all the properties in the model are valid
160
163
  # @return true if the model is valid
161
164
  def valid?
165
+ warn '[DEPRECATED] the `valid?` method is obsolete'
162
166
  return false if @object.nil?
163
167
  true
164
168
  end
@@ -196,37 +200,30 @@ module Conekta
196
200
  # @param [Hash] attributes Model attributes in the form of hash
197
201
  # @return [Object] Returns the model itself
198
202
  def self.build_from_hash(attributes)
199
- new.build_from_hash(attributes)
200
- end
201
-
202
- # Builds the object from hash
203
- # @param [Hash] attributes Model attributes in the form of hash
204
- # @return [Object] Returns the model itself
205
- def build_from_hash(attributes)
206
203
  return nil unless attributes.is_a?(Hash)
207
204
  attributes = attributes.transform_keys(&:to_sym)
208
- self.class.openapi_types.each_pair do |key, type|
209
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
210
- self.send("#{key}=", nil)
205
+ transformed_hash = {}
206
+ openapi_types.each_pair do |key, type|
207
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
208
+ transformed_hash["#{key}"] = nil
211
209
  elsif type =~ /\AArray<(.*)>/i
212
210
  # check to ensure the input is an array given that the attribute
213
211
  # is documented as an array but the input is not
214
- if attributes[self.class.attribute_map[key]].is_a?(Array)
215
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
212
+ if attributes[attribute_map[key]].is_a?(Array)
213
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
216
214
  end
217
- elsif !attributes[self.class.attribute_map[key]].nil?
218
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
215
+ elsif !attributes[attribute_map[key]].nil?
216
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
219
217
  end
220
218
  end
221
-
222
- self
219
+ new(transformed_hash)
223
220
  end
224
221
 
225
222
  # Deserializes the data based on type
226
223
  # @param string type Data type
227
224
  # @param string value Value to be deserialized
228
225
  # @return [Object] Deserialized data
229
- def _deserialize(type, value)
226
+ def self._deserialize(type, value)
230
227
  case type.to_sym
231
228
  when :Time
232
229
  Time.parse(value)
@@ -261,7 +258,7 @@ module Conekta
261
258
  else # model
262
259
  # models (e.g. Pet) or oneOf
263
260
  klass = Conekta.const_get(type)
264
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
261
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
265
262
  end
266
263
  end
267
264
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.1.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.1.0
10
10
 
11
11
  =end
12
12
 
@@ -72,6 +72,8 @@ module Conekta
72
72
 
73
73
  if attributes.key?(:'type')
74
74
  self.type = attributes[:'type']
75
+ else
76
+ self.type = nil
75
77
  end
76
78
 
77
79
  if attributes.key?(:'expires_at')
@@ -82,6 +84,7 @@ module Conekta
82
84
  # Show invalid properties with the reasons. Usually used together with valid?
83
85
  # @return Array for valid properties with the reasons
84
86
  def list_invalid_properties
87
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
88
  invalid_properties = Array.new
86
89
  if @type.nil?
87
90
  invalid_properties.push('invalid value for "type", type cannot be nil.')
@@ -93,6 +96,7 @@ module Conekta
93
96
  # Check to see if the all the properties in the model are valid
94
97
  # @return true if the model is valid
95
98
  def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
96
100
  return false if @type.nil?
97
101
  true
98
102
  end
@@ -122,37 +126,30 @@ module Conekta
122
126
  # @param [Hash] attributes Model attributes in the form of hash
123
127
  # @return [Object] Returns the model itself
124
128
  def self.build_from_hash(attributes)
125
- new.build_from_hash(attributes)
126
- end
127
-
128
- # Builds the object from hash
129
- # @param [Hash] attributes Model attributes in the form of hash
130
- # @return [Object] Returns the model itself
131
- def build_from_hash(attributes)
132
129
  return nil unless attributes.is_a?(Hash)
133
130
  attributes = attributes.transform_keys(&:to_sym)
134
- self.class.openapi_types.each_pair do |key, type|
135
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
136
- self.send("#{key}=", nil)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
137
135
  elsif type =~ /\AArray<(.*)>/i
138
136
  # check to ensure the input is an array given that the attribute
139
137
  # is documented as an array but the input is not
140
- if attributes[self.class.attribute_map[key]].is_a?(Array)
141
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
140
  end
143
- elsif !attributes[self.class.attribute_map[key]].nil?
144
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
143
  end
146
144
  end
147
-
148
- self
145
+ new(transformed_hash)
149
146
  end
150
147
 
151
148
  # Deserializes the data based on type
152
149
  # @param string type Data type
153
150
  # @param string value Value to be deserialized
154
151
  # @return [Object] Deserialized data
155
- def _deserialize(type, value)
152
+ def self._deserialize(type, value)
156
153
  case type.to_sym
157
154
  when :Time
158
155
  Time.parse(value)
@@ -187,7 +184,7 @@ module Conekta
187
184
  else # model
188
185
  # models (e.g. Pet) or oneOf
189
186
  klass = Conekta.const_get(type)
190
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
191
188
  end
192
189
  end
193
190
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.1.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.1.0
10
10
 
11
11
  =end
12
12
 
@@ -65,6 +65,7 @@ module Conekta
65
65
  # Show invalid properties with the reasons. Usually used together with valid?
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
68
69
  invalid_properties = Array.new
69
70
  invalid_properties
70
71
  end
@@ -72,6 +73,7 @@ module Conekta
72
73
  # Check to see if the all the properties in the model are valid
73
74
  # @return true if the model is valid
74
75
  def valid?
76
+ warn '[DEPRECATED] the `valid?` method is obsolete'
75
77
  true
76
78
  end
77
79
 
@@ -99,37 +101,30 @@ module Conekta
99
101
  # @param [Hash] attributes Model attributes in the form of hash
100
102
  # @return [Object] Returns the model itself
101
103
  def self.build_from_hash(attributes)
102
- new.build_from_hash(attributes)
103
- end
104
-
105
- # Builds the object from hash
106
- # @param [Hash] attributes Model attributes in the form of hash
107
- # @return [Object] Returns the model itself
108
- def build_from_hash(attributes)
109
104
  return nil unless attributes.is_a?(Hash)
110
105
  attributes = attributes.transform_keys(&:to_sym)
111
- self.class.openapi_types.each_pair do |key, type|
112
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
- self.send("#{key}=", nil)
106
+ transformed_hash = {}
107
+ openapi_types.each_pair do |key, type|
108
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
109
+ transformed_hash["#{key}"] = nil
114
110
  elsif type =~ /\AArray<(.*)>/i
115
111
  # check to ensure the input is an array given that the attribute
116
112
  # is documented as an array but the input is not
117
- if attributes[self.class.attribute_map[key]].is_a?(Array)
118
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
119
115
  end
120
- elsif !attributes[self.class.attribute_map[key]].nil?
121
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ elsif !attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
122
118
  end
123
119
  end
124
-
125
- self
120
+ new(transformed_hash)
126
121
  end
127
122
 
128
123
  # Deserializes the data based on type
129
124
  # @param string type Data type
130
125
  # @param string value Value to be deserialized
131
126
  # @return [Object] Deserialized data
132
- def _deserialize(type, value)
127
+ def self._deserialize(type, value)
133
128
  case type.to_sym
134
129
  when :Time
135
130
  Time.parse(value)
@@ -164,7 +159,7 @@ module Conekta
164
159
  else # model
165
160
  # models (e.g. Pet) or oneOf
166
161
  klass = Conekta.const_get(type)
167
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
162
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
163
  end
169
164
  end
170
165
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.1.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.1.0
10
10
 
11
11
  =end
12
12
 
@@ -103,18 +103,26 @@ module Conekta
103
103
 
104
104
  if attributes.key?(:'type')
105
105
  self.type = attributes[:'type']
106
+ else
107
+ self.type = nil
106
108
  end
107
109
 
108
110
  if attributes.key?(:'id')
109
111
  self.id = attributes[:'id']
112
+ else
113
+ self.id = nil
110
114
  end
111
115
 
112
116
  if attributes.key?(:'object')
113
117
  self.object = attributes[:'object']
118
+ else
119
+ self.object = nil
114
120
  end
115
121
 
116
122
  if attributes.key?(:'created_at')
117
123
  self.created_at = attributes[:'created_at']
124
+ else
125
+ self.created_at = nil
118
126
  end
119
127
 
120
128
  if attributes.key?(:'parent_id')
@@ -145,6 +153,7 @@ module Conekta
145
153
  # Show invalid properties with the reasons. Usually used together with valid?
146
154
  # @return Array for valid properties with the reasons
147
155
  def list_invalid_properties
156
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
148
157
  invalid_properties = Array.new
149
158
  if @type.nil?
150
159
  invalid_properties.push('invalid value for "type", type cannot be nil.')
@@ -168,6 +177,7 @@ module Conekta
168
177
  # Check to see if the all the properties in the model are valid
169
178
  # @return true if the model is valid
170
179
  def valid?
180
+ warn '[DEPRECATED] the `valid?` method is obsolete'
171
181
  return false if @type.nil?
172
182
  return false if @id.nil?
173
183
  return false if @object.nil?
@@ -208,37 +218,30 @@ module Conekta
208
218
  # @param [Hash] attributes Model attributes in the form of hash
209
219
  # @return [Object] Returns the model itself
210
220
  def self.build_from_hash(attributes)
211
- new.build_from_hash(attributes)
212
- end
213
-
214
- # Builds the object from hash
215
- # @param [Hash] attributes Model attributes in the form of hash
216
- # @return [Object] Returns the model itself
217
- def build_from_hash(attributes)
218
221
  return nil unless attributes.is_a?(Hash)
219
222
  attributes = attributes.transform_keys(&:to_sym)
220
- self.class.openapi_types.each_pair do |key, type|
221
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
222
- self.send("#{key}=", nil)
223
+ transformed_hash = {}
224
+ openapi_types.each_pair do |key, type|
225
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
226
+ transformed_hash["#{key}"] = nil
223
227
  elsif type =~ /\AArray<(.*)>/i
224
228
  # check to ensure the input is an array given that the attribute
225
229
  # is documented as an array but the input is not
226
- if attributes[self.class.attribute_map[key]].is_a?(Array)
227
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
230
+ if attributes[attribute_map[key]].is_a?(Array)
231
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
228
232
  end
229
- elsif !attributes[self.class.attribute_map[key]].nil?
230
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
233
+ elsif !attributes[attribute_map[key]].nil?
234
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
231
235
  end
232
236
  end
233
-
234
- self
237
+ new(transformed_hash)
235
238
  end
236
239
 
237
240
  # Deserializes the data based on type
238
241
  # @param string type Data type
239
242
  # @param string value Value to be deserialized
240
243
  # @return [Object] Deserialized data
241
- def _deserialize(type, value)
244
+ def self._deserialize(type, value)
242
245
  case type.to_sym
243
246
  when :Time
244
247
  Time.parse(value)
@@ -273,7 +276,7 @@ module Conekta
273
276
  else # model
274
277
  # models (e.g. Pet) or oneOf
275
278
  klass = Conekta.const_get(type)
276
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
279
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
277
280
  end
278
281
  end
279
282
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.1.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.1.0
10
10
 
11
11
  =end
12
12
 
@@ -98,6 +98,7 @@ module Conekta
98
98
  # Show invalid properties with the reasons. Usually used together with valid?
99
99
  # @return Array for valid properties with the reasons
100
100
  def list_invalid_properties
101
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
102
  invalid_properties = Array.new
102
103
  invalid_properties
103
104
  end
@@ -105,6 +106,7 @@ module Conekta
105
106
  # Check to see if the all the properties in the model are valid
106
107
  # @return true if the model is valid
107
108
  def valid?
109
+ warn '[DEPRECATED] the `valid?` method is obsolete'
108
110
  true
109
111
  end
110
112
 
@@ -136,37 +138,30 @@ module Conekta
136
138
  # @param [Hash] attributes Model attributes in the form of hash
137
139
  # @return [Object] Returns the model itself
138
140
  def self.build_from_hash(attributes)
139
- new.build_from_hash(attributes)
140
- end
141
-
142
- # Builds the object from hash
143
- # @param [Hash] attributes Model attributes in the form of hash
144
- # @return [Object] Returns the model itself
145
- def build_from_hash(attributes)
146
141
  return nil unless attributes.is_a?(Hash)
147
142
  attributes = attributes.transform_keys(&:to_sym)
148
- self.class.openapi_types.each_pair do |key, type|
149
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
150
- self.send("#{key}=", nil)
143
+ transformed_hash = {}
144
+ openapi_types.each_pair do |key, type|
145
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
146
+ transformed_hash["#{key}"] = nil
151
147
  elsif type =~ /\AArray<(.*)>/i
152
148
  # check to ensure the input is an array given that the attribute
153
149
  # is documented as an array but the input is not
154
- if attributes[self.class.attribute_map[key]].is_a?(Array)
155
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
150
+ if attributes[attribute_map[key]].is_a?(Array)
151
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
156
152
  end
157
- elsif !attributes[self.class.attribute_map[key]].nil?
158
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
+ elsif !attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
159
155
  end
160
156
  end
161
-
162
- self
157
+ new(transformed_hash)
163
158
  end
164
159
 
165
160
  # Deserializes the data based on type
166
161
  # @param string type Data type
167
162
  # @param string value Value to be deserialized
168
163
  # @return [Object] Deserialized data
169
- def _deserialize(type, value)
164
+ def self._deserialize(type, value)
170
165
  case type.to_sym
171
166
  when :Time
172
167
  Time.parse(value)
@@ -201,7 +196,7 @@ module Conekta
201
196
  else # model
202
197
  # models (e.g. Pet) or oneOf
203
198
  klass = Conekta.const_get(type)
204
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
199
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
205
200
  end
206
201
  end
207
202