Skip to content
This repository was archived by the owner on Oct 17, 2023. It is now read-only.

Latest commit

 

History

History
215 lines (140 loc) · 5.74 KB

ClientsApi.md

File metadata and controls

215 lines (140 loc) · 5.74 KB

Bfwd::ClientsApi

All URIs are relative to https://localhost:8080/RestAPI

Method HTTP request Description
create_client POST /clients Create a client.
get_all_clients GET /clients Returns a collection of clients.
get_client_by_id GET /clients/{client-ID} Returns a single client, specified by the client-ID parameter.
update_client PUT /clients Update a client.

create_client

ClientPagedMetadata create_client(client)

Create a client.

{"nickname":"Create","request":"createClientRequest.html","response":"createClientResponse.html"}

Example

# load the gem
require 'bf_ruby2'

api_instance = Bfwd::ClientsApi.new

client = Bfwd::Client.new # Client | The client object to be updated.


begin
  #Create a client.
  result = api_instance.create_client(client)
  p result
rescue Bfwd::ApiError => e
  puts "Exception when calling ClientsApi->create_client: #{e}"
end

Parameters

Name Type Description Notes
client Client The client object to be updated.

Return type

ClientPagedMetadata

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: text/xml, application/xml, application/json; charset=utf-8

get_all_clients

ClientPagedMetadata get_all_clients(opts)

Returns a collection of clients.

{"nickname":"Get All","response":"getClientAll.html"}

Example

# load the gem
require 'bf_ruby2'

api_instance = Bfwd::ClientsApi.new

opts = { 
  organizations: ["organizations_example"], # Array<String> | A list of organization-IDs used to restrict the scope of API calls.
  offset: 0, # Integer | The offset from the first client to return.
  records: 10, # Integer | The maximum number of clients to return.
  order_by: "created", # String | Specify a field used to order the result set.
  order: "DESC", # String | Ihe direction of any ordering, either ASC or DESC.
  include_retired: true # BOOLEAN | Whether retired products should be returned.
}

begin
  #Returns a collection of clients.
  result = api_instance.get_all_clients(opts)
  p result
rescue Bfwd::ApiError => e
  puts "Exception when calling ClientsApi->get_all_clients: #{e}"
end

Parameters

Name Type Description Notes
organizations Array<String> A list of organization-IDs used to restrict the scope of API calls. [optional]
offset Integer The offset from the first client to return. [optional] [default to 0]
records Integer The maximum number of clients to return. [optional] [default to 10]
order_by String Specify a field used to order the result set. [optional] [default to created]
order String Ihe direction of any ordering, either ASC or DESC. [optional] [default to DESC]
include_retired BOOLEAN Whether retired products should be returned. [optional] [default to true]

Return type

ClientPagedMetadata

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json; charset=utf-8

get_client_by_id

ClientPagedMetadata get_client_by_id(client_id, opts)

Returns a single client, specified by the client-ID parameter.

{"nickname":"Retrieve by id","response":"getClientByID.html"}

Example

# load the gem
require 'bf_ruby2'

api_instance = Bfwd::ClientsApi.new

client_id = "client_id_example" # String | The string ID of the client.

opts = { 
  organizations: ["organizations_example"] # Array<String> | A list of organization-IDs used to restrict the scope of API calls.
}

begin
  #Returns a single client, specified by the client-ID parameter.
  result = api_instance.get_client_by_id(client_id, opts)
  p result
rescue Bfwd::ApiError => e
  puts "Exception when calling ClientsApi->get_client_by_id: #{e}"
end

Parameters

Name Type Description Notes
client_id String The string ID of the client.
organizations Array<String> A list of organization-IDs used to restrict the scope of API calls. [optional]

Return type

ClientPagedMetadata

Authorization

No authorization required

HTTP request headers

  • Content-Type: text/plain
  • Accept: application/json; charset=utf-8

update_client

ClientPagedMetadata update_client(client)

Update a client.

{"nickname":"Update","request":"updateClientRequest.html","response":"updateClientResponse.html"}

Example

# load the gem
require 'bf_ruby2'

api_instance = Bfwd::ClientsApi.new

client = Bfwd::Client.new # Client | The client object to be updated.


begin
  #Update a client.
  result = api_instance.update_client(client)
  p result
rescue Bfwd::ApiError => e
  puts "Exception when calling ClientsApi->update_client: #{e}"
end

Parameters

Name Type Description Notes
client Client The client object to be updated.

Return type

ClientPagedMetadata

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: text/xml, application/xml, application/json; charset=utf-8