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

Latest commit

 

History

History
391 lines (308 loc) · 11.2 KB

EventsApi.md

File metadata and controls

391 lines (308 loc) · 11.2 KB

Org.OpenAPITools.Api.EventsApi

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

CreateBatchEvents

void CreateBatchEvents (BatchEventInput batchEventInput)

Create batch events

Create batch events

Example

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);
            }
        }
    }
}

Using the CreateBatchEventsWithHttpInfo variant

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);
}

Parameters

Name Type Description Notes
batchEventInput BatchEventInput Batch events payload

Return type

void (empty response body)

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]

CreateEvent

void CreateEvent (EventInput eventInput)

Create a new event

Create a new event

Example

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);
            }
        }
    }
}

Using the CreateEventWithHttpInfo variant

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);
}

Parameters

Name Type Description Notes
eventInput EventInput Event payload

Return type

void (empty response body)

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]

EventEstimateFees

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

Example

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);
            }
        }
    }
}

Using the EventEstimateFeesWithHttpInfo variant

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);
}

Parameters

Name Type Description Notes
eventEstimateFeesInput EventEstimateFeesInput Event payload for pay in advance fee estimate

Return type

Fees

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]

FindEvent

Event FindEvent (string id)

Find event by transaction ID

Return a single event

Example

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);
            }
        }
    }
}

Using the FindEventWithHttpInfo variant

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);
}

Parameters

Name Type Description Notes
id string Id of the existing transaction

Return type

Event

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]