Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Latest commit

 

History

History
105 lines (82 loc) · 3.23 KB

OrganizationsApi.md

File metadata and controls

105 lines (82 loc) · 3.23 KB

Org.OpenAPITools.Api.OrganizationsApi

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

Method HTTP request Description
UpdateOrganization PUT /organizations Update an existing Organization

UpdateOrganization

Organization UpdateOrganization (OrganizationInput organizationInput)

Update an existing Organization

Update an existing organization

Example

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

namespace Example
{
    public class UpdateOrganizationExample
    {
        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 OrganizationsApi(config);
            var organizationInput = new OrganizationInput(); // OrganizationInput | Update an existing organization

            try
            {
                // Update an existing Organization
                Organization result = apiInstance.UpdateOrganization(organizationInput);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling OrganizationsApi.UpdateOrganization: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the UpdateOrganizationWithHttpInfo variant

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

try
{
    // Update an existing Organization
    ApiResponse<Organization> response = apiInstance.UpdateOrganizationWithHttpInfo(organizationInput);
    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 OrganizationsApi.UpdateOrganizationWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
organizationInput OrganizationInput Update an existing organization

Return type

Organization

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]