Skip to content

Latest commit

 

History

History
130 lines (85 loc) · 3.63 KB

UtilsApi.md

File metadata and controls

130 lines (85 loc) · 3.63 KB

OpenAPI\Client\UtilsApi

All URIs are relative to https://api.thesmsworks.co.uk/v1, except if the operation defines another base path.

Method HTTP request Description
utilsErrorsErrorcodeGet() GET /utils/errors/{errorcode}
utilsTestGet() GET /utils/test

utilsErrorsErrorcodeGet()

utilsErrorsErrorcodeGet($errorcode): \OpenAPI\Client\Model\ExtendedErrorModel

Returns a sample error object for the given error code. Useful for designing code to react to errors when they occur for real.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: JWT
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\UtilsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$errorcode = 'errorcode_example'; // string | The code of the error you would like returned

try {
    $result = $apiInstance->utilsErrorsErrorcodeGet($errorcode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UtilsApi->utilsErrorsErrorcodeGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
errorcode string The code of the error you would like returned

Return type

\OpenAPI\Client\Model\ExtendedErrorModel

Authorization

JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=UTF-8

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

utilsTestGet()

utilsTestGet(): \OpenAPI\Client\Model\TestResponse

Returns the customer ID to the caller

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: JWT
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\UtilsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->utilsTestGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UtilsApi->utilsTestGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\OpenAPI\Client\Model\TestResponse

Authorization

JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=UTF-8

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