conekta 7.0.2 → 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 +55 -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 +5 -2
- data/docs/ChargeRequestPaymentMethod.md +3 -1
- data/docs/ChargeResponse.md +3 -1
- data/docs/ChargeResponsePaymentMethod.md +5 -2
- 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 +6 -5
- 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 +6 -5
- 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/EventsResendResponse.md +1 -1
- data/docs/{CustomerFiscalEntitiesRequest.md → FiscalEntityRequest.md} +3 -3
- data/docs/{CustomerAddress.md → FiscalEntityRequestAddress.md} +2 -2
- data/docs/GetCustomerPaymentMethodDataResponse.md +6 -5
- 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 +15 -11
- 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/PaymentMethodCardRequest.md +1 -1
- data/docs/PaymentMethodCardResponse.md +2 -0
- data/docs/PaymentMethodCashRecurrentResponse.md +38 -0
- data/docs/PaymentMethodCashRequest.md +1 -1
- data/docs/PaymentMethodCashResponse.md +1 -1
- data/docs/PaymentMethodPbbPayment.md +30 -0
- data/docs/PaymentMethodPbbRequest.md +22 -0
- data/docs/{PaymentMethodSpeiRecurrent.md → PaymentMethodSpeiRecurrentResponse.md} +2 -2
- data/docs/PaymentMethodSpeiRequest.md +1 -1
- data/docs/PaymentMethodTokenRequest.md +2 -2
- data/docs/PaymentMethodsApi.md +11 -11
- 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 +6 -5
- data/docs/{CustomerUpdateFiscalEntitiesRequest.md → UpdateFiscalEntityRequest.md} +3 -3
- data/docs/UpdatePaymentMethodsCard.md +20 -0
- 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 +2 -2
- data/docs/WebhookResponse.md +2 -2
- data/docs/WebhooksApi.md +12 -12
- data/examples/one_time_charge_bnpl.rb +3 -0
- data/examples/one_time_charge_pbb.rb +64 -0
- 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 +6 -4
- data/lib/conekta/models/charge_request.rb +22 -79
- data/lib/conekta/models/charge_request_payment_method.rb +6 -6
- 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 +6 -4
- 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/{update_payment_methods.rb → chargeback_file_response.rb} +48 -87
- 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 +6 -6
- 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 +6 -6
- 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 +6 -6
- 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_response.rb → payment_method_cash_recurrent_response.rb} +115 -84
- 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 +317 -0
- data/lib/conekta/models/{payment_method_cash_response_all_of.rb → payment_method_pbb_request.rb} +106 -112
- 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/tax_lines_data_response.rb +284 -0
- 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 +6 -6
- 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/{payment_method_cash_request_all_of.rb → update_payment_methods_card.rb} +44 -81
- 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 +47 -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 +111 -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/docs/UpdatePaymentMethods.md +0 -18
- 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_spei_recurrent_all_of.rb +0 -224
- data/lib/conekta/models/risk_rules.rb +0 -216
- 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
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
|
-
class PaymentMethodCashResponse
|
|
17
|
+
class PaymentMethodCashResponse < ApiModelBase
|
|
18
18
|
attr_accessor :type
|
|
19
19
|
|
|
20
20
|
attr_accessor :id
|
|
@@ -55,9 +55,14 @@ module Conekta
|
|
|
55
55
|
}
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
# Returns attribute mapping this model knows about
|
|
59
|
+
def self.acceptable_attribute_map
|
|
60
|
+
attribute_map
|
|
61
|
+
end
|
|
62
|
+
|
|
58
63
|
# Returns all the JSON keys this model knows about
|
|
59
64
|
def self.acceptable_attributes
|
|
60
|
-
|
|
65
|
+
acceptable_attribute_map.values
|
|
61
66
|
end
|
|
62
67
|
|
|
63
68
|
# Attribute type mapping.
|
|
@@ -68,7 +73,7 @@ module Conekta
|
|
|
68
73
|
:'object' => :'String',
|
|
69
74
|
:'created_at' => :'Integer',
|
|
70
75
|
:'parent_id' => :'String',
|
|
71
|
-
:'agreements' => :'Array<
|
|
76
|
+
:'agreements' => :'Array<CashAgreementsResponse>',
|
|
72
77
|
:'reference' => :'String',
|
|
73
78
|
:'barcode' => :'String',
|
|
74
79
|
:'barcode_url' => :'String',
|
|
@@ -83,13 +88,6 @@ module Conekta
|
|
|
83
88
|
])
|
|
84
89
|
end
|
|
85
90
|
|
|
86
|
-
# List of class defined in allOf (OpenAPI v3)
|
|
87
|
-
def self.openapi_all_of
|
|
88
|
-
[
|
|
89
|
-
:'PaymentMethodResponse'
|
|
90
|
-
]
|
|
91
|
-
end
|
|
92
|
-
|
|
93
91
|
# Initializes the object
|
|
94
92
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
95
93
|
def initialize(attributes = {})
|
|
@@ -98,9 +96,10 @@ module Conekta
|
|
|
98
96
|
end
|
|
99
97
|
|
|
100
98
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
99
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
101
100
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
102
|
-
if (!
|
|
103
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PaymentMethodCashResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
101
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
102
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PaymentMethodCashResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
104
103
|
end
|
|
105
104
|
h[k.to_sym] = v
|
|
106
105
|
}
|
|
@@ -195,6 +194,46 @@ module Conekta
|
|
|
195
194
|
true
|
|
196
195
|
end
|
|
197
196
|
|
|
197
|
+
# Custom attribute writer method with validation
|
|
198
|
+
# @param [Object] type Value to be assigned
|
|
199
|
+
def type=(type)
|
|
200
|
+
if type.nil?
|
|
201
|
+
fail ArgumentError, 'type cannot be nil'
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
@type = type
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Custom attribute writer method with validation
|
|
208
|
+
# @param [Object] id Value to be assigned
|
|
209
|
+
def id=(id)
|
|
210
|
+
if id.nil?
|
|
211
|
+
fail ArgumentError, 'id cannot be nil'
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
@id = id
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Custom attribute writer method with validation
|
|
218
|
+
# @param [Object] object Value to be assigned
|
|
219
|
+
def object=(object)
|
|
220
|
+
if object.nil?
|
|
221
|
+
fail ArgumentError, 'object cannot be nil'
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
@object = object
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Custom attribute writer method with validation
|
|
228
|
+
# @param [Object] created_at Value to be assigned
|
|
229
|
+
def created_at=(created_at)
|
|
230
|
+
if created_at.nil?
|
|
231
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
@created_at = created_at
|
|
235
|
+
end
|
|
236
|
+
|
|
198
237
|
# Checks equality by comparing each attribute.
|
|
199
238
|
# @param [Object] Object to be compared
|
|
200
239
|
def ==(o)
|
|
@@ -248,61 +287,6 @@ module Conekta
|
|
|
248
287
|
new(transformed_hash)
|
|
249
288
|
end
|
|
250
289
|
|
|
251
|
-
# Deserializes the data based on type
|
|
252
|
-
# @param string type Data type
|
|
253
|
-
# @param string value Value to be deserialized
|
|
254
|
-
# @return [Object] Deserialized data
|
|
255
|
-
def self._deserialize(type, value)
|
|
256
|
-
case type.to_sym
|
|
257
|
-
when :Time
|
|
258
|
-
Time.parse(value)
|
|
259
|
-
when :Date
|
|
260
|
-
Date.parse(value)
|
|
261
|
-
when :String
|
|
262
|
-
value.to_s
|
|
263
|
-
when :Integer
|
|
264
|
-
value.to_i
|
|
265
|
-
when :Float
|
|
266
|
-
value.to_f
|
|
267
|
-
when :Boolean
|
|
268
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
269
|
-
true
|
|
270
|
-
else
|
|
271
|
-
false
|
|
272
|
-
end
|
|
273
|
-
when :Object
|
|
274
|
-
# generic object (usually a Hash), return directly
|
|
275
|
-
value
|
|
276
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
277
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
278
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
279
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
280
|
-
k_type = Regexp.last_match[:k_type]
|
|
281
|
-
v_type = Regexp.last_match[:v_type]
|
|
282
|
-
{}.tap do |hash|
|
|
283
|
-
value.each do |k, v|
|
|
284
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
285
|
-
end
|
|
286
|
-
end
|
|
287
|
-
else # model
|
|
288
|
-
# models (e.g. Pet) or oneOf
|
|
289
|
-
klass = Conekta.const_get(type)
|
|
290
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
291
|
-
end
|
|
292
|
-
end
|
|
293
|
-
|
|
294
|
-
# Returns the string representation of the object
|
|
295
|
-
# @return [String] String presentation of the object
|
|
296
|
-
def to_s
|
|
297
|
-
to_hash.to_s
|
|
298
|
-
end
|
|
299
|
-
|
|
300
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
301
|
-
# @return [Hash] Returns the object in the form of hash
|
|
302
|
-
def to_body
|
|
303
|
-
to_hash
|
|
304
|
-
end
|
|
305
|
-
|
|
306
290
|
# Returns the object in the form of hash
|
|
307
291
|
# @return [Hash] Returns the object in the form of hash
|
|
308
292
|
def to_hash
|
|
@@ -319,24 +303,6 @@ module Conekta
|
|
|
319
303
|
hash
|
|
320
304
|
end
|
|
321
305
|
|
|
322
|
-
# Outputs non-array value in the form of hash
|
|
323
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
324
|
-
# @param [Object] value Any valid value
|
|
325
|
-
# @return [Hash] Returns the value in the form of hash
|
|
326
|
-
def _to_hash(value)
|
|
327
|
-
if value.is_a?(Array)
|
|
328
|
-
value.compact.map { |v| _to_hash(v) }
|
|
329
|
-
elsif value.is_a?(Hash)
|
|
330
|
-
{}.tap do |hash|
|
|
331
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
332
|
-
end
|
|
333
|
-
elsif value.respond_to? :to_hash
|
|
334
|
-
value.to_hash
|
|
335
|
-
else
|
|
336
|
-
value
|
|
337
|
-
end
|
|
338
|
-
end
|
|
339
|
-
|
|
340
306
|
end
|
|
341
307
|
|
|
342
308
|
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,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
17
|
# Payment method used in the charge. Go to the [payment methods](https://developers.conekta.com/reference/m%C3%A9todos-de-pago) section for more details
|
|
18
|
-
class PaymentMethodGeneralRequest
|
|
18
|
+
class PaymentMethodGeneralRequest < ApiModelBase
|
|
19
19
|
# Method expiration date as unix timestamp
|
|
20
20
|
attr_accessor :expires_at
|
|
21
21
|
|
|
@@ -52,9 +52,14 @@ module Conekta
|
|
|
52
52
|
}
|
|
53
53
|
end
|
|
54
54
|
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
55
60
|
# Returns all the JSON keys this model knows about
|
|
56
61
|
def self.acceptable_attributes
|
|
57
|
-
|
|
62
|
+
acceptable_attribute_map.values
|
|
58
63
|
end
|
|
59
64
|
|
|
60
65
|
# Attribute type mapping.
|
|
@@ -85,9 +90,10 @@ module Conekta
|
|
|
85
90
|
end
|
|
86
91
|
|
|
87
92
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
93
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
88
94
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
89
|
-
if (!
|
|
90
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PaymentMethodGeneralRequest`. Please check the name to make sure it's valid. List of attributes: " +
|
|
95
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
96
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PaymentMethodGeneralRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
91
97
|
end
|
|
92
98
|
h[k.to_sym] = v
|
|
93
99
|
}
|
|
@@ -147,6 +153,16 @@ module Conekta
|
|
|
147
153
|
true
|
|
148
154
|
end
|
|
149
155
|
|
|
156
|
+
# Custom attribute writer method with validation
|
|
157
|
+
# @param [Object] type Value to be assigned
|
|
158
|
+
def type=(type)
|
|
159
|
+
if type.nil?
|
|
160
|
+
fail ArgumentError, 'type cannot be nil'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
@type = type
|
|
164
|
+
end
|
|
165
|
+
|
|
150
166
|
# Checks equality by comparing each attribute.
|
|
151
167
|
# @param [Object] Object to be compared
|
|
152
168
|
def ==(o)
|
|
@@ -197,61 +213,6 @@ module Conekta
|
|
|
197
213
|
new(transformed_hash)
|
|
198
214
|
end
|
|
199
215
|
|
|
200
|
-
# Deserializes the data based on type
|
|
201
|
-
# @param string type Data type
|
|
202
|
-
# @param string value Value to be deserialized
|
|
203
|
-
# @return [Object] Deserialized data
|
|
204
|
-
def self._deserialize(type, value)
|
|
205
|
-
case type.to_sym
|
|
206
|
-
when :Time
|
|
207
|
-
Time.parse(value)
|
|
208
|
-
when :Date
|
|
209
|
-
Date.parse(value)
|
|
210
|
-
when :String
|
|
211
|
-
value.to_s
|
|
212
|
-
when :Integer
|
|
213
|
-
value.to_i
|
|
214
|
-
when :Float
|
|
215
|
-
value.to_f
|
|
216
|
-
when :Boolean
|
|
217
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
218
|
-
true
|
|
219
|
-
else
|
|
220
|
-
false
|
|
221
|
-
end
|
|
222
|
-
when :Object
|
|
223
|
-
# generic object (usually a Hash), return directly
|
|
224
|
-
value
|
|
225
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
226
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
227
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
228
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
229
|
-
k_type = Regexp.last_match[:k_type]
|
|
230
|
-
v_type = Regexp.last_match[:v_type]
|
|
231
|
-
{}.tap do |hash|
|
|
232
|
-
value.each do |k, v|
|
|
233
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
234
|
-
end
|
|
235
|
-
end
|
|
236
|
-
else # model
|
|
237
|
-
# models (e.g. Pet) or oneOf
|
|
238
|
-
klass = Conekta.const_get(type)
|
|
239
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
240
|
-
end
|
|
241
|
-
end
|
|
242
|
-
|
|
243
|
-
# Returns the string representation of the object
|
|
244
|
-
# @return [String] String presentation of the object
|
|
245
|
-
def to_s
|
|
246
|
-
to_hash.to_s
|
|
247
|
-
end
|
|
248
|
-
|
|
249
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
250
|
-
# @return [Hash] Returns the object in the form of hash
|
|
251
|
-
def to_body
|
|
252
|
-
to_hash
|
|
253
|
-
end
|
|
254
|
-
|
|
255
216
|
# Returns the object in the form of hash
|
|
256
217
|
# @return [Hash] Returns the object in the form of hash
|
|
257
218
|
def to_hash
|
|
@@ -268,24 +229,6 @@ module Conekta
|
|
|
268
229
|
hash
|
|
269
230
|
end
|
|
270
231
|
|
|
271
|
-
# Outputs non-array value in the form of hash
|
|
272
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
273
|
-
# @param [Object] value Any valid value
|
|
274
|
-
# @return [Hash] Returns the value in the form of hash
|
|
275
|
-
def _to_hash(value)
|
|
276
|
-
if value.is_a?(Array)
|
|
277
|
-
value.compact.map { |v| _to_hash(v) }
|
|
278
|
-
elsif value.is_a?(Hash)
|
|
279
|
-
{}.tap do |hash|
|
|
280
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
281
|
-
end
|
|
282
|
-
elsif value.respond_to? :to_hash
|
|
283
|
-
value.to_hash
|
|
284
|
-
else
|
|
285
|
-
value
|
|
286
|
-
end
|
|
287
|
-
end
|
|
288
|
-
|
|
289
232
|
end
|
|
290
233
|
|
|
291
234
|
end
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Conekta API
|
|
3
|
+
|
|
4
|
+
#Conekta sdk
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.3.0
|
|
7
|
+
Contact: engineering@conekta.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Conekta
|
|
17
|
+
class PaymentMethodPbbPayment < ApiModelBase
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
attr_accessor :object
|
|
21
|
+
|
|
22
|
+
# Deep link for the payment, use for mobile apps/flows
|
|
23
|
+
attr_accessor :deep_link
|
|
24
|
+
|
|
25
|
+
# Expiration date of the charge
|
|
26
|
+
attr_accessor :expires_at
|
|
27
|
+
|
|
28
|
+
# Product type of the charge
|
|
29
|
+
attr_accessor :product_type
|
|
30
|
+
|
|
31
|
+
# URL to redirect the customer to complete the payment
|
|
32
|
+
attr_accessor :redirect_url
|
|
33
|
+
|
|
34
|
+
# Reference for the payment
|
|
35
|
+
attr_accessor :reference
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'type' => :'type',
|
|
41
|
+
:'object' => :'object',
|
|
42
|
+
:'deep_link' => :'deep_link',
|
|
43
|
+
:'expires_at' => :'expires_at',
|
|
44
|
+
:'product_type' => :'product_type',
|
|
45
|
+
:'redirect_url' => :'redirect_url',
|
|
46
|
+
:'reference' => :'reference'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns attribute mapping this model knows about
|
|
51
|
+
def self.acceptable_attribute_map
|
|
52
|
+
attribute_map
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
|
56
|
+
def self.acceptable_attributes
|
|
57
|
+
acceptable_attribute_map.values
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Attribute type mapping.
|
|
61
|
+
def self.openapi_types
|
|
62
|
+
{
|
|
63
|
+
:'type' => :'String',
|
|
64
|
+
:'object' => :'String',
|
|
65
|
+
:'deep_link' => :'String',
|
|
66
|
+
:'expires_at' => :'Integer',
|
|
67
|
+
:'product_type' => :'String',
|
|
68
|
+
:'redirect_url' => :'String',
|
|
69
|
+
:'reference' => :'String'
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# List of attributes with nullable: true
|
|
74
|
+
def self.openapi_nullable
|
|
75
|
+
Set.new([
|
|
76
|
+
])
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Initializes the object
|
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
81
|
+
def initialize(attributes = {})
|
|
82
|
+
if (!attributes.is_a?(Hash))
|
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::PaymentMethodPbbPayment` initialize method"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
87
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
89
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PaymentMethodPbbPayment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
91
|
+
end
|
|
92
|
+
h[k.to_sym] = v
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'type')
|
|
96
|
+
self.type = attributes[:'type']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'object')
|
|
100
|
+
self.object = attributes[:'object']
|
|
101
|
+
else
|
|
102
|
+
self.object = nil
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'deep_link')
|
|
106
|
+
self.deep_link = attributes[:'deep_link']
|
|
107
|
+
else
|
|
108
|
+
self.deep_link = nil
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'expires_at')
|
|
112
|
+
self.expires_at = attributes[:'expires_at']
|
|
113
|
+
else
|
|
114
|
+
self.expires_at = nil
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'product_type')
|
|
118
|
+
self.product_type = attributes[:'product_type']
|
|
119
|
+
else
|
|
120
|
+
self.product_type = nil
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'redirect_url')
|
|
124
|
+
self.redirect_url = attributes[:'redirect_url']
|
|
125
|
+
else
|
|
126
|
+
self.redirect_url = nil
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'reference')
|
|
130
|
+
self.reference = attributes[:'reference']
|
|
131
|
+
else
|
|
132
|
+
self.reference = nil
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
137
|
+
# @return Array for valid properties with the reasons
|
|
138
|
+
def list_invalid_properties
|
|
139
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
140
|
+
invalid_properties = Array.new
|
|
141
|
+
if @object.nil?
|
|
142
|
+
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if @deep_link.nil?
|
|
146
|
+
invalid_properties.push('invalid value for "deep_link", deep_link cannot be nil.')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if @expires_at.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if @expires_at < 0
|
|
154
|
+
invalid_properties.push('invalid value for "expires_at", must be greater than or equal to 0.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if @product_type.nil?
|
|
158
|
+
invalid_properties.push('invalid value for "product_type", product_type cannot be nil.')
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if @redirect_url.nil?
|
|
162
|
+
invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if @reference.nil?
|
|
166
|
+
invalid_properties.push('invalid value for "reference", reference cannot be nil.')
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
invalid_properties
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Check to see if the all the properties in the model are valid
|
|
173
|
+
# @return true if the model is valid
|
|
174
|
+
def valid?
|
|
175
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
176
|
+
return false if @object.nil?
|
|
177
|
+
return false if @deep_link.nil?
|
|
178
|
+
return false if @expires_at.nil?
|
|
179
|
+
return false if @expires_at < 0
|
|
180
|
+
return false if @product_type.nil?
|
|
181
|
+
return false if @redirect_url.nil?
|
|
182
|
+
return false if @reference.nil?
|
|
183
|
+
true
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Custom attribute writer method with validation
|
|
187
|
+
# @param [Object] object Value to be assigned
|
|
188
|
+
def object=(object)
|
|
189
|
+
if object.nil?
|
|
190
|
+
fail ArgumentError, 'object cannot be nil'
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
@object = object
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Custom attribute writer method with validation
|
|
197
|
+
# @param [Object] deep_link Value to be assigned
|
|
198
|
+
def deep_link=(deep_link)
|
|
199
|
+
if deep_link.nil?
|
|
200
|
+
fail ArgumentError, 'deep_link cannot be nil'
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
@deep_link = deep_link
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Custom attribute writer method with validation
|
|
207
|
+
# @param [Object] expires_at Value to be assigned
|
|
208
|
+
def expires_at=(expires_at)
|
|
209
|
+
if expires_at.nil?
|
|
210
|
+
fail ArgumentError, 'expires_at cannot be nil'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if expires_at < 0
|
|
214
|
+
fail ArgumentError, 'invalid value for "expires_at", must be greater than or equal to 0.'
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
@expires_at = expires_at
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Custom attribute writer method with validation
|
|
221
|
+
# @param [Object] product_type Value to be assigned
|
|
222
|
+
def product_type=(product_type)
|
|
223
|
+
if product_type.nil?
|
|
224
|
+
fail ArgumentError, 'product_type cannot be nil'
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
@product_type = product_type
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Custom attribute writer method with validation
|
|
231
|
+
# @param [Object] redirect_url Value to be assigned
|
|
232
|
+
def redirect_url=(redirect_url)
|
|
233
|
+
if redirect_url.nil?
|
|
234
|
+
fail ArgumentError, 'redirect_url cannot be nil'
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
@redirect_url = redirect_url
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Custom attribute writer method with validation
|
|
241
|
+
# @param [Object] reference Value to be assigned
|
|
242
|
+
def reference=(reference)
|
|
243
|
+
if reference.nil?
|
|
244
|
+
fail ArgumentError, 'reference cannot be nil'
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
@reference = reference
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Checks equality by comparing each attribute.
|
|
251
|
+
# @param [Object] Object to be compared
|
|
252
|
+
def ==(o)
|
|
253
|
+
return true if self.equal?(o)
|
|
254
|
+
self.class == o.class &&
|
|
255
|
+
type == o.type &&
|
|
256
|
+
object == o.object &&
|
|
257
|
+
deep_link == o.deep_link &&
|
|
258
|
+
expires_at == o.expires_at &&
|
|
259
|
+
product_type == o.product_type &&
|
|
260
|
+
redirect_url == o.redirect_url &&
|
|
261
|
+
reference == o.reference
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# @see the `==` method
|
|
265
|
+
# @param [Object] Object to be compared
|
|
266
|
+
def eql?(o)
|
|
267
|
+
self == o
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Calculates hash code according to all attributes.
|
|
271
|
+
# @return [Integer] Hash code
|
|
272
|
+
def hash
|
|
273
|
+
[type, object, deep_link, expires_at, product_type, redirect_url, reference].hash
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Builds the object from hash
|
|
277
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
278
|
+
# @return [Object] Returns the model itself
|
|
279
|
+
def self.build_from_hash(attributes)
|
|
280
|
+
return nil unless attributes.is_a?(Hash)
|
|
281
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
282
|
+
transformed_hash = {}
|
|
283
|
+
openapi_types.each_pair do |key, type|
|
|
284
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
285
|
+
transformed_hash["#{key}"] = nil
|
|
286
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
287
|
+
# check to ensure the input is an array given that the attribute
|
|
288
|
+
# is documented as an array but the input is not
|
|
289
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
290
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
291
|
+
end
|
|
292
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
293
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
new(transformed_hash)
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Returns the object in the form of hash
|
|
300
|
+
# @return [Hash] Returns the object in the form of hash
|
|
301
|
+
def to_hash
|
|
302
|
+
hash = {}
|
|
303
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
304
|
+
value = self.send(attr)
|
|
305
|
+
if value.nil?
|
|
306
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
307
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
hash[param] = _to_hash(value)
|
|
311
|
+
end
|
|
312
|
+
hash
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
end
|