Skip to content

Latest commit

 

History

History
690 lines (561 loc) · 20.5 KB

File metadata and controls

690 lines (561 loc) · 20.5 KB

WalletInc.Api.SystemApi

All URIs are relative to https://api.wall.et

Method HTTP request Description
CreateRole POST /v2/system/roles Create role
DeleteRole DELETE /v2/system/roles/{roleID} Delete role
FetchAuditLogOfRoles GET /v2/system/roles/auditLog Get role's audit log
FetchEmployeesWithRole GET /v2/system/roles/employees/{roleID} Get employees with role
FetchWebpagesForRole GET /v2/system/roles/webpages/{roleID} Get webpages for role
LoadRole GET /v2/system/roles/{roleID} Get role
SaveRole PUT /v2/system/roles/{roleID} Update role

CreateRole

Role CreateRole (WTSystemRoleCreate wTSystemRoleCreate)

Create role

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WalletInc.Api;
using WalletInc.Client;
using WalletInc.Model;

namespace Example
{
    public class CreateRoleExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.wall.et";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new SystemApi(httpClient, config, httpClientHandler);
            var wTSystemRoleCreate = new WTSystemRoleCreate(); // WTSystemRoleCreate | 

            try
            {
                // Create role
                Role result = apiInstance.CreateRole(wTSystemRoleCreate);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling SystemApi.CreateRole: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CreateRoleWithHttpInfo variant

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

try
{
    // Create role
    ApiResponse<Role> response = apiInstance.CreateRoleWithHttpInfo(wTSystemRoleCreate);
    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 SystemApi.CreateRoleWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
wTSystemRoleCreate WTSystemRoleCreate

Return type

Role

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

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

DeleteRole

bool DeleteRole (string roleID)

Delete role

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WalletInc.Api;
using WalletInc.Client;
using WalletInc.Model;

namespace Example
{
    public class DeleteRoleExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.wall.et";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new SystemApi(httpClient, config, httpClientHandler);
            var roleID = "roleID_example";  // string | 

            try
            {
                // Delete role
                bool result = apiInstance.DeleteRole(roleID);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling SystemApi.DeleteRole: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the DeleteRoleWithHttpInfo variant

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

try
{
    // Delete role
    ApiResponse<bool> response = apiInstance.DeleteRoleWithHttpInfo(roleID);
    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 SystemApi.DeleteRoleWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
roleID string

Return type

bool

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

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

FetchAuditLogOfRoles

List<RoleAuditLog> FetchAuditLogOfRoles (DateTime startDateTime, DateTime endDateTime)

Get role's audit log

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WalletInc.Api;
using WalletInc.Client;
using WalletInc.Model;

namespace Example
{
    public class FetchAuditLogOfRolesExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.wall.et";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new SystemApi(httpClient, config, httpClientHandler);
            var startDateTime = DateTime.Parse("2013-10-20T19:20:30+01:00");  // DateTime | 
            var endDateTime = DateTime.Parse("2013-10-20T19:20:30+01:00");  // DateTime | 

            try
            {
                // Get role's audit log
                List<RoleAuditLog> result = apiInstance.FetchAuditLogOfRoles(startDateTime, endDateTime);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling SystemApi.FetchAuditLogOfRoles: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the FetchAuditLogOfRolesWithHttpInfo variant

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

try
{
    // Get role's audit log
    ApiResponse<List<RoleAuditLog>> response = apiInstance.FetchAuditLogOfRolesWithHttpInfo(startDateTime, endDateTime);
    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 SystemApi.FetchAuditLogOfRolesWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
startDateTime DateTime
endDateTime DateTime

Return type

List<RoleAuditLog>

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

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

FetchEmployeesWithRole

List<Employee> FetchEmployeesWithRole (string roleID)

Get employees with role

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WalletInc.Api;
using WalletInc.Client;
using WalletInc.Model;

namespace Example
{
    public class FetchEmployeesWithRoleExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.wall.et";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new SystemApi(httpClient, config, httpClientHandler);
            var roleID = "roleID_example";  // string | 

            try
            {
                // Get employees with role
                List<Employee> result = apiInstance.FetchEmployeesWithRole(roleID);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling SystemApi.FetchEmployeesWithRole: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the FetchEmployeesWithRoleWithHttpInfo variant

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

try
{
    // Get employees with role
    ApiResponse<List<Employee>> response = apiInstance.FetchEmployeesWithRoleWithHttpInfo(roleID);
    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 SystemApi.FetchEmployeesWithRoleWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
roleID string

Return type

List<Employee>

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

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

FetchWebpagesForRole

List<Webpage> FetchWebpagesForRole (string roleID)

Get webpages for role

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WalletInc.Api;
using WalletInc.Client;
using WalletInc.Model;

namespace Example
{
    public class FetchWebpagesForRoleExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.wall.et";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new SystemApi(httpClient, config, httpClientHandler);
            var roleID = "roleID_example";  // string | 

            try
            {
                // Get webpages for role
                List<Webpage> result = apiInstance.FetchWebpagesForRole(roleID);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling SystemApi.FetchWebpagesForRole: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the FetchWebpagesForRoleWithHttpInfo variant

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

try
{
    // Get webpages for role
    ApiResponse<List<Webpage>> response = apiInstance.FetchWebpagesForRoleWithHttpInfo(roleID);
    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 SystemApi.FetchWebpagesForRoleWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
roleID string

Return type

List<Webpage>

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

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

LoadRole

WTRole LoadRole (string roleID)

Get role

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WalletInc.Api;
using WalletInc.Client;
using WalletInc.Model;

namespace Example
{
    public class LoadRoleExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.wall.et";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new SystemApi(httpClient, config, httpClientHandler);
            var roleID = "roleID_example";  // string | 

            try
            {
                // Get role
                WTRole result = apiInstance.LoadRole(roleID);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling SystemApi.LoadRole: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the LoadRoleWithHttpInfo variant

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

try
{
    // Get role
    ApiResponse<WTRole> response = apiInstance.LoadRoleWithHttpInfo(roleID);
    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 SystemApi.LoadRoleWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
roleID string

Return type

WTRole

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

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

SaveRole

Role SaveRole (string roleID, WTSystemRoleCreate wTSystemRoleCreate)

Update role

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WalletInc.Api;
using WalletInc.Client;
using WalletInc.Model;

namespace Example
{
    public class SaveRoleExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.wall.et";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new SystemApi(httpClient, config, httpClientHandler);
            var roleID = "roleID_example";  // string | 
            var wTSystemRoleCreate = new WTSystemRoleCreate(); // WTSystemRoleCreate | 

            try
            {
                // Update role
                Role result = apiInstance.SaveRole(roleID, wTSystemRoleCreate);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling SystemApi.SaveRole: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the SaveRoleWithHttpInfo variant

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

try
{
    // Update role
    ApiResponse<Role> response = apiInstance.SaveRoleWithHttpInfo(roleID, wTSystemRoleCreate);
    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 SystemApi.SaveRoleWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
roleID string
wTSystemRoleCreate WTSystemRoleCreate

Return type

Role

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

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