conekta 6.0.5 → 7.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 (312) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +2 -2
  3. data/README.md +30 -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 +6 -6
  18. data/docs/ChargesDataResponse.md +8 -8
  19. data/docs/ChargesOrderResponseAllOfData.md +8 -8
  20. data/docs/Checkout.md +1 -1
  21. data/docs/CheckoutOrderTemplate.md +2 -0
  22. data/docs/CheckoutRequest.md +4 -2
  23. data/docs/CheckoutResponse.md +4 -2
  24. data/docs/CompaniesApi.md +2 -2
  25. data/docs/CreateCustomerPaymentMethodsResponse.md +1 -0
  26. data/docs/CustomerPaymentMethodRequest.md +1 -1
  27. data/docs/CustomerPaymentMethodsData.md +1 -0
  28. data/docs/CustomersApi.md +7 -7
  29. data/docs/DeleteApiKeysResponse.md +5 -3
  30. data/docs/DiscountsApi.md +5 -5
  31. data/docs/EventsApi.md +12 -12
  32. data/docs/GetCustomerPaymentMethodDataResponse.md +1 -0
  33. data/docs/LogResponse.md +3 -3
  34. data/docs/LogsApi.md +2 -2
  35. data/docs/LogsResponseData.md +3 -3
  36. data/docs/OrderChannelResponse.md +24 -0
  37. data/docs/{OrderResponseCharges.md → OrderChargesResponse.md} +2 -2
  38. data/docs/{OrderResponseDiscountLines.md → OrderDiscountLinesResponse.md} +2 -2
  39. data/docs/OrderRequest.md +5 -5
  40. data/docs/OrderResponse.md +3 -3
  41. data/docs/OrderResponseCheckout.md +2 -2
  42. data/docs/OrderUpdateRequest.md +3 -3
  43. data/docs/OrdersApi.md +8 -8
  44. data/docs/PaymentLinkApi.md +7 -7
  45. data/docs/PaymentMethodBankTransfer.md +1 -1
  46. data/docs/PaymentMethodBnplPayment.md +32 -0
  47. data/docs/PaymentMethodBnplRequest.md +28 -0
  48. data/docs/PaymentMethodCardRequest.md +1 -1
  49. data/docs/PaymentMethodCash.md +3 -3
  50. data/docs/PaymentMethodCashRequest.md +1 -1
  51. data/docs/PaymentMethodCashResponse.md +6 -4
  52. data/docs/PaymentMethodCashResponseAllOfAgreements.md +20 -0
  53. data/docs/PaymentMethodSpeiRequest.md +1 -1
  54. data/docs/PaymentMethodTokenRequest.md +2 -2
  55. data/docs/PaymentMethodsApi.md +5 -5
  56. data/docs/PayoutOrdersApi.md +4 -4
  57. data/docs/PlanRequest.md +5 -1
  58. data/docs/PlanResponse.md +5 -1
  59. data/docs/PlansApi.md +5 -5
  60. data/docs/ProductsApi.md +3 -3
  61. data/docs/ResendRequest.md +18 -0
  62. data/docs/ShippingContactsApi.md +3 -3
  63. data/docs/ShippingsApi.md +3 -3
  64. data/docs/SubscriptionsApi.md +793 -73
  65. data/docs/TaxesApi.md +3 -3
  66. data/docs/TokensApi.md +1 -1
  67. data/docs/TransactionsApi.md +2 -2
  68. data/docs/TransfersApi.md +2 -2
  69. data/docs/UpdateCustomerPaymentMethodsResponse.md +1 -0
  70. data/docs/WebhookKeysApi.md +5 -5
  71. data/docs/WebhookRequest.md +2 -2
  72. data/docs/WebhookResponse.md +10 -14
  73. data/docs/WebhookUpdateRequest.md +5 -5
  74. data/docs/WebhooksApi.md +8 -8
  75. data/lib/conekta/api/antifraud_api.rb +7 -7
  76. data/lib/conekta/api/api_keys_api.rb +6 -6
  77. data/lib/conekta/api/balances_api.rb +2 -2
  78. data/lib/conekta/api/charges_api.rb +5 -5
  79. data/lib/conekta/api/companies_api.rb +3 -3
  80. data/lib/conekta/api/customers_api.rb +8 -8
  81. data/lib/conekta/api/discounts_api.rb +6 -6
  82. data/lib/conekta/api/events_api.rb +21 -16
  83. data/lib/conekta/api/logs_api.rb +3 -3
  84. data/lib/conekta/api/orders_api.rb +9 -9
  85. data/lib/conekta/api/payment_link_api.rb +7 -7
  86. data/lib/conekta/api/payment_methods_api.rb +5 -5
  87. data/lib/conekta/api/payout_orders_api.rb +5 -5
  88. data/lib/conekta/api/plans_api.rb +6 -6
  89. data/lib/conekta/api/products_api.rb +4 -4
  90. data/lib/conekta/api/shipping_contacts_api.rb +4 -4
  91. data/lib/conekta/api/shippings_api.rb +4 -4
  92. data/lib/conekta/api/subscriptions_api.rb +826 -63
  93. data/lib/conekta/api/taxes_api.rb +4 -4
  94. data/lib/conekta/api/tokens_api.rb +2 -2
  95. data/lib/conekta/api/transactions_api.rb +3 -3
  96. data/lib/conekta/api/transfers_api.rb +3 -3
  97. data/lib/conekta/api/webhook_keys_api.rb +6 -6
  98. data/lib/conekta/api/webhooks_api.rb +7 -7
  99. data/lib/conekta/api_client.rb +1 -1
  100. data/lib/conekta/api_error.rb +1 -1
  101. data/lib/conekta/configuration.rb +1 -1
  102. data/lib/conekta/models/api_key_create_response.rb +13 -12
  103. data/lib/conekta/models/api_key_request.rb +1 -1
  104. data/lib/conekta/models/api_key_response.rb +13 -12
  105. data/lib/conekta/models/api_key_response_on_delete.rb +10 -9
  106. data/lib/conekta/models/api_key_update_request.rb +1 -1
  107. data/lib/conekta/models/balance_common_field.rb +1 -1
  108. data/lib/conekta/models/balance_response.rb +1 -1
  109. data/lib/conekta/models/blacklist_rule_response.rb +1 -1
  110. data/lib/conekta/models/charge_order_response.rb +1 -1
  111. data/lib/conekta/models/charge_order_response_payment_method.rb +3 -1
  112. data/lib/conekta/models/charge_request.rb +1 -1
  113. data/lib/conekta/models/charge_request_payment_method.rb +2 -1
  114. data/lib/conekta/models/charge_response.rb +58 -1
  115. data/lib/conekta/models/charge_response_channel.rb +1 -1
  116. data/lib/conekta/models/charge_response_payment_method.rb +3 -1
  117. data/lib/conekta/models/charge_response_refunds.rb +1 -1
  118. data/lib/conekta/models/charge_response_refunds_data.rb +1 -1
  119. data/lib/conekta/models/charge_update_request.rb +1 -1
  120. data/lib/conekta/models/charges_data_response.rb +58 -1
  121. data/lib/conekta/models/charges_order_response.rb +1 -1
  122. data/lib/conekta/models/charges_order_response_all_of_data.rb +58 -1
  123. data/lib/conekta/models/checkout.rb +1 -1
  124. data/lib/conekta/models/checkout_order_template.rb +14 -2
  125. data/lib/conekta/models/checkout_order_template_customer_info.rb +1 -1
  126. data/lib/conekta/models/checkout_request.rb +38 -4
  127. data/lib/conekta/models/checkout_response.rb +15 -2
  128. data/lib/conekta/models/checkouts_response.rb +1 -1
  129. data/lib/conekta/models/company_fiscal_info_address_response.rb +1 -1
  130. data/lib/conekta/models/company_fiscal_info_response.rb +1 -1
  131. data/lib/conekta/models/company_payout_destination_response.rb +1 -1
  132. data/lib/conekta/models/company_response.rb +1 -1
  133. data/lib/conekta/models/create_customer_fiscal_entities_response.rb +1 -1
  134. data/lib/conekta/models/create_customer_payment_methods_request.rb +1 -1
  135. data/lib/conekta/models/create_customer_payment_methods_response.rb +2 -1
  136. data/lib/conekta/models/create_risk_rules_data.rb +1 -1
  137. data/lib/conekta/models/customer.rb +1 -1
  138. data/lib/conekta/models/customer_address.rb +1 -1
  139. data/lib/conekta/models/customer_antifraud_info.rb +1 -1
  140. data/lib/conekta/models/customer_antifraud_info_response.rb +1 -1
  141. data/lib/conekta/models/customer_fiscal_entities_data_response.rb +1 -1
  142. data/lib/conekta/models/customer_fiscal_entities_request.rb +1 -1
  143. data/lib/conekta/models/customer_fiscal_entities_response.rb +1 -1
  144. data/lib/conekta/models/customer_info.rb +1 -1
  145. data/lib/conekta/models/customer_info_just_customer_id.rb +1 -1
  146. data/lib/conekta/models/customer_info_just_customer_id_response.rb +1 -1
  147. data/lib/conekta/models/customer_payment_method_request.rb +1 -1
  148. data/lib/conekta/models/customer_payment_methods_data.rb +2 -1
  149. data/lib/conekta/models/customer_payment_methods_request.rb +1 -1
  150. data/lib/conekta/models/customer_payment_methods_response.rb +1 -1
  151. data/lib/conekta/models/customer_response.rb +1 -1
  152. data/lib/conekta/models/customer_response_shipping_contacts.rb +1 -1
  153. data/lib/conekta/models/customer_shipping_contacts.rb +2 -2
  154. data/lib/conekta/models/customer_shipping_contacts_address.rb +1 -1
  155. data/lib/conekta/models/customer_shipping_contacts_data_response.rb +1 -1
  156. data/lib/conekta/models/customer_shipping_contacts_response.rb +1 -1
  157. data/lib/conekta/models/customer_shipping_contacts_response_address.rb +1 -1
  158. data/lib/conekta/models/customer_update_fiscal_entities_request.rb +1 -1
  159. data/lib/conekta/models/customer_update_shipping_contacts.rb +2 -2
  160. data/lib/conekta/models/customers_response.rb +1 -1
  161. data/lib/conekta/models/delete_api_keys_response.rb +22 -11
  162. data/lib/conekta/models/deleted_blacklist_rule_response.rb +1 -1
  163. data/lib/conekta/models/deleted_whitelist_rule_response.rb +1 -1
  164. data/lib/conekta/models/details.rb +1 -1
  165. data/lib/conekta/models/details_error.rb +1 -1
  166. data/lib/conekta/models/discount_lines_data_response.rb +1 -1
  167. data/lib/conekta/models/discount_lines_response.rb +1 -1
  168. data/lib/conekta/models/email_checkout_request.rb +1 -1
  169. data/lib/conekta/models/error.rb +1 -1
  170. data/lib/conekta/models/event_response.rb +1 -1
  171. data/lib/conekta/models/event_types.rb +1 -1
  172. data/lib/conekta/models/events_resend_response.rb +1 -1
  173. data/lib/conekta/models/fiscal_entity_address.rb +1 -1
  174. data/lib/conekta/models/get_api_keys_response.rb +1 -1
  175. data/lib/conekta/models/get_charges_response.rb +1 -1
  176. data/lib/conekta/models/get_companies_response.rb +1 -1
  177. data/lib/conekta/models/get_customer_payment_method_data_response.rb +2 -1
  178. data/lib/conekta/models/get_events_response.rb +1 -1
  179. data/lib/conekta/models/get_order_discount_lines_response.rb +1 -1
  180. data/lib/conekta/models/get_orders_response.rb +1 -1
  181. data/lib/conekta/models/get_payment_method_response.rb +1 -1
  182. data/lib/conekta/models/get_plans_response.rb +1 -1
  183. data/lib/conekta/models/get_transactions_response.rb +1 -1
  184. data/lib/conekta/models/get_transfers_response.rb +1 -1
  185. data/lib/conekta/models/get_webhook_keys_response.rb +1 -1
  186. data/lib/conekta/models/get_webhooks_response.rb +1 -1
  187. data/lib/conekta/models/log_response.rb +1 -1
  188. data/lib/conekta/models/logs_response.rb +1 -1
  189. data/lib/conekta/models/logs_response_data.rb +1 -1
  190. data/lib/conekta/models/order_capture_request.rb +1 -1
  191. data/lib/conekta/models/order_channel_response.rb +241 -0
  192. data/lib/conekta/models/order_charges_response.rb +258 -0
  193. data/lib/conekta/models/order_customer_info_response.rb +1 -1
  194. data/lib/conekta/models/order_discount_lines_request.rb +1 -1
  195. data/lib/conekta/models/order_discount_lines_response.rb +257 -0
  196. data/lib/conekta/models/order_fiscal_entity_address_response.rb +1 -1
  197. data/lib/conekta/models/order_fiscal_entity_request.rb +1 -1
  198. data/lib/conekta/models/order_fiscal_entity_response.rb +1 -1
  199. data/lib/conekta/models/order_next_action_response.rb +1 -1
  200. data/lib/conekta/models/order_next_action_response_redirect_to_url.rb +1 -1
  201. data/lib/conekta/models/order_refund_request.rb +1 -1
  202. data/lib/conekta/models/order_request.rb +6 -6
  203. data/lib/conekta/models/order_request_customer_info.rb +1 -1
  204. data/lib/conekta/models/order_response.rb +4 -4
  205. data/lib/conekta/models/order_response_checkout.rb +2 -1
  206. data/lib/conekta/models/order_response_customer_info.rb +1 -1
  207. data/lib/conekta/models/order_response_products.rb +1 -1
  208. data/lib/conekta/models/order_response_shipping_contact.rb +1 -1
  209. data/lib/conekta/models/order_tax_request.rb +1 -1
  210. data/lib/conekta/models/order_update_fiscal_entity_request.rb +1 -1
  211. data/lib/conekta/models/order_update_request.rb +4 -4
  212. data/lib/conekta/models/order_update_request_customer_info.rb +1 -1
  213. data/lib/conekta/models/orders_response.rb +1 -1
  214. data/lib/conekta/models/page.rb +1 -1
  215. data/lib/conekta/models/pagination.rb +1 -1
  216. data/lib/conekta/models/payment_method.rb +1 -1
  217. data/lib/conekta/models/payment_method_bank_transfer.rb +2 -2
  218. data/lib/conekta/models/payment_method_bnpl_payment.rb +311 -0
  219. data/lib/conekta/models/payment_method_bnpl_request.rb +348 -0
  220. data/lib/conekta/models/payment_method_card.rb +1 -1
  221. data/lib/conekta/models/payment_method_card_request.rb +1 -1
  222. data/lib/conekta/models/payment_method_card_response.rb +1 -1
  223. data/lib/conekta/models/payment_method_cash.rb +1 -1
  224. data/lib/conekta/models/payment_method_cash_request.rb +1 -1
  225. data/lib/conekta/models/payment_method_cash_response.rb +14 -2
  226. data/lib/conekta/models/payment_method_cash_response_all_of_agreements.rb +225 -0
  227. data/lib/conekta/models/payment_method_general_request.rb +1 -1
  228. data/lib/conekta/models/payment_method_response.rb +1 -1
  229. data/lib/conekta/models/payment_method_spei_recurrent.rb +1 -1
  230. data/lib/conekta/models/payment_method_spei_request.rb +1 -1
  231. data/lib/conekta/models/payment_method_token_request.rb +2 -2
  232. data/lib/conekta/models/payout.rb +1 -1
  233. data/lib/conekta/models/payout_method.rb +1 -1
  234. data/lib/conekta/models/payout_order.rb +1 -1
  235. data/lib/conekta/models/payout_order_payouts_item.rb +1 -1
  236. data/lib/conekta/models/payout_order_response.rb +1 -1
  237. data/lib/conekta/models/payout_order_response_customer_info.rb +1 -1
  238. data/lib/conekta/models/payout_orders_response.rb +1 -1
  239. data/lib/conekta/models/plan_request.rb +63 -5
  240. data/lib/conekta/models/plan_response.rb +24 -6
  241. data/lib/conekta/models/plan_update_request.rb +1 -1
  242. data/lib/conekta/models/product.rb +1 -1
  243. data/lib/conekta/models/product_data_response.rb +1 -1
  244. data/lib/conekta/models/product_order_response.rb +1 -1
  245. data/lib/conekta/models/resend_request.rb +224 -0
  246. data/lib/conekta/models/risk_rules_data.rb +1 -1
  247. data/lib/conekta/models/risk_rules_list.rb +1 -1
  248. data/lib/conekta/models/shipping_order_response.rb +1 -1
  249. data/lib/conekta/models/shipping_request.rb +1 -1
  250. data/lib/conekta/models/sms_checkout_request.rb +1 -1
  251. data/lib/conekta/models/subscription_events_response.rb +1 -1
  252. data/lib/conekta/models/subscription_request.rb +1 -1
  253. data/lib/conekta/models/subscription_response.rb +1 -1
  254. data/lib/conekta/models/subscription_update_request.rb +1 -1
  255. data/lib/conekta/models/token.rb +1 -1
  256. data/lib/conekta/models/token_card.rb +1 -1
  257. data/lib/conekta/models/token_checkout.rb +1 -1
  258. data/lib/conekta/models/token_response.rb +1 -1
  259. data/lib/conekta/models/token_response_checkout.rb +1 -1
  260. data/lib/conekta/models/transaction_response.rb +1 -1
  261. data/lib/conekta/models/transfer_destination_response.rb +1 -1
  262. data/lib/conekta/models/transfer_method_response.rb +1 -1
  263. data/lib/conekta/models/transfer_response.rb +1 -1
  264. data/lib/conekta/models/transfers_response.rb +1 -1
  265. data/lib/conekta/models/update_customer.rb +1 -1
  266. data/lib/conekta/models/update_customer_antifraud_info.rb +1 -1
  267. data/lib/conekta/models/update_customer_fiscal_entities_response.rb +1 -1
  268. data/lib/conekta/models/update_customer_payment_methods_response.rb +2 -1
  269. data/lib/conekta/models/update_order_discount_lines_request.rb +1 -1
  270. data/lib/conekta/models/update_order_tax_request.rb +1 -1
  271. data/lib/conekta/models/update_order_tax_response.rb +1 -1
  272. data/lib/conekta/models/update_payment_methods.rb +1 -1
  273. data/lib/conekta/models/update_product.rb +1 -1
  274. data/lib/conekta/models/webhook_key_create_response.rb +1 -1
  275. data/lib/conekta/models/webhook_key_delete_response.rb +1 -1
  276. data/lib/conekta/models/webhook_key_request.rb +1 -1
  277. data/lib/conekta/models/webhook_key_response.rb +1 -1
  278. data/lib/conekta/models/webhook_key_update_request.rb +1 -1
  279. data/lib/conekta/models/webhook_log.rb +1 -1
  280. data/lib/conekta/models/webhook_request.rb +11 -16
  281. data/lib/conekta/models/webhook_response.rb +28 -39
  282. data/lib/conekta/models/webhook_update_request.rb +20 -28
  283. data/lib/conekta/models/whitelistlist_rule_response.rb +1 -1
  284. data/lib/conekta/version.rb +2 -2
  285. data/lib/conekta.rb +8 -3
  286. data/spec/api/antifraud_api_spec.rb +8 -65
  287. data/spec/api/api_keys_api_spec.rb +7 -51
  288. data/spec/api/balances_api_spec.rb +3 -12
  289. data/spec/api/charges_api_spec.rb +30 -83
  290. data/spec/api/companies_api_spec.rb +5 -13
  291. data/spec/api/customers_api_spec.rb +13 -184
  292. data/spec/api/discounts_api_spec.rb +7 -46
  293. data/spec/api/events_api_spec.rb +7 -24
  294. data/spec/api/logs_api_spec.rb +3 -15
  295. data/spec/api/orders_api_spec.rb +19 -247
  296. data/spec/api/payment_link_api_spec.rb +9 -82
  297. data/spec/api/payment_methods_api_spec.rb +6 -41
  298. data/spec/api/payout_orders_api_spec.rb +14 -1
  299. data/spec/api/plans_api_spec.rb +7 -42
  300. data/spec/api/products_api_spec.rb +5 -30
  301. data/spec/api/shipping_contacts_api_spec.rb +5 -41
  302. data/spec/api/shippings_api_spec.rb +5 -32
  303. data/spec/api/subscriptions_api_spec.rb +168 -68
  304. data/spec/api/taxes_api_spec.rb +5 -34
  305. data/spec/api/tokens_api_spec.rb +3 -31
  306. data/spec/api/transactions_api_spec.rb +8 -21
  307. data/spec/api/transfers_api_spec.rb +4 -34
  308. data/spec/api/webhook_keys_api_spec.rb +7 -49
  309. data/spec/api/webhooks_api_spec.rb +9 -42
  310. data/spec/spec_helper.rb +1 -1
  311. metadata +34 -24
  312. data/spec/api/base_test.rb +0 -9
@@ -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
@@ -54,6 +54,7 @@ module Conekta
54
54
 
55
55
  attr_accessor :refunds
56
56
 
57
+ # Charge status
57
58
  attr_accessor :status
58
59
 
59
60
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -135,6 +136,8 @@ module Conekta
135
136
 
136
137
  if attributes.key?(:'amount')
137
138
  self.amount = attributes[:'amount']
139
+ else
140
+ self.amount = nil
138
141
  end
139
142
 
140
143
  if attributes.key?(:'channel')
@@ -143,10 +146,14 @@ module Conekta
143
146
 
144
147
  if attributes.key?(:'created_at')
145
148
  self.created_at = attributes[:'created_at']
149
+ else
150
+ self.created_at = nil
146
151
  end
147
152
 
148
153
  if attributes.key?(:'currency')
149
154
  self.currency = attributes[:'currency']
155
+ else
156
+ self.currency = nil
150
157
  end
151
158
 
152
159
  if attributes.key?(:'customer_id')
@@ -171,18 +178,26 @@ module Conekta
171
178
 
172
179
  if attributes.key?(:'id')
173
180
  self.id = attributes[:'id']
181
+ else
182
+ self.id = nil
174
183
  end
175
184
 
176
185
  if attributes.key?(:'livemode')
177
186
  self.livemode = attributes[:'livemode']
187
+ else
188
+ self.livemode = nil
178
189
  end
179
190
 
180
191
  if attributes.key?(:'object')
181
192
  self.object = attributes[:'object']
193
+ else
194
+ self.object = nil
182
195
  end
183
196
 
184
197
  if attributes.key?(:'order_id')
185
198
  self.order_id = attributes[:'order_id']
199
+ else
200
+ self.order_id = nil
186
201
  end
187
202
 
188
203
  if attributes.key?(:'paid_at')
@@ -203,6 +218,8 @@ module Conekta
203
218
 
204
219
  if attributes.key?(:'status')
205
220
  self.status = attributes[:'status']
221
+ else
222
+ self.status = nil
206
223
  end
207
224
  end
208
225
 
@@ -211,6 +228,38 @@ module Conekta
211
228
  def list_invalid_properties
212
229
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
213
230
  invalid_properties = Array.new
231
+ if @amount.nil?
232
+ invalid_properties.push('invalid value for "amount", amount cannot be nil.')
233
+ end
234
+
235
+ if @created_at.nil?
236
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
237
+ end
238
+
239
+ if @currency.nil?
240
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
241
+ end
242
+
243
+ if @id.nil?
244
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
245
+ end
246
+
247
+ if @livemode.nil?
248
+ invalid_properties.push('invalid value for "livemode", livemode cannot be nil.')
249
+ end
250
+
251
+ if @object.nil?
252
+ invalid_properties.push('invalid value for "object", object cannot be nil.')
253
+ end
254
+
255
+ if @order_id.nil?
256
+ invalid_properties.push('invalid value for "order_id", order_id cannot be nil.')
257
+ end
258
+
259
+ if @status.nil?
260
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
261
+ end
262
+
214
263
  invalid_properties
215
264
  end
216
265
 
@@ -218,6 +267,14 @@ module Conekta
218
267
  # @return true if the model is valid
219
268
  def valid?
220
269
  warn '[DEPRECATED] the `valid?` method is obsolete'
270
+ return false if @amount.nil?
271
+ return false if @created_at.nil?
272
+ return false if @currency.nil?
273
+ return false if @id.nil?
274
+ return false if @livemode.nil?
275
+ return false if @object.nil?
276
+ return false if @order_id.nil?
277
+ return false if @status.nil?
221
278
  true
222
279
  end
223
280
 
@@ -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
@@ -20,6 +20,7 @@ module Conekta
20
20
  def openapi_one_of
21
21
  [
22
22
  :'PaymentMethodBankTransfer',
23
+ :'PaymentMethodBnplPayment',
23
24
  :'PaymentMethodCard',
24
25
  :'PaymentMethodCash'
25
26
  ]
@@ -34,6 +35,7 @@ module Conekta
34
35
  def openapi_discriminator_mapping
35
36
  {
36
37
  :'bank_transfer_payment' => :'PaymentMethodBankTransfer',
38
+ :'bnpl_payment' => :'PaymentMethodBnplPayment',
37
39
  :'card_payment' => :'PaymentMethodCard',
38
40
  :'cash_payment' => :'PaymentMethodCash'
39
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
@@ -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
@@ -54,6 +54,7 @@ module Conekta
54
54
 
55
55
  attr_accessor :refunds
56
56
 
57
+ # Charge status
57
58
  attr_accessor :status
58
59
 
59
60
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -142,6 +143,8 @@ module Conekta
142
143
 
143
144
  if attributes.key?(:'amount')
144
145
  self.amount = attributes[:'amount']
146
+ else
147
+ self.amount = nil
145
148
  end
146
149
 
147
150
  if attributes.key?(:'channel')
@@ -150,10 +153,14 @@ module Conekta
150
153
 
151
154
  if attributes.key?(:'created_at')
152
155
  self.created_at = attributes[:'created_at']
156
+ else
157
+ self.created_at = nil
153
158
  end
154
159
 
155
160
  if attributes.key?(:'currency')
156
161
  self.currency = attributes[:'currency']
162
+ else
163
+ self.currency = nil
157
164
  end
158
165
 
159
166
  if attributes.key?(:'customer_id')
@@ -178,18 +185,26 @@ module Conekta
178
185
 
179
186
  if attributes.key?(:'id')
180
187
  self.id = attributes[:'id']
188
+ else
189
+ self.id = nil
181
190
  end
182
191
 
183
192
  if attributes.key?(:'livemode')
184
193
  self.livemode = attributes[:'livemode']
194
+ else
195
+ self.livemode = nil
185
196
  end
186
197
 
187
198
  if attributes.key?(:'object')
188
199
  self.object = attributes[:'object']
200
+ else
201
+ self.object = nil
189
202
  end
190
203
 
191
204
  if attributes.key?(:'order_id')
192
205
  self.order_id = attributes[:'order_id']
206
+ else
207
+ self.order_id = nil
193
208
  end
194
209
 
195
210
  if attributes.key?(:'paid_at')
@@ -210,6 +225,8 @@ module Conekta
210
225
 
211
226
  if attributes.key?(:'status')
212
227
  self.status = attributes[:'status']
228
+ else
229
+ self.status = nil
213
230
  end
214
231
  end
215
232
 
@@ -218,6 +235,38 @@ module Conekta
218
235
  def list_invalid_properties
219
236
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
220
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
+
221
270
  invalid_properties
222
271
  end
223
272
 
@@ -225,6 +274,14 @@ module Conekta
225
274
  # @return true if the model is valid
226
275
  def valid?
227
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?
228
285
  true
229
286
  end
230
287
 
@@ -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
@@ -54,6 +54,7 @@ module Conekta
54
54
 
55
55
  attr_accessor :refunds
56
56
 
57
+ # Charge status
57
58
  attr_accessor :status
58
59
 
59
60
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -142,6 +143,8 @@ module Conekta
142
143
 
143
144
  if attributes.key?(:'amount')
144
145
  self.amount = attributes[:'amount']
146
+ else
147
+ self.amount = nil
145
148
  end
146
149
 
147
150
  if attributes.key?(:'channel')
@@ -150,10 +153,14 @@ module Conekta
150
153
 
151
154
  if attributes.key?(:'created_at')
152
155
  self.created_at = attributes[:'created_at']
156
+ else
157
+ self.created_at = nil
153
158
  end
154
159
 
155
160
  if attributes.key?(:'currency')
156
161
  self.currency = attributes[:'currency']
162
+ else
163
+ self.currency = nil
157
164
  end
158
165
 
159
166
  if attributes.key?(:'customer_id')
@@ -178,18 +185,26 @@ module Conekta
178
185
 
179
186
  if attributes.key?(:'id')
180
187
  self.id = attributes[:'id']
188
+ else
189
+ self.id = nil
181
190
  end
182
191
 
183
192
  if attributes.key?(:'livemode')
184
193
  self.livemode = attributes[:'livemode']
194
+ else
195
+ self.livemode = nil
185
196
  end
186
197
 
187
198
  if attributes.key?(:'object')
188
199
  self.object = attributes[:'object']
200
+ else
201
+ self.object = nil
189
202
  end
190
203
 
191
204
  if attributes.key?(:'order_id')
192
205
  self.order_id = attributes[:'order_id']
206
+ else
207
+ self.order_id = nil
193
208
  end
194
209
 
195
210
  if attributes.key?(:'paid_at')
@@ -210,6 +225,8 @@ module Conekta
210
225
 
211
226
  if attributes.key?(:'status')
212
227
  self.status = attributes[:'status']
228
+ else
229
+ self.status = nil
213
230
  end
214
231
  end
215
232
 
@@ -218,6 +235,38 @@ module Conekta
218
235
  def list_invalid_properties
219
236
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
220
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
+
221
270
  invalid_properties
222
271
  end
223
272
 
@@ -225,6 +274,14 @@ module Conekta
225
274
  # @return true if the model is valid
226
275
  def valid?
227
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?
228
285
  true
229
286
  end
230
287
 
@@ -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
@@ -24,6 +24,9 @@ module Conekta
24
24
  # They are the products to buy. Each contains the \"unit price\" and \"quantity\" parameters that are used to calculate the total amount of the order.
25
25
  attr_accessor :line_items
26
26
 
27
+ # It is a list of plan IDs that will be associated with the order.
28
+ attr_accessor :plan_ids
29
+
27
30
  # It is a set of key-value pairs that you can attach to the order. It can be used to store additional information about the order in a structured format.
28
31
  attr_accessor :metadata
29
32
 
@@ -33,6 +36,7 @@ module Conekta
33
36
  :'currency' => :'currency',
34
37
  :'customer_info' => :'customer_info',
35
38
  :'line_items' => :'line_items',
39
+ :'plan_ids' => :'plan_ids',
36
40
  :'metadata' => :'metadata'
37
41
  }
38
42
  end
@@ -48,6 +52,7 @@ module Conekta
48
52
  :'currency' => :'String',
49
53
  :'customer_info' => :'CheckoutOrderTemplateCustomerInfo',
50
54
  :'line_items' => :'Array<Product>',
55
+ :'plan_ids' => :'Array<String>',
51
56
  :'metadata' => :'Hash<String, Object>'
52
57
  }
53
58
  end
@@ -91,6 +96,12 @@ module Conekta
91
96
  self.line_items = nil
92
97
  end
93
98
 
99
+ if attributes.key?(:'plan_ids')
100
+ if (value = attributes[:'plan_ids']).is_a?(Array)
101
+ self.plan_ids = value
102
+ end
103
+ end
104
+
94
105
  if attributes.key?(:'metadata')
95
106
  if (value = attributes[:'metadata']).is_a?(Hash)
96
107
  self.metadata = value
@@ -169,6 +180,7 @@ module Conekta
169
180
  currency == o.currency &&
170
181
  customer_info == o.customer_info &&
171
182
  line_items == o.line_items &&
183
+ plan_ids == o.plan_ids &&
172
184
  metadata == o.metadata
173
185
  end
174
186
 
@@ -181,7 +193,7 @@ module Conekta
181
193
  # Calculates hash code according to all attributes.
182
194
  # @return [Integer] Hash code
183
195
  def hash
184
- [currency, customer_info, line_items, metadata].hash
196
+ [currency, customer_info, line_items, plan_ids, metadata].hash
185
197
  end
186
198
 
187
199
  # 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
@@ -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,11 +14,14 @@ 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
- # Are the payment methods available for this link
19
+ # Are the payment methods available for this link. For subscriptions, only 'card' is allowed due to the recurring nature of the payments.
20
20
  attr_accessor :allowed_payment_methods
21
21
 
22
+ # List of plan IDs that will be available for subscription. This field is required for subscription payments.
23
+ attr_accessor :plan_ids
24
+
22
25
  # Unix timestamp of checkout expiration
23
26
  attr_accessor :expires_at
24
27
 
@@ -46,10 +49,33 @@ module Conekta
46
49
  # This field represents the type of checkout
47
50
  attr_accessor :type
48
51
 
52
+ class EnumAttributeValidator
53
+ attr_reader :datatype
54
+ attr_reader :allowable_values
55
+
56
+ def initialize(datatype, allowable_values)
57
+ @allowable_values = allowable_values.map do |value|
58
+ case datatype.to_s
59
+ when /Integer/i
60
+ value.to_i
61
+ when /Float/i
62
+ value.to_f
63
+ else
64
+ value
65
+ end
66
+ end
67
+ end
68
+
69
+ def valid?(value)
70
+ !value || allowable_values.include?(value)
71
+ end
72
+ end
73
+
49
74
  # Attribute mapping from ruby-style variable name to JSON key.
50
75
  def self.attribute_map
51
76
  {
52
77
  :'allowed_payment_methods' => :'allowed_payment_methods',
78
+ :'plan_ids' => :'plan_ids',
53
79
  :'expires_at' => :'expires_at',
54
80
  :'failure_url' => :'failure_url',
55
81
  :'monthly_installments_enabled' => :'monthly_installments_enabled',
@@ -72,6 +98,7 @@ module Conekta
72
98
  def self.openapi_types
73
99
  {
74
100
  :'allowed_payment_methods' => :'Array<String>',
101
+ :'plan_ids' => :'Array<String>',
75
102
  :'expires_at' => :'Integer',
76
103
  :'failure_url' => :'String',
77
104
  :'monthly_installments_enabled' => :'Boolean',
@@ -114,6 +141,12 @@ module Conekta
114
141
  self.allowed_payment_methods = nil
115
142
  end
116
143
 
144
+ if attributes.key?(:'plan_ids')
145
+ if (value = attributes[:'plan_ids']).is_a?(Array)
146
+ self.plan_ids = value
147
+ end
148
+ end
149
+
117
150
  if attributes.key?(:'expires_at')
118
151
  self.expires_at = attributes[:'expires_at']
119
152
  end
@@ -183,6 +216,7 @@ module Conekta
183
216
  return true if self.equal?(o)
184
217
  self.class == o.class &&
185
218
  allowed_payment_methods == o.allowed_payment_methods &&
219
+ plan_ids == o.plan_ids &&
186
220
  expires_at == o.expires_at &&
187
221
  failure_url == o.failure_url &&
188
222
  monthly_installments_enabled == o.monthly_installments_enabled &&
@@ -204,7 +238,7 @@ module Conekta
204
238
  # Calculates hash code according to all attributes.
205
239
  # @return [Integer] Hash code
206
240
  def 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
241
+ [allowed_payment_methods, plan_ids, expires_at, failure_url, monthly_installments_enabled, monthly_installments_options, max_failed_retries, name, on_demand_enabled, redirection_time, success_url, type].hash
208
242
  end
209
243
 
210
244
  # Builds the object from hash