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
|
# a payout order
|
|
18
|
-
class
|
|
18
|
+
class PayoutOrderRequest < ApiModelBase
|
|
19
19
|
# The payout methods that are allowed for the payout order.
|
|
20
20
|
attr_accessor :allowed_payout_methods
|
|
21
21
|
|
|
@@ -27,6 +27,9 @@ module Conekta
|
|
|
27
27
|
|
|
28
28
|
attr_accessor :customer_info
|
|
29
29
|
|
|
30
|
+
# The expiration time of the payout order in Unix timestamp.
|
|
31
|
+
attr_accessor :expires_at
|
|
32
|
+
|
|
30
33
|
# The metadata of the payout order.
|
|
31
34
|
attr_accessor :metadata
|
|
32
35
|
|
|
@@ -42,15 +45,21 @@ module Conekta
|
|
|
42
45
|
:'amount' => :'amount',
|
|
43
46
|
:'currency' => :'currency',
|
|
44
47
|
:'customer_info' => :'customer_info',
|
|
48
|
+
:'expires_at' => :'expires_at',
|
|
45
49
|
:'metadata' => :'metadata',
|
|
46
50
|
:'payout' => :'payout',
|
|
47
51
|
:'reason' => :'reason'
|
|
48
52
|
}
|
|
49
53
|
end
|
|
50
54
|
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
51
60
|
# Returns all the JSON keys this model knows about
|
|
52
61
|
def self.acceptable_attributes
|
|
53
|
-
|
|
62
|
+
acceptable_attribute_map.values
|
|
54
63
|
end
|
|
55
64
|
|
|
56
65
|
# Attribute type mapping.
|
|
@@ -59,7 +68,8 @@ module Conekta
|
|
|
59
68
|
:'allowed_payout_methods' => :'Array<String>',
|
|
60
69
|
:'amount' => :'Integer',
|
|
61
70
|
:'currency' => :'String',
|
|
62
|
-
:'customer_info' => :'
|
|
71
|
+
:'customer_info' => :'PayoutOrderRequestCustomerInfo',
|
|
72
|
+
:'expires_at' => :'Integer',
|
|
63
73
|
:'metadata' => :'Hash<String, Object>',
|
|
64
74
|
:'payout' => :'Payout',
|
|
65
75
|
:'reason' => :'String'
|
|
@@ -76,13 +86,14 @@ module Conekta
|
|
|
76
86
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
77
87
|
def initialize(attributes = {})
|
|
78
88
|
if (!attributes.is_a?(Hash))
|
|
79
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::
|
|
89
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::PayoutOrderRequest` initialize method"
|
|
80
90
|
end
|
|
81
91
|
|
|
82
92
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
93
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
83
94
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
84
|
-
if (!
|
|
85
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::
|
|
95
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
96
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrderRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
86
97
|
end
|
|
87
98
|
h[k.to_sym] = v
|
|
88
99
|
}
|
|
@@ -113,6 +124,12 @@ module Conekta
|
|
|
113
124
|
self.customer_info = nil
|
|
114
125
|
end
|
|
115
126
|
|
|
127
|
+
if attributes.key?(:'expires_at')
|
|
128
|
+
self.expires_at = attributes[:'expires_at']
|
|
129
|
+
else
|
|
130
|
+
self.expires_at = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
116
133
|
if attributes.key?(:'metadata')
|
|
117
134
|
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
118
135
|
self.metadata = value
|
|
@@ -153,6 +170,10 @@ module Conekta
|
|
|
153
170
|
invalid_properties.push('invalid value for "customer_info", customer_info cannot be nil.')
|
|
154
171
|
end
|
|
155
172
|
|
|
173
|
+
if @expires_at.nil?
|
|
174
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
175
|
+
end
|
|
176
|
+
|
|
156
177
|
if !@metadata.nil? && @metadata.length > 100
|
|
157
178
|
invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 100.')
|
|
158
179
|
end
|
|
@@ -176,12 +197,63 @@ module Conekta
|
|
|
176
197
|
return false if @amount.nil?
|
|
177
198
|
return false if @currency.nil?
|
|
178
199
|
return false if @customer_info.nil?
|
|
200
|
+
return false if @expires_at.nil?
|
|
179
201
|
return false if !@metadata.nil? && @metadata.length > 100
|
|
180
202
|
return false if @payout.nil?
|
|
181
203
|
return false if @reason.nil?
|
|
182
204
|
true
|
|
183
205
|
end
|
|
184
206
|
|
|
207
|
+
# Custom attribute writer method with validation
|
|
208
|
+
# @param [Object] allowed_payout_methods Value to be assigned
|
|
209
|
+
def allowed_payout_methods=(allowed_payout_methods)
|
|
210
|
+
if allowed_payout_methods.nil?
|
|
211
|
+
fail ArgumentError, 'allowed_payout_methods cannot be nil'
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
@allowed_payout_methods = allowed_payout_methods
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Custom attribute writer method with validation
|
|
218
|
+
# @param [Object] amount Value to be assigned
|
|
219
|
+
def amount=(amount)
|
|
220
|
+
if amount.nil?
|
|
221
|
+
fail ArgumentError, 'amount cannot be nil'
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
@amount = amount
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Custom attribute writer method with validation
|
|
228
|
+
# @param [Object] currency Value to be assigned
|
|
229
|
+
def currency=(currency)
|
|
230
|
+
if currency.nil?
|
|
231
|
+
fail ArgumentError, 'currency cannot be nil'
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
@currency = currency
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Custom attribute writer method with validation
|
|
238
|
+
# @param [Object] customer_info Value to be assigned
|
|
239
|
+
def customer_info=(customer_info)
|
|
240
|
+
if customer_info.nil?
|
|
241
|
+
fail ArgumentError, 'customer_info cannot be nil'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
@customer_info = customer_info
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Custom attribute writer method with validation
|
|
248
|
+
# @param [Object] expires_at Value to be assigned
|
|
249
|
+
def expires_at=(expires_at)
|
|
250
|
+
if expires_at.nil?
|
|
251
|
+
fail ArgumentError, 'expires_at cannot be nil'
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
@expires_at = expires_at
|
|
255
|
+
end
|
|
256
|
+
|
|
185
257
|
# Custom attribute writer method with validation
|
|
186
258
|
# @param [Object] metadata Value to be assigned
|
|
187
259
|
def metadata=(metadata)
|
|
@@ -196,6 +268,26 @@ module Conekta
|
|
|
196
268
|
@metadata = metadata
|
|
197
269
|
end
|
|
198
270
|
|
|
271
|
+
# Custom attribute writer method with validation
|
|
272
|
+
# @param [Object] payout Value to be assigned
|
|
273
|
+
def payout=(payout)
|
|
274
|
+
if payout.nil?
|
|
275
|
+
fail ArgumentError, 'payout cannot be nil'
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
@payout = payout
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Custom attribute writer method with validation
|
|
282
|
+
# @param [Object] reason Value to be assigned
|
|
283
|
+
def reason=(reason)
|
|
284
|
+
if reason.nil?
|
|
285
|
+
fail ArgumentError, 'reason cannot be nil'
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
@reason = reason
|
|
289
|
+
end
|
|
290
|
+
|
|
199
291
|
# Checks equality by comparing each attribute.
|
|
200
292
|
# @param [Object] Object to be compared
|
|
201
293
|
def ==(o)
|
|
@@ -205,6 +297,7 @@ module Conekta
|
|
|
205
297
|
amount == o.amount &&
|
|
206
298
|
currency == o.currency &&
|
|
207
299
|
customer_info == o.customer_info &&
|
|
300
|
+
expires_at == o.expires_at &&
|
|
208
301
|
metadata == o.metadata &&
|
|
209
302
|
payout == o.payout &&
|
|
210
303
|
reason == o.reason
|
|
@@ -219,7 +312,7 @@ module Conekta
|
|
|
219
312
|
# Calculates hash code according to all attributes.
|
|
220
313
|
# @return [Integer] Hash code
|
|
221
314
|
def hash
|
|
222
|
-
[allowed_payout_methods, amount, currency, customer_info, metadata, payout, reason].hash
|
|
315
|
+
[allowed_payout_methods, amount, currency, customer_info, expires_at, metadata, payout, reason].hash
|
|
223
316
|
end
|
|
224
317
|
|
|
225
318
|
# Builds the object from hash
|
|
@@ -245,61 +338,6 @@ module Conekta
|
|
|
245
338
|
new(transformed_hash)
|
|
246
339
|
end
|
|
247
340
|
|
|
248
|
-
# Deserializes the data based on type
|
|
249
|
-
# @param string type Data type
|
|
250
|
-
# @param string value Value to be deserialized
|
|
251
|
-
# @return [Object] Deserialized data
|
|
252
|
-
def self._deserialize(type, value)
|
|
253
|
-
case type.to_sym
|
|
254
|
-
when :Time
|
|
255
|
-
Time.parse(value)
|
|
256
|
-
when :Date
|
|
257
|
-
Date.parse(value)
|
|
258
|
-
when :String
|
|
259
|
-
value.to_s
|
|
260
|
-
when :Integer
|
|
261
|
-
value.to_i
|
|
262
|
-
when :Float
|
|
263
|
-
value.to_f
|
|
264
|
-
when :Boolean
|
|
265
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
266
|
-
true
|
|
267
|
-
else
|
|
268
|
-
false
|
|
269
|
-
end
|
|
270
|
-
when :Object
|
|
271
|
-
# generic object (usually a Hash), return directly
|
|
272
|
-
value
|
|
273
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
274
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
275
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
276
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
277
|
-
k_type = Regexp.last_match[:k_type]
|
|
278
|
-
v_type = Regexp.last_match[:v_type]
|
|
279
|
-
{}.tap do |hash|
|
|
280
|
-
value.each do |k, v|
|
|
281
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
282
|
-
end
|
|
283
|
-
end
|
|
284
|
-
else # model
|
|
285
|
-
# models (e.g. Pet) or oneOf
|
|
286
|
-
klass = Conekta.const_get(type)
|
|
287
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
288
|
-
end
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
# Returns the string representation of the object
|
|
292
|
-
# @return [String] String presentation of the object
|
|
293
|
-
def to_s
|
|
294
|
-
to_hash.to_s
|
|
295
|
-
end
|
|
296
|
-
|
|
297
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
298
|
-
# @return [Hash] Returns the object in the form of hash
|
|
299
|
-
def to_body
|
|
300
|
-
to_hash
|
|
301
|
-
end
|
|
302
|
-
|
|
303
341
|
# Returns the object in the form of hash
|
|
304
342
|
# @return [Hash] Returns the object in the form of hash
|
|
305
343
|
def to_hash
|
|
@@ -316,24 +354,6 @@ module Conekta
|
|
|
316
354
|
hash
|
|
317
355
|
end
|
|
318
356
|
|
|
319
|
-
# Outputs non-array value in the form of hash
|
|
320
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
321
|
-
# @param [Object] value Any valid value
|
|
322
|
-
# @return [Hash] Returns the value in the form of hash
|
|
323
|
-
def _to_hash(value)
|
|
324
|
-
if value.is_a?(Array)
|
|
325
|
-
value.compact.map { |v| _to_hash(v) }
|
|
326
|
-
elsif value.is_a?(Hash)
|
|
327
|
-
{}.tap do |hash|
|
|
328
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
329
|
-
end
|
|
330
|
-
elsif value.respond_to? :to_hash
|
|
331
|
-
value.to_hash
|
|
332
|
-
else
|
|
333
|
-
value
|
|
334
|
-
end
|
|
335
|
-
end
|
|
336
|
-
|
|
337
357
|
end
|
|
338
358
|
|
|
339
359
|
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,8 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
|
-
|
|
17
|
+
# The customer information to whom the payout order is made.
|
|
18
|
+
class PayoutOrderRequestCustomerInfo < ApiModelBase
|
|
18
19
|
attr_accessor :customer_id
|
|
19
20
|
|
|
20
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -24,9 +25,14 @@ module Conekta
|
|
|
24
25
|
}
|
|
25
26
|
end
|
|
26
27
|
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
27
33
|
# Returns all the JSON keys this model knows about
|
|
28
34
|
def self.acceptable_attributes
|
|
29
|
-
|
|
35
|
+
acceptable_attribute_map.values
|
|
30
36
|
end
|
|
31
37
|
|
|
32
38
|
# Attribute type mapping.
|
|
@@ -46,19 +52,22 @@ module Conekta
|
|
|
46
52
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
47
53
|
def initialize(attributes = {})
|
|
48
54
|
if (!attributes.is_a?(Hash))
|
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::PayoutOrderRequestCustomerInfo` initialize method"
|
|
50
56
|
end
|
|
51
57
|
|
|
52
58
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
53
60
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
54
|
-
if (!
|
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrderRequestCustomerInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
56
63
|
end
|
|
57
64
|
h[k.to_sym] = v
|
|
58
65
|
}
|
|
59
66
|
|
|
60
67
|
if attributes.key?(:'customer_id')
|
|
61
68
|
self.customer_id = attributes[:'customer_id']
|
|
69
|
+
else
|
|
70
|
+
self.customer_id = nil
|
|
62
71
|
end
|
|
63
72
|
end
|
|
64
73
|
|
|
@@ -67,6 +76,10 @@ module Conekta
|
|
|
67
76
|
def list_invalid_properties
|
|
68
77
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
69
78
|
invalid_properties = Array.new
|
|
79
|
+
if @customer_id.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "customer_id", customer_id cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
70
83
|
invalid_properties
|
|
71
84
|
end
|
|
72
85
|
|
|
@@ -74,9 +87,20 @@ module Conekta
|
|
|
74
87
|
# @return true if the model is valid
|
|
75
88
|
def valid?
|
|
76
89
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
+
return false if @customer_id.nil?
|
|
77
91
|
true
|
|
78
92
|
end
|
|
79
93
|
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param [Object] customer_id Value to be assigned
|
|
96
|
+
def customer_id=(customer_id)
|
|
97
|
+
if customer_id.nil?
|
|
98
|
+
fail ArgumentError, 'customer_id cannot be nil'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@customer_id = customer_id
|
|
102
|
+
end
|
|
103
|
+
|
|
80
104
|
# Checks equality by comparing each attribute.
|
|
81
105
|
# @param [Object] Object to be compared
|
|
82
106
|
def ==(o)
|
|
@@ -120,61 +144,6 @@ module Conekta
|
|
|
120
144
|
new(transformed_hash)
|
|
121
145
|
end
|
|
122
146
|
|
|
123
|
-
# Deserializes the data based on type
|
|
124
|
-
# @param string type Data type
|
|
125
|
-
# @param string value Value to be deserialized
|
|
126
|
-
# @return [Object] Deserialized data
|
|
127
|
-
def self._deserialize(type, value)
|
|
128
|
-
case type.to_sym
|
|
129
|
-
when :Time
|
|
130
|
-
Time.parse(value)
|
|
131
|
-
when :Date
|
|
132
|
-
Date.parse(value)
|
|
133
|
-
when :String
|
|
134
|
-
value.to_s
|
|
135
|
-
when :Integer
|
|
136
|
-
value.to_i
|
|
137
|
-
when :Float
|
|
138
|
-
value.to_f
|
|
139
|
-
when :Boolean
|
|
140
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
141
|
-
true
|
|
142
|
-
else
|
|
143
|
-
false
|
|
144
|
-
end
|
|
145
|
-
when :Object
|
|
146
|
-
# generic object (usually a Hash), return directly
|
|
147
|
-
value
|
|
148
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
149
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
150
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
151
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
152
|
-
k_type = Regexp.last_match[:k_type]
|
|
153
|
-
v_type = Regexp.last_match[:v_type]
|
|
154
|
-
{}.tap do |hash|
|
|
155
|
-
value.each do |k, v|
|
|
156
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
157
|
-
end
|
|
158
|
-
end
|
|
159
|
-
else # model
|
|
160
|
-
# models (e.g. Pet) or oneOf
|
|
161
|
-
klass = Conekta.const_get(type)
|
|
162
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
# Returns the string representation of the object
|
|
167
|
-
# @return [String] String presentation of the object
|
|
168
|
-
def to_s
|
|
169
|
-
to_hash.to_s
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
173
|
-
# @return [Hash] Returns the object in the form of hash
|
|
174
|
-
def to_body
|
|
175
|
-
to_hash
|
|
176
|
-
end
|
|
177
|
-
|
|
178
147
|
# Returns the object in the form of hash
|
|
179
148
|
# @return [Hash] Returns the object in the form of hash
|
|
180
149
|
def to_hash
|
|
@@ -191,24 +160,6 @@ module Conekta
|
|
|
191
160
|
hash
|
|
192
161
|
end
|
|
193
162
|
|
|
194
|
-
# Outputs non-array value in the form of hash
|
|
195
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
196
|
-
# @param [Object] value Any valid value
|
|
197
|
-
# @return [Hash] Returns the value in the form of hash
|
|
198
|
-
def _to_hash(value)
|
|
199
|
-
if value.is_a?(Array)
|
|
200
|
-
value.compact.map { |v| _to_hash(v) }
|
|
201
|
-
elsif value.is_a?(Hash)
|
|
202
|
-
{}.tap do |hash|
|
|
203
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
204
|
-
end
|
|
205
|
-
elsif value.respond_to? :to_hash
|
|
206
|
-
value.to_hash
|
|
207
|
-
else
|
|
208
|
-
value
|
|
209
|
-
end
|
|
210
|
-
end
|
|
211
|
-
|
|
212
163
|
end
|
|
213
164
|
|
|
214
165
|
end
|