conekta 7.0.2 → 9.0.0

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 (439) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +3 -3
  3. data/README.md +55 -49
  4. data/VERSION +1 -1
  5. data/conekta.gemspec +2 -2
  6. data/config-ruby.json +4 -1
  7. data/docs/AntifraudApi.md +14 -14
  8. data/docs/ApiKeyCreateResponse.md +3 -3
  9. data/docs/ApiKeysApi.md +5 -5
  10. data/docs/{BalanceCommonField.md → BalanceCommonFielsResponse.md} +2 -2
  11. data/docs/BalanceResponse.md +9 -9
  12. data/docs/BalancesApi.md +1 -1
  13. data/docs/{PaymentMethodCashResponseAllOfAgreements.md → CashAgreementsResponse.md} +2 -2
  14. data/docs/ChargeOrderResponsePaymentMethod.md +5 -2
  15. data/docs/ChargeRequestPaymentMethod.md +3 -1
  16. data/docs/ChargeResponse.md +3 -1
  17. data/docs/ChargeResponsePaymentMethod.md +5 -2
  18. data/docs/ChargebackFileResponse.md +24 -0
  19. data/docs/ChargebackResponse.md +38 -0
  20. data/docs/ChargesApi.md +4 -4
  21. data/docs/ChargesDataResponse.md +3 -1
  22. data/docs/ChargesOrderResponse.md +5 -1
  23. data/docs/Checkout.md +13 -5
  24. data/docs/CheckoutOrderTemplate.md +5 -3
  25. data/docs/CheckoutOrderTemplateCustomerInfo.md +2 -2
  26. data/docs/CheckoutResponse.md +9 -7
  27. data/docs/CompaniesApi.md +80 -8
  28. data/docs/CompanyDocumentRequest.md +1 -1
  29. data/docs/CompanyResponse.md +6 -2
  30. data/docs/CreateCustomerFiscalEntitiesResponse.md +1 -1
  31. data/docs/CreateCustomerPaymentMethodsResponse.md +6 -5
  32. data/docs/{CreateRiskRulesData.md → CreateRuleWhitelistRequest.md} +2 -2
  33. data/docs/Customer.md +2 -2
  34. data/docs/CustomerDetails.md +24 -0
  35. data/docs/CustomerFiscalEntitiesDataResponse.md +1 -1
  36. data/docs/{CustomerInfoJustCustomerId.md → CustomerInfoCustomerId.md} +2 -2
  37. data/docs/CustomerPaymentMethodsData.md +6 -5
  38. data/docs/CustomerPortalResponse.md +40 -0
  39. data/docs/CustomerShippingContactsAddress.md +3 -1
  40. data/docs/CustomerShippingContactsDataResponse.md +1 -1
  41. data/docs/{CustomerShippingContacts.md → CustomerShippingContactsRequest.md} +3 -3
  42. data/docs/{CustomerShippingContactsResponseAddress.md → CustomerShippingContactsRequestAddress.md} +3 -5
  43. data/docs/CustomerShippingContactsResponse.md +1 -1
  44. data/docs/{CustomerUpdateShippingContacts.md → CustomerUpdateShippingContactsRequest.md} +3 -3
  45. data/docs/CustomersApi.md +19 -19
  46. data/docs/CustomersResponse.md +3 -3
  47. data/docs/DiscountsApi.md +5 -5
  48. data/docs/EventResponse.md +1 -1
  49. data/docs/EventsApi.md +9 -9
  50. data/docs/EventsResendResponse.md +1 -1
  51. data/docs/{CustomerFiscalEntitiesRequest.md → FiscalEntityRequest.md} +3 -3
  52. data/docs/{CustomerAddress.md → FiscalEntityRequestAddress.md} +2 -2
  53. data/docs/GetCustomerPaymentMethodDataResponse.md +6 -5
  54. data/docs/LogResponseForRequest.md +56 -0
  55. data/docs/LogsApi.md +10 -10
  56. data/docs/LogsResponseData.md +7 -7
  57. data/docs/{LogsResponse.md → LogsResponseForRequest.md} +2 -2
  58. data/docs/OrderChargesResponse.md +4 -0
  59. data/docs/OrderCheckoutRequest.md +46 -0
  60. data/docs/OrderRequest.md +9 -9
  61. data/docs/OrderRequestCustomerInfo.md +2 -2
  62. data/docs/OrderResponse.md +5 -1
  63. data/docs/OrderResponseCheckout.md +15 -11
  64. data/docs/OrderResponseCustomerInfo.md +2 -2
  65. data/docs/{OrderDiscountLinesResponse.md → OrderResponseDiscountLines.md} +6 -2
  66. data/docs/OrderResponseShippingContact.md +7 -7
  67. data/docs/OrderResponseShippingLines.md +26 -0
  68. data/docs/{Page.md → OrderResponseTaxLines.md} +9 -3
  69. data/docs/OrderTaxRequest.md +1 -1
  70. data/docs/{UpdateOrderTaxResponse.md → OrderTaxResponse.md} +2 -2
  71. data/docs/{OrderUpdateRequest.md → OrderUpdate.md} +9 -9
  72. data/docs/{OrderUpdateRequestCustomerInfo.md → OrderUpdateCustomerInfo.md} +6 -6
  73. data/docs/OrdersApi.md +17 -15
  74. data/docs/{UpdateOrderTaxRequest.md → OrdersUpdateTaxesRequest.md} +2 -2
  75. data/docs/PaymentLinkApi.md +7 -7
  76. data/docs/PaymentMethodBnplPayment.md +1 -1
  77. data/docs/PaymentMethodCardRequest.md +1 -1
  78. data/docs/PaymentMethodCardResponse.md +2 -0
  79. data/docs/PaymentMethodCashRecurrentResponse.md +38 -0
  80. data/docs/PaymentMethodCashRequest.md +1 -1
  81. data/docs/PaymentMethodCashResponse.md +1 -1
  82. data/docs/PaymentMethodPbbPayment.md +30 -0
  83. data/docs/PaymentMethodPbbRequest.md +22 -0
  84. data/docs/{PaymentMethodSpeiRecurrent.md → PaymentMethodSpeiRecurrentResponse.md} +2 -2
  85. data/docs/PaymentMethodSpeiRequest.md +1 -1
  86. data/docs/PaymentMethodTokenRequest.md +2 -2
  87. data/docs/PaymentMethodsApi.md +11 -11
  88. data/docs/{PayoutOrder.md → PayoutOrderRequest.md} +7 -5
  89. data/docs/{CustomerInfoJustCustomerIdResponse.md → PayoutOrderRequestCustomerInfo.md} +3 -3
  90. data/docs/PayoutOrderResponse.md +4 -4
  91. data/docs/PayoutOrderResponseCustomerInfo.md +3 -3
  92. data/docs/PayoutOrdersApi.md +10 -10
  93. data/docs/PayoutOrdersResponse.md +3 -3
  94. data/docs/PlansApi.md +16 -12
  95. data/docs/Product.md +3 -3
  96. data/docs/ProductsApi.md +3 -3
  97. data/docs/{ResendRequest.md → ResendEventRequest.md} +3 -3
  98. data/docs/RiskRulesData.md +1 -1
  99. data/docs/ShippingContactsApi.md +15 -15
  100. data/docs/ShippingLinesDataResponse.md +32 -0
  101. data/docs/ShippingRequest.md +1 -1
  102. data/docs/ShippingsApi.md +3 -3
  103. data/docs/SubscriptionDetails.md +36 -0
  104. data/docs/SubscriptionDetailsCard.md +40 -0
  105. data/docs/SubscriptionDetailsPlan.md +36 -0
  106. data/docs/SubscriptionsApi.md +28 -28
  107. data/docs/SubscriptionsCustomerPortalApi.md +159 -0
  108. data/docs/TaxLinesDataResponse.md +28 -0
  109. data/docs/TaxesApi.md +19 -19
  110. data/docs/TokenRequest.md +20 -0
  111. data/docs/{TokenCard.md → TokenRequestCard.md} +2 -2
  112. data/docs/{TokenCheckout.md → TokenRequestCheckout.md} +2 -2
  113. data/docs/TokenResponseCheckout.md +1 -1
  114. data/docs/TokensApi.md +8 -8
  115. data/docs/TransactionsApi.md +2 -2
  116. data/docs/TransfersApi.md +2 -2
  117. data/docs/UpdateCustomer.md +2 -2
  118. data/docs/UpdateCustomerFiscalEntitiesResponse.md +1 -1
  119. data/docs/UpdateCustomerPaymentMethodsResponse.md +6 -5
  120. data/docs/{CustomerUpdateFiscalEntitiesRequest.md → UpdateFiscalEntityRequest.md} +3 -3
  121. data/docs/UpdatePaymentMethodsCard.md +20 -0
  122. data/docs/{PlanUpdateRequest.md → UpdatePlan.md} +2 -2
  123. data/docs/{WebhookUpdateRequest.md → UpdateWebhook.md} +2 -2
  124. data/docs/{SubscriptionUpdateRequest.md → UpdatesASubscription.md} +2 -2
  125. data/docs/WebhookKeysApi.md +5 -5
  126. data/docs/WebhookLog.md +2 -2
  127. data/docs/WebhookResponse.md +2 -2
  128. data/docs/WebhooksApi.md +12 -12
  129. data/examples/one_time_charge_bnpl.rb +3 -0
  130. data/examples/one_time_charge_pbb.rb +64 -0
  131. data/lib/conekta/api/antifraud_api.rb +22 -22
  132. data/lib/conekta/api/api_keys_api.rb +10 -10
  133. data/lib/conekta/api/balances_api.rb +3 -3
  134. data/lib/conekta/api/charges_api.rb +9 -9
  135. data/lib/conekta/api/companies_api.rb +76 -12
  136. data/lib/conekta/api/customers_api.rb +32 -32
  137. data/lib/conekta/api/discounts_api.rb +12 -12
  138. data/lib/conekta/api/events_api.rb +16 -16
  139. data/lib/conekta/api/logs_api.rb +11 -11
  140. data/lib/conekta/api/orders_api.rb +28 -25
  141. data/lib/conekta/api/payment_link_api.rb +12 -12
  142. data/lib/conekta/api/payment_methods_api.rb +19 -19
  143. data/lib/conekta/api/payout_orders_api.rb +17 -17
  144. data/lib/conekta/api/plans_api.rb +25 -19
  145. data/lib/conekta/api/products_api.rb +8 -8
  146. data/lib/conekta/api/shipping_contacts_api.rb +26 -26
  147. data/lib/conekta/api/shippings_api.rb +8 -8
  148. data/lib/conekta/api/subscriptions_api.rb +52 -52
  149. data/lib/conekta/api/subscriptions_customer_portal_api.rb +168 -0
  150. data/lib/conekta/api/taxes_api.rb +26 -26
  151. data/lib/conekta/api/tokens_api.rb +14 -14
  152. data/lib/conekta/api/transactions_api.rb +5 -5
  153. data/lib/conekta/api/transfers_api.rb +5 -5
  154. data/lib/conekta/api/webhook_keys_api.rb +10 -10
  155. data/lib/conekta/api/webhooks_api.rb +21 -21
  156. data/lib/conekta/api_client.rb +31 -27
  157. data/lib/conekta/api_error.rb +2 -2
  158. data/lib/conekta/api_model_base.rb +88 -0
  159. data/lib/conekta/configuration.rb +2 -4
  160. data/lib/conekta/models/api_key_create_response.rb +26 -102
  161. data/lib/conekta/models/api_key_request.rb +22 -79
  162. data/lib/conekta/models/api_key_response.rb +12 -81
  163. data/lib/conekta/models/api_key_update_request.rb +12 -79
  164. data/lib/conekta/models/{balance_common_field.rb → balance_common_fiels_response.rb} +13 -80
  165. data/lib/conekta/models/balance_response.rb +21 -88
  166. data/lib/conekta/models/blacklist_rule_response.rb +12 -79
  167. data/lib/conekta/models/{payment_method_cash_response_all_of_agreements.rb → cash_agreements_response.rb} +13 -80
  168. data/lib/conekta/models/charge_order_response.rb +12 -83
  169. data/lib/conekta/models/charge_order_response_payment_method.rb +6 -4
  170. data/lib/conekta/models/charge_request.rb +22 -79
  171. data/lib/conekta/models/charge_request_payment_method.rb +6 -6
  172. data/lib/conekta/models/charge_response.rb +103 -84
  173. data/lib/conekta/models/charge_response_channel.rb +12 -79
  174. data/lib/conekta/models/charge_response_payment_method.rb +6 -4
  175. data/lib/conekta/models/charge_response_refunds.rb +32 -89
  176. data/lib/conekta/models/charge_response_refunds_data.rb +52 -79
  177. data/lib/conekta/models/charge_update_request.rb +12 -79
  178. data/lib/conekta/models/{update_payment_methods.rb → chargeback_file_response.rb} +48 -87
  179. data/lib/conekta/models/chargeback_response.rb +298 -0
  180. data/lib/conekta/models/charges_data_response.rb +103 -91
  181. data/lib/conekta/models/charges_order_response.rb +54 -88
  182. data/lib/conekta/models/checkout.rb +162 -91
  183. data/lib/conekta/models/checkout_order_template.rb +50 -95
  184. data/lib/conekta/models/checkout_order_template_customer_info.rb +5 -6
  185. data/lib/conekta/models/checkout_response.rb +89 -82
  186. data/lib/conekta/models/checkouts_response.rb +32 -89
  187. data/lib/conekta/models/company_document_request.rb +42 -79
  188. data/lib/conekta/models/company_document_response.rb +32 -79
  189. data/lib/conekta/models/company_response.rb +151 -85
  190. data/lib/conekta/models/create_company_request.rb +12 -79
  191. data/lib/conekta/models/create_company_request_bank_account_info.rb +12 -79
  192. data/lib/conekta/models/create_company_request_comercial_info.rb +12 -79
  193. data/lib/conekta/models/create_company_request_fiscal_info.rb +12 -79
  194. data/lib/conekta/models/create_customer_fiscal_entities_response.rb +54 -90
  195. data/lib/conekta/models/create_customer_payment_methods_request.rb +4 -5
  196. data/lib/conekta/models/create_customer_payment_methods_response.rb +6 -6
  197. data/lib/conekta/models/{create_risk_rules_data.rb → create_rule_whitelist_request.rb} +43 -80
  198. data/lib/conekta/models/customer.rb +44 -82
  199. data/lib/conekta/models/customer_antifraud_info.rb +12 -79
  200. data/lib/conekta/models/customer_antifraud_info_response.rb +12 -79
  201. data/lib/conekta/models/{product_order_response_all_of.rb → customer_details.rb} +30 -87
  202. data/lib/conekta/models/customer_fiscal_entities_data_response.rb +54 -90
  203. data/lib/conekta/models/customer_fiscal_entities_response.rb +32 -86
  204. data/lib/conekta/models/customer_info.rb +42 -79
  205. data/lib/conekta/models/{customer_info_just_customer_id.rb → customer_info_customer_id.rb} +23 -80
  206. data/lib/conekta/models/customer_payment_methods_data.rb +6 -6
  207. data/lib/conekta/models/customer_payment_methods_request.rb +4 -5
  208. data/lib/conekta/models/customer_payment_methods_response.rb +32 -89
  209. data/lib/conekta/models/{customer_shipping_contacts_data_response_all_of.rb → customer_portal_response.rb} +108 -105
  210. data/lib/conekta/models/customer_response.rb +62 -82
  211. data/lib/conekta/models/customer_response_shipping_contacts.rb +32 -86
  212. data/lib/conekta/models/customer_shipping_contacts_address.rb +22 -83
  213. data/lib/conekta/models/customer_shipping_contacts_data_response.rb +53 -89
  214. data/lib/conekta/models/{customer_shipping_contacts.rb → customer_shipping_contacts_request.rb} +25 -84
  215. data/lib/conekta/models/{customer_shipping_contacts_response_address.rb → customer_shipping_contacts_request_address.rb} +16 -91
  216. data/lib/conekta/models/customer_shipping_contacts_response.rb +13 -81
  217. data/lib/conekta/models/{customer_update_shipping_contacts.rb → customer_update_shipping_contacts_request.rb} +15 -84
  218. data/lib/conekta/models/customers_response.rb +47 -104
  219. data/lib/conekta/models/delete_api_keys_response.rb +12 -87
  220. data/lib/conekta/models/deleted_blacklist_rule_response.rb +12 -79
  221. data/lib/conekta/models/deleted_whitelist_rule_response.rb +12 -79
  222. data/lib/conekta/models/details_error.rb +12 -80
  223. data/lib/conekta/models/discount_lines_data_response.rb +62 -86
  224. data/lib/conekta/models/discount_lines_response.rb +62 -86
  225. data/lib/conekta/models/email_checkout_request.rb +22 -79
  226. data/lib/conekta/models/error.rb +12 -87
  227. data/lib/conekta/models/event_response.rb +12 -79
  228. data/lib/conekta/models/event_types.rb +2 -2
  229. data/lib/conekta/models/events_resend_response.rb +12 -79
  230. data/lib/conekta/models/fiscal_entity_address.rb +62 -80
  231. data/lib/conekta/models/{customer_fiscal_entities_request.rb → fiscal_entity_request.rb} +25 -84
  232. data/lib/conekta/models/{customer_address.rb → fiscal_entity_request_address.rb} +43 -80
  233. data/lib/conekta/models/get_api_keys_response.rb +32 -89
  234. data/lib/conekta/models/get_charges_response.rb +32 -89
  235. data/lib/conekta/models/get_companies_response.rb +32 -89
  236. data/lib/conekta/models/get_customer_payment_method_data_response.rb +6 -6
  237. data/lib/conekta/models/get_events_response.rb +32 -89
  238. data/lib/conekta/models/get_order_discount_lines_response.rb +32 -89
  239. data/lib/conekta/models/get_orders_response.rb +42 -90
  240. data/lib/conekta/models/get_payment_method_response.rb +32 -89
  241. data/lib/conekta/models/get_plans_response.rb +32 -89
  242. data/lib/conekta/models/get_transactions_response.rb +32 -89
  243. data/lib/conekta/models/get_transfers_response.rb +32 -89
  244. data/lib/conekta/models/get_webhook_keys_response.rb +32 -89
  245. data/lib/conekta/models/get_webhooks_response.rb +32 -89
  246. data/lib/conekta/models/{log_response.rb → log_response_for_request.rb} +45 -89
  247. data/lib/conekta/models/logs_response_data.rb +14 -88
  248. data/lib/conekta/models/{logs_response.rb → logs_response_for_request.rb} +13 -83
  249. data/lib/conekta/models/order_capture_request.rb +12 -79
  250. data/lib/conekta/models/order_channel_response.rb +12 -79
  251. data/lib/conekta/models/order_charges_response.rb +53 -87
  252. data/lib/conekta/models/{checkout_request.rb → order_checkout_request.rb} +81 -90
  253. data/lib/conekta/models/order_discount_lines_request.rb +32 -79
  254. data/lib/conekta/models/order_fiscal_entity_address_response.rb +62 -87
  255. data/lib/conekta/models/order_fiscal_entity_request.rb +22 -81
  256. data/lib/conekta/models/order_fiscal_entity_response.rb +52 -83
  257. data/lib/conekta/models/order_next_action_response.rb +12 -79
  258. data/lib/conekta/models/order_next_action_response_redirect_to_url.rb +12 -79
  259. data/lib/conekta/models/order_refund_request.rb +32 -79
  260. data/lib/conekta/models/order_request.rb +40 -89
  261. data/lib/conekta/models/order_request_customer_info.rb +5 -6
  262. data/lib/conekta/models/order_response.rb +32 -82
  263. data/lib/conekta/models/order_response_checkout.rb +146 -84
  264. data/lib/conekta/models/order_response_customer_info.rb +22 -98
  265. data/lib/conekta/models/order_response_discount_lines.rb +54 -87
  266. data/lib/conekta/models/order_response_products.rb +32 -89
  267. data/lib/conekta/models/order_response_shipping_contact.rb +41 -116
  268. data/lib/conekta/models/{order_discount_lines_response.rb → order_response_shipping_lines.rb} +56 -89
  269. data/lib/conekta/models/{order_response_charges.rb → order_response_tax_lines.rb} +56 -90
  270. data/lib/conekta/models/order_tax_request.rb +14 -81
  271. data/lib/conekta/models/{update_order_tax_response.rb → order_tax_response.rb} +25 -89
  272. data/lib/conekta/models/{order_update_request.rb → order_update.rb} +20 -91
  273. data/lib/conekta/models/{order_update_request_customer_info.rb → order_update_customer_info.rb} +6 -7
  274. data/lib/conekta/models/order_update_fiscal_entity_request.rb +22 -81
  275. data/lib/conekta/models/{update_order_tax_request.rb → orders_update_taxes_request.rb} +17 -90
  276. data/lib/conekta/models/payment_method_bank_transfer.rb +22 -96
  277. data/lib/conekta/models/payment_method_bnpl_payment.rb +66 -86
  278. data/lib/conekta/models/payment_method_bnpl_request.rb +64 -88
  279. data/lib/conekta/models/payment_method_card.rb +22 -86
  280. data/lib/conekta/models/payment_method_card_request.rb +48 -92
  281. data/lib/conekta/models/payment_method_card_response.rb +63 -87
  282. data/lib/conekta/models/payment_method_cash.rb +22 -89
  283. data/lib/conekta/models/{payment_method_response.rb → payment_method_cash_recurrent_response.rb} +115 -84
  284. data/lib/conekta/models/payment_method_cash_request.rb +22 -86
  285. data/lib/conekta/models/payment_method_cash_response.rb +53 -87
  286. data/lib/conekta/models/payment_method_general_request.rb +22 -79
  287. data/lib/conekta/models/payment_method_pbb_payment.rb +317 -0
  288. data/lib/conekta/models/{payment_method_cash_response_all_of.rb → payment_method_pbb_request.rb} +106 -112
  289. data/lib/conekta/models/{payment_method_spei_recurrent.rb → payment_method_spei_recurrent_response.rb} +53 -87
  290. data/lib/conekta/models/payment_method_spei_request.rb +22 -86
  291. data/lib/conekta/models/payment_method_token_request.rb +33 -87
  292. data/lib/conekta/models/payout.rb +22 -79
  293. data/lib/conekta/models/payout_method.rb +22 -79
  294. data/lib/conekta/models/payout_order_payouts_item.rb +62 -79
  295. data/lib/conekta/models/{payout_order.rb → payout_order_request.rb} +102 -82
  296. data/lib/conekta/models/{customer_info_just_customer_id_response.rb → payout_order_request_customer_info.rb} +31 -80
  297. data/lib/conekta/models/payout_order_response.rb +146 -79
  298. data/lib/conekta/models/payout_order_response_customer_info.rb +38 -103
  299. data/lib/conekta/models/payout_orders_response.rb +47 -104
  300. data/lib/conekta/models/plan_request.rb +22 -79
  301. data/lib/conekta/models/plan_response.rb +12 -81
  302. data/lib/conekta/models/product.rb +22 -79
  303. data/lib/conekta/models/product_data_response.rb +22 -86
  304. data/lib/conekta/models/product_order_response.rb +22 -86
  305. data/lib/conekta/models/{resend_request.rb → resend_event_request.rb} +23 -80
  306. data/lib/conekta/models/risk_rules_data.rb +12 -79
  307. data/lib/conekta/models/risk_rules_list.rb +32 -89
  308. data/lib/conekta/models/{discount_lines_response_all_of.rb → shipping_lines_data_response.rb} +105 -99
  309. data/lib/conekta/models/shipping_order_response.rb +12 -86
  310. data/lib/conekta/models/shipping_request.rb +12 -79
  311. data/lib/conekta/models/sms_checkout_request.rb +22 -79
  312. data/lib/conekta/models/{order_response_shipping_contact_all_of.rb → subscription_details.rb} +87 -90
  313. data/lib/conekta/models/{payment_method_card_response_all_of.rb → subscription_details_card.rb} +68 -118
  314. data/lib/conekta/models/{product_data_response_all_of.rb → subscription_details_plan.rb} +83 -87
  315. data/lib/conekta/models/subscription_events_response.rb +32 -89
  316. data/lib/conekta/models/subscription_request.rb +22 -79
  317. data/lib/conekta/models/subscription_response.rb +12 -86
  318. data/lib/conekta/models/tax_lines_data_response.rb +284 -0
  319. data/lib/conekta/models/{token.rb → token_request.rb} +15 -84
  320. data/lib/conekta/models/{token_card.rb → token_request_card.rb} +33 -80
  321. data/lib/conekta/models/{token_checkout.rb → token_request_checkout.rb} +13 -80
  322. data/lib/conekta/models/token_response.rb +52 -80
  323. data/lib/conekta/models/token_response_checkout.rb +12 -79
  324. data/lib/conekta/models/transaction_response.rb +112 -79
  325. data/lib/conekta/models/transfer_destination_response.rb +12 -79
  326. data/lib/conekta/models/transfer_method_response.rb +12 -79
  327. data/lib/conekta/models/transfer_response.rb +12 -79
  328. data/lib/conekta/models/transfers_response.rb +12 -79
  329. data/lib/conekta/models/update_customer.rb +14 -82
  330. data/lib/conekta/models/update_customer_antifraud_info.rb +12 -79
  331. data/lib/conekta/models/update_customer_fiscal_entities_response.rb +54 -90
  332. data/lib/conekta/models/update_customer_payment_methods_response.rb +6 -6
  333. data/lib/conekta/models/{customer_update_fiscal_entities_request.rb → update_fiscal_entity_request.rb} +15 -84
  334. data/lib/conekta/models/update_order_discount_lines_request.rb +12 -79
  335. data/lib/conekta/models/{payment_method_cash_request_all_of.rb → update_payment_methods_card.rb} +44 -81
  336. data/lib/conekta/models/{plan_update_request.rb → update_plan.rb} +13 -80
  337. data/lib/conekta/models/update_product.rb +14 -85
  338. data/lib/conekta/models/{webhook_update_request.rb → update_webhook.rb} +13 -80
  339. data/lib/conekta/models/{subscription_update_request.rb → updates_a_subscription.rb} +13 -80
  340. data/lib/conekta/models/webhook_key_create_response.rb +12 -79
  341. data/lib/conekta/models/webhook_key_delete_response.rb +12 -79
  342. data/lib/conekta/models/webhook_key_request.rb +12 -79
  343. data/lib/conekta/models/webhook_key_response.rb +12 -80
  344. data/lib/conekta/models/webhook_key_update_request.rb +12 -79
  345. data/lib/conekta/models/webhook_log.rb +12 -79
  346. data/lib/conekta/models/webhook_request.rb +12 -79
  347. data/lib/conekta/models/webhook_response.rb +12 -79
  348. data/lib/conekta/models/whitelistlist_rule_response.rb +12 -79
  349. data/lib/conekta/version.rb +3 -3
  350. data/lib/conekta.rb +47 -42
  351. data/spec/api/antifraud_api_spec.rb +4 -4
  352. data/spec/api/api_keys_api_spec.rb +2 -2
  353. data/spec/api/balances_api_spec.rb +2 -2
  354. data/spec/api/charges_api_spec.rb +2 -2
  355. data/spec/api/companies_api_spec.rb +14 -2
  356. data/spec/api/customers_api_spec.rb +4 -4
  357. data/spec/api/discounts_api_spec.rb +2 -2
  358. data/spec/api/events_api_spec.rb +3 -3
  359. data/spec/api/logs_api_spec.rb +4 -4
  360. data/spec/api/orders_api_spec.rb +4 -3
  361. data/spec/api/payment_link_api_spec.rb +2 -2
  362. data/spec/api/payment_methods_api_spec.rb +3 -3
  363. data/spec/api/payout_orders_api_spec.rb +3 -3
  364. data/spec/api/plans_api_spec.rb +5 -3
  365. data/spec/api/products_api_spec.rb +2 -2
  366. data/spec/api/shipping_contacts_api_spec.rb +4 -4
  367. data/spec/api/shippings_api_spec.rb +2 -2
  368. data/spec/api/subscriptions_api_spec.rb +4 -4
  369. data/spec/api/subscriptions_customer_portal_api_spec.rb +63 -0
  370. data/spec/api/taxes_api_spec.rb +6 -6
  371. data/spec/api/tokens_api_spec.rb +4 -4
  372. data/spec/api/transactions_api_spec.rb +2 -2
  373. data/spec/api/transfers_api_spec.rb +2 -2
  374. data/spec/api/webhook_keys_api_spec.rb +2 -2
  375. data/spec/api/webhooks_api_spec.rb +3 -3
  376. data/spec/spec_helper.rb +2 -2
  377. metadata +111 -147
  378. data/docs/ApiKeyResponseOnDelete.md +0 -34
  379. data/docs/ChargesOrderResponseAllOfData.md +0 -52
  380. data/docs/CheckoutRequest.md +0 -40
  381. data/docs/CompanyResponseDocumentsInner.md +0 -22
  382. data/docs/CustomerPaymentMethodRequest.md +0 -18
  383. data/docs/Details.md +0 -18
  384. data/docs/LogResponse.md +0 -56
  385. data/docs/OrderCustomerInfoResponse.md +0 -28
  386. data/docs/OrdersResponse.md +0 -18
  387. data/docs/Pagination.md +0 -20
  388. data/docs/PaymentMethod.md +0 -20
  389. data/docs/PaymentMethodResponse.md +0 -26
  390. data/docs/Token.md +0 -20
  391. data/docs/UpdatePaymentMethods.md +0 -18
  392. data/lib/conekta/models/api_key_create_response_all_of.rb +0 -215
  393. data/lib/conekta/models/api_key_response_on_delete.rb +0 -297
  394. data/lib/conekta/models/charge_data_payment_method_bank_transfer_response.rb +0 -362
  395. data/lib/conekta/models/charge_data_payment_method_card_response.rb +0 -308
  396. data/lib/conekta/models/charge_data_payment_method_cash_response.rb +0 -281
  397. data/lib/conekta/models/charge_response_refunds_all_of.rb +0 -217
  398. data/lib/conekta/models/charges_order_response_all_of_data.rb +0 -439
  399. data/lib/conekta/models/checkouts_response_all_of.rb +0 -216
  400. data/lib/conekta/models/company_fiscal_info_address_response.rb +0 -330
  401. data/lib/conekta/models/company_fiscal_info_response.rb +0 -309
  402. data/lib/conekta/models/company_payout_destination_response.rb +0 -312
  403. data/lib/conekta/models/company_response_documents_inner.rb +0 -270
  404. data/lib/conekta/models/create_customer_fiscal_entities_response_all_of.rb +0 -271
  405. data/lib/conekta/models/customer_fiscal_entities_request_address.rb +0 -308
  406. data/lib/conekta/models/customer_fiscal_entities_response_all_of.rb +0 -216
  407. data/lib/conekta/models/customer_payment_method_request.rb +0 -223
  408. data/lib/conekta/models/customer_payment_methods.rb +0 -216
  409. data/lib/conekta/models/customer_response_shipping_contacts_all_of.rb +0 -216
  410. data/lib/conekta/models/customers_response_all_of.rb +0 -216
  411. data/lib/conekta/models/delete_api_keys_response_all_of.rb +0 -214
  412. data/lib/conekta/models/details.rb +0 -216
  413. data/lib/conekta/models/error_all_of.rb +0 -234
  414. data/lib/conekta/models/get_api_keys_response_all_of.rb +0 -216
  415. data/lib/conekta/models/get_charges_response_all_of.rb +0 -216
  416. data/lib/conekta/models/get_companies_response_all_of.rb +0 -216
  417. data/lib/conekta/models/get_events_response_all_of.rb +0 -216
  418. data/lib/conekta/models/get_order_discount_lines_response_all_of.rb +0 -216
  419. data/lib/conekta/models/get_payment_method_response_all_of.rb +0 -216
  420. data/lib/conekta/models/get_plans_response_all_of.rb +0 -216
  421. data/lib/conekta/models/get_transactions_response_all_of.rb +0 -217
  422. data/lib/conekta/models/get_transfers_response_all_of.rb +0 -217
  423. data/lib/conekta/models/get_webhook_keys_response_all_of.rb +0 -216
  424. data/lib/conekta/models/get_webhooks_response_all_of.rb +0 -216
  425. data/lib/conekta/models/order_customer_info_response.rb +0 -263
  426. data/lib/conekta/models/order_fiscal_entity_address_response_all_of.rb +0 -214
  427. data/lib/conekta/models/order_response_charges_all_of.rb +0 -216
  428. data/lib/conekta/models/order_response_customer_info_all_of.rb +0 -214
  429. data/lib/conekta/models/order_response_discount_lines_all_of.rb +0 -216
  430. data/lib/conekta/models/order_response_products_all_of.rb +0 -216
  431. data/lib/conekta/models/orders_response.rb +0 -223
  432. data/lib/conekta/models/page.rb +0 -228
  433. data/lib/conekta/models/pagination.rb +0 -240
  434. data/lib/conekta/models/payment_method.rb +0 -230
  435. data/lib/conekta/models/payment_method_card_request_all_of.rb +0 -215
  436. data/lib/conekta/models/payment_method_spei_recurrent_all_of.rb +0 -224
  437. data/lib/conekta/models/risk_rules.rb +0 -216
  438. data/lib/conekta/models/update_customer_fiscal_entities_response_all_of.rb +0 -271
  439. data/lib/conekta/models/update_order_tax_response_all_of.rb +0 -232
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.2.0
6
+ The version of the OpenAPI document: 2.3.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.5.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Conekta
17
17
  # Address of the fiscal entity
18
- class OrderFiscalEntityAddressResponse
18
+ class OrderFiscalEntityAddressResponse < ApiModelBase
19
19
  # Street name and number
20
20
  attr_accessor :street1
21
21
 
@@ -53,9 +53,14 @@ module Conekta
53
53
  }
54
54
  end
55
55
 
56
+ # Returns attribute mapping this model knows about
57
+ def self.acceptable_attribute_map
58
+ attribute_map
59
+ end
60
+
56
61
  # Returns all the JSON keys this model knows about
57
62
  def self.acceptable_attributes
58
- attribute_map.values
63
+ acceptable_attribute_map.values
59
64
  end
60
65
 
61
66
  # Attribute type mapping.
@@ -75,17 +80,9 @@ module Conekta
75
80
  # List of attributes with nullable: true
76
81
  def self.openapi_nullable
77
82
  Set.new([
78
- :'street2',
79
83
  ])
80
84
  end
81
85
 
82
- # List of class defined in allOf (OpenAPI v3)
83
- def self.openapi_all_of
84
- [
85
- :'FiscalEntityAddress'
86
- ]
87
- end
88
-
89
86
  # Initializes the object
90
87
  # @param [Hash] attributes Model attributes in the form of hash
91
88
  def initialize(attributes = {})
@@ -94,9 +91,10 @@ module Conekta
94
91
  end
95
92
 
96
93
  # check to see if the attribute exists and convert string to symbol for hash key
94
+ acceptable_attribute_map = self.class.acceptable_attribute_map
97
95
  attributes = attributes.each_with_object({}) { |(k, v), h|
98
- if (!self.class.attribute_map.key?(k.to_sym))
99
- fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderFiscalEntityAddressResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ if (!acceptable_attribute_map.key?(k.to_sym))
97
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderFiscalEntityAddressResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
100
98
  end
101
99
  h[k.to_sym] = v
102
100
  }
@@ -184,6 +182,56 @@ module Conekta
184
182
  true
185
183
  end
186
184
 
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] street1 Value to be assigned
187
+ def street1=(street1)
188
+ if street1.nil?
189
+ fail ArgumentError, 'street1 cannot be nil'
190
+ end
191
+
192
+ @street1 = street1
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] postal_code Value to be assigned
197
+ def postal_code=(postal_code)
198
+ if postal_code.nil?
199
+ fail ArgumentError, 'postal_code cannot be nil'
200
+ end
201
+
202
+ @postal_code = postal_code
203
+ end
204
+
205
+ # Custom attribute writer method with validation
206
+ # @param [Object] city Value to be assigned
207
+ def city=(city)
208
+ if city.nil?
209
+ fail ArgumentError, 'city cannot be nil'
210
+ end
211
+
212
+ @city = city
213
+ end
214
+
215
+ # Custom attribute writer method with validation
216
+ # @param [Object] country Value to be assigned
217
+ def country=(country)
218
+ if country.nil?
219
+ fail ArgumentError, 'country cannot be nil'
220
+ end
221
+
222
+ @country = country
223
+ end
224
+
225
+ # Custom attribute writer method with validation
226
+ # @param [Object] external_number Value to be assigned
227
+ def external_number=(external_number)
228
+ if external_number.nil?
229
+ fail ArgumentError, 'external_number cannot be nil'
230
+ end
231
+
232
+ @external_number = external_number
233
+ end
234
+
187
235
  # Checks equality by comparing each attribute.
188
236
  # @param [Object] Object to be compared
189
237
  def ==(o)
@@ -234,61 +282,6 @@ module Conekta
234
282
  new(transformed_hash)
235
283
  end
236
284
 
237
- # Deserializes the data based on type
238
- # @param string type Data type
239
- # @param string value Value to be deserialized
240
- # @return [Object] Deserialized data
241
- def self._deserialize(type, value)
242
- case type.to_sym
243
- when :Time
244
- Time.parse(value)
245
- when :Date
246
- Date.parse(value)
247
- when :String
248
- value.to_s
249
- when :Integer
250
- value.to_i
251
- when :Float
252
- value.to_f
253
- when :Boolean
254
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
255
- true
256
- else
257
- false
258
- end
259
- when :Object
260
- # generic object (usually a Hash), return directly
261
- value
262
- when /\AArray<(?<inner_type>.+)>\z/
263
- inner_type = Regexp.last_match[:inner_type]
264
- value.map { |v| _deserialize(inner_type, v) }
265
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
266
- k_type = Regexp.last_match[:k_type]
267
- v_type = Regexp.last_match[:v_type]
268
- {}.tap do |hash|
269
- value.each do |k, v|
270
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
271
- end
272
- end
273
- else # model
274
- # models (e.g. Pet) or oneOf
275
- klass = Conekta.const_get(type)
276
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
277
- end
278
- end
279
-
280
- # Returns the string representation of the object
281
- # @return [String] String presentation of the object
282
- def to_s
283
- to_hash.to_s
284
- end
285
-
286
- # to_body is an alias to to_hash (backward compatibility)
287
- # @return [Hash] Returns the object in the form of hash
288
- def to_body
289
- to_hash
290
- end
291
-
292
285
  # Returns the object in the form of hash
293
286
  # @return [Hash] Returns the object in the form of hash
294
287
  def to_hash
@@ -305,24 +298,6 @@ module Conekta
305
298
  hash
306
299
  end
307
300
 
308
- # Outputs non-array value in the form of hash
309
- # For object, use to_hash. Otherwise, just return the value
310
- # @param [Object] value Any valid value
311
- # @return [Hash] Returns the value in the form of hash
312
- def _to_hash(value)
313
- if value.is_a?(Array)
314
- value.compact.map { |v| _to_hash(v) }
315
- elsif value.is_a?(Hash)
316
- {}.tap do |hash|
317
- value.each { |k, v| hash[k] = _to_hash(v) }
318
- end
319
- elsif value.respond_to? :to_hash
320
- value.to_hash
321
- else
322
- value
323
- end
324
- end
325
-
326
301
  end
327
302
 
328
303
  end
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.2.0
6
+ The version of the OpenAPI document: 2.3.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.5.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Conekta
17
17
  # Fiscal entity of the order, Currently it is a purely informative field
18
- class OrderFiscalEntityRequest
18
+ class OrderFiscalEntityRequest < ApiModelBase
19
19
  attr_accessor :address
20
20
 
21
21
  # Email of the fiscal entity
@@ -45,9 +45,14 @@ module Conekta
45
45
  }
46
46
  end
47
47
 
48
+ # Returns attribute mapping this model knows about
49
+ def self.acceptable_attribute_map
50
+ attribute_map
51
+ end
52
+
48
53
  # Returns all the JSON keys this model knows about
49
54
  def self.acceptable_attributes
50
- attribute_map.values
55
+ acceptable_attribute_map.values
51
56
  end
52
57
 
53
58
  # Attribute type mapping.
@@ -65,8 +70,6 @@ module Conekta
65
70
  # List of attributes with nullable: true
66
71
  def self.openapi_nullable
67
72
  Set.new([
68
- :'name',
69
- :'tax_id'
70
73
  ])
71
74
  end
72
75
 
@@ -78,9 +81,10 @@ module Conekta
78
81
  end
79
82
 
80
83
  # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
81
85
  attributes = attributes.each_with_object({}) { |(k, v), h|
82
- if (!self.class.attribute_map.key?(k.to_sym))
83
- fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderFiscalEntityRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderFiscalEntityRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
84
88
  end
85
89
  h[k.to_sym] = v
86
90
  }
@@ -139,6 +143,16 @@ module Conekta
139
143
  true
140
144
  end
141
145
 
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] address Value to be assigned
148
+ def address=(address)
149
+ if address.nil?
150
+ fail ArgumentError, 'address cannot be nil'
151
+ end
152
+
153
+ @address = address
154
+ end
155
+
142
156
  # Custom attribute writer method with validation
143
157
  # @param [Object] metadata Value to be assigned
144
158
  def metadata=(metadata)
@@ -201,61 +215,6 @@ module Conekta
201
215
  new(transformed_hash)
202
216
  end
203
217
 
204
- # Deserializes the data based on type
205
- # @param string type Data type
206
- # @param string value Value to be deserialized
207
- # @return [Object] Deserialized data
208
- def self._deserialize(type, value)
209
- case type.to_sym
210
- when :Time
211
- Time.parse(value)
212
- when :Date
213
- Date.parse(value)
214
- when :String
215
- value.to_s
216
- when :Integer
217
- value.to_i
218
- when :Float
219
- value.to_f
220
- when :Boolean
221
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
222
- true
223
- else
224
- false
225
- end
226
- when :Object
227
- # generic object (usually a Hash), return directly
228
- value
229
- when /\AArray<(?<inner_type>.+)>\z/
230
- inner_type = Regexp.last_match[:inner_type]
231
- value.map { |v| _deserialize(inner_type, v) }
232
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
233
- k_type = Regexp.last_match[:k_type]
234
- v_type = Regexp.last_match[:v_type]
235
- {}.tap do |hash|
236
- value.each do |k, v|
237
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
238
- end
239
- end
240
- else # model
241
- # models (e.g. Pet) or oneOf
242
- klass = Conekta.const_get(type)
243
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
244
- end
245
- end
246
-
247
- # Returns the string representation of the object
248
- # @return [String] String presentation of the object
249
- def to_s
250
- to_hash.to_s
251
- end
252
-
253
- # to_body is an alias to to_hash (backward compatibility)
254
- # @return [Hash] Returns the object in the form of hash
255
- def to_body
256
- to_hash
257
- end
258
-
259
218
  # Returns the object in the form of hash
260
219
  # @return [Hash] Returns the object in the form of hash
261
220
  def to_hash
@@ -272,24 +231,6 @@ module Conekta
272
231
  hash
273
232
  end
274
233
 
275
- # Outputs non-array value in the form of hash
276
- # For object, use to_hash. Otherwise, just return the value
277
- # @param [Object] value Any valid value
278
- # @return [Hash] Returns the value in the form of hash
279
- def _to_hash(value)
280
- if value.is_a?(Array)
281
- value.compact.map { |v| _to_hash(v) }
282
- elsif value.is_a?(Hash)
283
- {}.tap do |hash|
284
- value.each { |k, v| hash[k] = _to_hash(v) }
285
- end
286
- elsif value.respond_to? :to_hash
287
- value.to_hash
288
- else
289
- value
290
- end
291
- end
292
-
293
234
  end
294
235
 
295
236
  end
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.2.0
6
+ The version of the OpenAPI document: 2.3.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.5.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Conekta
17
17
  # Fiscal entity of the order, Currently it is a purely informative field
18
- class OrderFiscalEntityResponse
18
+ class OrderFiscalEntityResponse < ApiModelBase
19
19
  attr_accessor :address
20
20
 
21
21
  # Email of the fiscal entity
@@ -56,9 +56,14 @@ module Conekta
56
56
  }
57
57
  end
58
58
 
59
+ # Returns attribute mapping this model knows about
60
+ def self.acceptable_attribute_map
61
+ attribute_map
62
+ end
63
+
59
64
  # Returns all the JSON keys this model knows about
60
65
  def self.acceptable_attributes
61
- attribute_map.values
66
+ acceptable_attribute_map.values
62
67
  end
63
68
 
64
69
  # Attribute type mapping.
@@ -79,10 +84,6 @@ module Conekta
79
84
  # List of attributes with nullable: true
80
85
  def self.openapi_nullable
81
86
  Set.new([
82
- :'email',
83
- :'name',
84
- :'tax_id',
85
- :'phone'
86
87
  ])
87
88
  end
88
89
 
@@ -94,9 +95,10 @@ module Conekta
94
95
  end
95
96
 
96
97
  # check to see if the attribute exists and convert string to symbol for hash key
98
+ acceptable_attribute_map = self.class.acceptable_attribute_map
97
99
  attributes = attributes.each_with_object({}) { |(k, v), h|
98
- if (!self.class.attribute_map.key?(k.to_sym))
99
- fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderFiscalEntityResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
100
+ if (!acceptable_attribute_map.key?(k.to_sym))
101
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderFiscalEntityResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
100
102
  end
101
103
  h[k.to_sym] = v
102
104
  }
@@ -188,6 +190,16 @@ module Conekta
188
190
  true
189
191
  end
190
192
 
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] address Value to be assigned
195
+ def address=(address)
196
+ if address.nil?
197
+ fail ArgumentError, 'address cannot be nil'
198
+ end
199
+
200
+ @address = address
201
+ end
202
+
191
203
  # Custom attribute writer method with validation
192
204
  # @param [Object] metadata Value to be assigned
193
205
  def metadata=(metadata)
@@ -202,6 +214,36 @@ module Conekta
202
214
  @metadata = metadata
203
215
  end
204
216
 
217
+ # Custom attribute writer method with validation
218
+ # @param [Object] id Value to be assigned
219
+ def id=(id)
220
+ if id.nil?
221
+ fail ArgumentError, 'id cannot be nil'
222
+ end
223
+
224
+ @id = id
225
+ end
226
+
227
+ # Custom attribute writer method with validation
228
+ # @param [Object] created_at Value to be assigned
229
+ def created_at=(created_at)
230
+ if created_at.nil?
231
+ fail ArgumentError, 'created_at cannot be nil'
232
+ end
233
+
234
+ @created_at = created_at
235
+ end
236
+
237
+ # Custom attribute writer method with validation
238
+ # @param [Object] object Value to be assigned
239
+ def object=(object)
240
+ if object.nil?
241
+ fail ArgumentError, 'object cannot be nil'
242
+ end
243
+
244
+ @object = object
245
+ end
246
+
205
247
  # Checks equality by comparing each attribute.
206
248
  # @param [Object] Object to be compared
207
249
  def ==(o)
@@ -253,61 +295,6 @@ module Conekta
253
295
  new(transformed_hash)
254
296
  end
255
297
 
256
- # Deserializes the data based on type
257
- # @param string type Data type
258
- # @param string value Value to be deserialized
259
- # @return [Object] Deserialized data
260
- def self._deserialize(type, value)
261
- case type.to_sym
262
- when :Time
263
- Time.parse(value)
264
- when :Date
265
- Date.parse(value)
266
- when :String
267
- value.to_s
268
- when :Integer
269
- value.to_i
270
- when :Float
271
- value.to_f
272
- when :Boolean
273
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
274
- true
275
- else
276
- false
277
- end
278
- when :Object
279
- # generic object (usually a Hash), return directly
280
- value
281
- when /\AArray<(?<inner_type>.+)>\z/
282
- inner_type = Regexp.last_match[:inner_type]
283
- value.map { |v| _deserialize(inner_type, v) }
284
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
285
- k_type = Regexp.last_match[:k_type]
286
- v_type = Regexp.last_match[:v_type]
287
- {}.tap do |hash|
288
- value.each do |k, v|
289
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
290
- end
291
- end
292
- else # model
293
- # models (e.g. Pet) or oneOf
294
- klass = Conekta.const_get(type)
295
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
296
- end
297
- end
298
-
299
- # Returns the string representation of the object
300
- # @return [String] String presentation of the object
301
- def to_s
302
- to_hash.to_s
303
- end
304
-
305
- # to_body is an alias to to_hash (backward compatibility)
306
- # @return [Hash] Returns the object in the form of hash
307
- def to_body
308
- to_hash
309
- end
310
-
311
298
  # Returns the object in the form of hash
312
299
  # @return [Hash] Returns the object in the form of hash
313
300
  def to_hash
@@ -324,24 +311,6 @@ module Conekta
324
311
  hash
325
312
  end
326
313
 
327
- # Outputs non-array value in the form of hash
328
- # For object, use to_hash. Otherwise, just return the value
329
- # @param [Object] value Any valid value
330
- # @return [Hash] Returns the value in the form of hash
331
- def _to_hash(value)
332
- if value.is_a?(Array)
333
- value.compact.map { |v| _to_hash(v) }
334
- elsif value.is_a?(Hash)
335
- {}.tap do |hash|
336
- value.each { |k, v| hash[k] = _to_hash(v) }
337
- end
338
- elsif value.respond_to? :to_hash
339
- value.to_hash
340
- else
341
- value
342
- end
343
- end
344
-
345
314
  end
346
315
 
347
316
  end
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.2.0
6
+ The version of the OpenAPI document: 2.3.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.5.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Conekta
17
17
  # contains the following attributes that will guide to continue the flow
18
- class OrderNextActionResponse
18
+ class OrderNextActionResponse < ApiModelBase
19
19
  attr_accessor :redirect_to_url
20
20
 
21
21
  # Indicates the type of action to be taken
@@ -29,9 +29,14 @@ module Conekta
29
29
  }
30
30
  end
31
31
 
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
32
37
  # Returns all the JSON keys this model knows about
33
38
  def self.acceptable_attributes
34
- attribute_map.values
39
+ acceptable_attribute_map.values
35
40
  end
36
41
 
37
42
  # Attribute type mapping.
@@ -56,9 +61,10 @@ module Conekta
56
61
  end
57
62
 
58
63
  # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
65
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
- if (!self.class.attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderNextActionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderNextActionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
68
  end
63
69
  h[k.to_sym] = v
64
70
  }
@@ -131,61 +137,6 @@ module Conekta
131
137
  new(transformed_hash)
132
138
  end
133
139
 
134
- # Deserializes the data based on type
135
- # @param string type Data type
136
- # @param string value Value to be deserialized
137
- # @return [Object] Deserialized data
138
- def self._deserialize(type, value)
139
- case type.to_sym
140
- when :Time
141
- Time.parse(value)
142
- when :Date
143
- Date.parse(value)
144
- when :String
145
- value.to_s
146
- when :Integer
147
- value.to_i
148
- when :Float
149
- value.to_f
150
- when :Boolean
151
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
- true
153
- else
154
- false
155
- end
156
- when :Object
157
- # generic object (usually a Hash), return directly
158
- value
159
- when /\AArray<(?<inner_type>.+)>\z/
160
- inner_type = Regexp.last_match[:inner_type]
161
- value.map { |v| _deserialize(inner_type, v) }
162
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
- k_type = Regexp.last_match[:k_type]
164
- v_type = Regexp.last_match[:v_type]
165
- {}.tap do |hash|
166
- value.each do |k, v|
167
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
- end
169
- end
170
- else # model
171
- # models (e.g. Pet) or oneOf
172
- klass = Conekta.const_get(type)
173
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
174
- end
175
- end
176
-
177
- # Returns the string representation of the object
178
- # @return [String] String presentation of the object
179
- def to_s
180
- to_hash.to_s
181
- end
182
-
183
- # to_body is an alias to to_hash (backward compatibility)
184
- # @return [Hash] Returns the object in the form of hash
185
- def to_body
186
- to_hash
187
- end
188
-
189
140
  # Returns the object in the form of hash
190
141
  # @return [Hash] Returns the object in the form of hash
191
142
  def to_hash
@@ -202,24 +153,6 @@ module Conekta
202
153
  hash
203
154
  end
204
155
 
205
- # Outputs non-array value in the form of hash
206
- # For object, use to_hash. Otherwise, just return the value
207
- # @param [Object] value Any valid value
208
- # @return [Hash] Returns the value in the form of hash
209
- def _to_hash(value)
210
- if value.is_a?(Array)
211
- value.compact.map { |v| _to_hash(v) }
212
- elsif value.is_a?(Hash)
213
- {}.tap do |hash|
214
- value.each { |k, v| hash[k] = _to_hash(v) }
215
- end
216
- elsif value.respond_to? :to_hash
217
- value.to_hash
218
- else
219
- value
220
- end
221
- end
222
-
223
156
  end
224
157
 
225
158
  end