Skip to content

Latest commit

 

History

History
597 lines (474 loc) · 17.1 KB

AddOnsApi.md

File metadata and controls

597 lines (474 loc) · 17.1 KB

Org.OpenAPITools.Api.AddOnsApi

All URIs are relative to https://api.getlago.com/api/v1

Method HTTP request Description
ApplyAddOn POST /applied_add_ons Apply an add-on to a customer
CreateAddOn POST /add_ons Create a new add-on
DestroyAddOn DELETE /add_ons/{code} Delete an add-on
FindAddOn GET /add_ons/{code} Find add-on by code
FindAllAddOns GET /add_ons Find add-ons
UpdateAddOn PUT /add_ons/{code} Update an existing add-on

ApplyAddOn

AppliedAddOn ApplyAddOn (AppliedAddOnInput appliedAddOnInput)

Apply an add-on to a customer

Apply an add-on to a customer

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class ApplyAddOnExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.getlago.com/api/v1";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new AddOnsApi(config);
            var appliedAddOnInput = new AppliedAddOnInput(); // AppliedAddOnInput | Apply add-on payload

            try
            {
                // Apply an add-on to a customer
                AppliedAddOn result = apiInstance.ApplyAddOn(appliedAddOnInput);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AddOnsApi.ApplyAddOn: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the ApplyAddOnWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Apply an add-on to a customer
    ApiResponse<AppliedAddOn> response = apiInstance.ApplyAddOnWithHttpInfo(appliedAddOnInput);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling AddOnsApi.ApplyAddOnWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
appliedAddOnInput AppliedAddOnInput Apply add-on payload

Return type

AppliedAddOn

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad Request error -
401 Unauthorized error -
404 Not Found error -
422 Unprocessable entity error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateAddOn

AddOn CreateAddOn (AddOnInput addOnInput)

Create a new add-on

Create a new add-on

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CreateAddOnExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.getlago.com/api/v1";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new AddOnsApi(config);
            var addOnInput = new AddOnInput(); // AddOnInput | Add-on payload

            try
            {
                // Create a new add-on
                AddOn result = apiInstance.CreateAddOn(addOnInput);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AddOnsApi.CreateAddOn: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CreateAddOnWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Create a new add-on
    ApiResponse<AddOn> response = apiInstance.CreateAddOnWithHttpInfo(addOnInput);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling AddOnsApi.CreateAddOnWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
addOnInput AddOnInput Add-on payload

Return type

AddOn

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad Request error -
401 Unauthorized error -
422 Unprocessable entity error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DestroyAddOn

AddOn DestroyAddOn (string code)

Delete an add-on

Delete an add-on

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class DestroyAddOnExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.getlago.com/api/v1";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new AddOnsApi(config);
            var code = example_code;  // string | Code of the existing add-on

            try
            {
                // Delete an add-on
                AddOn result = apiInstance.DestroyAddOn(code);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AddOnsApi.DestroyAddOn: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the DestroyAddOnWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Delete an add-on
    ApiResponse<AddOn> response = apiInstance.DestroyAddOnWithHttpInfo(code);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling AddOnsApi.DestroyAddOnWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
code string Code of the existing add-on

Return type

AddOn

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
401 Unauthorized error -
404 Not Found error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindAddOn

AddOn FindAddOn (string code)

Find add-on by code

Return a single add-on

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class FindAddOnExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.getlago.com/api/v1";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new AddOnsApi(config);
            var code = example_code;  // string | Code of the existing add-on

            try
            {
                // Find add-on by code
                AddOn result = apiInstance.FindAddOn(code);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AddOnsApi.FindAddOn: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the FindAddOnWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Find add-on by code
    ApiResponse<AddOn> response = apiInstance.FindAddOnWithHttpInfo(code);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling AddOnsApi.FindAddOnWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
code string Code of the existing add-on

Return type

AddOn

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
401 Unauthorized error -
404 Not Found error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindAllAddOns

AddOnsPaginated FindAllAddOns (int? page = null, int? perPage = null)

Find add-ons

Find all add-ons in certain organisation

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class FindAllAddOnsExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.getlago.com/api/v1";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new AddOnsApi(config);
            var page = 2;  // int? | Number of page (optional) 
            var perPage = 20;  // int? | Number of records per page (optional) 

            try
            {
                // Find add-ons
                AddOnsPaginated result = apiInstance.FindAllAddOns(page, perPage);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AddOnsApi.FindAllAddOns: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the FindAllAddOnsWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Find add-ons
    ApiResponse<AddOnsPaginated> response = apiInstance.FindAllAddOnsWithHttpInfo(page, perPage);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling AddOnsApi.FindAllAddOnsWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
page int? Number of page [optional]
perPage int? Number of records per page [optional]

Return type

AddOnsPaginated

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
401 Unauthorized error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateAddOn

AddOn UpdateAddOn (string code, AddOnInput addOnInput)

Update an existing add-on

Update an existing add-on by code

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class UpdateAddOnExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.getlago.com/api/v1";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new AddOnsApi(config);
            var code = example_code;  // string | Code of the existing add-on
            var addOnInput = new AddOnInput(); // AddOnInput | Update an existing add-on

            try
            {
                // Update an existing add-on
                AddOn result = apiInstance.UpdateAddOn(code, addOnInput);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AddOnsApi.UpdateAddOn: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the UpdateAddOnWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Update an existing add-on
    ApiResponse<AddOn> response = apiInstance.UpdateAddOnWithHttpInfo(code, addOnInput);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling AddOnsApi.UpdateAddOnWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
code string Code of the existing add-on
addOnInput AddOnInput Update an existing add-on

Return type

AddOn

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad Request error -
401 Unauthorized error -
404 Not Found error -
422 Unprocessable entity error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]