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
 
@@ -66,16 +66,21 @@ module Conekta
66
66
 
67
67
  if attributes.key?(:'has_more')
68
68
  self.has_more = attributes[:'has_more']
69
+ else
70
+ self.has_more = nil
69
71
  end
70
72
 
71
73
  if attributes.key?(:'object')
72
74
  self.object = attributes[:'object']
75
+ else
76
+ self.object = nil
73
77
  end
74
78
  end
75
79
 
76
80
  # Show invalid properties with the reasons. Usually used together with valid?
77
81
  # @return Array for valid properties with the reasons
78
82
  def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
84
  invalid_properties = Array.new
80
85
  if @has_more.nil?
81
86
  invalid_properties.push('invalid value for "has_more", has_more cannot be nil.')
@@ -91,6 +96,7 @@ module Conekta
91
96
  # Check to see if the all the properties in the model are valid
92
97
  # @return true if the model is valid
93
98
  def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
100
  return false if @has_more.nil?
95
101
  return false if @object.nil?
96
102
  true
@@ -121,37 +127,30 @@ module Conekta
121
127
  # @param [Hash] attributes Model attributes in the form of hash
122
128
  # @return [Object] Returns the model itself
123
129
  def self.build_from_hash(attributes)
124
- new.build_from_hash(attributes)
125
- end
126
-
127
- # Builds the object from hash
128
- # @param [Hash] attributes Model attributes in the form of hash
129
- # @return [Object] Returns the model itself
130
- def build_from_hash(attributes)
131
130
  return nil unless attributes.is_a?(Hash)
132
131
  attributes = attributes.transform_keys(&:to_sym)
133
- self.class.openapi_types.each_pair do |key, type|
134
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
135
- self.send("#{key}=", nil)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
136
  elsif type =~ /\AArray<(.*)>/i
137
137
  # check to ensure the input is an array given that the attribute
138
138
  # is documented as an array but the input is not
139
- if attributes[self.class.attribute_map[key]].is_a?(Array)
140
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
141
  end
142
- elsif !attributes[self.class.attribute_map[key]].nil?
143
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
144
  end
145
145
  end
146
-
147
- self
146
+ new(transformed_hash)
148
147
  end
149
148
 
150
149
  # Deserializes the data based on type
151
150
  # @param string type Data type
152
151
  # @param string value Value to be deserialized
153
152
  # @return [Object] Deserialized data
154
- def _deserialize(type, value)
153
+ def self._deserialize(type, value)
155
154
  case type.to_sym
156
155
  when :Time
157
156
  Time.parse(value)
@@ -186,7 +185,7 @@ module Conekta
186
185
  else # model
187
186
  # models (e.g. Pet) or oneOf
188
187
  klass = Conekta.const_get(type)
189
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
189
  end
191
190
  end
192
191
 
@@ -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
 
@@ -67,12 +67,15 @@ module Conekta
67
67
 
68
68
  if attributes.key?(:'object')
69
69
  self.object = attributes[:'object']
70
+ else
71
+ self.object = nil
70
72
  end
71
73
  end
72
74
 
73
75
  # Show invalid properties with the reasons. Usually used together with valid?
74
76
  # @return Array for valid properties with the reasons
75
77
  def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
79
  invalid_properties = Array.new
77
80
  if @object.nil?
78
81
  invalid_properties.push('invalid value for "object", object cannot be nil.')
@@ -84,6 +87,7 @@ module Conekta
84
87
  # Check to see if the all the properties in the model are valid
85
88
  # @return true if the model is valid
86
89
  def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
87
91
  return false if @object.nil?
88
92
  true
89
93
  end
@@ -113,37 +117,30 @@ module Conekta
113
117
  # @param [Hash] attributes Model attributes in the form of hash
114
118
  # @return [Object] Returns the model itself
115
119
  def self.build_from_hash(attributes)
116
- new.build_from_hash(attributes)
117
- end
118
-
119
- # Builds the object from hash
120
- # @param [Hash] attributes Model attributes in the form of hash
121
- # @return [Object] Returns the model itself
122
- def build_from_hash(attributes)
123
120
  return nil unless attributes.is_a?(Hash)
124
121
  attributes = attributes.transform_keys(&:to_sym)
125
- self.class.openapi_types.each_pair do |key, type|
126
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
127
- self.send("#{key}=", nil)
122
+ transformed_hash = {}
123
+ openapi_types.each_pair do |key, type|
124
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = nil
128
126
  elsif type =~ /\AArray<(.*)>/i
129
127
  # check to ensure the input is an array given that the attribute
130
128
  # is documented as an array but the input is not
131
- if attributes[self.class.attribute_map[key]].is_a?(Array)
132
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ if attributes[attribute_map[key]].is_a?(Array)
130
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
133
131
  end
134
- elsif !attributes[self.class.attribute_map[key]].nil?
135
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ elsif !attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
136
134
  end
137
135
  end
138
-
139
- self
136
+ new(transformed_hash)
140
137
  end
141
138
 
142
139
  # Deserializes the data based on type
143
140
  # @param string type Data type
144
141
  # @param string value Value to be deserialized
145
142
  # @return [Object] Deserialized data
146
- def _deserialize(type, value)
143
+ def self._deserialize(type, value)
147
144
  case type.to_sym
148
145
  when :Time
149
146
  Time.parse(value)
@@ -178,7 +175,7 @@ module Conekta
178
175
  else # model
179
176
  # models (e.g. Pet) or oneOf
180
177
  klass = Conekta.const_get(type)
181
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
178
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
182
179
  end
183
180
  end
184
181
 
@@ -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
 
@@ -149,6 +149,8 @@ module Conekta
149
149
 
150
150
  if attributes.key?(:'object')
151
151
  self.object = attributes[:'object']
152
+ else
153
+ self.object = nil
152
154
  end
153
155
 
154
156
  if attributes.key?(:'bank')
@@ -221,6 +223,7 @@ module Conekta
221
223
  # Show invalid properties with the reasons. Usually used together with valid?
222
224
  # @return Array for valid properties with the reasons
223
225
  def list_invalid_properties
226
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
224
227
  invalid_properties = Array.new
225
228
  if @object.nil?
226
229
  invalid_properties.push('invalid value for "object", object cannot be nil.')
@@ -232,6 +235,7 @@ module Conekta
232
235
  # Check to see if the all the properties in the model are valid
233
236
  # @return true if the model is valid
234
237
  def valid?
238
+ warn '[DEPRECATED] the `valid?` method is obsolete'
235
239
  return false if @object.nil?
236
240
  true
237
241
  end
@@ -277,37 +281,30 @@ module Conekta
277
281
  # @param [Hash] attributes Model attributes in the form of hash
278
282
  # @return [Object] Returns the model itself
279
283
  def self.build_from_hash(attributes)
280
- new.build_from_hash(attributes)
281
- end
282
-
283
- # Builds the object from hash
284
- # @param [Hash] attributes Model attributes in the form of hash
285
- # @return [Object] Returns the model itself
286
- def build_from_hash(attributes)
287
284
  return nil unless attributes.is_a?(Hash)
288
285
  attributes = attributes.transform_keys(&:to_sym)
289
- self.class.openapi_types.each_pair do |key, type|
290
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
291
- self.send("#{key}=", nil)
286
+ transformed_hash = {}
287
+ openapi_types.each_pair do |key, type|
288
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
289
+ transformed_hash["#{key}"] = nil
292
290
  elsif type =~ /\AArray<(.*)>/i
293
291
  # check to ensure the input is an array given that the attribute
294
292
  # is documented as an array but the input is not
295
- if attributes[self.class.attribute_map[key]].is_a?(Array)
296
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
293
+ if attributes[attribute_map[key]].is_a?(Array)
294
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
297
295
  end
298
- elsif !attributes[self.class.attribute_map[key]].nil?
299
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
296
+ elsif !attributes[attribute_map[key]].nil?
297
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
300
298
  end
301
299
  end
302
-
303
- self
300
+ new(transformed_hash)
304
301
  end
305
302
 
306
303
  # Deserializes the data based on type
307
304
  # @param string type Data type
308
305
  # @param string value Value to be deserialized
309
306
  # @return [Object] Deserialized data
310
- def _deserialize(type, value)
307
+ def self._deserialize(type, value)
311
308
  case type.to_sym
312
309
  when :Time
313
310
  Time.parse(value)
@@ -342,7 +339,7 @@ module Conekta
342
339
  else # model
343
340
  # models (e.g. Pet) or oneOf
344
341
  klass = Conekta.const_get(type)
345
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
342
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
346
343
  end
347
344
  end
348
345
 
@@ -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
 
@@ -120,6 +120,8 @@ module Conekta
120
120
 
121
121
  if attributes.key?(:'object')
122
122
  self.object = attributes[:'object']
123
+ else
124
+ self.object = nil
123
125
  end
124
126
 
125
127
  if attributes.key?(:'account_type')
@@ -172,45 +174,23 @@ module Conekta
172
174
  # Show invalid properties with the reasons. Usually used together with valid?
173
175
  # @return Array for valid properties with the reasons
174
176
  def list_invalid_properties
177
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
175
178
  invalid_properties = Array.new
176
179
  if @object.nil?
177
180
  invalid_properties.push('invalid value for "object", object cannot be nil.')
178
181
  end
179
182
 
180
- if !@contract_id.nil? && @contract_id.to_s.length > 10
181
- invalid_properties.push('invalid value for "contract_id", the character length must be smaller than or equal to 10.')
182
- end
183
-
184
- if !@contract_id.nil? && @contract_id.to_s.length < 10
185
- invalid_properties.push('invalid value for "contract_id", the character length must be great than or equal to 10.')
186
- end
187
-
188
183
  invalid_properties
189
184
  end
190
185
 
191
186
  # Check to see if the all the properties in the model are valid
192
187
  # @return true if the model is valid
193
188
  def valid?
189
+ warn '[DEPRECATED] the `valid?` method is obsolete'
194
190
  return false if @object.nil?
195
- return false if !@contract_id.nil? && @contract_id.to_s.length > 10
196
- return false if !@contract_id.nil? && @contract_id.to_s.length < 10
197
191
  true
198
192
  end
199
193
 
200
- # Custom attribute writer method with validation
201
- # @param [Object] contract_id Value to be assigned
202
- def contract_id=(contract_id)
203
- if !contract_id.nil? && contract_id.to_s.length > 10
204
- fail ArgumentError, 'invalid value for "contract_id", the character length must be smaller than or equal to 10.'
205
- end
206
-
207
- if !contract_id.nil? && contract_id.to_s.length < 10
208
- fail ArgumentError, 'invalid value for "contract_id", the character length must be great than or equal to 10.'
209
- end
210
-
211
- @contract_id = contract_id
212
- end
213
-
214
194
  # Checks equality by comparing each attribute.
215
195
  # @param [Object] Object to be compared
216
196
  def ==(o)
@@ -247,37 +227,30 @@ module Conekta
247
227
  # @param [Hash] attributes Model attributes in the form of hash
248
228
  # @return [Object] Returns the model itself
249
229
  def self.build_from_hash(attributes)
250
- new.build_from_hash(attributes)
251
- end
252
-
253
- # Builds the object from hash
254
- # @param [Hash] attributes Model attributes in the form of hash
255
- # @return [Object] Returns the model itself
256
- def build_from_hash(attributes)
257
230
  return nil unless attributes.is_a?(Hash)
258
231
  attributes = attributes.transform_keys(&:to_sym)
259
- self.class.openapi_types.each_pair do |key, type|
260
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
261
- self.send("#{key}=", nil)
232
+ transformed_hash = {}
233
+ openapi_types.each_pair do |key, type|
234
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
235
+ transformed_hash["#{key}"] = nil
262
236
  elsif type =~ /\AArray<(.*)>/i
263
237
  # check to ensure the input is an array given that the attribute
264
238
  # is documented as an array but the input is not
265
- if attributes[self.class.attribute_map[key]].is_a?(Array)
266
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
239
+ if attributes[attribute_map[key]].is_a?(Array)
240
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
267
241
  end
268
- elsif !attributes[self.class.attribute_map[key]].nil?
269
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
242
+ elsif !attributes[attribute_map[key]].nil?
243
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
270
244
  end
271
245
  end
272
-
273
- self
246
+ new(transformed_hash)
274
247
  end
275
248
 
276
249
  # Deserializes the data based on type
277
250
  # @param string type Data type
278
251
  # @param string value Value to be deserialized
279
252
  # @return [Object] Deserialized data
280
- def _deserialize(type, value)
253
+ def self._deserialize(type, value)
281
254
  case type.to_sym
282
255
  when :Time
283
256
  Time.parse(value)
@@ -312,7 +285,7 @@ module Conekta
312
285
  else # model
313
286
  # models (e.g. Pet) or oneOf
314
287
  klass = Conekta.const_get(type)
315
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
288
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
316
289
  end
317
290
  end
318
291
 
@@ -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
 
@@ -73,16 +73,21 @@ module Conekta
73
73
 
74
74
  if attributes.key?(:'type')
75
75
  self.type = attributes[:'type']
76
+ else
77
+ self.type = nil
76
78
  end
77
79
 
78
80
  if attributes.key?(:'token_id')
79
81
  self.token_id = attributes[:'token_id']
82
+ else
83
+ self.token_id = nil
80
84
  end
81
85
  end
82
86
 
83
87
  # Show invalid properties with the reasons. Usually used together with valid?
84
88
  # @return Array for valid properties with the reasons
85
89
  def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
91
  invalid_properties = Array.new
87
92
  if @type.nil?
88
93
  invalid_properties.push('invalid value for "type", type cannot be nil.')
@@ -98,6 +103,7 @@ module Conekta
98
103
  # Check to see if the all the properties in the model are valid
99
104
  # @return true if the model is valid
100
105
  def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
107
  return false if @type.nil?
102
108
  return false if @token_id.nil?
103
109
  true
@@ -128,37 +134,30 @@ module Conekta
128
134
  # @param [Hash] attributes Model attributes in the form of hash
129
135
  # @return [Object] Returns the model itself
130
136
  def self.build_from_hash(attributes)
131
- new.build_from_hash(attributes)
132
- end
133
-
134
- # Builds the object from hash
135
- # @param [Hash] attributes Model attributes in the form of hash
136
- # @return [Object] Returns the model itself
137
- def build_from_hash(attributes)
138
137
  return nil unless attributes.is_a?(Hash)
139
138
  attributes = attributes.transform_keys(&:to_sym)
140
- self.class.openapi_types.each_pair do |key, type|
141
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
142
- self.send("#{key}=", nil)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
143
  elsif type =~ /\AArray<(.*)>/i
144
144
  # check to ensure the input is an array given that the attribute
145
145
  # is documented as an array but the input is not
146
- if attributes[self.class.attribute_map[key]].is_a?(Array)
147
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
148
  end
149
- elsif !attributes[self.class.attribute_map[key]].nil?
150
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
151
  end
152
152
  end
153
-
154
- self
153
+ new(transformed_hash)
155
154
  end
156
155
 
157
156
  # Deserializes the data based on type
158
157
  # @param string type Data type
159
158
  # @param string value Value to be deserialized
160
159
  # @return [Object] Deserialized data
161
- def _deserialize(type, value)
160
+ def self._deserialize(type, value)
162
161
  case type.to_sym
163
162
  when :Time
164
163
  Time.parse(value)
@@ -193,7 +192,7 @@ module Conekta
193
192
  else # model
194
193
  # models (e.g. Pet) or oneOf
195
194
  klass = Conekta.const_get(type)
196
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
195
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
197
196
  end
198
197
  end
199
198
 
@@ -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