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
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Conekta API
|
|
3
|
-
|
|
4
|
-
#Conekta sdk
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 2.1.0
|
|
7
|
-
Contact: engineering@conekta.com
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 7.1.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'date'
|
|
14
|
-
require 'time'
|
|
15
|
-
|
|
16
|
-
module Conekta
|
|
17
|
-
# use for card responses
|
|
18
|
-
class ChargeDataPaymentMethodCardResponse
|
|
19
|
-
attr_accessor :account_type
|
|
20
|
-
|
|
21
|
-
attr_accessor :auth_code
|
|
22
|
-
|
|
23
|
-
attr_accessor :brand
|
|
24
|
-
|
|
25
|
-
# Id sent for recurrent charges.
|
|
26
|
-
attr_accessor :contract_id
|
|
27
|
-
|
|
28
|
-
attr_accessor :country
|
|
29
|
-
|
|
30
|
-
attr_accessor :exp_month
|
|
31
|
-
|
|
32
|
-
attr_accessor :exp_year
|
|
33
|
-
|
|
34
|
-
attr_accessor :fraud_indicators
|
|
35
|
-
|
|
36
|
-
attr_accessor :issuer
|
|
37
|
-
|
|
38
|
-
attr_accessor :last4
|
|
39
|
-
|
|
40
|
-
attr_accessor :name
|
|
41
|
-
|
|
42
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
|
-
def self.attribute_map
|
|
44
|
-
{
|
|
45
|
-
:'account_type' => :'account_type',
|
|
46
|
-
:'auth_code' => :'auth_code',
|
|
47
|
-
:'brand' => :'brand',
|
|
48
|
-
:'contract_id' => :'contract_id',
|
|
49
|
-
:'country' => :'country',
|
|
50
|
-
:'exp_month' => :'exp_month',
|
|
51
|
-
:'exp_year' => :'exp_year',
|
|
52
|
-
:'fraud_indicators' => :'fraud_indicators',
|
|
53
|
-
:'issuer' => :'issuer',
|
|
54
|
-
:'last4' => :'last4',
|
|
55
|
-
:'name' => :'name'
|
|
56
|
-
}
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
# Returns all the JSON keys this model knows about
|
|
60
|
-
def self.acceptable_attributes
|
|
61
|
-
attribute_map.values
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
# Attribute type mapping.
|
|
65
|
-
def self.openapi_types
|
|
66
|
-
{
|
|
67
|
-
:'account_type' => :'String',
|
|
68
|
-
:'auth_code' => :'String',
|
|
69
|
-
:'brand' => :'String',
|
|
70
|
-
:'contract_id' => :'String',
|
|
71
|
-
:'country' => :'String',
|
|
72
|
-
:'exp_month' => :'String',
|
|
73
|
-
:'exp_year' => :'String',
|
|
74
|
-
:'fraud_indicators' => :'Array<Object>',
|
|
75
|
-
:'issuer' => :'String',
|
|
76
|
-
:'last4' => :'String',
|
|
77
|
-
:'name' => :'String'
|
|
78
|
-
}
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
# List of attributes with nullable: true
|
|
82
|
-
def self.openapi_nullable
|
|
83
|
-
Set.new([
|
|
84
|
-
])
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
# Initializes the object
|
|
88
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
89
|
-
def initialize(attributes = {})
|
|
90
|
-
if (!attributes.is_a?(Hash))
|
|
91
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::ChargeDataPaymentMethodCardResponse` initialize method"
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
95
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
96
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
97
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::ChargeDataPaymentMethodCardResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
98
|
-
end
|
|
99
|
-
h[k.to_sym] = v
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if attributes.key?(:'account_type')
|
|
103
|
-
self.account_type = attributes[:'account_type']
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
if attributes.key?(:'auth_code')
|
|
107
|
-
self.auth_code = attributes[:'auth_code']
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
if attributes.key?(:'brand')
|
|
111
|
-
self.brand = attributes[:'brand']
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
if attributes.key?(:'contract_id')
|
|
115
|
-
self.contract_id = attributes[:'contract_id']
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
if attributes.key?(:'country')
|
|
119
|
-
self.country = attributes[:'country']
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
if attributes.key?(:'exp_month')
|
|
123
|
-
self.exp_month = attributes[:'exp_month']
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
if attributes.key?(:'exp_year')
|
|
127
|
-
self.exp_year = attributes[:'exp_year']
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
if attributes.key?(:'fraud_indicators')
|
|
131
|
-
if (value = attributes[:'fraud_indicators']).is_a?(Array)
|
|
132
|
-
self.fraud_indicators = value
|
|
133
|
-
end
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
if attributes.key?(:'issuer')
|
|
137
|
-
self.issuer = attributes[:'issuer']
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
if attributes.key?(:'last4')
|
|
141
|
-
self.last4 = attributes[:'last4']
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
if attributes.key?(:'name')
|
|
145
|
-
self.name = attributes[:'name']
|
|
146
|
-
end
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
150
|
-
# @return Array for valid properties with the reasons
|
|
151
|
-
def list_invalid_properties
|
|
152
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
153
|
-
invalid_properties = Array.new
|
|
154
|
-
invalid_properties
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
# Check to see if the all the properties in the model are valid
|
|
158
|
-
# @return true if the model is valid
|
|
159
|
-
def valid?
|
|
160
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
161
|
-
true
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
# Checks equality by comparing each attribute.
|
|
165
|
-
# @param [Object] Object to be compared
|
|
166
|
-
def ==(o)
|
|
167
|
-
return true if self.equal?(o)
|
|
168
|
-
self.class == o.class &&
|
|
169
|
-
account_type == o.account_type &&
|
|
170
|
-
auth_code == o.auth_code &&
|
|
171
|
-
brand == o.brand &&
|
|
172
|
-
contract_id == o.contract_id &&
|
|
173
|
-
country == o.country &&
|
|
174
|
-
exp_month == o.exp_month &&
|
|
175
|
-
exp_year == o.exp_year &&
|
|
176
|
-
fraud_indicators == o.fraud_indicators &&
|
|
177
|
-
issuer == o.issuer &&
|
|
178
|
-
last4 == o.last4 &&
|
|
179
|
-
name == o.name
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
# @see the `==` method
|
|
183
|
-
# @param [Object] Object to be compared
|
|
184
|
-
def eql?(o)
|
|
185
|
-
self == o
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
# Calculates hash code according to all attributes.
|
|
189
|
-
# @return [Integer] Hash code
|
|
190
|
-
def hash
|
|
191
|
-
[account_type, auth_code, brand, contract_id, country, exp_month, exp_year, fraud_indicators, issuer, last4, name].hash
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
# Builds the object from hash
|
|
195
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
196
|
-
# @return [Object] Returns the model itself
|
|
197
|
-
def self.build_from_hash(attributes)
|
|
198
|
-
return nil unless attributes.is_a?(Hash)
|
|
199
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
200
|
-
transformed_hash = {}
|
|
201
|
-
openapi_types.each_pair do |key, type|
|
|
202
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
203
|
-
transformed_hash["#{key}"] = nil
|
|
204
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
205
|
-
# check to ensure the input is an array given that the attribute
|
|
206
|
-
# is documented as an array but the input is not
|
|
207
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
208
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
209
|
-
end
|
|
210
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
211
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
212
|
-
end
|
|
213
|
-
end
|
|
214
|
-
new(transformed_hash)
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
# Deserializes the data based on type
|
|
218
|
-
# @param string type Data type
|
|
219
|
-
# @param string value Value to be deserialized
|
|
220
|
-
# @return [Object] Deserialized data
|
|
221
|
-
def self._deserialize(type, value)
|
|
222
|
-
case type.to_sym
|
|
223
|
-
when :Time
|
|
224
|
-
Time.parse(value)
|
|
225
|
-
when :Date
|
|
226
|
-
Date.parse(value)
|
|
227
|
-
when :String
|
|
228
|
-
value.to_s
|
|
229
|
-
when :Integer
|
|
230
|
-
value.to_i
|
|
231
|
-
when :Float
|
|
232
|
-
value.to_f
|
|
233
|
-
when :Boolean
|
|
234
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
235
|
-
true
|
|
236
|
-
else
|
|
237
|
-
false
|
|
238
|
-
end
|
|
239
|
-
when :Object
|
|
240
|
-
# generic object (usually a Hash), return directly
|
|
241
|
-
value
|
|
242
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
243
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
244
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
245
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
246
|
-
k_type = Regexp.last_match[:k_type]
|
|
247
|
-
v_type = Regexp.last_match[:v_type]
|
|
248
|
-
{}.tap do |hash|
|
|
249
|
-
value.each do |k, v|
|
|
250
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
251
|
-
end
|
|
252
|
-
end
|
|
253
|
-
else # model
|
|
254
|
-
# models (e.g. Pet) or oneOf
|
|
255
|
-
klass = Conekta.const_get(type)
|
|
256
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
257
|
-
end
|
|
258
|
-
end
|
|
259
|
-
|
|
260
|
-
# Returns the string representation of the object
|
|
261
|
-
# @return [String] String presentation of the object
|
|
262
|
-
def to_s
|
|
263
|
-
to_hash.to_s
|
|
264
|
-
end
|
|
265
|
-
|
|
266
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
267
|
-
# @return [Hash] Returns the object in the form of hash
|
|
268
|
-
def to_body
|
|
269
|
-
to_hash
|
|
270
|
-
end
|
|
271
|
-
|
|
272
|
-
# Returns the object in the form of hash
|
|
273
|
-
# @return [Hash] Returns the object in the form of hash
|
|
274
|
-
def to_hash
|
|
275
|
-
hash = {}
|
|
276
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
277
|
-
value = self.send(attr)
|
|
278
|
-
if value.nil?
|
|
279
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
280
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
281
|
-
end
|
|
282
|
-
|
|
283
|
-
hash[param] = _to_hash(value)
|
|
284
|
-
end
|
|
285
|
-
hash
|
|
286
|
-
end
|
|
287
|
-
|
|
288
|
-
# Outputs non-array value in the form of hash
|
|
289
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
290
|
-
# @param [Object] value Any valid value
|
|
291
|
-
# @return [Hash] Returns the value in the form of hash
|
|
292
|
-
def _to_hash(value)
|
|
293
|
-
if value.is_a?(Array)
|
|
294
|
-
value.compact.map { |v| _to_hash(v) }
|
|
295
|
-
elsif value.is_a?(Hash)
|
|
296
|
-
{}.tap do |hash|
|
|
297
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
298
|
-
end
|
|
299
|
-
elsif value.respond_to? :to_hash
|
|
300
|
-
value.to_hash
|
|
301
|
-
else
|
|
302
|
-
value
|
|
303
|
-
end
|
|
304
|
-
end
|
|
305
|
-
|
|
306
|
-
end
|
|
307
|
-
|
|
308
|
-
end
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Conekta API
|
|
3
|
-
|
|
4
|
-
#Conekta sdk
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 2.1.0
|
|
7
|
-
Contact: engineering@conekta.com
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 7.1.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'date'
|
|
14
|
-
require 'time'
|
|
15
|
-
|
|
16
|
-
module Conekta
|
|
17
|
-
# use for cash responses
|
|
18
|
-
class ChargeDataPaymentMethodCashResponse
|
|
19
|
-
attr_accessor :auth_code
|
|
20
|
-
|
|
21
|
-
attr_accessor :cashier_id
|
|
22
|
-
|
|
23
|
-
attr_accessor :reference
|
|
24
|
-
|
|
25
|
-
attr_accessor :barcode_url
|
|
26
|
-
|
|
27
|
-
attr_accessor :expires_at
|
|
28
|
-
|
|
29
|
-
attr_accessor :service_name
|
|
30
|
-
|
|
31
|
-
attr_accessor :store
|
|
32
|
-
|
|
33
|
-
attr_accessor :store_name
|
|
34
|
-
|
|
35
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
|
-
def self.attribute_map
|
|
37
|
-
{
|
|
38
|
-
:'auth_code' => :'auth_code',
|
|
39
|
-
:'cashier_id' => :'cashier_id',
|
|
40
|
-
:'reference' => :'reference',
|
|
41
|
-
:'barcode_url' => :'barcode_url',
|
|
42
|
-
:'expires_at' => :'expires_at',
|
|
43
|
-
:'service_name' => :'service_name',
|
|
44
|
-
:'store' => :'store',
|
|
45
|
-
:'store_name' => :'store_name'
|
|
46
|
-
}
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
# Returns all the JSON keys this model knows about
|
|
50
|
-
def self.acceptable_attributes
|
|
51
|
-
attribute_map.values
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# Attribute type mapping.
|
|
55
|
-
def self.openapi_types
|
|
56
|
-
{
|
|
57
|
-
:'auth_code' => :'Integer',
|
|
58
|
-
:'cashier_id' => :'String',
|
|
59
|
-
:'reference' => :'String',
|
|
60
|
-
:'barcode_url' => :'String',
|
|
61
|
-
:'expires_at' => :'Integer',
|
|
62
|
-
:'service_name' => :'String',
|
|
63
|
-
:'store' => :'String',
|
|
64
|
-
:'store_name' => :'String'
|
|
65
|
-
}
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
# List of attributes with nullable: true
|
|
69
|
-
def self.openapi_nullable
|
|
70
|
-
Set.new([
|
|
71
|
-
:'auth_code',
|
|
72
|
-
:'cashier_id',
|
|
73
|
-
:'store',
|
|
74
|
-
])
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# Initializes the object
|
|
78
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
-
def initialize(attributes = {})
|
|
80
|
-
if (!attributes.is_a?(Hash))
|
|
81
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::ChargeDataPaymentMethodCashResponse` initialize method"
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
86
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
87
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::ChargeDataPaymentMethodCashResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
88
|
-
end
|
|
89
|
-
h[k.to_sym] = v
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if attributes.key?(:'auth_code')
|
|
93
|
-
self.auth_code = attributes[:'auth_code']
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
if attributes.key?(:'cashier_id')
|
|
97
|
-
self.cashier_id = attributes[:'cashier_id']
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
if attributes.key?(:'reference')
|
|
101
|
-
self.reference = attributes[:'reference']
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
if attributes.key?(:'barcode_url')
|
|
105
|
-
self.barcode_url = attributes[:'barcode_url']
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
if attributes.key?(:'expires_at')
|
|
109
|
-
self.expires_at = attributes[:'expires_at']
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
if attributes.key?(:'service_name')
|
|
113
|
-
self.service_name = attributes[:'service_name']
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
if attributes.key?(:'store')
|
|
117
|
-
self.store = attributes[:'store']
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
if attributes.key?(:'store_name')
|
|
121
|
-
self.store_name = attributes[:'store_name']
|
|
122
|
-
end
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
126
|
-
# @return Array for valid properties with the reasons
|
|
127
|
-
def list_invalid_properties
|
|
128
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
129
|
-
invalid_properties = Array.new
|
|
130
|
-
invalid_properties
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
# Check to see if the all the properties in the model are valid
|
|
134
|
-
# @return true if the model is valid
|
|
135
|
-
def valid?
|
|
136
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
137
|
-
true
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
# Checks equality by comparing each attribute.
|
|
141
|
-
# @param [Object] Object to be compared
|
|
142
|
-
def ==(o)
|
|
143
|
-
return true if self.equal?(o)
|
|
144
|
-
self.class == o.class &&
|
|
145
|
-
auth_code == o.auth_code &&
|
|
146
|
-
cashier_id == o.cashier_id &&
|
|
147
|
-
reference == o.reference &&
|
|
148
|
-
barcode_url == o.barcode_url &&
|
|
149
|
-
expires_at == o.expires_at &&
|
|
150
|
-
service_name == o.service_name &&
|
|
151
|
-
store == o.store &&
|
|
152
|
-
store_name == o.store_name
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
# @see the `==` method
|
|
156
|
-
# @param [Object] Object to be compared
|
|
157
|
-
def eql?(o)
|
|
158
|
-
self == o
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
# Calculates hash code according to all attributes.
|
|
162
|
-
# @return [Integer] Hash code
|
|
163
|
-
def hash
|
|
164
|
-
[auth_code, cashier_id, reference, barcode_url, expires_at, service_name, store, store_name].hash
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
# Builds the object from hash
|
|
168
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
169
|
-
# @return [Object] Returns the model itself
|
|
170
|
-
def self.build_from_hash(attributes)
|
|
171
|
-
return nil unless attributes.is_a?(Hash)
|
|
172
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
173
|
-
transformed_hash = {}
|
|
174
|
-
openapi_types.each_pair do |key, type|
|
|
175
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
176
|
-
transformed_hash["#{key}"] = nil
|
|
177
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
178
|
-
# check to ensure the input is an array given that the attribute
|
|
179
|
-
# is documented as an array but the input is not
|
|
180
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
181
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
182
|
-
end
|
|
183
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
184
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
185
|
-
end
|
|
186
|
-
end
|
|
187
|
-
new(transformed_hash)
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
# Deserializes the data based on type
|
|
191
|
-
# @param string type Data type
|
|
192
|
-
# @param string value Value to be deserialized
|
|
193
|
-
# @return [Object] Deserialized data
|
|
194
|
-
def self._deserialize(type, value)
|
|
195
|
-
case type.to_sym
|
|
196
|
-
when :Time
|
|
197
|
-
Time.parse(value)
|
|
198
|
-
when :Date
|
|
199
|
-
Date.parse(value)
|
|
200
|
-
when :String
|
|
201
|
-
value.to_s
|
|
202
|
-
when :Integer
|
|
203
|
-
value.to_i
|
|
204
|
-
when :Float
|
|
205
|
-
value.to_f
|
|
206
|
-
when :Boolean
|
|
207
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
208
|
-
true
|
|
209
|
-
else
|
|
210
|
-
false
|
|
211
|
-
end
|
|
212
|
-
when :Object
|
|
213
|
-
# generic object (usually a Hash), return directly
|
|
214
|
-
value
|
|
215
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
216
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
217
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
218
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
219
|
-
k_type = Regexp.last_match[:k_type]
|
|
220
|
-
v_type = Regexp.last_match[:v_type]
|
|
221
|
-
{}.tap do |hash|
|
|
222
|
-
value.each do |k, v|
|
|
223
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
224
|
-
end
|
|
225
|
-
end
|
|
226
|
-
else # model
|
|
227
|
-
# models (e.g. Pet) or oneOf
|
|
228
|
-
klass = Conekta.const_get(type)
|
|
229
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
230
|
-
end
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
# Returns the string representation of the object
|
|
234
|
-
# @return [String] String presentation of the object
|
|
235
|
-
def to_s
|
|
236
|
-
to_hash.to_s
|
|
237
|
-
end
|
|
238
|
-
|
|
239
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
240
|
-
# @return [Hash] Returns the object in the form of hash
|
|
241
|
-
def to_body
|
|
242
|
-
to_hash
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
# Returns the object in the form of hash
|
|
246
|
-
# @return [Hash] Returns the object in the form of hash
|
|
247
|
-
def to_hash
|
|
248
|
-
hash = {}
|
|
249
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
250
|
-
value = self.send(attr)
|
|
251
|
-
if value.nil?
|
|
252
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
253
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
254
|
-
end
|
|
255
|
-
|
|
256
|
-
hash[param] = _to_hash(value)
|
|
257
|
-
end
|
|
258
|
-
hash
|
|
259
|
-
end
|
|
260
|
-
|
|
261
|
-
# Outputs non-array value in the form of hash
|
|
262
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
263
|
-
# @param [Object] value Any valid value
|
|
264
|
-
# @return [Hash] Returns the value in the form of hash
|
|
265
|
-
def _to_hash(value)
|
|
266
|
-
if value.is_a?(Array)
|
|
267
|
-
value.compact.map { |v| _to_hash(v) }
|
|
268
|
-
elsif value.is_a?(Hash)
|
|
269
|
-
{}.tap do |hash|
|
|
270
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
271
|
-
end
|
|
272
|
-
elsif value.respond_to? :to_hash
|
|
273
|
-
value.to_hash
|
|
274
|
-
else
|
|
275
|
-
value
|
|
276
|
-
end
|
|
277
|
-
end
|
|
278
|
-
|
|
279
|
-
end
|
|
280
|
-
|
|
281
|
-
end
|