# Inventory Service - Company Owner - REST API

## API and SDK Documentation

Version: 1.0.0

REST API for Inventory Service

# CompanyOwner

# createCompanyOwner

Creates new Company Owner

    /company-owners

### Usage and SDK Samples

    curl -X POST "https://localhost/inventory-service/api/v1/company-owners"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.CompanyOwnerApi;

    import java.io.File;
    import java.util.*;

    public class CompanyOwnerApiExample {

        public static void main(String[] args) {

            CompanyOwnerApi apiInstance = new CompanyOwnerApi();
            CompanyOwner body = ; // CompanyOwner | Company Owner object that needs to be created
            try {
                CompanyOwner result = apiInstance.createCompanyOwner(body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling CompanyOwnerApi#createCompanyOwner");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.CompanyOwnerApi;

    public class CompanyOwnerApiExample {

        public static void main(String[] args) {
            CompanyOwnerApi apiInstance = new CompanyOwnerApi();
            CompanyOwner body = ; // CompanyOwner | Company Owner object that needs to be created
            try {
                CompanyOwner result = apiInstance.createCompanyOwner(body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling CompanyOwnerApi#createCompanyOwner");
                e.printStackTrace();
            }
        }
    }

    CompanyOwner *body = ; // Company Owner object that needs to be created

    CompanyOwnerApi *apiInstance = [[CompanyOwnerApi alloc] init];

    // Creates new Company Owner
    [apiInstance createCompanyOwnerWith:body
                  completionHandler: ^(CompanyOwner output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceCompanyOwnerRestApi = require('inventory_service___company_owner___rest_api');

    var api = new InventoryServiceCompanyOwnerRestApi.CompanyOwnerApi()

    var body = ; // {CompanyOwner} Company Owner object that needs to be created

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.createCompanyOwner(body, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

    namespace Example
    {
        public class createCompanyOwnerExample
        {
            public void main()
            {

                var apiInstance = new CompanyOwnerApi();
                var body = new CompanyOwner(); // CompanyOwner | Company Owner object that needs to be created

                try
                {
                    // Creates new Company Owner
                    CompanyOwner result = apiInstance.createCompanyOwner(body);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling CompanyOwnerApi.createCompanyOwner: " + e.Message );
                }
            }
        }
    }

    <?php
    require_once(__DIR__ . '/vendor/autoload.php');

    $api_instance = new Swagger\Client\Api\CompanyOwnerApi();
    $body = ; // CompanyOwner | Company Owner object that needs to be created

    try {
        $result = $api_instance->createCompanyOwner($body);
        print_r($result);
    } catch (Exception $e) {
        echo 'Exception when calling CompanyOwnerApi->createCompanyOwner: ', $e->getMessage(), PHP_EOL;
    }
    ?>

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::CompanyOwnerApi;

    my $api_instance = WWW::SwaggerClient::CompanyOwnerApi->new();
    my $body = WWW::SwaggerClient::Object::CompanyOwner->new(); # CompanyOwner | Company Owner object that needs to be created

    eval {
        my $result = $api_instance->createCompanyOwner(body => $body);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling CompanyOwnerApi->createCompanyOwner: $@\n";
    }

    from __future__ import print_statement
    import time
    import swagger_client
    from swagger_client.rest import ApiException
    from pprint import pprint

    # create an instance of the API class
    api_instance = swagger_client.CompanyOwnerApi()
    body =  # CompanyOwner | Company Owner object that needs to be created

    try:
        # Creates new Company Owner
        api_response = api_instance.create_company_owner(body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CompanyOwnerApi->createCompanyOwner: %s\n" % e)

## Parameters

Body parameters

Name | Description
--- | ---
body * |

## Responses

### Status: 201 - Company Owner created

### Status: 405 - Invalid input

# getCompanyOwner

Gets Company Owner based on companyOwnerId

    /company-owners/{companyOwnerId}

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/company-owners/{companyOwnerId}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.CompanyOwnerApi;

    import java.io.File;
    import java.util.*;

    public class CompanyOwnerApiExample {

        public static void main(String[] args) {

            CompanyOwnerApi apiInstance = new CompanyOwnerApi();
            Long companyOwnerId = 789; // Long | Company Owner's id
            try {
                CompanyOwner result = apiInstance.getCompanyOwner(companyOwnerId);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling CompanyOwnerApi#getCompanyOwner");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.CompanyOwnerApi;

    public class CompanyOwnerApiExample {

        public static void main(String[] args) {
            CompanyOwnerApi apiInstance = new CompanyOwnerApi();
            Long companyOwnerId = 789; // Long | Company Owner's id
            try {
                CompanyOwner result = apiInstance.getCompanyOwner(companyOwnerId);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling CompanyOwnerApi#getCompanyOwner");
                e.printStackTrace();
            }
        }
    }

    Long *companyOwnerId = 789; // Company Owner's id

    CompanyOwnerApi *apiInstance = [[CompanyOwnerApi alloc] init];

    // Gets Company Owner based on companyOwnerId
    [apiInstance getCompanyOwnerWith:companyOwnerId
                  completionHandler: ^(CompanyOwner output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceCompanyOwnerRestApi = require('inventory_service___company_owner___rest_api');

    var api = new InventoryServiceCompanyOwnerRestApi.CompanyOwnerApi()

    var companyOwnerId = 789; // {Long} Company Owner's id

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getCompanyOwner(companyOwnerId, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

    namespace Example
    {
        public class getCompanyOwnerExample
        {
            public void main()
            {

                var apiInstance = new CompanyOwnerApi();
                var companyOwnerId = 789;  // Long | Company Owner's id

                try
                {
                    // Gets Company Owner based on companyOwnerId
                    CompanyOwner result = apiInstance.getCompanyOwner(companyOwnerId);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling CompanyOwnerApi.getCompanyOwner: " + e.Message );
                }
            }
        }
    }

    <?php
    require_once(__DIR__ . '/vendor/autoload.php');

    $api_instance = new Swagger\Client\Api\CompanyOwnerApi();
    $companyOwnerId = 789; // Long | Company Owner's id

    try {
        $result = $api_instance->getCompanyOwner($companyOwnerId);
        print_r($result);
    } catch (Exception $e) {
        echo 'Exception when calling CompanyOwnerApi->getCompanyOwner: ', $e->getMessage(), PHP_EOL;
    }
    ?>

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::CompanyOwnerApi;

    my $api_instance = WWW::SwaggerClient::CompanyOwnerApi->new();
    my $companyOwnerId = 789; # Long | Company Owner's id

    eval {
        my $result = $api_instance->getCompanyOwner(companyOwnerId => $companyOwnerId);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling CompanyOwnerApi->getCompanyOwner: $@\n";
    }

    from __future__ import print_statement
    import time
    import swagger_client
    from swagger_client.rest import ApiException
    from pprint import pprint

    # create an instance of the API class
    api_instance = swagger_client.CompanyOwnerApi()
    companyOwnerId = 789 # Long | Company Owner's id

    try:
        # Gets Company Owner based on companyOwnerId
        api_response = api_instance.get_company_owner(companyOwnerId)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CompanyOwnerApi->getCompanyOwner: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
companyOwnerId* | Long (int64) Company Owner's id Required

## Responses

### Status: 200 - The company owner

### Status: 404 - Requested Company Owner does not exist.

# getCompanyOwners

Gets all Company Owners

    /company-owners

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/company-owners"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.CompanyOwnerApi;

    import java.io.File;
    import java.util.*;

    public class CompanyOwnerApiExample {

        public static void main(String[] args) {

            CompanyOwnerApi apiInstance = new CompanyOwnerApi();
            try {
                array[CompanyOwner] result = apiInstance.getCompanyOwners();
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling CompanyOwnerApi#getCompanyOwners");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.CompanyOwnerApi;

    public class CompanyOwnerApiExample {

        public static void main(String[] args) {
            CompanyOwnerApi apiInstance = new CompanyOwnerApi();
            try {
                array[CompanyOwner] result = apiInstance.getCompanyOwners();
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling CompanyOwnerApi#getCompanyOwners");
                e.printStackTrace();
            }
        }
    }

    CompanyOwnerApi *apiInstance = [[CompanyOwnerApi alloc] init];

    // Gets all Company Owners
    [apiInstance getCompanyOwnersWithCompletionHandler:
                  ^(array[CompanyOwner] output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceCompanyOwnerRestApi = require('inventory_service___company_owner___rest_api');

    var api = new InventoryServiceCompanyOwnerRestApi.CompanyOwnerApi()

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getCompanyOwners(callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

    namespace Example
    {
        public class getCompanyOwnersExample
        {
            public void main()
            {

                var apiInstance = new CompanyOwnerApi();

                try
                {
                    // Gets all Company Owners
                    array[CompanyOwner] result = apiInstance.getCompanyOwners();
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling CompanyOwnerApi.getCompanyOwners: " + e.Message );
                }
            }
        }
    }

    <?php
    require_once(__DIR__ . '/vendor/autoload.php');

    $api_instance = new Swagger\Client\Api\CompanyOwnerApi();

    try {
        $result = $api_instance->getCompanyOwners();
        print_r($result);
    } catch (Exception $e) {
        echo 'Exception when calling CompanyOwnerApi->getCompanyOwners: ', $e->getMessage(), PHP_EOL;
    }
    ?>

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::CompanyOwnerApi;

    my $api_instance = WWW::SwaggerClient::CompanyOwnerApi->new();

    eval {
        my $result = $api_instance->getCompanyOwners();
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling CompanyOwnerApi->getCompanyOwners: $@\n";
    }

    from __future__ import print_statement
    import time
    import swagger_client
    from swagger_client.rest import ApiException
    from pprint import pprint

    # create an instance of the API class
    api_instance = swagger_client.CompanyOwnerApi()

    try:
        # Gets all Company Owners
        api_response = api_instance.get_company_owners()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CompanyOwnerApi->getCompanyOwners: %s\n" % e)

## Parameters

## Responses

### Status: 200 - All Company Owners

# updateCompanyOwner

Updates Company Owner based on companyOwnerId

    /company-owners/{companyOwnerId}

### Usage and SDK Samples

    curl -X PUT "https://localhost/inventory-service/api/v1/company-owners/{companyOwnerId}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.CompanyOwnerApi;

    import java.io.File;
    import java.util.*;

    public class CompanyOwnerApiExample {

        public static void main(String[] args) {

            CompanyOwnerApi apiInstance = new CompanyOwnerApi();
            Long companyOwnerId = 789; // Long | Company Owner's id
            CompanyOwner body = ; // CompanyOwner | DeviceInternal Type object that needs to be updated
            try {
                CompanyOwner result = apiInstance.updateCompanyOwner(companyOwnerId, body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling CompanyOwnerApi#updateCompanyOwner");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.CompanyOwnerApi;

    public class CompanyOwnerApiExample {

        public static void main(String[] args) {
            CompanyOwnerApi apiInstance = new CompanyOwnerApi();
            Long companyOwnerId = 789; // Long | Company Owner's id
            CompanyOwner body = ; // CompanyOwner | DeviceInternal Type object that needs to be updated
            try {
                CompanyOwner result = apiInstance.updateCompanyOwner(companyOwnerId, body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling CompanyOwnerApi#updateCompanyOwner");
                e.printStackTrace();
            }
        }
    }

    Long *companyOwnerId = 789; // Company Owner's id
    CompanyOwner *body = ; // DeviceInternal Type object that needs to be updated

    CompanyOwnerApi *apiInstance = [[CompanyOwnerApi alloc] init];

    // Updates Company Owner based on companyOwnerId
    [apiInstance updateCompanyOwnerWith:companyOwnerId
        body:body
                  completionHandler: ^(CompanyOwner output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceCompanyOwnerRestApi = require('inventory_service___company_owner___rest_api');

    var api = new InventoryServiceCompanyOwnerRestApi.CompanyOwnerApi()

    var companyOwnerId = 789; // {Long} Company Owner's id

    var body = ; // {CompanyOwner} DeviceInternal Type object that needs to be updated

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.updateCompanyOwner(companyOwnerId, body, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

    namespace Example
    {
        public class updateCompanyOwnerExample
        {
            public void main()
            {

                var apiInstance = new CompanyOwnerApi();
                var companyOwnerId = 789;  // Long | Company Owner's id
                var body = new CompanyOwner(); // CompanyOwner | DeviceInternal Type object that needs to be updated

                try
                {
                    // Updates Company Owner based on companyOwnerId
                    CompanyOwner result = apiInstance.updateCompanyOwner(companyOwnerId, body);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling CompanyOwnerApi.updateCompanyOwner: " + e.Message );
                }
            }
        }
    }

    <?php
    require_once(__DIR__ . '/vendor/autoload.php');

    $api_instance = new Swagger\Client\Api\CompanyOwnerApi();
    $companyOwnerId = 789; // Long | Company Owner's id
    $body = ; // CompanyOwner | DeviceInternal Type object that needs to be updated

    try {
        $result = $api_instance->updateCompanyOwner($companyOwnerId, $body);
        print_r($result);
    } catch (Exception $e) {
        echo 'Exception when calling CompanyOwnerApi->updateCompanyOwner: ', $e->getMessage(), PHP_EOL;
    }
    ?>

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::CompanyOwnerApi;

    my $api_instance = WWW::SwaggerClient::CompanyOwnerApi->new();
    my $companyOwnerId = 789; # Long | Company Owner's id
    my $body = WWW::SwaggerClient::Object::CompanyOwner->new(); # CompanyOwner | DeviceInternal Type object that needs to be updated

    eval {
        my $result = $api_instance->updateCompanyOwner(companyOwnerId => $companyOwnerId, body => $body);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling CompanyOwnerApi->updateCompanyOwner: $@\n";
    }

    from __future__ import print_statement
    import time
    import swagger_client
    from swagger_client.rest import ApiException
    from pprint import pprint

    # create an instance of the API class
    api_instance = swagger_client.CompanyOwnerApi()
    companyOwnerId = 789 # Long | Company Owner's id
    body =  # CompanyOwner | DeviceInternal Type object that needs to be updated

    try:
        # Updates Company Owner based on companyOwnerId
        api_response = api_instance.update_company_owner(companyOwnerId, body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CompanyOwnerApi->updateCompanyOwner: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
companyOwnerId* | Long (int64) Company Owner's id Required

Body parameters

Name | Description
--- | ---
body * |

## Responses

### Status: 200 - The Company Owner

### Status: 404 - Requested Company Owner does not exist.

# DeviceInternal

# deleteCompanyOwner

Deletes an company owner

    /company-owners/{companyOwnerId}

### Usage and SDK Samples

    curl -X DELETE "https://localhost/inventory-service/api/v1/company-owners/{companyOwnerId}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.DeviceInternalApi;

    import java.io.File;
    import java.util.*;

    public class DeviceInternalApiExample {

        public static void main(String[] args) {

            DeviceInternalApi apiInstance = new DeviceInternalApi();
            Long companyOwnerId = 789; // Long | Company Owner's id
            try {
                apiInstance.deleteCompanyOwner(companyOwnerId);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceInternalApi#deleteCompanyOwner");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.DeviceInternalApi;

    public class DeviceInternalApiExample {

        public static void main(String[] args) {
            DeviceInternalApi apiInstance = new DeviceInternalApi();
            Long companyOwnerId = 789; // Long | Company Owner's id
            try {
                apiInstance.deleteCompanyOwner(companyOwnerId);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceInternalApi#deleteCompanyOwner");
                e.printStackTrace();
            }
        }
    }

    Long *companyOwnerId = 789; // Company Owner's id

    DeviceInternalApi *apiInstance = [[DeviceInternalApi alloc] init];

    // Deletes an company owner
    [apiInstance deleteCompanyOwnerWith:companyOwnerId
                  completionHandler: ^(NSError* error) {
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceCompanyOwnerRestApi = require('inventory_service___company_owner___rest_api');

    var api = new InventoryServiceCompanyOwnerRestApi.DeviceInternalApi()

    var companyOwnerId = 789; // {Long} Company Owner's id

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully.');
      }
    };
    api.deleteCompanyOwner(companyOwnerId, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

    namespace Example
    {
        public class deleteCompanyOwnerExample
        {
            public void main()
            {

                var apiInstance = new DeviceInternalApi();
                var companyOwnerId = 789;  // Long | Company Owner's id

                try
                {
                    // Deletes an company owner
                    apiInstance.deleteCompanyOwner(companyOwnerId);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling DeviceInternalApi.deleteCompanyOwner: " + e.Message );
                }
            }
        }
    }

    <?php
    require_once(__DIR__ . '/vendor/autoload.php');

    $api_instance = new Swagger\Client\Api\DeviceInternalApi();
    $companyOwnerId = 789; // Long | Company Owner's id

    try {
        $api_instance->deleteCompanyOwner($companyOwnerId);
    } catch (Exception $e) {
        echo 'Exception when calling DeviceInternalApi->deleteCompanyOwner: ', $e->getMessage(), PHP_EOL;
    }
    ?>

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::DeviceInternalApi;

    my $api_instance = WWW::SwaggerClient::DeviceInternalApi->new();
    my $companyOwnerId = 789; # Long | Company Owner's id

    eval {
        $api_instance->deleteCompanyOwner(companyOwnerId => $companyOwnerId);
    };
    if ($@) {
        warn "Exception when calling DeviceInternalApi->deleteCompanyOwner: $@\n";
    }

    from __future__ import print_statement
    import time
    import swagger_client
    from swagger_client.rest import ApiException
    from pprint import pprint

    # create an instance of the API class
    api_instance = swagger_client.DeviceInternalApi()
    companyOwnerId = 789 # Long | Company Owner's id

    try:
        # Deletes an company owner
        api_instance.delete_company_owner(companyOwnerId)
    except ApiException as e:
        print("Exception when calling DeviceInternalApi->deleteCompanyOwner: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
companyOwnerId* | Long (int64) Company Owner's id Required

## Responses

### Status: 200 - Company Owner was deleted.

### Status: 404 - Specified Company Owner does not exist.

Generated 2018-12-11T17:24:00.026+01:00