All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
get_companies | GET /companies | Get List of Companies |
get_company | GET /companies/{id} | Get Company |
get_companies(opts)
Get List of Companies
Consume the list of child companies. This is used for holding companies with several child entities.
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::CompaniesApi.new
opts = {
accept_language: 'es', # String | Use for knowing which language to use
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 List of Companies
result = api_instance.get_companies(opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_companies: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_companies_with_http_info(opts)
begin
# Get List of Companies
data, status_code, headers = api_instance.get_companies_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetCompaniesResponse>
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_companies_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
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
get_company(id, opts)
Get Company
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::CompaniesApi.new
id = '6307a60c41de27127515a575' # String | Identifier of the resource
opts = {
accept_language: 'es' # String | Use for knowing which language to use
}
begin
# Get Company
result = api_instance.get_company(id, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_company: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_company_with_http_info(id, opts)
begin
# Get Company
data, status_code, headers = api_instance.get_company_with_http_info(id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CompanyResponse>
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_company_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