conekta 6.0.4 → 7.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 (315) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +2 -2
  3. data/README.md +34 -16
  4. data/VERSION +1 -1
  5. data/conekta.gemspec +1 -1
  6. data/config-ruby.json +1 -1
  7. data/docs/AntifraudApi.md +6 -6
  8. data/docs/ApiKeyCreateResponse.md +2 -2
  9. data/docs/ApiKeyResponse.md +2 -2
  10. data/docs/ApiKeyResponseOnDelete.md +2 -2
  11. data/docs/ApiKeysApi.md +5 -5
  12. data/docs/BalancesApi.md +1 -1
  13. data/docs/ChargeOrderResponsePaymentMethod.md +3 -0
  14. data/docs/ChargeRequestPaymentMethod.md +3 -1
  15. data/docs/ChargeResponse.md +8 -8
  16. data/docs/ChargeResponsePaymentMethod.md +3 -0
  17. data/docs/ChargesApi.md +82 -4
  18. data/docs/ChargesDataResponse.md +8 -8
  19. data/docs/ChargesOrderResponse.md +22 -0
  20. data/docs/ChargesOrderResponseAllOfData.md +52 -0
  21. data/docs/Checkout.md +1 -1
  22. data/docs/CheckoutRequest.md +3 -1
  23. data/docs/CheckoutResponse.md +2 -2
  24. data/docs/CompaniesApi.md +2 -2
  25. data/docs/CreateCustomerPaymentMethodsResponse.md +1 -0
  26. data/docs/Customer.md +4 -0
  27. data/docs/CustomerPaymentMethodRequest.md +1 -1
  28. data/docs/CustomerPaymentMethodsData.md +1 -0
  29. data/docs/CustomerResponse.md +4 -0
  30. data/docs/CustomersApi.md +7 -7
  31. data/docs/DeleteApiKeysResponse.md +5 -3
  32. data/docs/DiscountsApi.md +5 -5
  33. data/docs/EventsApi.md +12 -12
  34. data/docs/GetCustomerPaymentMethodDataResponse.md +1 -0
  35. data/docs/LogResponse.md +3 -3
  36. data/docs/LogsApi.md +2 -2
  37. data/docs/LogsResponseData.md +3 -3
  38. data/docs/OrderChannelResponse.md +24 -0
  39. data/docs/{OrderResponseCharges.md → OrderChargesResponse.md} +2 -2
  40. data/docs/{OrderResponseDiscountLines.md → OrderDiscountLinesResponse.md} +2 -2
  41. data/docs/OrderRequest.md +5 -5
  42. data/docs/OrderResponse.md +3 -3
  43. data/docs/OrderResponseCheckout.md +4 -2
  44. data/docs/OrderUpdateRequest.md +3 -3
  45. data/docs/OrdersApi.md +8 -8
  46. data/docs/PaymentLinkApi.md +7 -7
  47. data/docs/PaymentMethodBankTransfer.md +1 -1
  48. data/docs/PaymentMethodBnplPayment.md +32 -0
  49. data/docs/PaymentMethodBnplRequest.md +28 -0
  50. data/docs/PaymentMethodCardRequest.md +1 -1
  51. data/docs/PaymentMethodCash.md +7 -3
  52. data/docs/PaymentMethodCashRequest.md +1 -1
  53. data/docs/PaymentMethodCashResponse.md +6 -4
  54. data/docs/PaymentMethodCashResponseAllOfAgreements.md +20 -0
  55. data/docs/PaymentMethodSpeiRequest.md +1 -1
  56. data/docs/PaymentMethodTokenRequest.md +3 -3
  57. data/docs/PaymentMethodsApi.md +5 -5
  58. data/docs/PayoutOrdersApi.md +77 -3
  59. data/docs/PlanRequest.md +5 -1
  60. data/docs/PlanResponse.md +5 -1
  61. data/docs/PlansApi.md +5 -5
  62. data/docs/ProductsApi.md +3 -3
  63. data/docs/ResendRequest.md +18 -0
  64. data/docs/ShippingContactsApi.md +3 -3
  65. data/docs/ShippingsApi.md +3 -3
  66. data/docs/SubscriptionsApi.md +793 -73
  67. data/docs/TaxesApi.md +3 -3
  68. data/docs/TokensApi.md +1 -1
  69. data/docs/TransactionsApi.md +2 -2
  70. data/docs/TransfersApi.md +2 -2
  71. data/docs/UpdateCustomer.md +4 -0
  72. data/docs/UpdateCustomerPaymentMethodsResponse.md +1 -0
  73. data/docs/WebhookKeysApi.md +5 -5
  74. data/docs/WebhookRequest.md +2 -2
  75. data/docs/WebhookResponse.md +10 -14
  76. data/docs/WebhookUpdateRequest.md +5 -5
  77. data/docs/WebhooksApi.md +8 -8
  78. data/lib/conekta/api/antifraud_api.rb +7 -7
  79. data/lib/conekta/api/api_keys_api.rb +6 -6
  80. data/lib/conekta/api/balances_api.rb +2 -2
  81. data/lib/conekta/api/charges_api.rb +88 -4
  82. data/lib/conekta/api/companies_api.rb +3 -3
  83. data/lib/conekta/api/customers_api.rb +8 -8
  84. data/lib/conekta/api/discounts_api.rb +6 -6
  85. data/lib/conekta/api/events_api.rb +21 -16
  86. data/lib/conekta/api/logs_api.rb +3 -3
  87. data/lib/conekta/api/orders_api.rb +9 -9
  88. data/lib/conekta/api/payment_link_api.rb +7 -7
  89. data/lib/conekta/api/payment_methods_api.rb +5 -5
  90. data/lib/conekta/api/payout_orders_api.rb +74 -4
  91. data/lib/conekta/api/plans_api.rb +6 -6
  92. data/lib/conekta/api/products_api.rb +4 -4
  93. data/lib/conekta/api/shipping_contacts_api.rb +4 -4
  94. data/lib/conekta/api/shippings_api.rb +4 -4
  95. data/lib/conekta/api/subscriptions_api.rb +826 -63
  96. data/lib/conekta/api/taxes_api.rb +4 -4
  97. data/lib/conekta/api/tokens_api.rb +2 -2
  98. data/lib/conekta/api/transactions_api.rb +3 -3
  99. data/lib/conekta/api/transfers_api.rb +3 -3
  100. data/lib/conekta/api/webhook_keys_api.rb +6 -6
  101. data/lib/conekta/api/webhooks_api.rb +7 -7
  102. data/lib/conekta/api_client.rb +1 -1
  103. data/lib/conekta/api_error.rb +1 -1
  104. data/lib/conekta/configuration.rb +1 -1
  105. data/lib/conekta/models/api_key_create_response.rb +13 -12
  106. data/lib/conekta/models/api_key_request.rb +1 -1
  107. data/lib/conekta/models/api_key_response.rb +13 -12
  108. data/lib/conekta/models/api_key_response_on_delete.rb +10 -9
  109. data/lib/conekta/models/api_key_update_request.rb +1 -1
  110. data/lib/conekta/models/balance_common_field.rb +1 -1
  111. data/lib/conekta/models/balance_response.rb +1 -1
  112. data/lib/conekta/models/blacklist_rule_response.rb +1 -1
  113. data/lib/conekta/models/charge_order_response.rb +1 -1
  114. data/lib/conekta/models/charge_order_response_payment_method.rb +3 -1
  115. data/lib/conekta/models/charge_request.rb +1 -1
  116. data/lib/conekta/models/charge_request_payment_method.rb +2 -1
  117. data/lib/conekta/models/charge_response.rb +58 -1
  118. data/lib/conekta/models/charge_response_channel.rb +1 -1
  119. data/lib/conekta/models/charge_response_payment_method.rb +3 -1
  120. data/lib/conekta/models/charge_response_refunds.rb +1 -1
  121. data/lib/conekta/models/charge_response_refunds_data.rb +1 -1
  122. data/lib/conekta/models/charge_update_request.rb +1 -1
  123. data/lib/conekta/models/charges_data_response.rb +58 -1
  124. data/lib/conekta/models/charges_order_response.rb +258 -0
  125. data/lib/conekta/models/charges_order_response_all_of_data.rb +439 -0
  126. data/lib/conekta/models/checkout.rb +1 -1
  127. data/lib/conekta/models/checkout_order_template.rb +1 -1
  128. data/lib/conekta/models/checkout_order_template_customer_info.rb +1 -1
  129. data/lib/conekta/models/checkout_request.rb +13 -3
  130. data/lib/conekta/models/checkout_response.rb +2 -1
  131. data/lib/conekta/models/checkouts_response.rb +1 -1
  132. data/lib/conekta/models/company_fiscal_info_address_response.rb +1 -1
  133. data/lib/conekta/models/company_fiscal_info_response.rb +1 -1
  134. data/lib/conekta/models/company_payout_destination_response.rb +1 -1
  135. data/lib/conekta/models/company_response.rb +1 -1
  136. data/lib/conekta/models/create_customer_fiscal_entities_response.rb +1 -1
  137. data/lib/conekta/models/create_customer_payment_methods_request.rb +1 -1
  138. data/lib/conekta/models/create_customer_payment_methods_response.rb +2 -1
  139. data/lib/conekta/models/create_risk_rules_data.rb +1 -1
  140. data/lib/conekta/models/customer.rb +22 -2
  141. data/lib/conekta/models/customer_address.rb +1 -1
  142. data/lib/conekta/models/customer_antifraud_info.rb +1 -1
  143. data/lib/conekta/models/customer_antifraud_info_response.rb +1 -1
  144. data/lib/conekta/models/customer_fiscal_entities_data_response.rb +1 -1
  145. data/lib/conekta/models/customer_fiscal_entities_request.rb +1 -1
  146. data/lib/conekta/models/customer_fiscal_entities_response.rb +1 -1
  147. data/lib/conekta/models/customer_info.rb +1 -1
  148. data/lib/conekta/models/customer_info_just_customer_id.rb +1 -1
  149. data/lib/conekta/models/customer_info_just_customer_id_response.rb +1 -1
  150. data/lib/conekta/models/customer_payment_method_request.rb +1 -1
  151. data/lib/conekta/models/customer_payment_methods_data.rb +2 -1
  152. data/lib/conekta/models/customer_payment_methods_request.rb +1 -1
  153. data/lib/conekta/models/customer_payment_methods_response.rb +1 -1
  154. data/lib/conekta/models/customer_response.rb +22 -2
  155. data/lib/conekta/models/customer_response_shipping_contacts.rb +1 -1
  156. data/lib/conekta/models/customer_shipping_contacts.rb +2 -2
  157. data/lib/conekta/models/customer_shipping_contacts_address.rb +1 -1
  158. data/lib/conekta/models/customer_shipping_contacts_data_response.rb +1 -1
  159. data/lib/conekta/models/customer_shipping_contacts_response.rb +1 -1
  160. data/lib/conekta/models/customer_shipping_contacts_response_address.rb +1 -1
  161. data/lib/conekta/models/customer_update_fiscal_entities_request.rb +1 -1
  162. data/lib/conekta/models/customer_update_shipping_contacts.rb +2 -2
  163. data/lib/conekta/models/customers_response.rb +1 -1
  164. data/lib/conekta/models/delete_api_keys_response.rb +22 -11
  165. data/lib/conekta/models/deleted_blacklist_rule_response.rb +1 -1
  166. data/lib/conekta/models/deleted_whitelist_rule_response.rb +1 -1
  167. data/lib/conekta/models/details.rb +1 -1
  168. data/lib/conekta/models/details_error.rb +1 -1
  169. data/lib/conekta/models/discount_lines_data_response.rb +1 -1
  170. data/lib/conekta/models/discount_lines_response.rb +1 -1
  171. data/lib/conekta/models/email_checkout_request.rb +1 -1
  172. data/lib/conekta/models/error.rb +1 -1
  173. data/lib/conekta/models/event_response.rb +1 -1
  174. data/lib/conekta/models/event_types.rb +1 -1
  175. data/lib/conekta/models/events_resend_response.rb +1 -1
  176. data/lib/conekta/models/fiscal_entity_address.rb +1 -1
  177. data/lib/conekta/models/get_api_keys_response.rb +1 -1
  178. data/lib/conekta/models/get_charges_response.rb +1 -1
  179. data/lib/conekta/models/get_companies_response.rb +1 -1
  180. data/lib/conekta/models/get_customer_payment_method_data_response.rb +2 -1
  181. data/lib/conekta/models/get_events_response.rb +1 -1
  182. data/lib/conekta/models/get_order_discount_lines_response.rb +1 -1
  183. data/lib/conekta/models/get_orders_response.rb +1 -1
  184. data/lib/conekta/models/get_payment_method_response.rb +1 -1
  185. data/lib/conekta/models/get_plans_response.rb +1 -1
  186. data/lib/conekta/models/get_transactions_response.rb +1 -1
  187. data/lib/conekta/models/get_transfers_response.rb +1 -1
  188. data/lib/conekta/models/get_webhook_keys_response.rb +1 -1
  189. data/lib/conekta/models/get_webhooks_response.rb +1 -1
  190. data/lib/conekta/models/log_response.rb +1 -1
  191. data/lib/conekta/models/logs_response.rb +1 -1
  192. data/lib/conekta/models/logs_response_data.rb +1 -1
  193. data/lib/conekta/models/order_capture_request.rb +1 -1
  194. data/lib/conekta/models/order_channel_response.rb +241 -0
  195. data/lib/conekta/models/order_charges_response.rb +258 -0
  196. data/lib/conekta/models/order_customer_info_response.rb +1 -1
  197. data/lib/conekta/models/order_discount_lines_request.rb +1 -1
  198. data/lib/conekta/models/order_discount_lines_response.rb +257 -0
  199. data/lib/conekta/models/order_fiscal_entity_address_response.rb +1 -1
  200. data/lib/conekta/models/order_fiscal_entity_request.rb +1 -1
  201. data/lib/conekta/models/order_fiscal_entity_response.rb +1 -1
  202. data/lib/conekta/models/order_next_action_response.rb +1 -1
  203. data/lib/conekta/models/order_next_action_response_redirect_to_url.rb +1 -1
  204. data/lib/conekta/models/order_refund_request.rb +1 -2
  205. data/lib/conekta/models/order_request.rb +6 -6
  206. data/lib/conekta/models/order_request_customer_info.rb +1 -1
  207. data/lib/conekta/models/order_response.rb +4 -4
  208. data/lib/conekta/models/order_response_checkout.rb +14 -2
  209. data/lib/conekta/models/order_response_customer_info.rb +1 -1
  210. data/lib/conekta/models/order_response_products.rb +1 -1
  211. data/lib/conekta/models/order_response_shipping_contact.rb +1 -1
  212. data/lib/conekta/models/order_tax_request.rb +1 -1
  213. data/lib/conekta/models/order_update_fiscal_entity_request.rb +1 -1
  214. data/lib/conekta/models/order_update_request.rb +4 -4
  215. data/lib/conekta/models/order_update_request_customer_info.rb +1 -1
  216. data/lib/conekta/models/orders_response.rb +1 -1
  217. data/lib/conekta/models/page.rb +1 -1
  218. data/lib/conekta/models/pagination.rb +1 -1
  219. data/lib/conekta/models/payment_method.rb +1 -1
  220. data/lib/conekta/models/payment_method_bank_transfer.rb +2 -2
  221. data/lib/conekta/models/payment_method_bnpl_payment.rb +311 -0
  222. data/lib/conekta/models/payment_method_bnpl_request.rb +348 -0
  223. data/lib/conekta/models/payment_method_card.rb +1 -1
  224. data/lib/conekta/models/payment_method_card_request.rb +1 -1
  225. data/lib/conekta/models/payment_method_card_response.rb +1 -1
  226. data/lib/conekta/models/payment_method_cash.rb +22 -2
  227. data/lib/conekta/models/payment_method_cash_request.rb +1 -1
  228. data/lib/conekta/models/payment_method_cash_response.rb +14 -2
  229. data/lib/conekta/models/payment_method_cash_response_all_of_agreements.rb +225 -0
  230. data/lib/conekta/models/payment_method_general_request.rb +1 -1
  231. data/lib/conekta/models/payment_method_response.rb +1 -1
  232. data/lib/conekta/models/payment_method_spei_recurrent.rb +1 -1
  233. data/lib/conekta/models/payment_method_spei_request.rb +1 -1
  234. data/lib/conekta/models/payment_method_token_request.rb +2 -2
  235. data/lib/conekta/models/payout.rb +1 -1
  236. data/lib/conekta/models/payout_method.rb +1 -1
  237. data/lib/conekta/models/payout_order.rb +1 -1
  238. data/lib/conekta/models/payout_order_payouts_item.rb +1 -1
  239. data/lib/conekta/models/payout_order_response.rb +1 -1
  240. data/lib/conekta/models/payout_order_response_customer_info.rb +1 -1
  241. data/lib/conekta/models/payout_orders_response.rb +1 -1
  242. data/lib/conekta/models/plan_request.rb +63 -5
  243. data/lib/conekta/models/plan_response.rb +24 -6
  244. data/lib/conekta/models/plan_update_request.rb +1 -1
  245. data/lib/conekta/models/product.rb +1 -1
  246. data/lib/conekta/models/product_data_response.rb +1 -1
  247. data/lib/conekta/models/product_order_response.rb +1 -1
  248. data/lib/conekta/models/resend_request.rb +224 -0
  249. data/lib/conekta/models/risk_rules_data.rb +1 -1
  250. data/lib/conekta/models/risk_rules_list.rb +1 -1
  251. data/lib/conekta/models/shipping_order_response.rb +1 -1
  252. data/lib/conekta/models/shipping_request.rb +1 -1
  253. data/lib/conekta/models/sms_checkout_request.rb +1 -1
  254. data/lib/conekta/models/subscription_events_response.rb +1 -1
  255. data/lib/conekta/models/subscription_request.rb +1 -1
  256. data/lib/conekta/models/subscription_response.rb +1 -1
  257. data/lib/conekta/models/subscription_update_request.rb +1 -1
  258. data/lib/conekta/models/token.rb +1 -1
  259. data/lib/conekta/models/token_card.rb +1 -1
  260. data/lib/conekta/models/token_checkout.rb +1 -1
  261. data/lib/conekta/models/token_response.rb +1 -1
  262. data/lib/conekta/models/token_response_checkout.rb +1 -1
  263. data/lib/conekta/models/transaction_response.rb +1 -1
  264. data/lib/conekta/models/transfer_destination_response.rb +1 -1
  265. data/lib/conekta/models/transfer_method_response.rb +1 -1
  266. data/lib/conekta/models/transfer_response.rb +1 -1
  267. data/lib/conekta/models/transfers_response.rb +1 -1
  268. data/lib/conekta/models/update_customer.rb +22 -2
  269. data/lib/conekta/models/update_customer_antifraud_info.rb +1 -1
  270. data/lib/conekta/models/update_customer_fiscal_entities_response.rb +1 -1
  271. data/lib/conekta/models/update_customer_payment_methods_response.rb +2 -1
  272. data/lib/conekta/models/update_order_discount_lines_request.rb +1 -1
  273. data/lib/conekta/models/update_order_tax_request.rb +1 -1
  274. data/lib/conekta/models/update_order_tax_response.rb +1 -1
  275. data/lib/conekta/models/update_payment_methods.rb +1 -1
  276. data/lib/conekta/models/update_product.rb +1 -1
  277. data/lib/conekta/models/webhook_key_create_response.rb +1 -1
  278. data/lib/conekta/models/webhook_key_delete_response.rb +1 -1
  279. data/lib/conekta/models/webhook_key_request.rb +1 -1
  280. data/lib/conekta/models/webhook_key_response.rb +1 -1
  281. data/lib/conekta/models/webhook_key_update_request.rb +1 -1
  282. data/lib/conekta/models/webhook_log.rb +1 -1
  283. data/lib/conekta/models/webhook_request.rb +11 -16
  284. data/lib/conekta/models/webhook_response.rb +28 -39
  285. data/lib/conekta/models/webhook_update_request.rb +20 -28
  286. data/lib/conekta/models/whitelistlist_rule_response.rb +1 -1
  287. data/lib/conekta/version.rb +2 -2
  288. data/lib/conekta.rb +10 -3
  289. data/spec/api/antifraud_api_spec.rb +8 -65
  290. data/spec/api/api_keys_api_spec.rb +7 -51
  291. data/spec/api/balances_api_spec.rb +3 -12
  292. data/spec/api/charges_api_spec.rb +30 -83
  293. data/spec/api/companies_api_spec.rb +5 -13
  294. data/spec/api/customers_api_spec.rb +13 -184
  295. data/spec/api/discounts_api_spec.rb +7 -46
  296. data/spec/api/events_api_spec.rb +7 -24
  297. data/spec/api/logs_api_spec.rb +3 -15
  298. data/spec/api/orders_api_spec.rb +19 -247
  299. data/spec/api/payment_link_api_spec.rb +9 -82
  300. data/spec/api/payment_methods_api_spec.rb +6 -41
  301. data/spec/api/payout_orders_api_spec.rb +14 -1
  302. data/spec/api/plans_api_spec.rb +7 -42
  303. data/spec/api/products_api_spec.rb +5 -30
  304. data/spec/api/shipping_contacts_api_spec.rb +5 -41
  305. data/spec/api/shippings_api_spec.rb +5 -32
  306. data/spec/api/subscriptions_api_spec.rb +168 -68
  307. data/spec/api/taxes_api_spec.rb +5 -34
  308. data/spec/api/tokens_api_spec.rb +3 -31
  309. data/spec/api/transactions_api_spec.rb +8 -21
  310. data/spec/api/transfers_api_spec.rb +4 -34
  311. data/spec/api/webhook_keys_api_spec.rb +7 -49
  312. data/spec/api/webhooks_api_spec.rb +9 -42
  313. data/spec/spec_helper.rb +1 -1
  314. metadata +36 -22
  315. data/spec/api/base_test.rb +0 -9
@@ -0,0 +1,439 @@
1
+ =begin
2
+ #Conekta API
3
+
4
+ #Conekta sdk
5
+
6
+ The version of the OpenAPI document: 2.2.0
7
+ Contact: engineering@conekta.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.5.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Conekta
17
+ class ChargesOrderResponseAllOfData
18
+ attr_accessor :amount
19
+
20
+ attr_accessor :channel
21
+
22
+ attr_accessor :created_at
23
+
24
+ attr_accessor :currency
25
+
26
+ attr_accessor :customer_id
27
+
28
+ attr_accessor :description
29
+
30
+ attr_accessor :device_fingerprint
31
+
32
+ attr_accessor :failure_code
33
+
34
+ attr_accessor :failure_message
35
+
36
+ # Charge ID
37
+ attr_accessor :id
38
+
39
+ # Whether the charge was made in live mode or not
40
+ attr_accessor :livemode
41
+
42
+ attr_accessor :object
43
+
44
+ # Order ID
45
+ attr_accessor :order_id
46
+
47
+ # Payment date
48
+ attr_accessor :paid_at
49
+
50
+ attr_accessor :payment_method
51
+
52
+ # Reference ID of the charge
53
+ attr_accessor :reference_id
54
+
55
+ attr_accessor :refunds
56
+
57
+ # Charge status
58
+ attr_accessor :status
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+ :'amount' => :'amount',
64
+ :'channel' => :'channel',
65
+ :'created_at' => :'created_at',
66
+ :'currency' => :'currency',
67
+ :'customer_id' => :'customer_id',
68
+ :'description' => :'description',
69
+ :'device_fingerprint' => :'device_fingerprint',
70
+ :'failure_code' => :'failure_code',
71
+ :'failure_message' => :'failure_message',
72
+ :'id' => :'id',
73
+ :'livemode' => :'livemode',
74
+ :'object' => :'object',
75
+ :'order_id' => :'order_id',
76
+ :'paid_at' => :'paid_at',
77
+ :'payment_method' => :'payment_method',
78
+ :'reference_id' => :'reference_id',
79
+ :'refunds' => :'refunds',
80
+ :'status' => :'status'
81
+ }
82
+ end
83
+
84
+ # Returns all the JSON keys this model knows about
85
+ def self.acceptable_attributes
86
+ attribute_map.values
87
+ end
88
+
89
+ # Attribute type mapping.
90
+ def self.openapi_types
91
+ {
92
+ :'amount' => :'Integer',
93
+ :'channel' => :'ChargeResponseChannel',
94
+ :'created_at' => :'Integer',
95
+ :'currency' => :'String',
96
+ :'customer_id' => :'String',
97
+ :'description' => :'String',
98
+ :'device_fingerprint' => :'String',
99
+ :'failure_code' => :'String',
100
+ :'failure_message' => :'String',
101
+ :'id' => :'String',
102
+ :'livemode' => :'Boolean',
103
+ :'object' => :'String',
104
+ :'order_id' => :'String',
105
+ :'paid_at' => :'Integer',
106
+ :'payment_method' => :'ChargeResponsePaymentMethod',
107
+ :'reference_id' => :'String',
108
+ :'refunds' => :'ChargeResponseRefunds',
109
+ :'status' => :'String'
110
+ }
111
+ end
112
+
113
+ # List of attributes with nullable: true
114
+ def self.openapi_nullable
115
+ Set.new([
116
+ :'paid_at',
117
+ :'reference_id',
118
+ :'refunds',
119
+ ])
120
+ end
121
+
122
+ # List of class defined in allOf (OpenAPI v3)
123
+ def self.openapi_all_of
124
+ [
125
+ :'ChargeResponse'
126
+ ]
127
+ end
128
+
129
+ # Initializes the object
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ def initialize(attributes = {})
132
+ if (!attributes.is_a?(Hash))
133
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::ChargesOrderResponseAllOfData` initialize method"
134
+ end
135
+
136
+ # check to see if the attribute exists and convert string to symbol for hash key
137
+ attributes = attributes.each_with_object({}) { |(k, v), h|
138
+ if (!self.class.attribute_map.key?(k.to_sym))
139
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::ChargesOrderResponseAllOfData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
140
+ end
141
+ h[k.to_sym] = v
142
+ }
143
+
144
+ if attributes.key?(:'amount')
145
+ self.amount = attributes[:'amount']
146
+ else
147
+ self.amount = nil
148
+ end
149
+
150
+ if attributes.key?(:'channel')
151
+ self.channel = attributes[:'channel']
152
+ end
153
+
154
+ if attributes.key?(:'created_at')
155
+ self.created_at = attributes[:'created_at']
156
+ else
157
+ self.created_at = nil
158
+ end
159
+
160
+ if attributes.key?(:'currency')
161
+ self.currency = attributes[:'currency']
162
+ else
163
+ self.currency = nil
164
+ end
165
+
166
+ if attributes.key?(:'customer_id')
167
+ self.customer_id = attributes[:'customer_id']
168
+ end
169
+
170
+ if attributes.key?(:'description')
171
+ self.description = attributes[:'description']
172
+ end
173
+
174
+ if attributes.key?(:'device_fingerprint')
175
+ self.device_fingerprint = attributes[:'device_fingerprint']
176
+ end
177
+
178
+ if attributes.key?(:'failure_code')
179
+ self.failure_code = attributes[:'failure_code']
180
+ end
181
+
182
+ if attributes.key?(:'failure_message')
183
+ self.failure_message = attributes[:'failure_message']
184
+ end
185
+
186
+ if attributes.key?(:'id')
187
+ self.id = attributes[:'id']
188
+ else
189
+ self.id = nil
190
+ end
191
+
192
+ if attributes.key?(:'livemode')
193
+ self.livemode = attributes[:'livemode']
194
+ else
195
+ self.livemode = nil
196
+ end
197
+
198
+ if attributes.key?(:'object')
199
+ self.object = attributes[:'object']
200
+ else
201
+ self.object = nil
202
+ end
203
+
204
+ if attributes.key?(:'order_id')
205
+ self.order_id = attributes[:'order_id']
206
+ else
207
+ self.order_id = nil
208
+ end
209
+
210
+ if attributes.key?(:'paid_at')
211
+ self.paid_at = attributes[:'paid_at']
212
+ end
213
+
214
+ if attributes.key?(:'payment_method')
215
+ self.payment_method = attributes[:'payment_method']
216
+ end
217
+
218
+ if attributes.key?(:'reference_id')
219
+ self.reference_id = attributes[:'reference_id']
220
+ end
221
+
222
+ if attributes.key?(:'refunds')
223
+ self.refunds = attributes[:'refunds']
224
+ end
225
+
226
+ if attributes.key?(:'status')
227
+ self.status = attributes[:'status']
228
+ else
229
+ self.status = nil
230
+ end
231
+ end
232
+
233
+ # Show invalid properties with the reasons. Usually used together with valid?
234
+ # @return Array for valid properties with the reasons
235
+ def list_invalid_properties
236
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
237
+ invalid_properties = Array.new
238
+ if @amount.nil?
239
+ invalid_properties.push('invalid value for "amount", amount cannot be nil.')
240
+ end
241
+
242
+ if @created_at.nil?
243
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
244
+ end
245
+
246
+ if @currency.nil?
247
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
248
+ end
249
+
250
+ if @id.nil?
251
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
252
+ end
253
+
254
+ if @livemode.nil?
255
+ invalid_properties.push('invalid value for "livemode", livemode cannot be nil.')
256
+ end
257
+
258
+ if @object.nil?
259
+ invalid_properties.push('invalid value for "object", object cannot be nil.')
260
+ end
261
+
262
+ if @order_id.nil?
263
+ invalid_properties.push('invalid value for "order_id", order_id cannot be nil.')
264
+ end
265
+
266
+ if @status.nil?
267
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
268
+ end
269
+
270
+ invalid_properties
271
+ end
272
+
273
+ # Check to see if the all the properties in the model are valid
274
+ # @return true if the model is valid
275
+ def valid?
276
+ warn '[DEPRECATED] the `valid?` method is obsolete'
277
+ return false if @amount.nil?
278
+ return false if @created_at.nil?
279
+ return false if @currency.nil?
280
+ return false if @id.nil?
281
+ return false if @livemode.nil?
282
+ return false if @object.nil?
283
+ return false if @order_id.nil?
284
+ return false if @status.nil?
285
+ true
286
+ end
287
+
288
+ # Checks equality by comparing each attribute.
289
+ # @param [Object] Object to be compared
290
+ def ==(o)
291
+ return true if self.equal?(o)
292
+ self.class == o.class &&
293
+ amount == o.amount &&
294
+ channel == o.channel &&
295
+ created_at == o.created_at &&
296
+ currency == o.currency &&
297
+ customer_id == o.customer_id &&
298
+ description == o.description &&
299
+ device_fingerprint == o.device_fingerprint &&
300
+ failure_code == o.failure_code &&
301
+ failure_message == o.failure_message &&
302
+ id == o.id &&
303
+ livemode == o.livemode &&
304
+ object == o.object &&
305
+ order_id == o.order_id &&
306
+ paid_at == o.paid_at &&
307
+ payment_method == o.payment_method &&
308
+ reference_id == o.reference_id &&
309
+ refunds == o.refunds &&
310
+ status == o.status
311
+ end
312
+
313
+ # @see the `==` method
314
+ # @param [Object] Object to be compared
315
+ def eql?(o)
316
+ self == o
317
+ end
318
+
319
+ # Calculates hash code according to all attributes.
320
+ # @return [Integer] Hash code
321
+ def hash
322
+ [amount, channel, created_at, currency, customer_id, description, device_fingerprint, failure_code, failure_message, id, livemode, object, order_id, paid_at, payment_method, reference_id, refunds, status].hash
323
+ end
324
+
325
+ # Builds the object from hash
326
+ # @param [Hash] attributes Model attributes in the form of hash
327
+ # @return [Object] Returns the model itself
328
+ def self.build_from_hash(attributes)
329
+ return nil unless attributes.is_a?(Hash)
330
+ attributes = attributes.transform_keys(&:to_sym)
331
+ transformed_hash = {}
332
+ openapi_types.each_pair do |key, type|
333
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
334
+ transformed_hash["#{key}"] = nil
335
+ elsif type =~ /\AArray<(.*)>/i
336
+ # check to ensure the input is an array given that the attribute
337
+ # is documented as an array but the input is not
338
+ if attributes[attribute_map[key]].is_a?(Array)
339
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
340
+ end
341
+ elsif !attributes[attribute_map[key]].nil?
342
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
343
+ end
344
+ end
345
+ new(transformed_hash)
346
+ end
347
+
348
+ # Deserializes the data based on type
349
+ # @param string type Data type
350
+ # @param string value Value to be deserialized
351
+ # @return [Object] Deserialized data
352
+ def self._deserialize(type, value)
353
+ case type.to_sym
354
+ when :Time
355
+ Time.parse(value)
356
+ when :Date
357
+ Date.parse(value)
358
+ when :String
359
+ value.to_s
360
+ when :Integer
361
+ value.to_i
362
+ when :Float
363
+ value.to_f
364
+ when :Boolean
365
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
366
+ true
367
+ else
368
+ false
369
+ end
370
+ when :Object
371
+ # generic object (usually a Hash), return directly
372
+ value
373
+ when /\AArray<(?<inner_type>.+)>\z/
374
+ inner_type = Regexp.last_match[:inner_type]
375
+ value.map { |v| _deserialize(inner_type, v) }
376
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
377
+ k_type = Regexp.last_match[:k_type]
378
+ v_type = Regexp.last_match[:v_type]
379
+ {}.tap do |hash|
380
+ value.each do |k, v|
381
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
382
+ end
383
+ end
384
+ else # model
385
+ # models (e.g. Pet) or oneOf
386
+ klass = Conekta.const_get(type)
387
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
388
+ end
389
+ end
390
+
391
+ # Returns the string representation of the object
392
+ # @return [String] String presentation of the object
393
+ def to_s
394
+ to_hash.to_s
395
+ end
396
+
397
+ # to_body is an alias to to_hash (backward compatibility)
398
+ # @return [Hash] Returns the object in the form of hash
399
+ def to_body
400
+ to_hash
401
+ end
402
+
403
+ # Returns the object in the form of hash
404
+ # @return [Hash] Returns the object in the form of hash
405
+ def to_hash
406
+ hash = {}
407
+ self.class.attribute_map.each_pair do |attr, param|
408
+ value = self.send(attr)
409
+ if value.nil?
410
+ is_nullable = self.class.openapi_nullable.include?(attr)
411
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
412
+ end
413
+
414
+ hash[param] = _to_hash(value)
415
+ end
416
+ hash
417
+ end
418
+
419
+ # Outputs non-array value in the form of hash
420
+ # For object, use to_hash. Otherwise, just return the value
421
+ # @param [Object] value Any valid value
422
+ # @return [Hash] Returns the value in the form of hash
423
+ def _to_hash(value)
424
+ if value.is_a?(Array)
425
+ value.compact.map { |v| _to_hash(v) }
426
+ elsif value.is_a?(Hash)
427
+ {}.tap do |hash|
428
+ value.each { |k, v| hash[k] = _to_hash(v) }
429
+ end
430
+ elsif value.respond_to? :to_hash
431
+ value.to_hash
432
+ else
433
+ value
434
+ end
435
+ end
436
+
437
+ end
438
+
439
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Conekta
17
- # [Checkout](https://developers.conekta.com/v2.1.0/reference/payment-link) details
17
+ # [Checkout](https://developers.conekta.com/v2.2.0/reference/payment-link) details
18
18
  class CheckoutRequest
19
19
  # Are the payment methods available for this link
20
20
  attr_accessor :allowed_payment_methods
@@ -29,6 +29,9 @@ module Conekta
29
29
 
30
30
  attr_accessor :monthly_installments_options
31
31
 
32
+ # Number of retries allowed before the checkout is marked as failed
33
+ attr_accessor :max_failed_retries
34
+
32
35
  # Reason for payment
33
36
  attr_accessor :name
34
37
 
@@ -51,6 +54,7 @@ module Conekta
51
54
  :'failure_url' => :'failure_url',
52
55
  :'monthly_installments_enabled' => :'monthly_installments_enabled',
53
56
  :'monthly_installments_options' => :'monthly_installments_options',
57
+ :'max_failed_retries' => :'max_failed_retries',
54
58
  :'name' => :'name',
55
59
  :'on_demand_enabled' => :'on_demand_enabled',
56
60
  :'redirection_time' => :'redirection_time',
@@ -72,6 +76,7 @@ module Conekta
72
76
  :'failure_url' => :'String',
73
77
  :'monthly_installments_enabled' => :'Boolean',
74
78
  :'monthly_installments_options' => :'Array<Integer>',
79
+ :'max_failed_retries' => :'Integer',
75
80
  :'name' => :'String',
76
81
  :'on_demand_enabled' => :'Boolean',
77
82
  :'redirection_time' => :'Integer',
@@ -127,6 +132,10 @@ module Conekta
127
132
  end
128
133
  end
129
134
 
135
+ if attributes.key?(:'max_failed_retries')
136
+ self.max_failed_retries = attributes[:'max_failed_retries']
137
+ end
138
+
130
139
  if attributes.key?(:'name')
131
140
  self.name = attributes[:'name']
132
141
  end
@@ -178,6 +187,7 @@ module Conekta
178
187
  failure_url == o.failure_url &&
179
188
  monthly_installments_enabled == o.monthly_installments_enabled &&
180
189
  monthly_installments_options == o.monthly_installments_options &&
190
+ max_failed_retries == o.max_failed_retries &&
181
191
  name == o.name &&
182
192
  on_demand_enabled == o.on_demand_enabled &&
183
193
  redirection_time == o.redirection_time &&
@@ -194,7 +204,7 @@ module Conekta
194
204
  # Calculates hash code according to all attributes.
195
205
  # @return [Integer] Hash code
196
206
  def hash
197
- [allowed_payment_methods, expires_at, failure_url, monthly_installments_enabled, monthly_installments_options, name, on_demand_enabled, redirection_time, success_url, type].hash
207
+ [allowed_payment_methods, expires_at, failure_url, monthly_installments_enabled, monthly_installments_options, max_failed_retries, name, on_demand_enabled, redirection_time, success_url, type].hash
198
208
  end
199
209
 
200
210
  # Builds the object from hash
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -16,6 +16,7 @@ require 'time'
16
16
  module Conekta
17
17
  # checkout response
18
18
  class CheckoutResponse
19
+ # Are the payment methods available for this link
19
20
  attr_accessor :allowed_payment_methods
20
21
 
21
22
  attr_accessor :can_not_expire
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0
@@ -35,6 +35,7 @@ module Conekta
35
35
  {
36
36
  :'card' => :'PaymentMethodCardResponse',
37
37
  :'cash' => :'PaymentMethodCashResponse',
38
+ :'cash_recurrent' => :'PaymentMethodCashResponse',
38
39
  :'oxxo_recurrent' => :'PaymentMethodCashResponse',
39
40
  :'spei_recurrent' => :'PaymentMethodSpeiRecurrent'
40
41
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Conekta sdk
5
5
 
6
- The version of the OpenAPI document: 2.1.0
6
+ The version of the OpenAPI document: 2.2.0
7
7
  Contact: engineering@conekta.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.5.0