All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Method | HTTP request | Description |
---|---|---|
create_product | POST /product | Create |
list_product | GET /product | List |
show_product_by_id | GET /product/{productId} | Detail |
update_product | PUT /product/{productId} | Update |
String create_product(body)
Create
Create a product
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::ProductsApi.new
body = SwaggerClient::Product.new # Product |
begin
#Create
result = api_instance.create_product(body)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ProductsApi->create_product: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | Product |
String
- Content-Type: application/json
- Accept: application/json
InlineResponse2008 list_product(opts)
List
List all products
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::ProductsApi.new
opts = {
limit: 56, # Integer | How many items to return at one time (max 100)
last_key: 'last_key_example', # String | The key to be used in pagination to say what the last key of the previous page was
name: 'name_example' # String | The name to search for
}
begin
#List
result = api_instance.list_product(opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ProductsApi->list_product: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | How many items to return at one time (max 100) | [optional] |
last_key | String | The key to be used in pagination to say what the last key of the previous page was | [optional] |
name | String | The name to search for | [optional] |
- Content-Type: Not defined
- Accept: application/json
Product show_product_by_id(product_id)
Detail
Info for a specific product
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::ProductsApi.new
product_id = 'product_id_example' # String | The id of the product to retrieve
begin
#Detail
result = api_instance.show_product_by_id(product_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ProductsApi->show_product_by_id: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
product_id | String | The id of the product to retrieve |
- Content-Type: Not defined
- Accept: application/json
Product update_product(product_id)
Update
Update a product
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::ProductsApi.new
product_id = 'product_id_example' # String | The id of the product to retrieve
begin
#Update
result = api_instance.update_product(product_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ProductsApi->update_product: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
product_id | String | The id of the product to retrieve |
- Content-Type: Not defined
- Accept: application/json