Skip to content

Latest commit

 

History

History
141 lines (106 loc) · 4.9 KB

ProductTypeApi.md

File metadata and controls

141 lines (106 loc) · 4.9 KB

ProductTypeApi

All URIs are relative to https://api.eu-west-2.outscale.com/api/v1

Method HTTP request Description
createProductType POST /CreateProductType
readProductTypes POST /ReadProductTypes

createProductType

CreateProductTypeResponse createProductType(createProductTypeRequest)

Example

// Import classes:
import io.github.outscale.osc_sdk_java.client.ApiClient;
import io.github.outscale.osc_sdk_java.client.ApiException;
import io.github.outscale.osc_sdk_java.client.Configuration;
import io.github.outscale.osc_sdk_java.client.auth.*;
import io.github.outscale.osc_sdk_java.client.models.*;
import io.github.outscale.osc_sdk_java.client.api.ProductTypeApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1");
    // Configure AWS Signature V4 authorization
    defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE")
    
    // Configure API key authorization: ApiKeyAuth
    ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    ApiKeyAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuth.setApiKeyPrefix("Token");

    ProductTypeApi apiInstance = new ProductTypeApi(defaultClient);
    CreateProductTypeRequest createProductTypeRequest = new CreateProductTypeRequest(); // CreateProductTypeRequest | 
    try {
      CreateProductTypeResponse result = apiInstance.createProductType(createProductTypeRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ProductTypeApi#createProductType");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
createProductTypeRequest CreateProductTypeRequest [optional]

Return type

CreateProductTypeResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The HTTP 200 response (OK). -

readProductTypes

ReadProductTypesResponse readProductTypes(readProductTypesRequest)

Example

// Import classes:
import io.github.outscale.osc_sdk_java.client.ApiClient;
import io.github.outscale.osc_sdk_java.client.ApiException;
import io.github.outscale.osc_sdk_java.client.Configuration;
import io.github.outscale.osc_sdk_java.client.models.*;
import io.github.outscale.osc_sdk_java.client.api.ProductTypeApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1");
    // Configure AWS Signature V4 authorization
    defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE")

    ProductTypeApi apiInstance = new ProductTypeApi(defaultClient);
    ReadProductTypesRequest readProductTypesRequest = new ReadProductTypesRequest(); // ReadProductTypesRequest | 
    try {
      ReadProductTypesResponse result = apiInstance.readProductTypes(readProductTypesRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ProductTypeApi#readProductTypes");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
readProductTypesRequest ReadProductTypesRequest [optional]

Return type

ReadProductTypesResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The HTTP 200 response (OK). -