conekta 6.0.0 → 6.0.2

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 (350) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Makefile +10 -1
  4. data/README.md +16 -52
  5. data/VERSION +1 -1
  6. data/conekta.gemspec +4 -3
  7. data/config-ruby.json +32 -0
  8. data/docs/ApiKeyCreateResponse.md +3 -3
  9. data/docs/BalancesApi.md +1 -1
  10. data/docs/ChargeOrderResponse.md +0 -2
  11. data/docs/ChargeRequest.md +0 -2
  12. data/docs/ChargeRequestPaymentMethod.md +2 -0
  13. data/docs/ChargeResponse.md +0 -2
  14. data/docs/ChargeUpdateRequest.md +18 -0
  15. data/docs/ChargesApi.md +76 -0
  16. data/docs/ChargesDataResponse.md +0 -2
  17. data/docs/Checkout.md +2 -2
  18. data/docs/CheckoutOrderTemplate.md +1 -1
  19. data/docs/CheckoutRequest.md +2 -2
  20. data/docs/CheckoutResponse.md +3 -3
  21. data/docs/CreateCustomerFiscalEntitiesResponse.md +1 -1
  22. data/docs/CustomerAddress.md +3 -3
  23. data/docs/CustomerFiscalEntitiesDataResponse.md +1 -1
  24. data/docs/CustomerFiscalEntitiesRequest.md +1 -1
  25. data/docs/CustomerResponse.md +10 -8
  26. data/docs/CustomerShippingContacts.md +3 -1
  27. data/docs/CustomerShippingContactsAddress.md +2 -2
  28. data/docs/CustomerShippingContactsDataResponse.md +2 -0
  29. data/docs/CustomerShippingContactsResponse.md +2 -0
  30. data/docs/CustomerShippingContactsResponseAddress.md +2 -2
  31. data/docs/CustomerUpdateFiscalEntitiesRequest.md +1 -1
  32. data/docs/CustomersApi.md +1 -1
  33. data/docs/CustomersResponse.md +3 -3
  34. data/docs/EventResponse.md +1 -1
  35. data/docs/FiscalEntityAddress.md +30 -0
  36. data/docs/LogResponse.md +5 -5
  37. data/docs/LogsResponseData.md +5 -5
  38. data/docs/{CustomerInfoResponse.md → OrderCustomerInfoResponse.md} +4 -2
  39. data/docs/OrderFiscalEntityAddressResponse.md +32 -0
  40. data/docs/OrderFiscalEntityRequest.md +28 -0
  41. data/docs/OrderFiscalEntityResponse.md +34 -0
  42. data/docs/OrderNextActionResponse.md +20 -0
  43. data/docs/OrderNextActionResponseRedirectToUrl.md +20 -0
  44. data/docs/OrderRequest.md +7 -1
  45. data/docs/OrderResponse.md +3 -1
  46. data/docs/OrderResponseCustomerInfo.md +4 -2
  47. data/docs/OrderResponseShippingContact.md +8 -6
  48. data/docs/OrderTaxRequest.md +1 -1
  49. data/docs/OrderUpdateFiscalEntityRequest.md +28 -0
  50. data/docs/OrderUpdateRequest.md +2 -0
  51. data/docs/PaymentLinkApi.md +1 -1
  52. data/docs/Product.md +3 -3
  53. data/docs/ShippingRequest.md +1 -1
  54. data/docs/TokenResponseCheckout.md +1 -1
  55. data/docs/TransactionsApi.md +9 -3
  56. data/docs/UpdateCustomerFiscalEntitiesResponse.md +1 -1
  57. data/docs/WebhookLog.md +1 -1
  58. data/docs/WebhookResponse.md +1 -1
  59. data/docs/WebhookUpdateRequest.md +2 -2
  60. data/lib/conekta/api/antifraud_api.rb +1 -1
  61. data/lib/conekta/api/api_keys_api.rb +1 -1
  62. data/lib/conekta/api/balances_api.rb +2 -2
  63. data/lib/conekta/api/charges_api.rb +83 -1
  64. data/lib/conekta/api/companies_api.rb +1 -1
  65. data/lib/conekta/api/customers_api.rb +1 -1
  66. data/lib/conekta/api/discounts_api.rb +1 -1
  67. data/lib/conekta/api/events_api.rb +1 -1
  68. data/lib/conekta/api/logs_api.rb +1 -1
  69. data/lib/conekta/api/orders_api.rb +1 -1
  70. data/lib/conekta/api/payment_link_api.rb +1 -1
  71. data/lib/conekta/api/payment_methods_api.rb +1 -1
  72. data/lib/conekta/api/plans_api.rb +1 -1
  73. data/lib/conekta/api/products_api.rb +1 -1
  74. data/lib/conekta/api/shipping_contacts_api.rb +1 -1
  75. data/lib/conekta/api/shippings_api.rb +1 -1
  76. data/lib/conekta/api/subscriptions_api.rb +1 -1
  77. data/lib/conekta/api/taxes_api.rb +1 -1
  78. data/lib/conekta/api/tokens_api.rb +1 -1
  79. data/lib/conekta/api/transactions_api.rb +13 -4
  80. data/lib/conekta/api/transfers_api.rb +1 -1
  81. data/lib/conekta/api/webhook_keys_api.rb +1 -1
  82. data/lib/conekta/api/webhooks_api.rb +1 -1
  83. data/lib/conekta/api_client.rb +40 -37
  84. data/lib/conekta/api_error.rb +1 -1
  85. data/lib/conekta/configuration.rb +13 -10
  86. data/lib/conekta/models/api_key_create_response.rb +28 -34
  87. data/lib/conekta/models/api_key_create_response_all_of.rb +14 -19
  88. data/lib/conekta/models/api_key_request.rb +16 -19
  89. data/lib/conekta/models/api_key_response.rb +14 -19
  90. data/lib/conekta/models/api_key_response_on_delete.rb +14 -19
  91. data/lib/conekta/models/api_key_update_request.rb +14 -19
  92. data/lib/conekta/models/balance_common_field.rb +14 -19
  93. data/lib/conekta/models/balance_response.rb +14 -19
  94. data/lib/conekta/models/blacklist_rule_response.rb +14 -19
  95. data/lib/conekta/models/charge_data_payment_method_bank_transfer_response.rb +14 -19
  96. data/lib/conekta/models/charge_data_payment_method_card_response.rb +14 -43
  97. data/lib/conekta/models/charge_data_payment_method_cash_response.rb +14 -19
  98. data/lib/conekta/models/charge_order_response.rb +15 -29
  99. data/lib/conekta/models/charge_order_response_payment_method.rb +1 -1
  100. data/lib/conekta/models/charge_request.rb +17 -30
  101. data/lib/conekta/models/charge_request_payment_method.rb +27 -44
  102. data/lib/conekta/models/charge_response.rb +15 -29
  103. data/lib/conekta/models/charge_response_channel.rb +14 -19
  104. data/lib/conekta/models/charge_response_payment_method.rb +1 -1
  105. data/lib/conekta/models/charge_response_refunds.rb +18 -20
  106. data/lib/conekta/models/charge_response_refunds_all_of.rb +14 -19
  107. data/lib/conekta/models/charge_response_refunds_data.rb +22 -19
  108. data/lib/conekta/models/charge_update_request.rb +216 -0
  109. data/lib/conekta/models/charges_data_response.rb +15 -29
  110. data/lib/conekta/models/checkout.rb +26 -19
  111. data/lib/conekta/models/checkout_order_template.rb +23 -20
  112. data/lib/conekta/models/checkout_order_template_customer_info.rb +2 -2
  113. data/lib/conekta/models/checkout_request.rb +16 -19
  114. data/lib/conekta/models/checkout_response.rb +22 -19
  115. data/lib/conekta/models/checkouts_response.rb +18 -20
  116. data/lib/conekta/models/checkouts_response_all_of.rb +14 -19
  117. data/lib/conekta/models/company_fiscal_info_address_response.rb +14 -19
  118. data/lib/conekta/models/company_fiscal_info_response.rb +14 -19
  119. data/lib/conekta/models/company_payout_destination_response.rb +14 -19
  120. data/lib/conekta/models/company_response.rb +14 -19
  121. data/lib/conekta/models/create_customer_fiscal_entities_response.rb +23 -21
  122. data/lib/conekta/models/create_customer_fiscal_entities_response_all_of.rb +20 -19
  123. data/lib/conekta/models/create_customer_payment_methods_request.rb +2 -2
  124. data/lib/conekta/models/create_customer_payment_methods_response.rb +1 -1
  125. data/lib/conekta/models/create_risk_rules_data.rb +20 -19
  126. data/lib/conekta/models/customer.rb +25 -20
  127. data/lib/conekta/models/customer_address.rb +22 -19
  128. data/lib/conekta/models/customer_antifraud_info.rb +14 -19
  129. data/lib/conekta/models/customer_antifraud_info_response.rb +14 -19
  130. data/lib/conekta/models/customer_fiscal_entities_data_response.rb +23 -21
  131. data/lib/conekta/models/customer_fiscal_entities_request.rb +17 -20
  132. data/lib/conekta/models/customer_fiscal_entities_request_address.rb +22 -19
  133. data/lib/conekta/models/customer_fiscal_entities_response.rb +18 -20
  134. data/lib/conekta/models/customer_fiscal_entities_response_all_of.rb +14 -19
  135. data/lib/conekta/models/customer_info.rb +20 -19
  136. data/lib/conekta/models/customer_info_just_customer_id.rb +16 -19
  137. data/lib/conekta/models/customer_info_just_customer_id_response.rb +14 -19
  138. data/lib/conekta/models/customer_payment_method_request.rb +16 -19
  139. data/lib/conekta/models/customer_payment_methods.rb +14 -19
  140. data/lib/conekta/models/customer_payment_methods_data.rb +1 -1
  141. data/lib/conekta/models/customer_payment_methods_request.rb +2 -2
  142. data/lib/conekta/models/customer_payment_methods_response.rb +18 -20
  143. data/lib/conekta/models/customer_response.rb +67 -20
  144. data/lib/conekta/models/customer_response_shipping_contacts.rb +18 -20
  145. data/lib/conekta/models/customer_response_shipping_contacts_all_of.rb +14 -19
  146. data/lib/conekta/models/customer_shipping_contacts.rb +52 -24
  147. data/lib/conekta/models/customer_shipping_contacts_address.rb +14 -19
  148. data/lib/conekta/models/customer_shipping_contacts_data_response.rb +55 -22
  149. data/lib/conekta/models/customer_shipping_contacts_data_response_all_of.rb +20 -19
  150. data/lib/conekta/models/customer_shipping_contacts_response.rb +46 -20
  151. data/lib/conekta/models/customer_shipping_contacts_response_address.rb +15 -19
  152. data/lib/conekta/models/customer_update_fiscal_entities_request.rb +15 -20
  153. data/lib/conekta/models/customer_update_shipping_contacts.rb +14 -19
  154. data/lib/conekta/models/customers_response.rb +34 -36
  155. data/lib/conekta/models/customers_response_all_of.rb +14 -19
  156. data/lib/conekta/models/delete_api_keys_response.rb +15 -21
  157. data/lib/conekta/models/delete_api_keys_response_all_of.rb +14 -19
  158. data/lib/conekta/models/deleted_blacklist_rule_response.rb +14 -19
  159. data/lib/conekta/models/deleted_whitelist_rule_response.rb +14 -19
  160. data/lib/conekta/models/details.rb +14 -19
  161. data/lib/conekta/models/details_error.rb +14 -19
  162. data/lib/conekta/models/discount_lines_data_response.rb +26 -19
  163. data/lib/conekta/models/discount_lines_response.rb +26 -20
  164. data/lib/conekta/models/discount_lines_response_all_of.rb +20 -19
  165. data/lib/conekta/models/email_checkout_request.rb +16 -19
  166. data/lib/conekta/models/error.rb +15 -21
  167. data/lib/conekta/models/error_all_of.rb +14 -19
  168. data/lib/conekta/models/event_response.rb +19 -20
  169. data/lib/conekta/models/events_resend_response.rb +19 -20
  170. data/lib/conekta/models/fiscal_entity_address.rb +312 -0
  171. data/lib/conekta/models/get_api_keys_response.rb +18 -20
  172. data/lib/conekta/models/get_api_keys_response_all_of.rb +14 -19
  173. data/lib/conekta/models/get_charges_response.rb +18 -20
  174. data/lib/conekta/models/get_charges_response_all_of.rb +14 -19
  175. data/lib/conekta/models/get_companies_response.rb +18 -20
  176. data/lib/conekta/models/get_companies_response_all_of.rb +14 -19
  177. data/lib/conekta/models/get_customer_payment_method_data_response.rb +1 -1
  178. data/lib/conekta/models/get_events_response.rb +18 -20
  179. data/lib/conekta/models/get_events_response_all_of.rb +14 -19
  180. data/lib/conekta/models/get_order_discount_lines_response.rb +18 -20
  181. data/lib/conekta/models/get_order_discount_lines_response_all_of.rb +14 -19
  182. data/lib/conekta/models/get_orders_response.rb +20 -19
  183. data/lib/conekta/models/get_payment_method_response.rb +18 -20
  184. data/lib/conekta/models/get_payment_method_response_all_of.rb +14 -19
  185. data/lib/conekta/models/get_plans_response.rb +18 -20
  186. data/lib/conekta/models/get_plans_response_all_of.rb +14 -19
  187. data/lib/conekta/models/get_transactions_response.rb +18 -20
  188. data/lib/conekta/models/get_transactions_response_all_of.rb +14 -19
  189. data/lib/conekta/models/get_transfers_response.rb +18 -20
  190. data/lib/conekta/models/get_transfers_response_all_of.rb +14 -19
  191. data/lib/conekta/models/get_webhook_keys_response.rb +18 -20
  192. data/lib/conekta/models/get_webhook_keys_response_all_of.rb +14 -19
  193. data/lib/conekta/models/get_webhooks_response.rb +18 -20
  194. data/lib/conekta/models/get_webhooks_response_all_of.rb +14 -19
  195. data/lib/conekta/models/log_response.rb +20 -19
  196. data/lib/conekta/models/logs_response.rb +14 -19
  197. data/lib/conekta/models/logs_response_data.rb +14 -19
  198. data/lib/conekta/models/order_capture_request.rb +16 -19
  199. data/lib/conekta/models/{customer_info_response.rb → order_customer_info_response.rb} +29 -23
  200. data/lib/conekta/models/order_discount_lines_request.rb +20 -19
  201. data/lib/conekta/models/{order_response_fiscal_entity_address.rb → order_fiscal_entity_address_response.rb} +47 -34
  202. data/lib/conekta/models/{order_response_fiscal_entity_address_all_of.rb → order_fiscal_entity_address_response_all_of.rb} +17 -22
  203. data/lib/conekta/models/order_fiscal_entity_request.rb +295 -0
  204. data/lib/conekta/models/order_fiscal_entity_response.rb +347 -0
  205. data/lib/conekta/models/{order_response_fiscal_entity.rb → order_next_action_response.rb} +32 -53
  206. data/lib/conekta/models/order_next_action_response_redirect_to_url.rb +226 -0
  207. data/lib/conekta/models/order_refund_request.rb +18 -19
  208. data/lib/conekta/models/order_request.rb +58 -24
  209. data/lib/conekta/models/order_request_customer_info.rb +2 -2
  210. data/lib/conekta/models/order_response.rb +31 -22
  211. data/lib/conekta/models/order_response_charges.rb +18 -20
  212. data/lib/conekta/models/order_response_charges_all_of.rb +14 -19
  213. data/lib/conekta/models/order_response_checkout.rb +19 -20
  214. data/lib/conekta/models/order_response_customer_info.rb +33 -28
  215. data/lib/conekta/models/order_response_customer_info_all_of.rb +14 -19
  216. data/lib/conekta/models/order_response_discount_lines.rb +18 -20
  217. data/lib/conekta/models/order_response_discount_lines_all_of.rb +14 -19
  218. data/lib/conekta/models/order_response_products.rb +18 -20
  219. data/lib/conekta/models/order_response_products_all_of.rb +14 -19
  220. data/lib/conekta/models/order_response_shipping_contact.rb +74 -49
  221. data/lib/conekta/models/order_response_shipping_contact_all_of.rb +14 -19
  222. data/lib/conekta/models/order_tax_request.rb +23 -20
  223. data/lib/conekta/models/order_update_fiscal_entity_request.rb +295 -0
  224. data/lib/conekta/models/order_update_request.rb +29 -21
  225. data/lib/conekta/models/order_update_request_customer_info.rb +2 -2
  226. data/lib/conekta/models/orders_response.rb +16 -19
  227. data/lib/conekta/models/page.rb +14 -19
  228. data/lib/conekta/models/pagination.rb +18 -19
  229. data/lib/conekta/models/payment_method.rb +16 -19
  230. data/lib/conekta/models/payment_method_bank_transfer.rb +16 -20
  231. data/lib/conekta/models/payment_method_card.rb +16 -44
  232. data/lib/conekta/models/payment_method_card_request.rb +19 -21
  233. data/lib/conekta/models/payment_method_card_request_all_of.rb +14 -19
  234. data/lib/conekta/models/payment_method_card_response.rb +22 -20
  235. data/lib/conekta/models/payment_method_card_response_all_of.rb +14 -19
  236. data/lib/conekta/models/payment_method_cash.rb +16 -20
  237. data/lib/conekta/models/payment_method_cash_request.rb +17 -21
  238. data/lib/conekta/models/payment_method_cash_request_all_of.rb +14 -19
  239. data/lib/conekta/models/payment_method_cash_response.rb +22 -20
  240. data/lib/conekta/models/payment_method_cash_response_all_of.rb +14 -19
  241. data/lib/conekta/models/payment_method_response.rb +22 -19
  242. data/lib/conekta/models/payment_method_spei_recurrent.rb +23 -21
  243. data/lib/conekta/models/payment_method_spei_recurrent_all_of.rb +14 -19
  244. data/lib/conekta/models/payment_method_spei_request.rb +17 -21
  245. data/lib/conekta/models/plan_request.rb +27 -20
  246. data/lib/conekta/models/plan_response.rb +19 -20
  247. data/lib/conekta/models/plan_update_request.rb +24 -21
  248. data/lib/conekta/models/product.rb +30 -21
  249. data/lib/conekta/models/product_data_response.rb +31 -23
  250. data/lib/conekta/models/product_data_response_all_of.rb +14 -19
  251. data/lib/conekta/models/product_order_response.rb +31 -23
  252. data/lib/conekta/models/product_order_response_all_of.rb +14 -19
  253. data/lib/conekta/models/risk_rules.rb +14 -19
  254. data/lib/conekta/models/risk_rules_data.rb +14 -19
  255. data/lib/conekta/models/risk_rules_list.rb +19 -21
  256. data/lib/conekta/models/shipping_order_response.rb +21 -21
  257. data/lib/conekta/models/shipping_request.rb +21 -20
  258. data/lib/conekta/models/sms_checkout_request.rb +16 -19
  259. data/lib/conekta/models/subscription_events_response.rb +18 -20
  260. data/lib/conekta/models/subscription_request.rb +16 -19
  261. data/lib/conekta/models/subscription_response.rb +14 -19
  262. data/lib/conekta/models/subscription_update_request.rb +14 -19
  263. data/lib/conekta/models/token.rb +14 -19
  264. data/lib/conekta/models/token_card.rb +24 -19
  265. data/lib/conekta/models/token_checkout.rb +14 -19
  266. data/lib/conekta/models/token_response.rb +22 -19
  267. data/lib/conekta/models/token_response_checkout.rb +14 -19
  268. data/lib/conekta/models/transaction_response.rb +36 -19
  269. data/lib/conekta/models/transfer_destination_response.rb +14 -19
  270. data/lib/conekta/models/transfer_method_response.rb +14 -19
  271. data/lib/conekta/models/transfer_response.rb +19 -20
  272. data/lib/conekta/models/transfers_response.rb +19 -20
  273. data/lib/conekta/models/update_customer.rb +19 -20
  274. data/lib/conekta/models/update_customer_antifraud_info.rb +14 -19
  275. data/lib/conekta/models/update_customer_fiscal_entities_response.rb +24 -22
  276. data/lib/conekta/models/update_customer_fiscal_entities_response_all_of.rb +20 -19
  277. data/lib/conekta/models/update_customer_payment_methods_response.rb +1 -1
  278. data/lib/conekta/models/update_order_discount_lines_request.rb +19 -20
  279. data/lib/conekta/models/update_order_tax_request.rb +29 -22
  280. data/lib/conekta/models/update_order_tax_response.rb +26 -22
  281. data/lib/conekta/models/update_order_tax_response_all_of.rb +14 -19
  282. data/lib/conekta/models/update_payment_methods.rb +14 -19
  283. data/lib/conekta/models/update_product.rb +29 -22
  284. data/lib/conekta/models/webhook_key_create_response.rb +14 -19
  285. data/lib/conekta/models/webhook_key_delete_response.rb +14 -19
  286. data/lib/conekta/models/webhook_key_request.rb +14 -19
  287. data/lib/conekta/models/webhook_key_response.rb +14 -19
  288. data/lib/conekta/models/webhook_key_update_request.rb +14 -19
  289. data/lib/conekta/models/webhook_log.rb +19 -20
  290. data/lib/conekta/models/webhook_request.rb +16 -19
  291. data/lib/conekta/models/webhook_response.rb +14 -19
  292. data/lib/conekta/models/webhook_update_request.rb +24 -27
  293. data/lib/conekta/models/whitelistlist_rule_response.rb +14 -19
  294. data/lib/conekta/version.rb +2 -2
  295. data/lib/conekta.rb +10 -47
  296. data/spec/api/customers_api_spec.rb +2 -2
  297. data/spec/api/orders_api_spec.rb +27 -1
  298. data/spec/api_client_spec.rb +1 -1
  299. data/spec/configuration_spec.rb +1 -1
  300. data/spec/spec_helper.rb +1 -8
  301. data/ssl_data/ca_bundle.crt +4039 -0
  302. data/templates/ruby/CUSTOM_VERSION.mustache +1 -0
  303. data/templates/ruby/api_client.mustache +256 -0
  304. data/templates/ruby/configuration.mustache +481 -0
  305. metadata +45 -71
  306. data/docs/ApiKeyCreateResponseAllOf.md +0 -18
  307. data/docs/ChargeDataPaymentMethodBankTransferResponse.md +0 -48
  308. data/docs/ChargeDataPaymentMethodCardResponse.md +0 -38
  309. data/docs/ChargeDataPaymentMethodCashResponse.md +0 -32
  310. data/docs/ChargeResponseRefundsAllOf.md +0 -18
  311. data/docs/CheckoutsResponseAllOf.md +0 -18
  312. data/docs/CreateCustomerFiscalEntitiesResponseAllOf.md +0 -26
  313. data/docs/CustomerFiscalEntitiesRequestAddress.md +0 -32
  314. data/docs/CustomerFiscalEntitiesResponseAllOf.md +0 -18
  315. data/docs/CustomerPaymentMethods.md +0 -18
  316. data/docs/CustomerResponseShippingContactsAllOf.md +0 -18
  317. data/docs/CustomerShippingContactsDataResponseAllOf.md +0 -22
  318. data/docs/CustomersResponseAllOf.md +0 -18
  319. data/docs/DeleteApiKeysResponseAllOf.md +0 -18
  320. data/docs/DiscountLinesResponseAllOf.md +0 -22
  321. data/docs/ErrorAllOf.md +0 -22
  322. data/docs/GetApiKeysResponseAllOf.md +0 -18
  323. data/docs/GetChargesResponseAllOf.md +0 -18
  324. data/docs/GetCompaniesResponseAllOf.md +0 -18
  325. data/docs/GetEventsResponseAllOf.md +0 -18
  326. data/docs/GetOrderDiscountLinesResponseAllOf.md +0 -18
  327. data/docs/GetPaymentMethodResponseAllOf.md +0 -18
  328. data/docs/GetPlansResponseAllOf.md +0 -18
  329. data/docs/GetTransactionsResponseAllOf.md +0 -18
  330. data/docs/GetTransfersResponseAllOf.md +0 -18
  331. data/docs/GetWebhookKeysResponseAllOf.md +0 -18
  332. data/docs/GetWebhooksResponseAllOf.md +0 -18
  333. data/docs/OrderResponseChargesAllOf.md +0 -18
  334. data/docs/OrderResponseCustomerInfoAllOf.md +0 -18
  335. data/docs/OrderResponseDiscountLinesAllOf.md +0 -18
  336. data/docs/OrderResponseFiscalEntity.md +0 -24
  337. data/docs/OrderResponseFiscalEntityAddress.md +0 -34
  338. data/docs/OrderResponseFiscalEntityAddressAllOf.md +0 -18
  339. data/docs/OrderResponseProductsAllOf.md +0 -18
  340. data/docs/OrderResponseShippingContactAllOf.md +0 -22
  341. data/docs/PaymentMethodCardRequestAllOf.md +0 -18
  342. data/docs/PaymentMethodCardResponseAllOf.md +0 -36
  343. data/docs/PaymentMethodCashRequestAllOf.md +0 -18
  344. data/docs/PaymentMethodCashResponseAllOf.md +0 -26
  345. data/docs/PaymentMethodSpeiRecurrentAllOf.md +0 -20
  346. data/docs/ProductDataResponseAllOf.md +0 -22
  347. data/docs/ProductOrderResponseAllOf.md +0 -22
  348. data/docs/RiskRules.md +0 -18
  349. data/docs/UpdateCustomerFiscalEntitiesResponseAllOf.md +0 -26
  350. data/docs/UpdateOrderTaxResponseAllOf.md +0 -22
@@ -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.2.0
10
10
 
11
11
  =end
12
12
 
@@ -151,7 +151,7 @@ module Conekta
151
151
  @scheme = 'https'
152
152
  @host = 'api.conekta.io'
153
153
  @base_path = ''
154
- @server_index = 0
154
+ @server_index = nil
155
155
  @server_operation_index = {}
156
156
  @server_variables = {}
157
157
  @server_operation_variables = {}
@@ -204,10 +204,12 @@ module Conekta
204
204
 
205
205
  # Returns base URL for specified operation based on server settings
206
206
  def base_url(operation = nil)
207
- index = server_operation_index[operation]
208
- return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
209
-
210
- server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
207
+ if operation_server_settings.key?(operation) then
208
+ index = server_operation_index.fetch(operation, server_index)
209
+ server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
210
+ else
211
+ server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil)
212
+ end
211
213
  end
212
214
 
213
215
  # Gets API key (with prefix if set).
@@ -224,8 +226,8 @@ module Conekta
224
226
 
225
227
  # Gets access_token using access_token_getter or uses the static access_token
226
228
  def access_token_with_refresh
227
- return access_token if access_token_getter.nil?
228
- access_token_getter.call
229
+ return access_token if access_token_getter.nil?
230
+ access_token_getter.call
229
231
  end
230
232
 
231
233
  # Gets Basic Auth token string
@@ -269,8 +271,8 @@ module Conekta
269
271
  servers = server_settings if servers == nil
270
272
 
271
273
  # check array index out of bound
272
- if (index < 0 || index >= servers.size)
273
- fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
274
+ if (index.nil? || index < 0 || index >= servers.size)
275
+ fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}"
274
276
  end
275
277
 
276
278
  server = servers[index]
@@ -375,5 +377,6 @@ module Conekta
375
377
  end
376
378
  end
377
379
  end
380
+
378
381
  end
379
382
  end
@@ -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.2.0
10
10
 
11
11
  =end
12
12
 
@@ -15,9 +15,6 @@ require 'time'
15
15
 
16
16
  module Conekta
17
17
  class ApiKeyCreateResponse
18
- # It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place.
19
- attr_accessor :authentication_token
20
-
21
18
  # Indicates if the api key is active
22
19
  attr_accessor :active
23
20
 
@@ -51,10 +48,12 @@ module Conekta
51
48
  # Indicates if the api key is private or public
52
49
  attr_accessor :role
53
50
 
51
+ # It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place.
52
+ attr_accessor :authentication_token
53
+
54
54
  # Attribute mapping from ruby-style variable name to JSON key.
55
55
  def self.attribute_map
56
56
  {
57
- :'authentication_token' => :'authentication_token',
58
57
  :'active' => :'active',
59
58
  :'created_at' => :'created_at',
60
59
  :'updated_at' => :'updated_at',
@@ -65,7 +64,8 @@ module Conekta
65
64
  :'deleted' => :'deleted',
66
65
  :'object' => :'object',
67
66
  :'prefix' => :'prefix',
68
- :'role' => :'role'
67
+ :'role' => :'role',
68
+ :'authentication_token' => :'authentication_token'
69
69
  }
70
70
  end
71
71
 
@@ -77,7 +77,6 @@ module Conekta
77
77
  # Attribute type mapping.
78
78
  def self.openapi_types
79
79
  {
80
- :'authentication_token' => :'String',
81
80
  :'active' => :'Boolean',
82
81
  :'created_at' => :'Integer',
83
82
  :'updated_at' => :'Integer',
@@ -88,7 +87,8 @@ module Conekta
88
87
  :'deleted' => :'Boolean',
89
88
  :'object' => :'String',
90
89
  :'prefix' => :'String',
91
- :'role' => :'String'
90
+ :'role' => :'String',
91
+ :'authentication_token' => :'String'
92
92
  }
93
93
  end
94
94
 
@@ -102,7 +102,6 @@ module Conekta
102
102
  # List of class defined in allOf (OpenAPI v3)
103
103
  def self.openapi_all_of
104
104
  [
105
- :'ApiKeyCreateResponseAllOf',
106
105
  :'ApiKeyResponse'
107
106
  ]
108
107
  end
@@ -122,10 +121,6 @@ module Conekta
122
121
  h[k.to_sym] = v
123
122
  }
124
123
 
125
- if attributes.key?(:'authentication_token')
126
- self.authentication_token = attributes[:'authentication_token']
127
- end
128
-
129
124
  if attributes.key?(:'active')
130
125
  self.active = attributes[:'active']
131
126
  end
@@ -169,11 +164,16 @@ module Conekta
169
164
  if attributes.key?(:'role')
170
165
  self.role = attributes[:'role']
171
166
  end
167
+
168
+ if attributes.key?(:'authentication_token')
169
+ self.authentication_token = attributes[:'authentication_token']
170
+ end
172
171
  end
173
172
 
174
173
  # Show invalid properties with the reasons. Usually used together with valid?
175
174
  # @return Array for valid properties with the reasons
176
175
  def list_invalid_properties
176
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
177
177
  invalid_properties = Array.new
178
178
  invalid_properties
179
179
  end
@@ -181,6 +181,7 @@ module Conekta
181
181
  # Check to see if the all the properties in the model are valid
182
182
  # @return true if the model is valid
183
183
  def valid?
184
+ warn '[DEPRECATED] the `valid?` method is obsolete'
184
185
  true
185
186
  end
186
187
 
@@ -189,7 +190,6 @@ module Conekta
189
190
  def ==(o)
190
191
  return true if self.equal?(o)
191
192
  self.class == o.class &&
192
- authentication_token == o.authentication_token &&
193
193
  active == o.active &&
194
194
  created_at == o.created_at &&
195
195
  updated_at == o.updated_at &&
@@ -200,7 +200,8 @@ module Conekta
200
200
  deleted == o.deleted &&
201
201
  object == o.object &&
202
202
  prefix == o.prefix &&
203
- role == o.role
203
+ role == o.role &&
204
+ authentication_token == o.authentication_token
204
205
  end
205
206
 
206
207
  # @see the `==` method
@@ -212,44 +213,37 @@ module Conekta
212
213
  # Calculates hash code according to all attributes.
213
214
  # @return [Integer] Hash code
214
215
  def hash
215
- [authentication_token, active, created_at, updated_at, deactivated_at, description, id, livemode, deleted, object, prefix, role].hash
216
+ [active, created_at, updated_at, deactivated_at, description, id, livemode, deleted, object, prefix, role, authentication_token].hash
216
217
  end
217
218
 
218
219
  # Builds the object from hash
219
220
  # @param [Hash] attributes Model attributes in the form of hash
220
221
  # @return [Object] Returns the model itself
221
222
  def self.build_from_hash(attributes)
222
- new.build_from_hash(attributes)
223
- end
224
-
225
- # Builds the object from hash
226
- # @param [Hash] attributes Model attributes in the form of hash
227
- # @return [Object] Returns the model itself
228
- def build_from_hash(attributes)
229
223
  return nil unless attributes.is_a?(Hash)
230
224
  attributes = attributes.transform_keys(&:to_sym)
231
- self.class.openapi_types.each_pair do |key, type|
232
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
233
- self.send("#{key}=", nil)
225
+ transformed_hash = {}
226
+ openapi_types.each_pair do |key, type|
227
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
228
+ transformed_hash["#{key}"] = nil
234
229
  elsif type =~ /\AArray<(.*)>/i
235
230
  # check to ensure the input is an array given that the attribute
236
231
  # is documented as an array but the input is not
237
- if attributes[self.class.attribute_map[key]].is_a?(Array)
238
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
232
+ if attributes[attribute_map[key]].is_a?(Array)
233
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
239
234
  end
240
- elsif !attributes[self.class.attribute_map[key]].nil?
241
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
235
+ elsif !attributes[attribute_map[key]].nil?
236
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
242
237
  end
243
238
  end
244
-
245
- self
239
+ new(transformed_hash)
246
240
  end
247
241
 
248
242
  # Deserializes the data based on type
249
243
  # @param string type Data type
250
244
  # @param string value Value to be deserialized
251
245
  # @return [Object] Deserialized data
252
- def _deserialize(type, value)
246
+ def self._deserialize(type, value)
253
247
  case type.to_sym
254
248
  when :Time
255
249
  Time.parse(value)
@@ -284,7 +278,7 @@ module Conekta
284
278
  else # model
285
279
  # models (e.g. Pet) or oneOf
286
280
  klass = Conekta.const_get(type)
287
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
281
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
288
282
  end
289
283
  end
290
284
 
@@ -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
 
@@ -66,6 +66,7 @@ module Conekta
66
66
  # Show invalid properties with the reasons. Usually used together with valid?
67
67
  # @return Array for valid properties with the reasons
68
68
  def list_invalid_properties
69
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
70
  invalid_properties = Array.new
70
71
  invalid_properties
71
72
  end
@@ -73,6 +74,7 @@ module Conekta
73
74
  # Check to see if the all the properties in the model are valid
74
75
  # @return true if the model is valid
75
76
  def valid?
77
+ warn '[DEPRECATED] the `valid?` method is obsolete'
76
78
  true
77
79
  end
78
80
 
@@ -100,37 +102,30 @@ module Conekta
100
102
  # @param [Hash] attributes Model attributes in the form of hash
101
103
  # @return [Object] Returns the model itself
102
104
  def self.build_from_hash(attributes)
103
- new.build_from_hash(attributes)
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
105
  return nil unless attributes.is_a?(Hash)
111
106
  attributes = attributes.transform_keys(&:to_sym)
112
- self.class.openapi_types.each_pair do |key, type|
113
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
- self.send("#{key}=", nil)
107
+ transformed_hash = {}
108
+ openapi_types.each_pair do |key, type|
109
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
110
+ transformed_hash["#{key}"] = nil
115
111
  elsif type =~ /\AArray<(.*)>/i
116
112
  # check to ensure the input is an array given that the attribute
117
113
  # is documented as an array but the input is not
118
- if attributes[self.class.attribute_map[key]].is_a?(Array)
119
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
+ if attributes[attribute_map[key]].is_a?(Array)
115
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
120
116
  end
121
- elsif !attributes[self.class.attribute_map[key]].nil?
122
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
+ elsif !attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
123
119
  end
124
120
  end
125
-
126
- self
121
+ new(transformed_hash)
127
122
  end
128
123
 
129
124
  # Deserializes the data based on type
130
125
  # @param string type Data type
131
126
  # @param string value Value to be deserialized
132
127
  # @return [Object] Deserialized data
133
- def _deserialize(type, value)
128
+ def self._deserialize(type, value)
134
129
  case type.to_sym
135
130
  when :Time
136
131
  Time.parse(value)
@@ -165,7 +160,7 @@ module Conekta
165
160
  else # model
166
161
  # models (e.g. Pet) or oneOf
167
162
  klass = Conekta.const_get(type)
168
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
163
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
164
  end
170
165
  end
171
166
 
@@ -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.2.0
10
10
 
11
11
  =end
12
12
 
@@ -68,12 +68,15 @@ module Conekta
68
68
 
69
69
  if attributes.key?(:'role')
70
70
  self.role = attributes[:'role']
71
+ else
72
+ self.role = nil
71
73
  end
72
74
  end
73
75
 
74
76
  # Show invalid properties with the reasons. Usually used together with valid?
75
77
  # @return Array for valid properties with the reasons
76
78
  def list_invalid_properties
79
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
80
  invalid_properties = Array.new
78
81
  if @role.nil?
79
82
  invalid_properties.push('invalid value for "role", role cannot be nil.')
@@ -85,6 +88,7 @@ module Conekta
85
88
  # Check to see if the all the properties in the model are valid
86
89
  # @return true if the model is valid
87
90
  def valid?
91
+ warn '[DEPRECATED] the `valid?` method is obsolete'
88
92
  return false if @role.nil?
89
93
  true
90
94
  end
@@ -114,37 +118,30 @@ module Conekta
114
118
  # @param [Hash] attributes Model attributes in the form of hash
115
119
  # @return [Object] Returns the model itself
116
120
  def self.build_from_hash(attributes)
117
- new.build_from_hash(attributes)
118
- end
119
-
120
- # Builds the object from hash
121
- # @param [Hash] attributes Model attributes in the form of hash
122
- # @return [Object] Returns the model itself
123
- def build_from_hash(attributes)
124
121
  return nil unless attributes.is_a?(Hash)
125
122
  attributes = attributes.transform_keys(&:to_sym)
126
- self.class.openapi_types.each_pair do |key, type|
127
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
128
- self.send("#{key}=", nil)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
129
127
  elsif type =~ /\AArray<(.*)>/i
130
128
  # check to ensure the input is an array given that the attribute
131
129
  # is documented as an array but the input is not
132
- if attributes[self.class.attribute_map[key]].is_a?(Array)
133
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
134
132
  end
135
- elsif !attributes[self.class.attribute_map[key]].nil?
136
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
137
135
  end
138
136
  end
139
-
140
- self
137
+ new(transformed_hash)
141
138
  end
142
139
 
143
140
  # Deserializes the data based on type
144
141
  # @param string type Data type
145
142
  # @param string value Value to be deserialized
146
143
  # @return [Object] Deserialized data
147
- def _deserialize(type, value)
144
+ def self._deserialize(type, value)
148
145
  case type.to_sym
149
146
  when :Time
150
147
  Time.parse(value)
@@ -179,7 +176,7 @@ module Conekta
179
176
  else # model
180
177
  # models (e.g. Pet) or oneOf
181
178
  klass = Conekta.const_get(type)
182
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
183
180
  end
184
181
  end
185
182
 
@@ -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.2.0
10
10
 
11
11
  =end
12
12
 
@@ -158,6 +158,7 @@ module Conekta
158
158
  # Show invalid properties with the reasons. Usually used together with valid?
159
159
  # @return Array for valid properties with the reasons
160
160
  def list_invalid_properties
161
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
161
162
  invalid_properties = Array.new
162
163
  invalid_properties
163
164
  end
@@ -165,6 +166,7 @@ module Conekta
165
166
  # Check to see if the all the properties in the model are valid
166
167
  # @return true if the model is valid
167
168
  def valid?
169
+ warn '[DEPRECATED] the `valid?` method is obsolete'
168
170
  true
169
171
  end
170
172
 
@@ -202,37 +204,30 @@ module Conekta
202
204
  # @param [Hash] attributes Model attributes in the form of hash
203
205
  # @return [Object] Returns the model itself
204
206
  def self.build_from_hash(attributes)
205
- new.build_from_hash(attributes)
206
- end
207
-
208
- # Builds the object from hash
209
- # @param [Hash] attributes Model attributes in the form of hash
210
- # @return [Object] Returns the model itself
211
- def build_from_hash(attributes)
212
207
  return nil unless attributes.is_a?(Hash)
213
208
  attributes = attributes.transform_keys(&:to_sym)
214
- self.class.openapi_types.each_pair do |key, type|
215
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
216
- self.send("#{key}=", nil)
209
+ transformed_hash = {}
210
+ openapi_types.each_pair do |key, type|
211
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
212
+ transformed_hash["#{key}"] = nil
217
213
  elsif type =~ /\AArray<(.*)>/i
218
214
  # check to ensure the input is an array given that the attribute
219
215
  # is documented as an array but the input is not
220
- if attributes[self.class.attribute_map[key]].is_a?(Array)
221
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
216
+ if attributes[attribute_map[key]].is_a?(Array)
217
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
222
218
  end
223
- elsif !attributes[self.class.attribute_map[key]].nil?
224
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
219
+ elsif !attributes[attribute_map[key]].nil?
220
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
225
221
  end
226
222
  end
227
-
228
- self
223
+ new(transformed_hash)
229
224
  end
230
225
 
231
226
  # Deserializes the data based on type
232
227
  # @param string type Data type
233
228
  # @param string value Value to be deserialized
234
229
  # @return [Object] Deserialized data
235
- def _deserialize(type, value)
230
+ def self._deserialize(type, value)
236
231
  case type.to_sym
237
232
  when :Time
238
233
  Time.parse(value)
@@ -267,7 +262,7 @@ module Conekta
267
262
  else # model
268
263
  # models (e.g. Pet) or oneOf
269
264
  klass = Conekta.const_get(type)
270
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
265
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
271
266
  end
272
267
  end
273
268
 
@@ -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.2.0
10
10
 
11
11
  =end
12
12
 
@@ -139,6 +139,7 @@ module Conekta
139
139
  # Show invalid properties with the reasons. Usually used together with valid?
140
140
  # @return Array for valid properties with the reasons
141
141
  def list_invalid_properties
142
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
142
143
  invalid_properties = Array.new
143
144
  invalid_properties
144
145
  end
@@ -146,6 +147,7 @@ module Conekta
146
147
  # Check to see if the all the properties in the model are valid
147
148
  # @return true if the model is valid
148
149
  def valid?
150
+ warn '[DEPRECATED] the `valid?` method is obsolete'
149
151
  true
150
152
  end
151
153
 
@@ -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.2.0
10
10
 
11
11
  =end
12
12
 
@@ -75,6 +75,7 @@ module Conekta
75
75
  # Show invalid properties with the reasons. Usually used together with valid?
76
76
  # @return Array for valid properties with the reasons
77
77
  def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
79
  invalid_properties = Array.new
79
80
  invalid_properties
80
81
  end
@@ -82,6 +83,7 @@ module Conekta
82
83
  # Check to see if the all the properties in the model are valid
83
84
  # @return true if the model is valid
84
85
  def valid?
86
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
87
  true
86
88
  end
87
89
 
@@ -110,37 +112,30 @@ module Conekta
110
112
  # @param [Hash] attributes Model attributes in the form of hash
111
113
  # @return [Object] Returns the model itself
112
114
  def self.build_from_hash(attributes)
113
- new.build_from_hash(attributes)
114
- end
115
-
116
- # Builds the object from hash
117
- # @param [Hash] attributes Model attributes in the form of hash
118
- # @return [Object] Returns the model itself
119
- def build_from_hash(attributes)
120
115
  return nil unless attributes.is_a?(Hash)
121
116
  attributes = attributes.transform_keys(&:to_sym)
122
- self.class.openapi_types.each_pair do |key, type|
123
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
- self.send("#{key}=", nil)
117
+ transformed_hash = {}
118
+ openapi_types.each_pair do |key, type|
119
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
120
+ transformed_hash["#{key}"] = nil
125
121
  elsif type =~ /\AArray<(.*)>/i
126
122
  # check to ensure the input is an array given that the attribute
127
123
  # is documented as an array but the input is not
128
- if attributes[self.class.attribute_map[key]].is_a?(Array)
129
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
124
+ if attributes[attribute_map[key]].is_a?(Array)
125
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
126
  end
131
- elsif !attributes[self.class.attribute_map[key]].nil?
132
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
+ elsif !attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
129
  end
134
130
  end
135
-
136
- self
131
+ new(transformed_hash)
137
132
  end
138
133
 
139
134
  # Deserializes the data based on type
140
135
  # @param string type Data type
141
136
  # @param string value Value to be deserialized
142
137
  # @return [Object] Deserialized data
143
- def _deserialize(type, value)
138
+ def self._deserialize(type, value)
144
139
  case type.to_sym
145
140
  when :Time
146
141
  Time.parse(value)
@@ -175,7 +170,7 @@ module Conekta
175
170
  else # model
176
171
  # models (e.g. Pet) or oneOf
177
172
  klass = Conekta.const_get(type)
178
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
173
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
174
  end
180
175
  end
181
176