# Inventory Service - Electric revision - REST API

## API and SDK Documentation

Version: 1.0.0

REST API for Inventory Service

# ElectricRevision

# getElectricRevision

Gets Electric revision based on revisionId

    /electric-revisions/{revisionId}

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/electric-revisions/{revisionId}"

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

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

    public class ElectricRevisionApiExample {

        public static void main(String[] args) {

            ElectricRevisionApi apiInstance = new ElectricRevisionApi();
            Long revisionId = 789; // Long | Electric revision's id
            try {
                DeviceRevision result = apiInstance.getElectricRevision(revisionId);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ElectricRevisionApi#getElectricRevision");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.ElectricRevisionApi;

    public class ElectricRevisionApiExample {

        public static void main(String[] args) {
            ElectricRevisionApi apiInstance = new ElectricRevisionApi();
            Long revisionId = 789; // Long | Electric revision's id
            try {
                DeviceRevision result = apiInstance.getElectricRevision(revisionId);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ElectricRevisionApi#getElectricRevision");
                e.printStackTrace();
            }
        }
    }

    Long *revisionId = 789; // Electric revision's id

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

    // Gets Electric revision based on revisionId
    [apiInstance getElectricRevisionWith:revisionId
                  completionHandler: ^(DeviceRevision output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceElectricRevisionRestApi = require('inventory_service___electric_revision___rest_api');

    var api = new InventoryServiceElectricRevisionRestApi.ElectricRevisionApi()

    var revisionId = 789; // {Long} Electric revision's id

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

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

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

                var apiInstance = new ElectricRevisionApi();
                var revisionId = 789;  // Long | Electric revision's id

                try
                {
                    // Gets Electric revision based on revisionId
                    DeviceRevision result = apiInstance.getElectricRevision(revisionId);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling ElectricRevisionApi.getElectricRevision: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\ElectricRevisionApi();
    $revisionId = 789; // Long | Electric revision's id

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

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

    my $api_instance = WWW::SwaggerClient::ElectricRevisionApi->new();
    my $revisionId = 789; # Long | Electric revision's id

    eval {
        my $result = $api_instance->getElectricRevision(revisionId => $revisionId);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling ElectricRevisionApi->getElectricRevision: $@\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.ElectricRevisionApi()
    revisionId = 789 # Long | Electric revision's id

    try:
        # Gets Electric revision based on revisionId
        api_response = api_instance.get_electric_revision(revisionId)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ElectricRevisionApi->getElectricRevision: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
revisionId* | Long (int64) Electric revision's id Required

## Responses

### Status: 200 - The Electric revision

### Status: 404 - Requested Electric revision does not exist.

# updateElectricRevision

Updates an Electric revision based on revisionId

    /electric-revisions/{revisionId}

### Usage and SDK Samples

    curl -X PUT "https://localhost/inventory-service/api/v1/electric-revisions/{revisionId}"

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

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

    public class ElectricRevisionApiExample {

        public static void main(String[] args) {

            ElectricRevisionApi apiInstance = new ElectricRevisionApi();
            Long revisionId = 789; // Long | Electric Revision id to update
            DeviceRevision body = ; // DeviceRevision | Electric revision object that needs to be updated
            try {
                DeviceRevision result = apiInstance.updateElectricRevision(revisionId, body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ElectricRevisionApi#updateElectricRevision");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.ElectricRevisionApi;

    public class ElectricRevisionApiExample {

        public static void main(String[] args) {
            ElectricRevisionApi apiInstance = new ElectricRevisionApi();
            Long revisionId = 789; // Long | Electric Revision id to update
            DeviceRevision body = ; // DeviceRevision | Electric revision object that needs to be updated
            try {
                DeviceRevision result = apiInstance.updateElectricRevision(revisionId, body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ElectricRevisionApi#updateElectricRevision");
                e.printStackTrace();
            }
        }
    }

    Long *revisionId = 789; // Electric Revision id to update
    DeviceRevision *body = ; // Electric revision object that needs to be updated

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

    // Updates an Electric revision based on revisionId
    [apiInstance updateElectricRevisionWith:revisionId
        body:body
                  completionHandler: ^(DeviceRevision output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceElectricRevisionRestApi = require('inventory_service___electric_revision___rest_api');

    var api = new InventoryServiceElectricRevisionRestApi.ElectricRevisionApi()

    var revisionId = 789; // {Long} Electric Revision id to update

    var body = ; // {DeviceRevision} Electric revision 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.updateElectricRevision(revisionId, body, callback);

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

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

                var apiInstance = new ElectricRevisionApi();
                var revisionId = 789;  // Long | Electric Revision id to update
                var body = new DeviceRevision(); // DeviceRevision | Electric revision object that needs to be updated

                try
                {
                    // Updates an Electric revision based on revisionId
                    DeviceRevision result = apiInstance.updateElectricRevision(revisionId, body);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling ElectricRevisionApi.updateElectricRevision: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\ElectricRevisionApi();
    $revisionId = 789; // Long | Electric Revision id to update
    $body = ; // DeviceRevision | Electric revision object that needs to be updated

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

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

    my $api_instance = WWW::SwaggerClient::ElectricRevisionApi->new();
    my $revisionId = 789; # Long | Electric Revision id to update
    my $body = WWW::SwaggerClient::Object::DeviceRevision->new(); # DeviceRevision | Electric revision object that needs to be updated

    eval {
        my $result = $api_instance->updateElectricRevision(revisionId => $revisionId, body => $body);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling ElectricRevisionApi->updateElectricRevision: $@\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.ElectricRevisionApi()
    revisionId = 789 # Long | Electric Revision id to update
    body =  # DeviceRevision | Electric revision object that needs to be updated

    try:
        # Updates an Electric revision based on revisionId
        api_response = api_instance.update_electric_revision(revisionId, body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ElectricRevisionApi->updateElectricRevision: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
revisionId* | Long (int64) Electric Revision id to update Required

Body parameters

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

## Responses

### Status: 200 - Updated Electric revision

### Status: 404 - Specified Electric revision does not exist.

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