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,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.2.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -43,20 +43,7 @@ describe 'ProductsApi' do
|
|
43
43
|
# @return [ProductOrderResponse]
|
44
44
|
describe 'orders_create_product test' do
|
45
45
|
it 'should work' do
|
46
|
-
|
47
|
-
request = Conekta::Product.new({
|
48
|
-
description: "Mes de marz.",
|
49
|
-
name: "Pago Mensualidad test",
|
50
|
-
quantity: 1,
|
51
|
-
unit_price: 1000,
|
52
|
-
tags: ["Pago 2", "Pago mensualidad 2"]
|
53
|
-
})
|
54
|
-
|
55
|
-
response = @api_instance.orders_create_product(id, request)
|
56
|
-
|
57
|
-
expect(response).to be_instance_of(Conekta::ProductOrderResponse)
|
58
|
-
expect(response.parent_id).to eq(id)
|
59
|
-
expect(response.object).to eq('line_item')
|
46
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
60
47
|
end
|
61
48
|
end
|
62
49
|
|
@@ -71,11 +58,7 @@ describe 'ProductsApi' do
|
|
71
58
|
# @return [ProductOrderResponse]
|
72
59
|
describe 'orders_delete_product test' do
|
73
60
|
it 'should work' do
|
74
|
-
|
75
|
-
|
76
|
-
expect(response).to be_instance_of(Conekta::ProductOrderResponse)
|
77
|
-
expect(response.id).to eq('line_item_2tVz8UkyWhSxLfUd7')
|
78
|
-
expect(response.parent_id).to eq('ord_2tVyWPnCPWbrV37mW')
|
61
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
79
62
|
end
|
80
63
|
end
|
81
64
|
|
@@ -91,15 +74,7 @@ describe 'ProductsApi' do
|
|
91
74
|
# @return [ProductOrderResponse]
|
92
75
|
describe 'orders_update_product test' do
|
93
76
|
it 'should work' do
|
94
|
-
|
95
|
-
product_id = "line_item_2tVz8UkyWhSxLfUd7"
|
96
|
-
request = Conekta::UpdateProduct.new({description: "Pago Mensualidad"})
|
97
|
-
|
98
|
-
response = @api_instance.orders_update_product(id, product_id, request)
|
99
|
-
|
100
|
-
expect(response).to be_instance_of(Conekta::ProductOrderResponse)
|
101
|
-
expect(response.parent_id).to eq(id)
|
102
|
-
expect(response.id).to eq(product_id)
|
77
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
103
78
|
end
|
104
79
|
end
|
105
80
|
|
@@ -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.2.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -43,24 +43,7 @@ describe 'ShippingContactsApi' do
|
|
43
43
|
# @return [CustomerShippingContactsResponse]
|
44
44
|
describe 'create_customer_shipping_contacts test' do
|
45
45
|
it 'should work' do
|
46
|
-
|
47
|
-
request = Conekta::CustomerShippingContacts.new({
|
48
|
-
address: Conekta::CustomerShippingContactsAddress.new({
|
49
|
-
street1: "av siem",
|
50
|
-
city: "mexico",
|
51
|
-
country: "mx",
|
52
|
-
postal_code: "11000"
|
53
|
-
}),
|
54
|
-
phone: "1234567890",
|
55
|
-
receiver: "receiver"
|
56
|
-
})
|
57
|
-
response = @api_instance.create_customer_shipping_contacts(id, request)
|
58
|
-
|
59
|
-
expect(response).to be_instance_of(Conekta::CustomerShippingContactsResponse)
|
60
|
-
expect(response.parent_id).to eq(id)
|
61
|
-
expect(response.address.country).to eq(request.address.country)
|
62
|
-
expect(response.id).to be_truthy
|
63
|
-
expect(response.created_at).to eq(1679009479)
|
46
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
64
47
|
end
|
65
48
|
end
|
66
49
|
|
@@ -75,14 +58,7 @@ describe 'ShippingContactsApi' do
|
|
75
58
|
# @return [CustomerShippingContactsResponse]
|
76
59
|
describe 'delete_customer_shipping_contacts test' do
|
77
60
|
it 'should work' do
|
78
|
-
|
79
|
-
shipping_contact_id = 'ship_cont_2tZWzJPBf87C6TcoQ'
|
80
|
-
|
81
|
-
response = @api_instance.delete_customer_shipping_contacts(id, shipping_contact_id)
|
82
|
-
|
83
|
-
expect(response).to be_instance_of(Conekta::CustomerShippingContactsResponse)
|
84
|
-
expect(response.parent_id).to eq(id)
|
85
|
-
expect(response.id).to eq(shipping_contact_id)
|
61
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
86
62
|
end
|
87
63
|
end
|
88
64
|
|
@@ -98,19 +74,7 @@ describe 'ShippingContactsApi' do
|
|
98
74
|
# @return [CustomerShippingContactsResponse]
|
99
75
|
describe 'update_customer_shipping_contacts test' do
|
100
76
|
it 'should work' do
|
101
|
-
|
102
|
-
shipping_contacts_id = "ship_cont_2tZWzJPBf87C6TcoQ"
|
103
|
-
request = Conekta::CustomerUpdateShippingContacts.new({
|
104
|
-
phone: "3143145050"
|
105
|
-
})
|
106
|
-
|
107
|
-
response = @api_instance.update_customer_shipping_contacts(id, shipping_contacts_id, request)
|
108
|
-
|
109
|
-
expect(response).to be_instance_of(Conekta::CustomerShippingContactsResponse)
|
110
|
-
expect(response.phone).to eq(request.phone)
|
111
|
-
expect(response.parent_id).to eq(id)
|
112
|
-
expect(response.id).to eq(shipping_contacts_id)
|
113
|
-
expect(response.default).to eq(false)
|
77
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
114
78
|
end
|
115
79
|
end
|
116
80
|
|
@@ -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.2.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -43,16 +43,7 @@ describe 'ShippingsApi' do
|
|
43
43
|
# @return [ShippingOrderResponse]
|
44
44
|
describe 'orders_create_shipping test' do
|
45
45
|
it 'should work' do
|
46
|
-
|
47
|
-
shipping_request = Conekta::ShippingRequest.new({
|
48
|
-
amount: 500
|
49
|
-
})
|
50
|
-
response = @api_instance.orders_create_shipping(id, shipping_request)
|
51
|
-
|
52
|
-
expect(response).to be_instance_of(Conekta::ShippingOrderResponse)
|
53
|
-
expect(response.parent_id).to eq(id)
|
54
|
-
expect(response.amount).to eq(shipping_request.amount)
|
55
|
-
expect(response.object).to eq("shipping_line")
|
46
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
56
47
|
end
|
57
48
|
end
|
58
49
|
|
@@ -67,14 +58,7 @@ describe 'ShippingsApi' do
|
|
67
58
|
# @return [ShippingOrderResponse]
|
68
59
|
describe 'orders_delete_shipping test' do
|
69
60
|
it 'should work' do
|
70
|
-
|
71
|
-
shipping_id = 'ship_lin_2tVzNuDGSaDwreMg6'
|
72
|
-
|
73
|
-
response = @api_instance.orders_delete_shipping(id, shipping_id)
|
74
|
-
|
75
|
-
expect(response).to be_instance_of(Conekta::ShippingOrderResponse)
|
76
|
-
expect(response.parent_id).to eq(id)
|
77
|
-
expect(response.id).to eq(shipping_id)
|
61
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
78
62
|
end
|
79
63
|
end
|
80
64
|
|
@@ -90,18 +74,7 @@ describe 'ShippingsApi' do
|
|
90
74
|
# @return [ShippingOrderResponse]
|
91
75
|
describe 'orders_update_shipping test' do
|
92
76
|
it 'should work' do
|
93
|
-
|
94
|
-
shipping_id = 'ship_lin_2tVzNuDGSaDwreMg6'
|
95
|
-
shipping_request = Conekta::ShippingRequest.new({
|
96
|
-
amount: 540
|
97
|
-
})
|
98
|
-
|
99
|
-
response = @api_instance.orders_update_shipping(id, shipping_id, shipping_request)
|
100
|
-
|
101
|
-
expect(response).to be_instance_of(Conekta::ShippingOrderResponse)
|
102
|
-
expect(response.parent_id).to eq(id)
|
103
|
-
expect(response.id).to eq(shipping_id)
|
104
|
-
expect(response.amount).to eq(shipping_request.amount)
|
77
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
105
78
|
end
|
106
79
|
end
|
107
80
|
|
@@ -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.2.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -33,8 +33,8 @@ describe 'SubscriptionsApi' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for cancel_subscription
|
36
|
-
# Cancel Subscription
|
37
|
-
#
|
36
|
+
# Cancel Subscription [Deprecated]
|
37
|
+
# DEPRECATED: This endpoint will be removed in version 2.3.0.
|
38
38
|
# @param id Identifier of the resource
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @option opts [String] :accept_language Use for knowing which language to use
|
@@ -42,20 +42,13 @@ describe 'SubscriptionsApi' do
|
|
42
42
|
# @return [SubscriptionResponse]
|
43
43
|
describe 'cancel_subscription test' do
|
44
44
|
it 'should work' do
|
45
|
-
|
46
|
-
|
47
|
-
response = @api_instance.cancel_subscription(customer_id, { accept_language: 'es' })
|
48
|
-
|
49
|
-
expect(response).to be_instance_of(Conekta::SubscriptionResponse)
|
50
|
-
expect(response.customer_id).to eq(customer_id)
|
51
|
-
expect(response.status).to eq('canceled')
|
52
|
-
expect(response.canceled_at).to eq(1679431258)
|
45
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
53
46
|
end
|
54
47
|
end
|
55
48
|
|
56
49
|
# unit tests for create_subscription
|
57
|
-
# Create Subscription
|
58
|
-
# You can create the subscription to include the plans that your customers consume
|
50
|
+
# Create Subscription [Deprecated]
|
51
|
+
# DEPRECATED: This endpoint will be removed in version 2.3.0. You can create the subscription to include the plans that your customers consume
|
59
52
|
# @param id Identifier of the resource
|
60
53
|
# @param subscription_request requested field for subscriptions
|
61
54
|
# @param [Hash] opts the optional parameters
|
@@ -64,99 +57,211 @@ describe 'SubscriptionsApi' do
|
|
64
57
|
# @return [SubscriptionResponse]
|
65
58
|
describe 'create_subscription test' do
|
66
59
|
it 'should work' do
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
response = @api_instance.create_subscription(customer_id, subscription_request)
|
60
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
61
|
+
end
|
62
|
+
end
|
71
63
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
64
|
+
# unit tests for get_subscription
|
65
|
+
# Get Subscription [Deprecated]
|
66
|
+
# DEPRECATED: This endpoint will be removed in version 2.3.0.
|
67
|
+
# @param id Identifier of the resource
|
68
|
+
# @param [Hash] opts the optional parameters
|
69
|
+
# @option opts [String] :accept_language Use for knowing which language to use
|
70
|
+
# @return [SubscriptionResponse]
|
71
|
+
describe 'get_subscription test' do
|
72
|
+
it 'should work' do
|
73
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
78
74
|
end
|
79
75
|
end
|
80
76
|
|
81
|
-
# unit tests for
|
82
|
-
# Get Events
|
83
|
-
# You can get the events of the subscription(s) of a client, with the customer id
|
77
|
+
# unit tests for get_subscription_events
|
78
|
+
# Get Subscription Events [Deprecated]
|
79
|
+
# DEPRECATED: This endpoint will be removed in version 2.3.0. You can get the events of the subscription(s) of a client, with the customer id
|
84
80
|
# @param id Identifier of the resource
|
85
81
|
# @param [Hash] opts the optional parameters
|
86
82
|
# @option opts [String] :accept_language Use for knowing which language to use
|
87
83
|
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
88
84
|
# @return [SubscriptionEventsResponse]
|
89
|
-
describe '
|
85
|
+
describe 'get_subscription_events test' do
|
90
86
|
it 'should work' do
|
87
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
88
|
+
end
|
89
|
+
end
|
91
90
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
91
|
+
# unit tests for pause_subscription
|
92
|
+
# Pause Subscription [Deprecated]
|
93
|
+
# DEPRECATED: This endpoint will be removed in version 2.3.0.
|
94
|
+
# @param id Identifier of the resource
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @option opts [String] :accept_language Use for knowing which language to use
|
97
|
+
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
98
|
+
# @return [SubscriptionResponse]
|
99
|
+
describe 'pause_subscription test' do
|
100
|
+
it 'should work' do
|
101
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
96
102
|
end
|
97
103
|
end
|
98
104
|
|
99
|
-
# unit tests for
|
100
|
-
#
|
105
|
+
# unit tests for resume_subscription
|
106
|
+
# Resume Subscription [Deprecated]
|
107
|
+
# DEPRECATED: This endpoint will be removed in version 2.3.0.
|
101
108
|
# @param id Identifier of the resource
|
102
109
|
# @param [Hash] opts the optional parameters
|
103
110
|
# @option opts [String] :accept_language Use for knowing which language to use
|
111
|
+
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
104
112
|
# @return [SubscriptionResponse]
|
105
|
-
describe '
|
113
|
+
describe 'resume_subscription test' do
|
106
114
|
it 'should work' do
|
107
|
-
|
115
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
116
|
+
end
|
117
|
+
end
|
108
118
|
|
109
|
-
|
110
|
-
|
111
|
-
|
119
|
+
# unit tests for subscription_cancel
|
120
|
+
# Cancel Subscription
|
121
|
+
# Cancel a specific subscription
|
122
|
+
# @param customer_id Identifier of the customer resource
|
123
|
+
# @param id Identifier of the subscription resource
|
124
|
+
# @param [Hash] opts the optional parameters
|
125
|
+
# @option opts [String] :accept_language Use for knowing which language to use
|
126
|
+
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
127
|
+
# @return [SubscriptionResponse]
|
128
|
+
describe 'subscription_cancel test' do
|
129
|
+
it 'should work' do
|
130
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
112
131
|
end
|
113
132
|
end
|
114
133
|
|
115
|
-
# unit tests for
|
116
|
-
#
|
117
|
-
#
|
118
|
-
# @param
|
134
|
+
# unit tests for subscription_create
|
135
|
+
# Create Subscription
|
136
|
+
# Create a new subscription for a customer (keeps existing subscriptions active)
|
137
|
+
# @param customer_id Identifier of the customer resource
|
138
|
+
# @param subscription_request requested field for subscriptions
|
119
139
|
# @param [Hash] opts the optional parameters
|
120
140
|
# @option opts [String] :accept_language Use for knowing which language to use
|
121
141
|
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
122
142
|
# @return [SubscriptionResponse]
|
123
|
-
describe '
|
143
|
+
describe 'subscription_create test' do
|
124
144
|
it 'should work' do
|
125
|
-
|
145
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
146
|
+
end
|
147
|
+
end
|
126
148
|
|
127
|
-
|
149
|
+
# unit tests for subscription_events
|
150
|
+
# Get Subscription Events
|
151
|
+
# Get events for a specific subscription
|
152
|
+
# @param customer_id Identifier of the customer resource
|
153
|
+
# @param id Identifier of the subscription resource
|
154
|
+
# @param [Hash] opts the optional parameters
|
155
|
+
# @option opts [String] :accept_language Use for knowing which language to use
|
156
|
+
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
157
|
+
# @option opts [Integer] :limit The numbers of items to return, the maximum value is 250
|
158
|
+
# @option opts [String] :search General order search, e.g. by mail, reference etc.
|
159
|
+
# @option opts [String] :_next next page
|
160
|
+
# @option opts [String] :previous previous page
|
161
|
+
# @return [SubscriptionEventsResponse]
|
162
|
+
describe 'subscription_events test' do
|
163
|
+
it 'should work' do
|
164
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
165
|
+
end
|
166
|
+
end
|
128
167
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
168
|
+
# unit tests for subscription_list
|
169
|
+
# List Subscriptions
|
170
|
+
# Get a list of subscriptions for a customer
|
171
|
+
# @param customer_id Identifier of the customer resource
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @option opts [String] :accept_language Use for knowing which language to use
|
174
|
+
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
175
|
+
# @option opts [Integer] :limit The numbers of items to return, the maximum value is 250
|
176
|
+
# @option opts [String] :search General order search, e.g. by mail, reference etc.
|
177
|
+
# @option opts [String] :_next next page
|
178
|
+
# @option opts [String] :previous previous page
|
179
|
+
# @return [SubscriptionResponse]
|
180
|
+
describe 'subscription_list test' do
|
181
|
+
it 'should work' do
|
182
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
133
183
|
end
|
134
184
|
end
|
135
185
|
|
136
|
-
# unit tests for
|
186
|
+
# unit tests for subscription_pause
|
187
|
+
# Pause Subscription
|
188
|
+
# Pause a specific subscription
|
189
|
+
# @param customer_id Identifier of the customer resource
|
190
|
+
# @param id Identifier of the subscription resource
|
191
|
+
# @param [Hash] opts the optional parameters
|
192
|
+
# @option opts [String] :accept_language Use for knowing which language to use
|
193
|
+
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
194
|
+
# @return [SubscriptionResponse]
|
195
|
+
describe 'subscription_pause test' do
|
196
|
+
it 'should work' do
|
197
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
# unit tests for subscription_resume
|
137
202
|
# Resume Subscription
|
138
|
-
#
|
139
|
-
# @param
|
203
|
+
# Resume a specific paused subscription
|
204
|
+
# @param customer_id Identifier of the customer resource
|
205
|
+
# @param id Identifier of the subscription resource
|
140
206
|
# @param [Hash] opts the optional parameters
|
141
207
|
# @option opts [String] :accept_language Use for knowing which language to use
|
142
208
|
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
143
209
|
# @return [SubscriptionResponse]
|
144
|
-
describe '
|
210
|
+
describe 'subscription_resume test' do
|
145
211
|
it 'should work' do
|
146
|
-
|
212
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
213
|
+
end
|
214
|
+
end
|
147
215
|
|
148
|
-
|
216
|
+
# unit tests for subscription_update
|
217
|
+
# Update Subscription
|
218
|
+
# Update a specific subscription
|
219
|
+
# @param customer_id Identifier of the customer resource
|
220
|
+
# @param id Identifier of the subscription resource
|
221
|
+
# @param subscription_update_request requested field for update a subscription
|
222
|
+
# @param [Hash] opts the optional parameters
|
223
|
+
# @option opts [String] :accept_language Use for knowing which language to use
|
224
|
+
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
225
|
+
# @return [SubscriptionResponse]
|
226
|
+
describe 'subscription_update test' do
|
227
|
+
it 'should work' do
|
228
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
# unit tests for subscriptions_get
|
233
|
+
# Get Subscription
|
234
|
+
# Retrieve a specific subscription
|
235
|
+
# @param customer_id Identifier of the customer resource
|
236
|
+
# @param id Identifier of the subscription resource
|
237
|
+
# @param [Hash] opts the optional parameters
|
238
|
+
# @option opts [String] :accept_language Use for knowing which language to use
|
239
|
+
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
240
|
+
# @return [SubscriptionResponse]
|
241
|
+
describe 'subscriptions_get test' do
|
242
|
+
it 'should work' do
|
243
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
244
|
+
end
|
245
|
+
end
|
149
246
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
247
|
+
# unit tests for subscriptions_retry
|
248
|
+
# Retry Failed Payment
|
249
|
+
# Retry a failed payment for a specific subscription
|
250
|
+
# @param customer_id Identifier of the customer resource
|
251
|
+
# @param id Identifier of the subscription resource
|
252
|
+
# @param [Hash] opts the optional parameters
|
253
|
+
# @option opts [String] :accept_language Use for knowing which language to use
|
254
|
+
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
255
|
+
# @return [SubscriptionResponse]
|
256
|
+
describe 'subscriptions_retry test' do
|
257
|
+
it 'should work' do
|
258
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
154
259
|
end
|
155
260
|
end
|
156
261
|
|
157
262
|
# unit tests for update_subscription
|
158
|
-
# Update Subscription
|
159
|
-
# You can modify the subscription to change the plans that your customers consume
|
263
|
+
# Update Subscription [Deprecated]
|
264
|
+
# DEPRECATED: This endpoint will be removed in version 2.3.0. You can modify the subscription to change the plans that your customers consume
|
160
265
|
# @param id Identifier of the resource
|
161
266
|
# @param subscription_update_request requested field for update a subscription
|
162
267
|
# @param [Hash] opts the optional parameters
|
@@ -165,12 +270,7 @@ describe 'SubscriptionsApi' do
|
|
165
270
|
# @return [SubscriptionResponse]
|
166
271
|
describe 'update_subscription test' do
|
167
272
|
it 'should work' do
|
168
|
-
|
169
|
-
subscription_update_request = Conekta::SubscriptionUpdateRequest.new({ trial_end: 1679752328})
|
170
|
-
|
171
|
-
response = @api_instance.update_subscription(customer_id, subscription_update_request, { accept_language: 'es' })
|
172
|
-
|
173
|
-
expect(response).to be_instance_of(Conekta::SubscriptionResponse)
|
273
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
174
274
|
end
|
175
275
|
end
|
176
276
|
|
data/spec/api/taxes_api_spec.rb
CHANGED
@@ -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.2.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -43,20 +43,7 @@ describe 'TaxesApi' do
|
|
43
43
|
# @return [UpdateOrderTaxResponse]
|
44
44
|
describe 'orders_create_taxes test' do
|
45
45
|
it 'should work' do
|
46
|
-
|
47
|
-
order_tax_request = Conekta::OrderTaxRequest.new({
|
48
|
-
amount: 100,
|
49
|
-
description: "test",
|
50
|
-
metadata: { "key": "value" }
|
51
|
-
})
|
52
|
-
|
53
|
-
response = @api_instance.orders_create_taxes(id, order_tax_request)
|
54
|
-
|
55
|
-
expect(response).to be_instance_of(Conekta::UpdateOrderTaxResponse)
|
56
|
-
expect(response.amount).to eq(100)
|
57
|
-
expect(response.description).to eq("test postman")
|
58
|
-
expect(response.parent_id).to eq(id)
|
59
|
-
expect(response.id).to be_truthy
|
46
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
60
47
|
end
|
61
48
|
end
|
62
49
|
|
@@ -71,14 +58,7 @@ describe 'TaxesApi' do
|
|
71
58
|
# @return [UpdateOrderTaxResponse]
|
72
59
|
describe 'orders_delete_taxes test' do
|
73
60
|
it 'should work' do
|
74
|
-
|
75
|
-
tax_id = 'tax_lin_2tVzVp6AAptCRHhgt'
|
76
|
-
|
77
|
-
response = @api_instance.orders_delete_taxes(id, tax_id)
|
78
|
-
|
79
|
-
expect(response).to be_instance_of(Conekta::UpdateOrderTaxResponse)
|
80
|
-
expect(response.id).to eq(tax_id)
|
81
|
-
expect(response.parent_id).to eq(id)
|
61
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
82
62
|
end
|
83
63
|
end
|
84
64
|
|
@@ -94,16 +74,7 @@ describe 'TaxesApi' do
|
|
94
74
|
# @return [UpdateOrderTaxResponse]
|
95
75
|
describe 'orders_update_taxes test' do
|
96
76
|
it 'should work' do
|
97
|
-
|
98
|
-
tax_id = 'tax_lin_2tVzVp6AAptCRHhgt'
|
99
|
-
update_order_tax_request = Conekta::UpdateOrderTaxRequest.new({amount: 99})
|
100
|
-
|
101
|
-
response = @api_instance.orders_update_taxes(id, tax_id, update_order_tax_request)
|
102
|
-
|
103
|
-
expect(response).to be_instance_of(Conekta::UpdateOrderTaxResponse)
|
104
|
-
expect(response.id).to eq(tax_id)
|
105
|
-
expect(response.parent_id).to eq(id)
|
106
|
-
expect(response.amount).to eq(update_order_tax_request.amount)
|
77
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
107
78
|
end
|
108
79
|
end
|
109
80
|
|
data/spec/api/tokens_api_spec.rb
CHANGED
@@ -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.2.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -41,35 +41,7 @@ describe 'TokensApi' do
|
|
41
41
|
# @return [TokenResponse]
|
42
42
|
describe 'create_token test' do
|
43
43
|
it 'should work' do
|
44
|
-
|
45
|
-
card: {
|
46
|
-
name: "Jorge López",
|
47
|
-
expMonth: "12",
|
48
|
-
expYear: "25",
|
49
|
-
cvc: "123",
|
50
|
-
number: "5475040095304607"
|
51
|
-
}
|
52
|
-
})
|
53
|
-
|
54
|
-
response = @api_instance.create_token(token)
|
55
|
-
|
56
|
-
expect(response).to be_instance_of(Conekta::TokenResponse)
|
57
|
-
expect(response.id).to eq('tok_2toPJUcZ27AH5LsZk')
|
58
|
-
expect(response.used).to eq(false)
|
59
|
-
expect(response.livemode).to eq(true)
|
60
|
-
expect(response.checkout).to be_nil
|
61
|
-
end
|
62
|
-
it 'empty token' do
|
63
|
-
token = Conekta::Token.new({
|
64
|
-
checkout: Conekta::TokenCheckout.new({returns_control_on: "Token"})
|
65
|
-
})
|
66
|
-
|
67
|
-
response = @api_instance.create_token(token)
|
68
|
-
|
69
|
-
expect(response).to be_instance_of(Conekta::TokenResponse)
|
70
|
-
expect(response.id).to eq('tok_2toNoPZpJgRU4PvgZ')
|
71
|
-
expect(response.checkout).not_to be_nil
|
72
|
-
expect(response.checkout.status).to eq('Issued')
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
73
45
|
end
|
74
46
|
end
|
75
47
|
|