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
|
# payout order model response
|
|
18
|
-
class PayoutOrderResponse
|
|
18
|
+
class PayoutOrderResponse < ApiModelBase
|
|
19
19
|
# The payout methods that are allowed for the payout order.
|
|
20
20
|
attr_accessor :allowed_payout_methods
|
|
21
21
|
|
|
@@ -77,9 +77,14 @@ module Conekta
|
|
|
77
77
|
}
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
+
# Returns attribute mapping this model knows about
|
|
81
|
+
def self.acceptable_attribute_map
|
|
82
|
+
attribute_map
|
|
83
|
+
end
|
|
84
|
+
|
|
80
85
|
# Returns all the JSON keys this model knows about
|
|
81
86
|
def self.acceptable_attributes
|
|
82
|
-
|
|
87
|
+
acceptable_attribute_map.values
|
|
83
88
|
end
|
|
84
89
|
|
|
85
90
|
# Attribute type mapping.
|
|
@@ -116,9 +121,10 @@ module Conekta
|
|
|
116
121
|
end
|
|
117
122
|
|
|
118
123
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
124
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
119
125
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
120
|
-
if (!
|
|
121
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrderResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
126
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
127
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrderResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
122
128
|
end
|
|
123
129
|
h[k.to_sym] = v
|
|
124
130
|
}
|
|
@@ -157,6 +163,8 @@ module Conekta
|
|
|
157
163
|
|
|
158
164
|
if attributes.key?(:'expires_at')
|
|
159
165
|
self.expires_at = attributes[:'expires_at']
|
|
166
|
+
else
|
|
167
|
+
self.expires_at = nil
|
|
160
168
|
end
|
|
161
169
|
|
|
162
170
|
if attributes.key?(:'id')
|
|
@@ -199,6 +207,8 @@ module Conekta
|
|
|
199
207
|
|
|
200
208
|
if attributes.key?(:'status')
|
|
201
209
|
self.status = attributes[:'status']
|
|
210
|
+
else
|
|
211
|
+
self.status = nil
|
|
202
212
|
end
|
|
203
213
|
|
|
204
214
|
if attributes.key?(:'updated_at')
|
|
@@ -237,6 +247,10 @@ module Conekta
|
|
|
237
247
|
invalid_properties.push('invalid value for "customer_info", customer_info cannot be nil.')
|
|
238
248
|
end
|
|
239
249
|
|
|
250
|
+
if @expires_at.nil?
|
|
251
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
252
|
+
end
|
|
253
|
+
|
|
240
254
|
if @id.nil?
|
|
241
255
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
242
256
|
end
|
|
@@ -261,6 +275,10 @@ module Conekta
|
|
|
261
275
|
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
|
262
276
|
end
|
|
263
277
|
|
|
278
|
+
if @status.nil?
|
|
279
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
280
|
+
end
|
|
281
|
+
|
|
264
282
|
if @updated_at.nil?
|
|
265
283
|
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
266
284
|
end
|
|
@@ -278,12 +296,14 @@ module Conekta
|
|
|
278
296
|
return false if @created_at.nil?
|
|
279
297
|
return false if @currency.nil?
|
|
280
298
|
return false if @customer_info.nil?
|
|
299
|
+
return false if @expires_at.nil?
|
|
281
300
|
return false if @id.nil?
|
|
282
301
|
return false if @livemode.nil?
|
|
283
302
|
return false if @object.nil?
|
|
284
303
|
return false if !@metadata.nil? && @metadata.length > 100
|
|
285
304
|
return false if @payouts.nil?
|
|
286
305
|
return false if @reason.nil?
|
|
306
|
+
return false if @status.nil?
|
|
287
307
|
return false if @updated_at.nil?
|
|
288
308
|
true
|
|
289
309
|
end
|
|
@@ -302,6 +322,86 @@ module Conekta
|
|
|
302
322
|
@allowed_payout_methods = allowed_payout_methods
|
|
303
323
|
end
|
|
304
324
|
|
|
325
|
+
# Custom attribute writer method with validation
|
|
326
|
+
# @param [Object] amount Value to be assigned
|
|
327
|
+
def amount=(amount)
|
|
328
|
+
if amount.nil?
|
|
329
|
+
fail ArgumentError, 'amount cannot be nil'
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
@amount = amount
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# Custom attribute writer method with validation
|
|
336
|
+
# @param [Object] created_at Value to be assigned
|
|
337
|
+
def created_at=(created_at)
|
|
338
|
+
if created_at.nil?
|
|
339
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
@created_at = created_at
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# Custom attribute writer method with validation
|
|
346
|
+
# @param [Object] currency Value to be assigned
|
|
347
|
+
def currency=(currency)
|
|
348
|
+
if currency.nil?
|
|
349
|
+
fail ArgumentError, 'currency cannot be nil'
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
@currency = currency
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# Custom attribute writer method with validation
|
|
356
|
+
# @param [Object] customer_info Value to be assigned
|
|
357
|
+
def customer_info=(customer_info)
|
|
358
|
+
if customer_info.nil?
|
|
359
|
+
fail ArgumentError, 'customer_info cannot be nil'
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
@customer_info = customer_info
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Custom attribute writer method with validation
|
|
366
|
+
# @param [Object] expires_at Value to be assigned
|
|
367
|
+
def expires_at=(expires_at)
|
|
368
|
+
if expires_at.nil?
|
|
369
|
+
fail ArgumentError, 'expires_at cannot be nil'
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
@expires_at = expires_at
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Custom attribute writer method with validation
|
|
376
|
+
# @param [Object] id Value to be assigned
|
|
377
|
+
def id=(id)
|
|
378
|
+
if id.nil?
|
|
379
|
+
fail ArgumentError, 'id cannot be nil'
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
@id = id
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# Custom attribute writer method with validation
|
|
386
|
+
# @param [Object] livemode Value to be assigned
|
|
387
|
+
def livemode=(livemode)
|
|
388
|
+
if livemode.nil?
|
|
389
|
+
fail ArgumentError, 'livemode cannot be nil'
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
@livemode = livemode
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# Custom attribute writer method with validation
|
|
396
|
+
# @param [Object] object Value to be assigned
|
|
397
|
+
def object=(object)
|
|
398
|
+
if object.nil?
|
|
399
|
+
fail ArgumentError, 'object cannot be nil'
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
@object = object
|
|
403
|
+
end
|
|
404
|
+
|
|
305
405
|
# Custom attribute writer method with validation
|
|
306
406
|
# @param [Object] metadata Value to be assigned
|
|
307
407
|
def metadata=(metadata)
|
|
@@ -316,6 +416,46 @@ module Conekta
|
|
|
316
416
|
@metadata = metadata
|
|
317
417
|
end
|
|
318
418
|
|
|
419
|
+
# Custom attribute writer method with validation
|
|
420
|
+
# @param [Object] payouts Value to be assigned
|
|
421
|
+
def payouts=(payouts)
|
|
422
|
+
if payouts.nil?
|
|
423
|
+
fail ArgumentError, 'payouts cannot be nil'
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
@payouts = payouts
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
# Custom attribute writer method with validation
|
|
430
|
+
# @param [Object] reason Value to be assigned
|
|
431
|
+
def reason=(reason)
|
|
432
|
+
if reason.nil?
|
|
433
|
+
fail ArgumentError, 'reason cannot be nil'
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
@reason = reason
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
# Custom attribute writer method with validation
|
|
440
|
+
# @param [Object] status Value to be assigned
|
|
441
|
+
def status=(status)
|
|
442
|
+
if status.nil?
|
|
443
|
+
fail ArgumentError, 'status cannot be nil'
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
@status = status
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
# Custom attribute writer method with validation
|
|
450
|
+
# @param [Object] updated_at Value to be assigned
|
|
451
|
+
def updated_at=(updated_at)
|
|
452
|
+
if updated_at.nil?
|
|
453
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
@updated_at = updated_at
|
|
457
|
+
end
|
|
458
|
+
|
|
319
459
|
# Checks equality by comparing each attribute.
|
|
320
460
|
# @param [Object] Object to be compared
|
|
321
461
|
def ==(o)
|
|
@@ -372,61 +512,6 @@ module Conekta
|
|
|
372
512
|
new(transformed_hash)
|
|
373
513
|
end
|
|
374
514
|
|
|
375
|
-
# Deserializes the data based on type
|
|
376
|
-
# @param string type Data type
|
|
377
|
-
# @param string value Value to be deserialized
|
|
378
|
-
# @return [Object] Deserialized data
|
|
379
|
-
def self._deserialize(type, value)
|
|
380
|
-
case type.to_sym
|
|
381
|
-
when :Time
|
|
382
|
-
Time.parse(value)
|
|
383
|
-
when :Date
|
|
384
|
-
Date.parse(value)
|
|
385
|
-
when :String
|
|
386
|
-
value.to_s
|
|
387
|
-
when :Integer
|
|
388
|
-
value.to_i
|
|
389
|
-
when :Float
|
|
390
|
-
value.to_f
|
|
391
|
-
when :Boolean
|
|
392
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
393
|
-
true
|
|
394
|
-
else
|
|
395
|
-
false
|
|
396
|
-
end
|
|
397
|
-
when :Object
|
|
398
|
-
# generic object (usually a Hash), return directly
|
|
399
|
-
value
|
|
400
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
401
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
402
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
403
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
404
|
-
k_type = Regexp.last_match[:k_type]
|
|
405
|
-
v_type = Regexp.last_match[:v_type]
|
|
406
|
-
{}.tap do |hash|
|
|
407
|
-
value.each do |k, v|
|
|
408
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
409
|
-
end
|
|
410
|
-
end
|
|
411
|
-
else # model
|
|
412
|
-
# models (e.g. Pet) or oneOf
|
|
413
|
-
klass = Conekta.const_get(type)
|
|
414
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
415
|
-
end
|
|
416
|
-
end
|
|
417
|
-
|
|
418
|
-
# Returns the string representation of the object
|
|
419
|
-
# @return [String] String presentation of the object
|
|
420
|
-
def to_s
|
|
421
|
-
to_hash.to_s
|
|
422
|
-
end
|
|
423
|
-
|
|
424
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
425
|
-
# @return [Hash] Returns the object in the form of hash
|
|
426
|
-
def to_body
|
|
427
|
-
to_hash
|
|
428
|
-
end
|
|
429
|
-
|
|
430
515
|
# Returns the object in the form of hash
|
|
431
516
|
# @return [Hash] Returns the object in the form of hash
|
|
432
517
|
def to_hash
|
|
@@ -443,24 +528,6 @@ module Conekta
|
|
|
443
528
|
hash
|
|
444
529
|
end
|
|
445
530
|
|
|
446
|
-
# Outputs non-array value in the form of hash
|
|
447
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
448
|
-
# @param [Object] value Any valid value
|
|
449
|
-
# @return [Hash] Returns the value in the form of hash
|
|
450
|
-
def _to_hash(value)
|
|
451
|
-
if value.is_a?(Array)
|
|
452
|
-
value.compact.map { |v| _to_hash(v) }
|
|
453
|
-
elsif value.is_a?(Hash)
|
|
454
|
-
{}.tap do |hash|
|
|
455
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
456
|
-
end
|
|
457
|
-
elsif value.respond_to? :to_hash
|
|
458
|
-
value.to_hash
|
|
459
|
-
else
|
|
460
|
-
value
|
|
461
|
-
end
|
|
462
|
-
end
|
|
463
|
-
|
|
464
531
|
end
|
|
465
532
|
|
|
466
533
|
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,7 +15,10 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
17
|
# The customer information of the payout order.
|
|
18
|
-
class PayoutOrderResponseCustomerInfo
|
|
18
|
+
class PayoutOrderResponseCustomerInfo < ApiModelBase
|
|
19
|
+
# The id of the customer.
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
19
22
|
# Custom reference
|
|
20
23
|
attr_accessor :customer_custom_reference
|
|
21
24
|
|
|
@@ -29,54 +32,48 @@ module Conekta
|
|
|
29
32
|
|
|
30
33
|
attr_accessor :object
|
|
31
34
|
|
|
32
|
-
# The id of the customer.
|
|
33
|
-
attr_accessor :id
|
|
34
|
-
|
|
35
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
36
|
def self.attribute_map
|
|
37
37
|
{
|
|
38
|
+
:'id' => :'id',
|
|
38
39
|
:'customer_custom_reference' => :'customer_custom_reference',
|
|
39
40
|
:'name' => :'name',
|
|
40
41
|
:'email' => :'email',
|
|
41
42
|
:'phone' => :'phone',
|
|
42
43
|
:'corporate' => :'corporate',
|
|
43
|
-
:'object' => :'object'
|
|
44
|
-
:'id' => :'id'
|
|
44
|
+
:'object' => :'object'
|
|
45
45
|
}
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
+
# Returns attribute mapping this model knows about
|
|
49
|
+
def self.acceptable_attribute_map
|
|
50
|
+
attribute_map
|
|
51
|
+
end
|
|
52
|
+
|
|
48
53
|
# Returns all the JSON keys this model knows about
|
|
49
54
|
def self.acceptable_attributes
|
|
50
|
-
|
|
55
|
+
acceptable_attribute_map.values
|
|
51
56
|
end
|
|
52
57
|
|
|
53
58
|
# Attribute type mapping.
|
|
54
59
|
def self.openapi_types
|
|
55
60
|
{
|
|
61
|
+
:'id' => :'String',
|
|
56
62
|
:'customer_custom_reference' => :'String',
|
|
57
63
|
:'name' => :'String',
|
|
58
64
|
:'email' => :'String',
|
|
59
65
|
:'phone' => :'String',
|
|
60
66
|
:'corporate' => :'Boolean',
|
|
61
|
-
:'object' => :'String'
|
|
62
|
-
:'id' => :'String'
|
|
67
|
+
:'object' => :'String'
|
|
63
68
|
}
|
|
64
69
|
end
|
|
65
70
|
|
|
66
71
|
# List of attributes with nullable: true
|
|
67
72
|
def self.openapi_nullable
|
|
68
73
|
Set.new([
|
|
69
|
-
:'customer_custom_reference',
|
|
70
74
|
])
|
|
71
75
|
end
|
|
72
76
|
|
|
73
|
-
# List of class defined in allOf (OpenAPI v3)
|
|
74
|
-
def self.openapi_all_of
|
|
75
|
-
[
|
|
76
|
-
:'OrderCustomerInfoResponse'
|
|
77
|
-
]
|
|
78
|
-
end
|
|
79
|
-
|
|
80
77
|
# Initializes the object
|
|
81
78
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
79
|
def initialize(attributes = {})
|
|
@@ -85,13 +82,20 @@ module Conekta
|
|
|
85
82
|
end
|
|
86
83
|
|
|
87
84
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
88
86
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
89
|
-
if (!
|
|
90
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrderResponseCustomerInfo`. Please check the name to make sure it's valid. List of attributes: " +
|
|
87
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrderResponseCustomerInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
91
89
|
end
|
|
92
90
|
h[k.to_sym] = v
|
|
93
91
|
}
|
|
94
92
|
|
|
93
|
+
if attributes.key?(:'id')
|
|
94
|
+
self.id = attributes[:'id']
|
|
95
|
+
else
|
|
96
|
+
self.id = nil
|
|
97
|
+
end
|
|
98
|
+
|
|
95
99
|
if attributes.key?(:'customer_custom_reference')
|
|
96
100
|
self.customer_custom_reference = attributes[:'customer_custom_reference']
|
|
97
101
|
end
|
|
@@ -117,12 +121,6 @@ module Conekta
|
|
|
117
121
|
if attributes.key?(:'object')
|
|
118
122
|
self.object = attributes[:'object']
|
|
119
123
|
end
|
|
120
|
-
|
|
121
|
-
if attributes.key?(:'id')
|
|
122
|
-
self.id = attributes[:'id']
|
|
123
|
-
else
|
|
124
|
-
self.id = nil
|
|
125
|
-
end
|
|
126
124
|
end
|
|
127
125
|
|
|
128
126
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -145,18 +143,28 @@ module Conekta
|
|
|
145
143
|
true
|
|
146
144
|
end
|
|
147
145
|
|
|
146
|
+
# Custom attribute writer method with validation
|
|
147
|
+
# @param [Object] id Value to be assigned
|
|
148
|
+
def id=(id)
|
|
149
|
+
if id.nil?
|
|
150
|
+
fail ArgumentError, 'id cannot be nil'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@id = id
|
|
154
|
+
end
|
|
155
|
+
|
|
148
156
|
# Checks equality by comparing each attribute.
|
|
149
157
|
# @param [Object] Object to be compared
|
|
150
158
|
def ==(o)
|
|
151
159
|
return true if self.equal?(o)
|
|
152
160
|
self.class == o.class &&
|
|
161
|
+
id == o.id &&
|
|
153
162
|
customer_custom_reference == o.customer_custom_reference &&
|
|
154
163
|
name == o.name &&
|
|
155
164
|
email == o.email &&
|
|
156
165
|
phone == o.phone &&
|
|
157
166
|
corporate == o.corporate &&
|
|
158
|
-
object == o.object
|
|
159
|
-
id == o.id
|
|
167
|
+
object == o.object
|
|
160
168
|
end
|
|
161
169
|
|
|
162
170
|
# @see the `==` method
|
|
@@ -168,7 +176,7 @@ module Conekta
|
|
|
168
176
|
# Calculates hash code according to all attributes.
|
|
169
177
|
# @return [Integer] Hash code
|
|
170
178
|
def hash
|
|
171
|
-
[customer_custom_reference, name, email, phone, corporate, object
|
|
179
|
+
[id, customer_custom_reference, name, email, phone, corporate, object].hash
|
|
172
180
|
end
|
|
173
181
|
|
|
174
182
|
# Builds the object from hash
|
|
@@ -194,61 +202,6 @@ module Conekta
|
|
|
194
202
|
new(transformed_hash)
|
|
195
203
|
end
|
|
196
204
|
|
|
197
|
-
# Deserializes the data based on type
|
|
198
|
-
# @param string type Data type
|
|
199
|
-
# @param string value Value to be deserialized
|
|
200
|
-
# @return [Object] Deserialized data
|
|
201
|
-
def self._deserialize(type, value)
|
|
202
|
-
case type.to_sym
|
|
203
|
-
when :Time
|
|
204
|
-
Time.parse(value)
|
|
205
|
-
when :Date
|
|
206
|
-
Date.parse(value)
|
|
207
|
-
when :String
|
|
208
|
-
value.to_s
|
|
209
|
-
when :Integer
|
|
210
|
-
value.to_i
|
|
211
|
-
when :Float
|
|
212
|
-
value.to_f
|
|
213
|
-
when :Boolean
|
|
214
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
215
|
-
true
|
|
216
|
-
else
|
|
217
|
-
false
|
|
218
|
-
end
|
|
219
|
-
when :Object
|
|
220
|
-
# generic object (usually a Hash), return directly
|
|
221
|
-
value
|
|
222
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
223
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
224
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
225
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
226
|
-
k_type = Regexp.last_match[:k_type]
|
|
227
|
-
v_type = Regexp.last_match[:v_type]
|
|
228
|
-
{}.tap do |hash|
|
|
229
|
-
value.each do |k, v|
|
|
230
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
231
|
-
end
|
|
232
|
-
end
|
|
233
|
-
else # model
|
|
234
|
-
# models (e.g. Pet) or oneOf
|
|
235
|
-
klass = Conekta.const_get(type)
|
|
236
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
237
|
-
end
|
|
238
|
-
end
|
|
239
|
-
|
|
240
|
-
# Returns the string representation of the object
|
|
241
|
-
# @return [String] String presentation of the object
|
|
242
|
-
def to_s
|
|
243
|
-
to_hash.to_s
|
|
244
|
-
end
|
|
245
|
-
|
|
246
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
247
|
-
# @return [Hash] Returns the object in the form of hash
|
|
248
|
-
def to_body
|
|
249
|
-
to_hash
|
|
250
|
-
end
|
|
251
|
-
|
|
252
205
|
# Returns the object in the form of hash
|
|
253
206
|
# @return [Hash] Returns the object in the form of hash
|
|
254
207
|
def to_hash
|
|
@@ -265,24 +218,6 @@ module Conekta
|
|
|
265
218
|
hash
|
|
266
219
|
end
|
|
267
220
|
|
|
268
|
-
# Outputs non-array value in the form of hash
|
|
269
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
270
|
-
# @param [Object] value Any valid value
|
|
271
|
-
# @return [Hash] Returns the value in the form of hash
|
|
272
|
-
def _to_hash(value)
|
|
273
|
-
if value.is_a?(Array)
|
|
274
|
-
value.compact.map { |v| _to_hash(v) }
|
|
275
|
-
elsif value.is_a?(Hash)
|
|
276
|
-
{}.tap do |hash|
|
|
277
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
278
|
-
end
|
|
279
|
-
elsif value.respond_to? :to_hash
|
|
280
|
-
value.to_hash
|
|
281
|
-
else
|
|
282
|
-
value
|
|
283
|
-
end
|
|
284
|
-
end
|
|
285
|
-
|
|
286
221
|
end
|
|
287
222
|
|
|
288
223
|
end
|