Skip to content

Latest commit

 

History

History
195 lines (131 loc) · 5.43 KB

WarrantyApi.md

File metadata and controls

195 lines (131 loc) · 5.43 KB

OpenAPI\Client\WarrantyApi

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

Method HTTP request Description
deleteWarranty() DELETE /warranties/{id} Delete warranty
getWarrantyById() GET /warranties/{id} Get warranty by id
updateWarranty() PUT /warranties/{id} Updated warranty

deleteWarranty()

deleteWarranty($id)

Delete warranty

This can only be done by the logged in warranty.

Example

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


// Configure OAuth2 access token for authorization: main_auth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\WarrantyApi(
    // 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
);
$id = 'id_example'; // string | The id of the warranty that needs to be deleted

try {
    $apiInstance->deleteWarranty($id);
} catch (Exception $e) {
    echo 'Exception when calling WarrantyApi->deleteWarranty: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string The id of the warranty that needs to be deleted

Return type

void (empty response body)

Authorization

main_auth

HTTP request headers

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

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

getWarrantyById()

getWarrantyById($id): \OpenAPI\Client\Model\Warranty

Get warranty by id

Some description of the operation. You can use Markdown here.

Example

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


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

// Configure OAuth2 access token for authorization: main_auth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\WarrantyApi(
    // 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
);
$id = 'id_example'; // string | The id that needs to be fetched

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

Parameters

Name Type Description Notes
id string The id that needs to be fetched

Return type

\OpenAPI\Client\Model\Warranty

Authorization

api_key, main_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

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

updateWarranty()

updateWarranty($id, $warranty)

Updated warranty

This can only be done by the logged in user.

Example

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


// Configure OAuth2 access token for authorization: main_auth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\WarrantyApi(
    // 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
);
$id = 'id_example'; // string | The id that needs to be updated
$warranty = new \OpenAPI\Client\Model\Warranty(); // \OpenAPI\Client\Model\Warranty | Updated reuturn object

try {
    $apiInstance->updateWarranty($id, $warranty);
} catch (Exception $e) {
    echo 'Exception when calling WarrantyApi->updateWarranty: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string The id that needs to be updated
warranty \OpenAPI\Client\Model\Warranty Updated reuturn object

Return type

void (empty response body)

Authorization

main_auth

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/problem+json

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