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