All URIs are relative to https://api.getlago.com/api/v1
Method | HTTP request | Description |
---|---|---|
CreatePlan | POST /plans | Create a new plan |
DestroyPlan | DELETE /plans/{code} | Delete a plan |
FindAllPlans | GET /plans | Find plans |
FindPlan | GET /plans/{code} | Find plan by code |
UpdatePlan | PUT /plans/{code} | Update an existing plan |
Plan CreatePlan (PlanInput planInput)
Create a new plan
Create a new plan
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreatePlanExample
{
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 PlansApi(config);
var planInput = new PlanInput(); // PlanInput | Plan payload
try
{
// Create a new plan
Plan result = apiInstance.CreatePlan(planInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PlansApi.CreatePlan: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Create a new plan
ApiResponse<Plan> response = apiInstance.CreatePlanWithHttpInfo(planInput);
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 PlansApi.CreatePlanWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
planInput | PlanInput | Plan payload |
- Content-Type: application/json
- Accept: application/json
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]
Plan DestroyPlan (string code)
Delete a plan
Delete a plan
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DestroyPlanExample
{
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 PlansApi(config);
var code = example_code; // string | Code of the existing plan
try
{
// Delete a plan
Plan result = apiInstance.DestroyPlan(code);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PlansApi.DestroyPlan: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete a plan
ApiResponse<Plan> response = apiInstance.DestroyPlanWithHttpInfo(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 PlansApi.DestroyPlanWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | Code of the existing plan |
- Content-Type: Not defined
- Accept: application/json
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]
PlansPaginated FindAllPlans (int? page = null, int? perPage = null)
Find plans
Find all plans in certain organisation
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class FindAllPlansExample
{
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 PlansApi(config);
var page = 2; // int? | Number of page (optional)
var perPage = 20; // int? | Number of records per page (optional)
try
{
// Find plans
PlansPaginated result = apiInstance.FindAllPlans(page, perPage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PlansApi.FindAllPlans: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Find plans
ApiResponse<PlansPaginated> response = apiInstance.FindAllPlansWithHttpInfo(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 PlansApi.FindAllPlansWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
page | int? | Number of page | [optional] |
perPage | int? | Number of records per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
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]
Plan FindPlan (string code)
Find plan by code
Return a single plan
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class FindPlanExample
{
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 PlansApi(config);
var code = example_code; // string | Code of the existing plan
try
{
// Find plan by code
Plan result = apiInstance.FindPlan(code);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PlansApi.FindPlan: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Find plan by code
ApiResponse<Plan> response = apiInstance.FindPlanWithHttpInfo(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 PlansApi.FindPlanWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | Code of the existing plan |
- Content-Type: Not defined
- Accept: application/json
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]
Plan UpdatePlan (string code, PlanInput planInput)
Update an existing plan
Update an existing plan by code
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class UpdatePlanExample
{
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 PlansApi(config);
var code = example_code; // string | Code of the existing plan
var planInput = new PlanInput(); // PlanInput | Update an existing plan
try
{
// Update an existing plan
Plan result = apiInstance.UpdatePlan(code, planInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PlansApi.UpdatePlan: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Update an existing plan
ApiResponse<Plan> response = apiInstance.UpdatePlanWithHttpInfo(code, planInput);
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 PlansApi.UpdatePlanWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | Code of the existing plan | |
planInput | PlanInput | Update an existing plan |
- Content-Type: application/json
- Accept: application/json
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]