conekta 6.0.4 → 7.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 +2 -2
- data/README.md +34 -16
- data/VERSION +1 -1
- data/conekta.gemspec +1 -1
- data/config-ruby.json +1 -1
- data/docs/AntifraudApi.md +6 -6
- data/docs/ApiKeyCreateResponse.md +2 -2
- data/docs/ApiKeyResponse.md +2 -2
- data/docs/ApiKeyResponseOnDelete.md +2 -2
- data/docs/ApiKeysApi.md +5 -5
- data/docs/BalancesApi.md +1 -1
- data/docs/ChargeOrderResponsePaymentMethod.md +3 -0
- data/docs/ChargeRequestPaymentMethod.md +3 -1
- data/docs/ChargeResponse.md +8 -8
- data/docs/ChargeResponsePaymentMethod.md +3 -0
- data/docs/ChargesApi.md +82 -4
- data/docs/ChargesDataResponse.md +8 -8
- data/docs/ChargesOrderResponse.md +22 -0
- data/docs/ChargesOrderResponseAllOfData.md +52 -0
- data/docs/Checkout.md +1 -1
- data/docs/CheckoutRequest.md +3 -1
- data/docs/CheckoutResponse.md +2 -2
- data/docs/CompaniesApi.md +2 -2
- data/docs/CreateCustomerPaymentMethodsResponse.md +1 -0
- data/docs/Customer.md +4 -0
- data/docs/CustomerPaymentMethodRequest.md +1 -1
- data/docs/CustomerPaymentMethodsData.md +1 -0
- data/docs/CustomerResponse.md +4 -0
- data/docs/CustomersApi.md +7 -7
- data/docs/DeleteApiKeysResponse.md +5 -3
- data/docs/DiscountsApi.md +5 -5
- data/docs/EventsApi.md +12 -12
- data/docs/GetCustomerPaymentMethodDataResponse.md +1 -0
- data/docs/LogResponse.md +3 -3
- data/docs/LogsApi.md +2 -2
- data/docs/LogsResponseData.md +3 -3
- data/docs/OrderChannelResponse.md +24 -0
- data/docs/{OrderResponseCharges.md → OrderChargesResponse.md} +2 -2
- data/docs/{OrderResponseDiscountLines.md → OrderDiscountLinesResponse.md} +2 -2
- data/docs/OrderRequest.md +5 -5
- data/docs/OrderResponse.md +3 -3
- data/docs/OrderResponseCheckout.md +4 -2
- data/docs/OrderUpdateRequest.md +3 -3
- data/docs/OrdersApi.md +8 -8
- data/docs/PaymentLinkApi.md +7 -7
- data/docs/PaymentMethodBankTransfer.md +1 -1
- data/docs/PaymentMethodBnplPayment.md +32 -0
- data/docs/PaymentMethodBnplRequest.md +28 -0
- data/docs/PaymentMethodCardRequest.md +1 -1
- data/docs/PaymentMethodCash.md +7 -3
- data/docs/PaymentMethodCashRequest.md +1 -1
- data/docs/PaymentMethodCashResponse.md +6 -4
- data/docs/PaymentMethodCashResponseAllOfAgreements.md +20 -0
- data/docs/PaymentMethodSpeiRequest.md +1 -1
- data/docs/PaymentMethodTokenRequest.md +3 -3
- data/docs/PaymentMethodsApi.md +5 -5
- data/docs/PayoutOrdersApi.md +77 -3
- data/docs/PlanRequest.md +5 -1
- data/docs/PlanResponse.md +5 -1
- data/docs/PlansApi.md +5 -5
- data/docs/ProductsApi.md +3 -3
- data/docs/ResendRequest.md +18 -0
- data/docs/ShippingContactsApi.md +3 -3
- data/docs/ShippingsApi.md +3 -3
- data/docs/SubscriptionsApi.md +793 -73
- data/docs/TaxesApi.md +3 -3
- data/docs/TokensApi.md +1 -1
- data/docs/TransactionsApi.md +2 -2
- data/docs/TransfersApi.md +2 -2
- data/docs/UpdateCustomer.md +4 -0
- data/docs/UpdateCustomerPaymentMethodsResponse.md +1 -0
- data/docs/WebhookKeysApi.md +5 -5
- data/docs/WebhookRequest.md +2 -2
- data/docs/WebhookResponse.md +10 -14
- data/docs/WebhookUpdateRequest.md +5 -5
- data/docs/WebhooksApi.md +8 -8
- data/lib/conekta/api/antifraud_api.rb +7 -7
- data/lib/conekta/api/api_keys_api.rb +6 -6
- data/lib/conekta/api/balances_api.rb +2 -2
- data/lib/conekta/api/charges_api.rb +88 -4
- data/lib/conekta/api/companies_api.rb +3 -3
- data/lib/conekta/api/customers_api.rb +8 -8
- data/lib/conekta/api/discounts_api.rb +6 -6
- data/lib/conekta/api/events_api.rb +21 -16
- data/lib/conekta/api/logs_api.rb +3 -3
- data/lib/conekta/api/orders_api.rb +9 -9
- data/lib/conekta/api/payment_link_api.rb +7 -7
- data/lib/conekta/api/payment_methods_api.rb +5 -5
- data/lib/conekta/api/payout_orders_api.rb +74 -4
- data/lib/conekta/api/plans_api.rb +6 -6
- data/lib/conekta/api/products_api.rb +4 -4
- data/lib/conekta/api/shipping_contacts_api.rb +4 -4
- data/lib/conekta/api/shippings_api.rb +4 -4
- data/lib/conekta/api/subscriptions_api.rb +826 -63
- data/lib/conekta/api/taxes_api.rb +4 -4
- data/lib/conekta/api/tokens_api.rb +2 -2
- data/lib/conekta/api/transactions_api.rb +3 -3
- data/lib/conekta/api/transfers_api.rb +3 -3
- data/lib/conekta/api/webhook_keys_api.rb +6 -6
- data/lib/conekta/api/webhooks_api.rb +7 -7
- data/lib/conekta/api_client.rb +1 -1
- data/lib/conekta/api_error.rb +1 -1
- data/lib/conekta/configuration.rb +1 -1
- data/lib/conekta/models/api_key_create_response.rb +13 -12
- data/lib/conekta/models/api_key_request.rb +1 -1
- data/lib/conekta/models/api_key_response.rb +13 -12
- data/lib/conekta/models/api_key_response_on_delete.rb +10 -9
- data/lib/conekta/models/api_key_update_request.rb +1 -1
- data/lib/conekta/models/balance_common_field.rb +1 -1
- data/lib/conekta/models/balance_response.rb +1 -1
- data/lib/conekta/models/blacklist_rule_response.rb +1 -1
- data/lib/conekta/models/charge_order_response.rb +1 -1
- data/lib/conekta/models/charge_order_response_payment_method.rb +3 -1
- data/lib/conekta/models/charge_request.rb +1 -1
- data/lib/conekta/models/charge_request_payment_method.rb +2 -1
- data/lib/conekta/models/charge_response.rb +58 -1
- data/lib/conekta/models/charge_response_channel.rb +1 -1
- data/lib/conekta/models/charge_response_payment_method.rb +3 -1
- data/lib/conekta/models/charge_response_refunds.rb +1 -1
- data/lib/conekta/models/charge_response_refunds_data.rb +1 -1
- data/lib/conekta/models/charge_update_request.rb +1 -1
- data/lib/conekta/models/charges_data_response.rb +58 -1
- data/lib/conekta/models/charges_order_response.rb +258 -0
- data/lib/conekta/models/charges_order_response_all_of_data.rb +439 -0
- data/lib/conekta/models/checkout.rb +1 -1
- data/lib/conekta/models/checkout_order_template.rb +1 -1
- data/lib/conekta/models/checkout_order_template_customer_info.rb +1 -1
- data/lib/conekta/models/checkout_request.rb +13 -3
- data/lib/conekta/models/checkout_response.rb +2 -1
- data/lib/conekta/models/checkouts_response.rb +1 -1
- data/lib/conekta/models/company_fiscal_info_address_response.rb +1 -1
- data/lib/conekta/models/company_fiscal_info_response.rb +1 -1
- data/lib/conekta/models/company_payout_destination_response.rb +1 -1
- data/lib/conekta/models/company_response.rb +1 -1
- data/lib/conekta/models/create_customer_fiscal_entities_response.rb +1 -1
- data/lib/conekta/models/create_customer_payment_methods_request.rb +1 -1
- data/lib/conekta/models/create_customer_payment_methods_response.rb +2 -1
- data/lib/conekta/models/create_risk_rules_data.rb +1 -1
- data/lib/conekta/models/customer.rb +22 -2
- data/lib/conekta/models/customer_address.rb +1 -1
- data/lib/conekta/models/customer_antifraud_info.rb +1 -1
- data/lib/conekta/models/customer_antifraud_info_response.rb +1 -1
- data/lib/conekta/models/customer_fiscal_entities_data_response.rb +1 -1
- data/lib/conekta/models/customer_fiscal_entities_request.rb +1 -1
- data/lib/conekta/models/customer_fiscal_entities_response.rb +1 -1
- data/lib/conekta/models/customer_info.rb +1 -1
- data/lib/conekta/models/customer_info_just_customer_id.rb +1 -1
- data/lib/conekta/models/customer_info_just_customer_id_response.rb +1 -1
- data/lib/conekta/models/customer_payment_method_request.rb +1 -1
- data/lib/conekta/models/customer_payment_methods_data.rb +2 -1
- data/lib/conekta/models/customer_payment_methods_request.rb +1 -1
- data/lib/conekta/models/customer_payment_methods_response.rb +1 -1
- data/lib/conekta/models/customer_response.rb +22 -2
- data/lib/conekta/models/customer_response_shipping_contacts.rb +1 -1
- data/lib/conekta/models/customer_shipping_contacts.rb +2 -2
- data/lib/conekta/models/customer_shipping_contacts_address.rb +1 -1
- data/lib/conekta/models/customer_shipping_contacts_data_response.rb +1 -1
- data/lib/conekta/models/customer_shipping_contacts_response.rb +1 -1
- data/lib/conekta/models/customer_shipping_contacts_response_address.rb +1 -1
- data/lib/conekta/models/customer_update_fiscal_entities_request.rb +1 -1
- data/lib/conekta/models/customer_update_shipping_contacts.rb +2 -2
- data/lib/conekta/models/customers_response.rb +1 -1
- data/lib/conekta/models/delete_api_keys_response.rb +22 -11
- data/lib/conekta/models/deleted_blacklist_rule_response.rb +1 -1
- data/lib/conekta/models/deleted_whitelist_rule_response.rb +1 -1
- data/lib/conekta/models/details.rb +1 -1
- data/lib/conekta/models/details_error.rb +1 -1
- data/lib/conekta/models/discount_lines_data_response.rb +1 -1
- data/lib/conekta/models/discount_lines_response.rb +1 -1
- data/lib/conekta/models/email_checkout_request.rb +1 -1
- data/lib/conekta/models/error.rb +1 -1
- data/lib/conekta/models/event_response.rb +1 -1
- data/lib/conekta/models/event_types.rb +1 -1
- data/lib/conekta/models/events_resend_response.rb +1 -1
- data/lib/conekta/models/fiscal_entity_address.rb +1 -1
- data/lib/conekta/models/get_api_keys_response.rb +1 -1
- data/lib/conekta/models/get_charges_response.rb +1 -1
- data/lib/conekta/models/get_companies_response.rb +1 -1
- data/lib/conekta/models/get_customer_payment_method_data_response.rb +2 -1
- data/lib/conekta/models/get_events_response.rb +1 -1
- data/lib/conekta/models/get_order_discount_lines_response.rb +1 -1
- data/lib/conekta/models/get_orders_response.rb +1 -1
- data/lib/conekta/models/get_payment_method_response.rb +1 -1
- data/lib/conekta/models/get_plans_response.rb +1 -1
- data/lib/conekta/models/get_transactions_response.rb +1 -1
- data/lib/conekta/models/get_transfers_response.rb +1 -1
- data/lib/conekta/models/get_webhook_keys_response.rb +1 -1
- data/lib/conekta/models/get_webhooks_response.rb +1 -1
- data/lib/conekta/models/log_response.rb +1 -1
- data/lib/conekta/models/logs_response.rb +1 -1
- data/lib/conekta/models/logs_response_data.rb +1 -1
- data/lib/conekta/models/order_capture_request.rb +1 -1
- data/lib/conekta/models/order_channel_response.rb +241 -0
- data/lib/conekta/models/order_charges_response.rb +258 -0
- data/lib/conekta/models/order_customer_info_response.rb +1 -1
- data/lib/conekta/models/order_discount_lines_request.rb +1 -1
- data/lib/conekta/models/order_discount_lines_response.rb +257 -0
- data/lib/conekta/models/order_fiscal_entity_address_response.rb +1 -1
- data/lib/conekta/models/order_fiscal_entity_request.rb +1 -1
- data/lib/conekta/models/order_fiscal_entity_response.rb +1 -1
- data/lib/conekta/models/order_next_action_response.rb +1 -1
- data/lib/conekta/models/order_next_action_response_redirect_to_url.rb +1 -1
- data/lib/conekta/models/order_refund_request.rb +1 -2
- data/lib/conekta/models/order_request.rb +6 -6
- data/lib/conekta/models/order_request_customer_info.rb +1 -1
- data/lib/conekta/models/order_response.rb +4 -4
- data/lib/conekta/models/order_response_checkout.rb +14 -2
- data/lib/conekta/models/order_response_customer_info.rb +1 -1
- data/lib/conekta/models/order_response_products.rb +1 -1
- data/lib/conekta/models/order_response_shipping_contact.rb +1 -1
- data/lib/conekta/models/order_tax_request.rb +1 -1
- data/lib/conekta/models/order_update_fiscal_entity_request.rb +1 -1
- data/lib/conekta/models/order_update_request.rb +4 -4
- data/lib/conekta/models/order_update_request_customer_info.rb +1 -1
- data/lib/conekta/models/orders_response.rb +1 -1
- data/lib/conekta/models/page.rb +1 -1
- data/lib/conekta/models/pagination.rb +1 -1
- data/lib/conekta/models/payment_method.rb +1 -1
- data/lib/conekta/models/payment_method_bank_transfer.rb +2 -2
- data/lib/conekta/models/payment_method_bnpl_payment.rb +311 -0
- data/lib/conekta/models/payment_method_bnpl_request.rb +348 -0
- data/lib/conekta/models/payment_method_card.rb +1 -1
- data/lib/conekta/models/payment_method_card_request.rb +1 -1
- data/lib/conekta/models/payment_method_card_response.rb +1 -1
- data/lib/conekta/models/payment_method_cash.rb +22 -2
- data/lib/conekta/models/payment_method_cash_request.rb +1 -1
- data/lib/conekta/models/payment_method_cash_response.rb +14 -2
- data/lib/conekta/models/payment_method_cash_response_all_of_agreements.rb +225 -0
- data/lib/conekta/models/payment_method_general_request.rb +1 -1
- data/lib/conekta/models/payment_method_response.rb +1 -1
- data/lib/conekta/models/payment_method_spei_recurrent.rb +1 -1
- data/lib/conekta/models/payment_method_spei_request.rb +1 -1
- data/lib/conekta/models/payment_method_token_request.rb +2 -2
- data/lib/conekta/models/payout.rb +1 -1
- data/lib/conekta/models/payout_method.rb +1 -1
- data/lib/conekta/models/payout_order.rb +1 -1
- data/lib/conekta/models/payout_order_payouts_item.rb +1 -1
- data/lib/conekta/models/payout_order_response.rb +1 -1
- data/lib/conekta/models/payout_order_response_customer_info.rb +1 -1
- data/lib/conekta/models/payout_orders_response.rb +1 -1
- data/lib/conekta/models/plan_request.rb +63 -5
- data/lib/conekta/models/plan_response.rb +24 -6
- data/lib/conekta/models/plan_update_request.rb +1 -1
- data/lib/conekta/models/product.rb +1 -1
- data/lib/conekta/models/product_data_response.rb +1 -1
- data/lib/conekta/models/product_order_response.rb +1 -1
- data/lib/conekta/models/resend_request.rb +224 -0
- data/lib/conekta/models/risk_rules_data.rb +1 -1
- data/lib/conekta/models/risk_rules_list.rb +1 -1
- data/lib/conekta/models/shipping_order_response.rb +1 -1
- data/lib/conekta/models/shipping_request.rb +1 -1
- data/lib/conekta/models/sms_checkout_request.rb +1 -1
- data/lib/conekta/models/subscription_events_response.rb +1 -1
- data/lib/conekta/models/subscription_request.rb +1 -1
- data/lib/conekta/models/subscription_response.rb +1 -1
- data/lib/conekta/models/subscription_update_request.rb +1 -1
- data/lib/conekta/models/token.rb +1 -1
- data/lib/conekta/models/token_card.rb +1 -1
- data/lib/conekta/models/token_checkout.rb +1 -1
- data/lib/conekta/models/token_response.rb +1 -1
- data/lib/conekta/models/token_response_checkout.rb +1 -1
- data/lib/conekta/models/transaction_response.rb +1 -1
- data/lib/conekta/models/transfer_destination_response.rb +1 -1
- data/lib/conekta/models/transfer_method_response.rb +1 -1
- data/lib/conekta/models/transfer_response.rb +1 -1
- data/lib/conekta/models/transfers_response.rb +1 -1
- data/lib/conekta/models/update_customer.rb +22 -2
- data/lib/conekta/models/update_customer_antifraud_info.rb +1 -1
- data/lib/conekta/models/update_customer_fiscal_entities_response.rb +1 -1
- data/lib/conekta/models/update_customer_payment_methods_response.rb +2 -1
- data/lib/conekta/models/update_order_discount_lines_request.rb +1 -1
- data/lib/conekta/models/update_order_tax_request.rb +1 -1
- data/lib/conekta/models/update_order_tax_response.rb +1 -1
- data/lib/conekta/models/update_payment_methods.rb +1 -1
- data/lib/conekta/models/update_product.rb +1 -1
- data/lib/conekta/models/webhook_key_create_response.rb +1 -1
- data/lib/conekta/models/webhook_key_delete_response.rb +1 -1
- data/lib/conekta/models/webhook_key_request.rb +1 -1
- data/lib/conekta/models/webhook_key_response.rb +1 -1
- data/lib/conekta/models/webhook_key_update_request.rb +1 -1
- data/lib/conekta/models/webhook_log.rb +1 -1
- data/lib/conekta/models/webhook_request.rb +11 -16
- data/lib/conekta/models/webhook_response.rb +28 -39
- data/lib/conekta/models/webhook_update_request.rb +20 -28
- data/lib/conekta/models/whitelistlist_rule_response.rb +1 -1
- data/lib/conekta/version.rb +2 -2
- data/lib/conekta.rb +10 -3
- data/spec/api/antifraud_api_spec.rb +8 -65
- data/spec/api/api_keys_api_spec.rb +7 -51
- data/spec/api/balances_api_spec.rb +3 -12
- data/spec/api/charges_api_spec.rb +30 -83
- data/spec/api/companies_api_spec.rb +5 -13
- data/spec/api/customers_api_spec.rb +13 -184
- data/spec/api/discounts_api_spec.rb +7 -46
- data/spec/api/events_api_spec.rb +7 -24
- data/spec/api/logs_api_spec.rb +3 -15
- data/spec/api/orders_api_spec.rb +19 -247
- data/spec/api/payment_link_api_spec.rb +9 -82
- data/spec/api/payment_methods_api_spec.rb +6 -41
- data/spec/api/payout_orders_api_spec.rb +14 -1
- data/spec/api/plans_api_spec.rb +7 -42
- data/spec/api/products_api_spec.rb +5 -30
- data/spec/api/shipping_contacts_api_spec.rb +5 -41
- data/spec/api/shippings_api_spec.rb +5 -32
- data/spec/api/subscriptions_api_spec.rb +168 -68
- data/spec/api/taxes_api_spec.rb +5 -34
- data/spec/api/tokens_api_spec.rb +3 -31
- data/spec/api/transactions_api_spec.rb +8 -21
- data/spec/api/transfers_api_spec.rb +4 -34
- data/spec/api/webhook_keys_api_spec.rb +7 -49
- data/spec/api/webhooks_api_spec.rb +9 -42
- data/spec/spec_helper.rb +1 -1
- metadata +36 -22
- data/spec/api/base_test.rb +0 -9
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Conekta sdk
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.
|
6
|
+
The version of the OpenAPI document: 2.2.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.5.0
|
@@ -19,6 +19,9 @@ module Conekta
|
|
19
19
|
|
20
20
|
attr_accessor :object
|
21
21
|
|
22
|
+
# Agreement ID
|
23
|
+
attr_accessor :agreement
|
24
|
+
|
22
25
|
attr_accessor :auth_code
|
23
26
|
|
24
27
|
attr_accessor :cashier_id
|
@@ -29,6 +32,9 @@ module Conekta
|
|
29
32
|
|
30
33
|
attr_accessor :expires_at
|
31
34
|
|
35
|
+
# Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc.
|
36
|
+
attr_accessor :product_type
|
37
|
+
|
32
38
|
attr_accessor :service_name
|
33
39
|
|
34
40
|
attr_accessor :store
|
@@ -42,11 +48,13 @@ module Conekta
|
|
42
48
|
{
|
43
49
|
:'type' => :'type',
|
44
50
|
:'object' => :'object',
|
51
|
+
:'agreement' => :'agreement',
|
45
52
|
:'auth_code' => :'auth_code',
|
46
53
|
:'cashier_id' => :'cashier_id',
|
47
54
|
:'reference' => :'reference',
|
48
55
|
:'barcode_url' => :'barcode_url',
|
49
56
|
:'expires_at' => :'expires_at',
|
57
|
+
:'product_type' => :'product_type',
|
50
58
|
:'service_name' => :'service_name',
|
51
59
|
:'store' => :'store',
|
52
60
|
:'store_name' => :'store_name',
|
@@ -64,11 +72,13 @@ module Conekta
|
|
64
72
|
{
|
65
73
|
:'type' => :'String',
|
66
74
|
:'object' => :'String',
|
75
|
+
:'agreement' => :'String',
|
67
76
|
:'auth_code' => :'Integer',
|
68
77
|
:'cashier_id' => :'String',
|
69
78
|
:'reference' => :'String',
|
70
79
|
:'barcode_url' => :'String',
|
71
80
|
:'expires_at' => :'Integer',
|
81
|
+
:'product_type' => :'String',
|
72
82
|
:'service_name' => :'String',
|
73
83
|
:'store' => :'String',
|
74
84
|
:'store_name' => :'String',
|
@@ -117,6 +127,10 @@ module Conekta
|
|
117
127
|
self.object = nil
|
118
128
|
end
|
119
129
|
|
130
|
+
if attributes.key?(:'agreement')
|
131
|
+
self.agreement = attributes[:'agreement']
|
132
|
+
end
|
133
|
+
|
120
134
|
if attributes.key?(:'auth_code')
|
121
135
|
self.auth_code = attributes[:'auth_code']
|
122
136
|
end
|
@@ -137,6 +151,10 @@ module Conekta
|
|
137
151
|
self.expires_at = attributes[:'expires_at']
|
138
152
|
end
|
139
153
|
|
154
|
+
if attributes.key?(:'product_type')
|
155
|
+
self.product_type = attributes[:'product_type']
|
156
|
+
end
|
157
|
+
|
140
158
|
if attributes.key?(:'service_name')
|
141
159
|
self.service_name = attributes[:'service_name']
|
142
160
|
end
|
@@ -181,11 +199,13 @@ module Conekta
|
|
181
199
|
self.class == o.class &&
|
182
200
|
type == o.type &&
|
183
201
|
object == o.object &&
|
202
|
+
agreement == o.agreement &&
|
184
203
|
auth_code == o.auth_code &&
|
185
204
|
cashier_id == o.cashier_id &&
|
186
205
|
reference == o.reference &&
|
187
206
|
barcode_url == o.barcode_url &&
|
188
207
|
expires_at == o.expires_at &&
|
208
|
+
product_type == o.product_type &&
|
189
209
|
service_name == o.service_name &&
|
190
210
|
store == o.store &&
|
191
211
|
store_name == o.store_name &&
|
@@ -201,7 +221,7 @@ module Conekta
|
|
201
221
|
# Calculates hash code according to all attributes.
|
202
222
|
# @return [Integer] Hash code
|
203
223
|
def hash
|
204
|
-
[type, object, auth_code, cashier_id, reference, barcode_url, expires_at, service_name, store, store_name, customer_ip_address].hash
|
224
|
+
[type, object, agreement, auth_code, cashier_id, reference, barcode_url, expires_at, product_type, service_name, store, store_name, customer_ip_address].hash
|
205
225
|
end
|
206
226
|
|
207
227
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Conekta sdk
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.
|
6
|
+
The version of the OpenAPI document: 2.2.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.5.0
|
@@ -25,10 +25,13 @@ module Conekta
|
|
25
25
|
|
26
26
|
attr_accessor :parent_id
|
27
27
|
|
28
|
+
attr_accessor :agreements
|
29
|
+
|
28
30
|
attr_accessor :reference
|
29
31
|
|
30
32
|
attr_accessor :barcode
|
31
33
|
|
34
|
+
# URL to the barcode image, reference is the same as barcode
|
32
35
|
attr_accessor :barcode_url
|
33
36
|
|
34
37
|
attr_accessor :expires_at
|
@@ -43,6 +46,7 @@ module Conekta
|
|
43
46
|
:'object' => :'object',
|
44
47
|
:'created_at' => :'created_at',
|
45
48
|
:'parent_id' => :'parent_id',
|
49
|
+
:'agreements' => :'agreements',
|
46
50
|
:'reference' => :'reference',
|
47
51
|
:'barcode' => :'barcode',
|
48
52
|
:'barcode_url' => :'barcode_url',
|
@@ -64,6 +68,7 @@ module Conekta
|
|
64
68
|
:'object' => :'String',
|
65
69
|
:'created_at' => :'Integer',
|
66
70
|
:'parent_id' => :'String',
|
71
|
+
:'agreements' => :'Array<PaymentMethodCashResponseAllOfAgreements>',
|
67
72
|
:'reference' => :'String',
|
68
73
|
:'barcode' => :'String',
|
69
74
|
:'barcode_url' => :'String',
|
@@ -128,6 +133,12 @@ module Conekta
|
|
128
133
|
self.parent_id = attributes[:'parent_id']
|
129
134
|
end
|
130
135
|
|
136
|
+
if attributes.key?(:'agreements')
|
137
|
+
if (value = attributes[:'agreements']).is_a?(Array)
|
138
|
+
self.agreements = value
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
131
142
|
if attributes.key?(:'reference')
|
132
143
|
self.reference = attributes[:'reference']
|
133
144
|
end
|
@@ -194,6 +205,7 @@ module Conekta
|
|
194
205
|
object == o.object &&
|
195
206
|
created_at == o.created_at &&
|
196
207
|
parent_id == o.parent_id &&
|
208
|
+
agreements == o.agreements &&
|
197
209
|
reference == o.reference &&
|
198
210
|
barcode == o.barcode &&
|
199
211
|
barcode_url == o.barcode_url &&
|
@@ -210,7 +222,7 @@ module Conekta
|
|
210
222
|
# Calculates hash code according to all attributes.
|
211
223
|
# @return [Integer] Hash code
|
212
224
|
def hash
|
213
|
-
[type, id, object, created_at, parent_id, reference, barcode, barcode_url, expires_at, provider].hash
|
225
|
+
[type, id, object, created_at, parent_id, agreements, reference, barcode, barcode_url, expires_at, provider].hash
|
214
226
|
end
|
215
227
|
|
216
228
|
# Builds the object from hash
|
@@ -0,0 +1,225 @@
|
|
1
|
+
=begin
|
2
|
+
#Conekta API
|
3
|
+
|
4
|
+
#Conekta sdk
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.2.0
|
7
|
+
Contact: engineering@conekta.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Conekta
|
17
|
+
class PaymentMethodCashResponseAllOfAgreements
|
18
|
+
# Agreement number, you can use this number to pay in the store/bbva
|
19
|
+
attr_accessor :agreement
|
20
|
+
|
21
|
+
# Provider name, you can use this to know where to pay
|
22
|
+
attr_accessor :provider
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'agreement' => :'agreement',
|
28
|
+
:'provider' => :'provider'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'agreement' => :'String',
|
41
|
+
:'provider' => :'String'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::PaymentMethodCashResponseAllOfAgreements` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PaymentMethodCashResponseAllOfAgreements`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'agreement')
|
67
|
+
self.agreement = attributes[:'agreement']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'provider')
|
71
|
+
self.provider = attributes[:'provider']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
79
|
+
invalid_properties = Array.new
|
80
|
+
invalid_properties
|
81
|
+
end
|
82
|
+
|
83
|
+
# Check to see if the all the properties in the model are valid
|
84
|
+
# @return true if the model is valid
|
85
|
+
def valid?
|
86
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
87
|
+
true
|
88
|
+
end
|
89
|
+
|
90
|
+
# Checks equality by comparing each attribute.
|
91
|
+
# @param [Object] Object to be compared
|
92
|
+
def ==(o)
|
93
|
+
return true if self.equal?(o)
|
94
|
+
self.class == o.class &&
|
95
|
+
agreement == o.agreement &&
|
96
|
+
provider == o.provider
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Integer] Hash code
|
107
|
+
def hash
|
108
|
+
[agreement, provider].hash
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def self.build_from_hash(attributes)
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
116
|
+
attributes = attributes.transform_keys(&:to_sym)
|
117
|
+
transformed_hash = {}
|
118
|
+
openapi_types.each_pair do |key, type|
|
119
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
120
|
+
transformed_hash["#{key}"] = nil
|
121
|
+
elsif type =~ /\AArray<(.*)>/i
|
122
|
+
# check to ensure the input is an array given that the attribute
|
123
|
+
# is documented as an array but the input is not
|
124
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
125
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
126
|
+
end
|
127
|
+
elsif !attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
129
|
+
end
|
130
|
+
end
|
131
|
+
new(transformed_hash)
|
132
|
+
end
|
133
|
+
|
134
|
+
# Deserializes the data based on type
|
135
|
+
# @param string type Data type
|
136
|
+
# @param string value Value to be deserialized
|
137
|
+
# @return [Object] Deserialized data
|
138
|
+
def self._deserialize(type, value)
|
139
|
+
case type.to_sym
|
140
|
+
when :Time
|
141
|
+
Time.parse(value)
|
142
|
+
when :Date
|
143
|
+
Date.parse(value)
|
144
|
+
when :String
|
145
|
+
value.to_s
|
146
|
+
when :Integer
|
147
|
+
value.to_i
|
148
|
+
when :Float
|
149
|
+
value.to_f
|
150
|
+
when :Boolean
|
151
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
152
|
+
true
|
153
|
+
else
|
154
|
+
false
|
155
|
+
end
|
156
|
+
when :Object
|
157
|
+
# generic object (usually a Hash), return directly
|
158
|
+
value
|
159
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
160
|
+
inner_type = Regexp.last_match[:inner_type]
|
161
|
+
value.map { |v| _deserialize(inner_type, v) }
|
162
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
163
|
+
k_type = Regexp.last_match[:k_type]
|
164
|
+
v_type = Regexp.last_match[:v_type]
|
165
|
+
{}.tap do |hash|
|
166
|
+
value.each do |k, v|
|
167
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
else # model
|
171
|
+
# models (e.g. Pet) or oneOf
|
172
|
+
klass = Conekta.const_get(type)
|
173
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns the string representation of the object
|
178
|
+
# @return [String] String presentation of the object
|
179
|
+
def to_s
|
180
|
+
to_hash.to_s
|
181
|
+
end
|
182
|
+
|
183
|
+
# to_body is an alias to to_hash (backward compatibility)
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_body
|
186
|
+
to_hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the object in the form of hash
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
191
|
+
def to_hash
|
192
|
+
hash = {}
|
193
|
+
self.class.attribute_map.each_pair do |attr, param|
|
194
|
+
value = self.send(attr)
|
195
|
+
if value.nil?
|
196
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
197
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
198
|
+
end
|
199
|
+
|
200
|
+
hash[param] = _to_hash(value)
|
201
|
+
end
|
202
|
+
hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Outputs non-array value in the form of hash
|
206
|
+
# For object, use to_hash. Otherwise, just return the value
|
207
|
+
# @param [Object] value Any valid value
|
208
|
+
# @return [Hash] Returns the value in the form of hash
|
209
|
+
def _to_hash(value)
|
210
|
+
if value.is_a?(Array)
|
211
|
+
value.compact.map { |v| _to_hash(v) }
|
212
|
+
elsif value.is_a?(Hash)
|
213
|
+
{}.tap do |hash|
|
214
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
215
|
+
end
|
216
|
+
elsif value.respond_to? :to_hash
|
217
|
+
value.to_hash
|
218
|
+
else
|
219
|
+
value
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
224
|
+
|
225
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Conekta sdk
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.
|
6
|
+
The version of the OpenAPI document: 2.2.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.5.0
|
@@ -18,7 +18,7 @@ module Conekta
|
|
18
18
|
# Type of payment method
|
19
19
|
attr_accessor :type
|
20
20
|
|
21
|
-
# Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.
|
21
|
+
# Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.2.0/reference/createsubscription] tutorial for more information on how to tokenize cards.
|
22
22
|
attr_accessor :token_id
|
23
23
|
|
24
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Conekta sdk
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.
|
6
|
+
The version of the OpenAPI document: 2.2.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.5.0
|
@@ -40,6 +40,12 @@ module Conekta
|
|
40
40
|
# The number of days the customer will have a free trial.
|
41
41
|
attr_accessor :trial_period_days
|
42
42
|
|
43
|
+
# (optional) Specifies the maximum number of retry attempts for a subscription payment before it is canceled.
|
44
|
+
attr_accessor :max_retries
|
45
|
+
|
46
|
+
# (optional) Defines the number of hours between subscription payment retry attempts.
|
47
|
+
attr_accessor :retry_delay_hours
|
48
|
+
|
43
49
|
class EnumAttributeValidator
|
44
50
|
attr_reader :datatype
|
45
51
|
attr_reader :allowable_values
|
@@ -72,7 +78,9 @@ module Conekta
|
|
72
78
|
:'id' => :'id',
|
73
79
|
:'interval' => :'interval',
|
74
80
|
:'name' => :'name',
|
75
|
-
:'trial_period_days' => :'trial_period_days'
|
81
|
+
:'trial_period_days' => :'trial_period_days',
|
82
|
+
:'max_retries' => :'max_retries',
|
83
|
+
:'retry_delay_hours' => :'retry_delay_hours'
|
76
84
|
}
|
77
85
|
end
|
78
86
|
|
@@ -91,7 +99,9 @@ module Conekta
|
|
91
99
|
:'id' => :'String',
|
92
100
|
:'interval' => :'String',
|
93
101
|
:'name' => :'String',
|
94
|
-
:'trial_period_days' => :'Integer'
|
102
|
+
:'trial_period_days' => :'Integer',
|
103
|
+
:'max_retries' => :'Integer',
|
104
|
+
:'retry_delay_hours' => :'Integer'
|
95
105
|
}
|
96
106
|
end
|
97
107
|
|
@@ -155,6 +165,14 @@ module Conekta
|
|
155
165
|
if attributes.key?(:'trial_period_days')
|
156
166
|
self.trial_period_days = attributes[:'trial_period_days']
|
157
167
|
end
|
168
|
+
|
169
|
+
if attributes.key?(:'max_retries')
|
170
|
+
self.max_retries = attributes[:'max_retries']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.key?(:'retry_delay_hours')
|
174
|
+
self.retry_delay_hours = attributes[:'retry_delay_hours']
|
175
|
+
end
|
158
176
|
end
|
159
177
|
|
160
178
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -190,6 +208,14 @@ module Conekta
|
|
190
208
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
191
209
|
end
|
192
210
|
|
211
|
+
if !@max_retries.nil? && @max_retries < 3
|
212
|
+
invalid_properties.push('invalid value for "max_retries", must be greater than or equal to 3.')
|
213
|
+
end
|
214
|
+
|
215
|
+
if !@retry_delay_hours.nil? && @retry_delay_hours < 48
|
216
|
+
invalid_properties.push('invalid value for "retry_delay_hours", must be greater than or equal to 48.')
|
217
|
+
end
|
218
|
+
|
193
219
|
invalid_properties
|
194
220
|
end
|
195
221
|
|
@@ -206,6 +232,8 @@ module Conekta
|
|
206
232
|
interval_validator = EnumAttributeValidator.new('String', ["week", "half_month", "month", "year"])
|
207
233
|
return false unless interval_validator.valid?(@interval)
|
208
234
|
return false if @name.nil?
|
235
|
+
return false if !@max_retries.nil? && @max_retries < 3
|
236
|
+
return false if !@retry_delay_hours.nil? && @retry_delay_hours < 48
|
209
237
|
true
|
210
238
|
end
|
211
239
|
|
@@ -261,6 +289,34 @@ module Conekta
|
|
261
289
|
@interval = interval
|
262
290
|
end
|
263
291
|
|
292
|
+
# Custom attribute writer method with validation
|
293
|
+
# @param [Object] max_retries Value to be assigned
|
294
|
+
def max_retries=(max_retries)
|
295
|
+
if max_retries.nil?
|
296
|
+
fail ArgumentError, 'max_retries cannot be nil'
|
297
|
+
end
|
298
|
+
|
299
|
+
if max_retries < 3
|
300
|
+
fail ArgumentError, 'invalid value for "max_retries", must be greater than or equal to 3.'
|
301
|
+
end
|
302
|
+
|
303
|
+
@max_retries = max_retries
|
304
|
+
end
|
305
|
+
|
306
|
+
# Custom attribute writer method with validation
|
307
|
+
# @param [Object] retry_delay_hours Value to be assigned
|
308
|
+
def retry_delay_hours=(retry_delay_hours)
|
309
|
+
if retry_delay_hours.nil?
|
310
|
+
fail ArgumentError, 'retry_delay_hours cannot be nil'
|
311
|
+
end
|
312
|
+
|
313
|
+
if retry_delay_hours < 48
|
314
|
+
fail ArgumentError, 'invalid value for "retry_delay_hours", must be greater than or equal to 48.'
|
315
|
+
end
|
316
|
+
|
317
|
+
@retry_delay_hours = retry_delay_hours
|
318
|
+
end
|
319
|
+
|
264
320
|
# Checks equality by comparing each attribute.
|
265
321
|
# @param [Object] Object to be compared
|
266
322
|
def ==(o)
|
@@ -273,7 +329,9 @@ module Conekta
|
|
273
329
|
id == o.id &&
|
274
330
|
interval == o.interval &&
|
275
331
|
name == o.name &&
|
276
|
-
trial_period_days == o.trial_period_days
|
332
|
+
trial_period_days == o.trial_period_days &&
|
333
|
+
max_retries == o.max_retries &&
|
334
|
+
retry_delay_hours == o.retry_delay_hours
|
277
335
|
end
|
278
336
|
|
279
337
|
# @see the `==` method
|
@@ -285,7 +343,7 @@ module Conekta
|
|
285
343
|
# Calculates hash code according to all attributes.
|
286
344
|
# @return [Integer] Hash code
|
287
345
|
def hash
|
288
|
-
[amount, currency, expiry_count, frequency, id, interval, name, trial_period_days].hash
|
346
|
+
[amount, currency, expiry_count, frequency, id, interval, name, trial_period_days, max_retries, retry_delay_hours].hash
|
289
347
|
end
|
290
348
|
|
291
349
|
# Builds the object from hash
|