Skip to content

Latest commit

 

History

History
110 lines (87 loc) · 4.14 KB

ObjectPeriodApi.md

File metadata and controls

110 lines (87 loc) · 4.14 KB

eZmaxApi.Api.ObjectPeriodApi

All URIs are relative to https://prod.api.appcluster01.ca-central-1.ezmax.com/rest

Method HTTP request Description
PeriodGetAutocompleteV2 GET /2/object/period/getAutocomplete/{sSelector} Retrieve Periods and IDs

PeriodGetAutocompleteV2

PeriodGetAutocompleteV2Response PeriodGetAutocompleteV2 (string sSelector, string? eFilterActive = null, string? sQuery = null, HeaderAcceptLanguage? acceptLanguage = null)

Retrieve Periods and IDs

Get the list of Period to be used in a dropdown or autocomplete control.

Example

using System.Collections.Generic;
using System.Diagnostics;
using eZmaxApi.Api;
using eZmaxApi.Client;
using eZmaxApi.Model;

namespace Example
{
    public class PeriodGetAutocompleteV2Example
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://prod.api.appcluster01.ca-central-1.ezmax.com/rest";
            // Configure API key authorization: Authorization
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new ObjectPeriodApi(config);
            var sSelector = "ActiveNormal";  // string | The type of Periods to return
            var eFilterActive = "All";  // string? | Specify which results we want to display. (optional)  (default to Active)
            var sQuery = "sQuery_example";  // string? | Allow to filter the returned results (optional) 
            var acceptLanguage = new HeaderAcceptLanguage?(); // HeaderAcceptLanguage? |  (optional) 

            try
            {
                // Retrieve Periods and IDs
                PeriodGetAutocompleteV2Response result = apiInstance.PeriodGetAutocompleteV2(sSelector, eFilterActive, sQuery, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ObjectPeriodApi.PeriodGetAutocompleteV2: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the PeriodGetAutocompleteV2WithHttpInfo variant

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

try
{
    // Retrieve Periods and IDs
    ApiResponse<PeriodGetAutocompleteV2Response> response = apiInstance.PeriodGetAutocompleteV2WithHttpInfo(sSelector, eFilterActive, sQuery, acceptLanguage);
    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 ObjectPeriodApi.PeriodGetAutocompleteV2WithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
sSelector string The type of Periods to return
eFilterActive string? Specify which results we want to display. [optional] [default to Active]
sQuery string? Allow to filter the returned results [optional]
acceptLanguage HeaderAcceptLanguage? [optional]

Return type

PeriodGetAutocompleteV2Response

Authorization

Authorization

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -

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