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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,241 @@
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 OrderChannelResponse
18
+ attr_accessor :segment
19
+
20
+ attr_accessor :checkout_request_id
21
+
22
+ attr_accessor :checkout_request_type
23
+
24
+ attr_accessor :id
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'segment' => :'segment',
30
+ :'checkout_request_id' => :'checkout_request_id',
31
+ :'checkout_request_type' => :'checkout_request_type',
32
+ :'id' => :'id'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'segment' => :'String',
45
+ :'checkout_request_id' => :'String',
46
+ :'checkout_request_type' => :'String',
47
+ :'id' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::OrderChannelResponse` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderChannelResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'segment')
73
+ self.segment = attributes[:'segment']
74
+ end
75
+
76
+ if attributes.key?(:'checkout_request_id')
77
+ self.checkout_request_id = attributes[:'checkout_request_id']
78
+ end
79
+
80
+ if attributes.key?(:'checkout_request_type')
81
+ self.checkout_request_type = attributes[:'checkout_request_type']
82
+ end
83
+
84
+ if attributes.key?(:'id')
85
+ self.id = attributes[:'id']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ segment == o.segment &&
110
+ checkout_request_id == o.checkout_request_id &&
111
+ checkout_request_type == o.checkout_request_type &&
112
+ id == o.id
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Integer] Hash code
123
+ def hash
124
+ [segment, checkout_request_id, checkout_request_type, id].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def self.build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
133
+ transformed_hash = {}
134
+ openapi_types.each_pair do |key, type|
135
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = nil
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[attribute_map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
+ end
143
+ elsif !attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
+ end
146
+ end
147
+ new(transformed_hash)
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def self._deserialize(type, value)
155
+ case type.to_sym
156
+ when :Time
157
+ Time.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ # models (e.g. Pet) or oneOf
188
+ klass = Conekta.const_get(type)
189
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
+ end
191
+ end
192
+
193
+ # Returns the string representation of the object
194
+ # @return [String] String presentation of the object
195
+ def to_s
196
+ to_hash.to_s
197
+ end
198
+
199
+ # to_body is an alias to to_hash (backward compatibility)
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_body
202
+ to_hash
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Outputs non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ # @param [Object] value Any valid value
224
+ # @return [Hash] Returns the value in the form of hash
225
+ def _to_hash(value)
226
+ if value.is_a?(Array)
227
+ value.compact.map { |v| _to_hash(v) }
228
+ elsif value.is_a?(Hash)
229
+ {}.tap do |hash|
230
+ value.each { |k, v| hash[k] = _to_hash(v) }
231
+ end
232
+ elsif value.respond_to? :to_hash
233
+ value.to_hash
234
+ else
235
+ value
236
+ end
237
+ end
238
+
239
+ end
240
+
241
+ end
@@ -0,0 +1,258 @@
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
+ # The charges associated with the order
18
+ class OrderChargesResponse
19
+ # Indicates if there are more pages to be requested
20
+ attr_accessor :has_more
21
+
22
+ # Object type, in this case is list
23
+ attr_accessor :object
24
+
25
+ attr_accessor :data
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'has_more' => :'has_more',
31
+ :'object' => :'object',
32
+ :'data' => :'data'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'has_more' => :'Boolean',
45
+ :'object' => :'String',
46
+ :'data' => :'Array<ChargesDataResponse>'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # List of class defined in allOf (OpenAPI v3)
57
+ def self.openapi_all_of
58
+ [
59
+ :'Pagination'
60
+ ]
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::OrderChargesResponse` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!self.class.attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderChargesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'has_more')
79
+ self.has_more = attributes[:'has_more']
80
+ else
81
+ self.has_more = nil
82
+ end
83
+
84
+ if attributes.key?(:'object')
85
+ self.object = attributes[:'object']
86
+ else
87
+ self.object = nil
88
+ end
89
+
90
+ if attributes.key?(:'data')
91
+ if (value = attributes[:'data']).is_a?(Array)
92
+ self.data = value
93
+ end
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @has_more.nil?
103
+ invalid_properties.push('invalid value for "has_more", has_more cannot be nil.')
104
+ end
105
+
106
+ if @object.nil?
107
+ invalid_properties.push('invalid value for "object", object cannot be nil.')
108
+ end
109
+
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ return false if @has_more.nil?
118
+ return false if @object.nil?
119
+ true
120
+ end
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param [Object] Object to be compared
124
+ def ==(o)
125
+ return true if self.equal?(o)
126
+ self.class == o.class &&
127
+ has_more == o.has_more &&
128
+ object == o.object &&
129
+ data == o.data
130
+ end
131
+
132
+ # @see the `==` method
133
+ # @param [Object] Object to be compared
134
+ def eql?(o)
135
+ self == o
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Integer] Hash code
140
+ def hash
141
+ [has_more, object, data].hash
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def self.build_from_hash(attributes)
148
+ return nil unless attributes.is_a?(Hash)
149
+ attributes = attributes.transform_keys(&:to_sym)
150
+ transformed_hash = {}
151
+ openapi_types.each_pair do |key, type|
152
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = nil
154
+ elsif type =~ /\AArray<(.*)>/i
155
+ # check to ensure the input is an array given that the attribute
156
+ # is documented as an array but the input is not
157
+ if attributes[attribute_map[key]].is_a?(Array)
158
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
159
+ end
160
+ elsif !attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
162
+ end
163
+ end
164
+ new(transformed_hash)
165
+ end
166
+
167
+ # Deserializes the data based on type
168
+ # @param string type Data type
169
+ # @param string value Value to be deserialized
170
+ # @return [Object] Deserialized data
171
+ def self._deserialize(type, value)
172
+ case type.to_sym
173
+ when :Time
174
+ Time.parse(value)
175
+ when :Date
176
+ Date.parse(value)
177
+ when :String
178
+ value.to_s
179
+ when :Integer
180
+ value.to_i
181
+ when :Float
182
+ value.to_f
183
+ when :Boolean
184
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
185
+ true
186
+ else
187
+ false
188
+ end
189
+ when :Object
190
+ # generic object (usually a Hash), return directly
191
+ value
192
+ when /\AArray<(?<inner_type>.+)>\z/
193
+ inner_type = Regexp.last_match[:inner_type]
194
+ value.map { |v| _deserialize(inner_type, v) }
195
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
196
+ k_type = Regexp.last_match[:k_type]
197
+ v_type = Regexp.last_match[:v_type]
198
+ {}.tap do |hash|
199
+ value.each do |k, v|
200
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
201
+ end
202
+ end
203
+ else # model
204
+ # models (e.g. Pet) or oneOf
205
+ klass = Conekta.const_get(type)
206
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
207
+ end
208
+ end
209
+
210
+ # Returns the string representation of the object
211
+ # @return [String] String presentation of the object
212
+ def to_s
213
+ to_hash.to_s
214
+ end
215
+
216
+ # to_body is an alias to to_hash (backward compatibility)
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_body
219
+ to_hash
220
+ end
221
+
222
+ # Returns the object in the form of hash
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_hash
225
+ hash = {}
226
+ self.class.attribute_map.each_pair do |attr, param|
227
+ value = self.send(attr)
228
+ if value.nil?
229
+ is_nullable = self.class.openapi_nullable.include?(attr)
230
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
+ end
232
+
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ # Outputs non-array value in the form of hash
239
+ # For object, use to_hash. Otherwise, just return the value
240
+ # @param [Object] value Any valid value
241
+ # @return [Hash] Returns the value in the form of hash
242
+ def _to_hash(value)
243
+ if value.is_a?(Array)
244
+ value.compact.map { |v| _to_hash(v) }
245
+ elsif value.is_a?(Hash)
246
+ {}.tap do |hash|
247
+ value.each { |k, v| hash[k] = _to_hash(v) }
248
+ end
249
+ elsif value.respond_to? :to_hash
250
+ value.to_hash
251
+ else
252
+ value
253
+ end
254
+ end
255
+
256
+ end
257
+
258
+ end