All URIs are relative to http://localhost:4000
Method | HTTP request | Description |
---|---|---|
countries_list | GET /api/v2/platform/countries | Returns a list of Countries |
show_country | GET /api/v2/platform/countries/{id} | Returns a Country |
countries_list
Returns a list of Countries
Returns a list of Countries
require 'time'
require 'spree_client'
# setup authorization
SpreeClient.configure do |config|
# Configure Bearer authorization: bearer_auth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = SpreeClient::CountriesApi.new
begin
# Returns a list of Countries
result = api_instance.countries_list
p result
rescue SpreeClient::ApiError => e
puts "Error when calling CountriesApi->countries_list: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> countries_list_with_http_info
begin
# Returns a list of Countries
data, status_code, headers = api_instance.countries_list_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <ResourcesList>
rescue SpreeClient::ApiError => e
puts "Error when calling CountriesApi->countries_list_with_http_info: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/vnd.api+json
show_country(id)
Returns a Country
Returns a Country
require 'time'
require 'spree_client'
# setup authorization
SpreeClient.configure do |config|
# Configure Bearer authorization: bearer_auth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = SpreeClient::CountriesApi.new
id = 'id_example' # String |
begin
# Returns a Country
result = api_instance.show_country(id)
p result
rescue SpreeClient::ApiError => e
puts "Error when calling CountriesApi->show_country: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> show_country_with_http_info(id)
begin
# Returns a Country
data, status_code, headers = api_instance.show_country_with_http_info(id)
p status_code # => 2xx
p headers # => { ... }
p data # => <Resource>
rescue SpreeClient::ApiError => e
puts "Error when calling CountriesApi->show_country_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String |
- Content-Type: Not defined
- Accept: application/vnd.api+json