All URIs are relative to https://api.getlago.com/api/v1
Method | HTTP request | Description |
---|---|---|
CreateBatchEvents | POST /events/batch | Create batch events |
CreateEvent | POST /events | Create a new event |
EventEstimateFees | POST /events/estimate_fees | Estimate fees for an pay in advance charge |
FindEvent | GET /events/{id} | Find event by transaction ID |
void CreateBatchEvents (BatchEventInput batchEventInput)
Create batch events
Create batch events
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreateBatchEventsExample
{
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 EventsApi(config);
var batchEventInput = new BatchEventInput(); // BatchEventInput | Batch events payload
try
{
// Create batch events
apiInstance.CreateBatchEvents(batchEventInput);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventsApi.CreateBatchEvents: " + 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 batch events
apiInstance.CreateBatchEventsWithHttpInfo(batchEventInput);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventsApi.CreateBatchEventsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
batchEventInput | BatchEventInput | Batch events payload |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
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]
void CreateEvent (EventInput eventInput)
Create a new event
Create a new event
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreateEventExample
{
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 EventsApi(config);
var eventInput = new EventInput(); // EventInput | Event payload
try
{
// Create a new event
apiInstance.CreateEvent(eventInput);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventsApi.CreateEvent: " + 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 event
apiInstance.CreateEventWithHttpInfo(eventInput);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventsApi.CreateEventWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
eventInput | EventInput | Event payload |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
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]
Fees EventEstimateFees (EventEstimateFeesInput eventEstimateFeesInput)
Estimate fees for an pay in advance charge
Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance charges
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class EventEstimateFeesExample
{
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 EventsApi(config);
var eventEstimateFeesInput = new EventEstimateFeesInput(); // EventEstimateFeesInput | Event payload for pay in advance fee estimate
try
{
// Estimate fees for an pay in advance charge
Fees result = apiInstance.EventEstimateFees(eventEstimateFeesInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventsApi.EventEstimateFees: " + 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
{
// Estimate fees for an pay in advance charge
ApiResponse<Fees> response = apiInstance.EventEstimateFeesWithHttpInfo(eventEstimateFeesInput);
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 EventsApi.EventEstimateFeesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
eventEstimateFeesInput | EventEstimateFeesInput | Event payload for pay in advance fee estimate |
- 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]
Event FindEvent (string id)
Find event by transaction ID
Return a single event
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class FindEventExample
{
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 EventsApi(config);
var id = 12345; // string | Id of the existing transaction
try
{
// Find event by transaction ID
Event result = apiInstance.FindEvent(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventsApi.FindEvent: " + 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 event by transaction ID
ApiResponse<Event> response = apiInstance.FindEventWithHttpInfo(id);
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 EventsApi.FindEventWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Id of the existing transaction |
- 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]