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($id)
Delete warranty
This can only be done by the logged in warranty.
<?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;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The id of the warranty that needs to be deleted |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getWarrantyById($id): \OpenAPI\Client\Model\Warranty
Get warranty by id
Some description of the operation. You can use Markdown
here.
<?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;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The id that needs to be fetched |
\OpenAPI\Client\Model\Warranty
- 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($id, $warranty)
Updated warranty
This can only be done by the logged in user.
<?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;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The id that needs to be updated | |
warranty | \OpenAPI\Client\Model\Warranty | Updated reuturn object |
void (empty response body)
- Content-Type:
application/json
,application/xml
- Accept:
application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]