All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
create_plan | POST /plans | Create Plan |
delete_plan | DELETE /plans/{id} | Delete Plan |
get_plan | GET /plans/{id} | Get Plan |
get_plans | GET /plans | Get A List of Plans |
update_plan | PUT /plans/{id} | Update Plan |
create_plan(plan_request, opts)
Create Plan
Create a new plan for an existing order
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::PlansApi.new
plan_request = Conekta::PlanRequest.new({amount: 10000, frequency: 1, interval: 'week', name: 'Extra Plan3'}) # PlanRequest | requested field for plan
opts = {
accept_language: 'es', # String | Use for knowing which language to use
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
}
begin
# Create Plan
result = api_instance.create_plan(plan_request, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling PlansApi->create_plan: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_plan_with_http_info(plan_request, opts)
begin
# Create Plan
data, status_code, headers = api_instance.create_plan_with_http_info(plan_request, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <PlanResponse>
rescue Conekta::ApiError => e
puts "Error when calling PlansApi->create_plan_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
plan_request | PlanRequest | requested field for plan | |
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
x_child_company_id | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json
delete_plan(id, opts)
Delete Plan
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::PlansApi.new
id = '6307a60c41de27127515a575' # String | Identifier of the resource
opts = {
accept_language: 'es' # String | Use for knowing which language to use
}
begin
# Delete Plan
result = api_instance.delete_plan(id, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling PlansApi->delete_plan: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_plan_with_http_info(id, opts)
begin
# Delete Plan
data, status_code, headers = api_instance.delete_plan_with_http_info(id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <PlanResponse>
rescue Conekta::ApiError => e
puts "Error when calling PlansApi->delete_plan_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
get_plan(id, opts)
Get Plan
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::PlansApi.new
id = '6307a60c41de27127515a575' # String | Identifier of the resource
opts = {
accept_language: 'es', # String | Use for knowing which language to use
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
}
begin
# Get Plan
result = api_instance.get_plan(id, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling PlansApi->get_plan: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_plan_with_http_info(id, opts)
begin
# Get Plan
data, status_code, headers = api_instance.get_plan_with_http_info(id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <PlanResponse>
rescue Conekta::ApiError => e
puts "Error when calling PlansApi->get_plan_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
x_child_company_id | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
get_plans(opts)
Get A List of Plans
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::PlansApi.new
opts = {
accept_language: 'es', # String | Use for knowing which language to use
x_child_company_id: '6441b6376b60c3a638da80af', # String | In the case of a holding company, the company id of the child company to which will process the request.
limit: 56, # Integer | The numbers of items to return, the maximum value is 250
search: 'search_example', # String | General order search, e.g. by mail, reference etc.
_next: '_next_example', # String | next page
previous: 'previous_example' # String | previous page
}
begin
# Get A List of Plans
result = api_instance.get_plans(opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling PlansApi->get_plans: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_plans_with_http_info(opts)
begin
# Get A List of Plans
data, status_code, headers = api_instance.get_plans_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetPlansResponse>
rescue Conekta::ApiError => e
puts "Error when calling PlansApi->get_plans_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
x_child_company_id | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
limit | Integer | The numbers of items to return, the maximum value is 250 | [optional][default to 20] |
search | String | General order search, e.g. by mail, reference etc. | [optional] |
_next | String | next page | [optional] |
previous | String | previous page | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
update_plan(id, plan_update_request, opts)
Update Plan
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::PlansApi.new
id = '6307a60c41de27127515a575' # String | Identifier of the resource
plan_update_request = Conekta::PlanUpdateRequest.new # PlanUpdateRequest | requested field for plan
opts = {
accept_language: 'es', # String | Use for knowing which language to use
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
}
begin
# Update Plan
result = api_instance.update_plan(id, plan_update_request, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling PlansApi->update_plan: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> update_plan_with_http_info(id, plan_update_request, opts)
begin
# Update Plan
data, status_code, headers = api_instance.update_plan_with_http_info(id, plan_update_request, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <PlanResponse>
rescue Conekta::ApiError => e
puts "Error when calling PlansApi->update_plan_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
plan_update_request | PlanUpdateRequest | requested field for plan | |
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
x_child_company_id | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json