All URIs are relative to https://api.stateset.com/v1, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
createReturn() | POST /returns | Create a new return |
deleteReturn() | DELETE /returns/{id} | Delete return |
getReturnById() | GET /returns/{id} | Get return by id |
getReturns() | GET /returns | Get returns |
updateReturn() | PUT /returns/{id} | Updated return |
createReturn($model_return)
Create a new return
Create a new return. This can only be done by the logged in return.
<?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\ReturnsApi(
// 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
);
$model_return = new \OpenAPI\Client\Model\ModelReturn(); // \OpenAPI\Client\Model\ModelReturn | Created return object
try {
$apiInstance->createReturn($model_return);
} catch (Exception $e) {
echo 'Exception when calling ReturnsApi->createReturn: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
model_return | \OpenAPI\Client\Model\ModelReturn | Created return 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]
deleteReturn($id)
Delete return
This can only be done by the logged in return.
<?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\ReturnsApi(
// 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 return that needs to be deleted
try {
$apiInstance->deleteReturn($id);
} catch (Exception $e) {
echo 'Exception when calling ReturnsApi->deleteReturn: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The id of the return 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]
getReturnById($id): \OpenAPI\Client\Model\ModelReturn
Get return by id
Get return by id with all details and items
<?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\ReturnsApi(
// 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->getReturnById($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReturnsApi->getReturnById: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The id that needs to be fetched |
\OpenAPI\Client\Model\ModelReturn
- Content-Type: Not defined
- Accept:
application/json
,application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getReturns($limit, $offset, $order_direction): \OpenAPI\Client\Model\ModelReturn
Get returns
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\ReturnsApi(
// 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
);
$limit = 3.4; // float | The number of items to return
$offset = 3.4; // float | Filter users without email
$order_direction = 'order_direction_example'; // string | Direction to return accounts
try {
$result = $apiInstance->getReturns($limit, $offset, $order_direction);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReturnsApi->getReturns: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
limit | float | The number of items to return | |
offset | float | Filter users without email | |
order_direction | string | Direction to return accounts |
\OpenAPI\Client\Model\ModelReturn
- Content-Type: Not defined
- Accept:
application/json
,application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateReturn($id, $model_return)
Updated return
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\ReturnsApi(
// 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
$model_return = new \OpenAPI\Client\Model\ModelReturn(); // \OpenAPI\Client\Model\ModelReturn | Updated reuturn object
try {
$apiInstance->updateReturn($id, $model_return);
} catch (Exception $e) {
echo 'Exception when calling ReturnsApi->updateReturn: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The id that needs to be updated | |
model_return | \OpenAPI\Client\Model\ModelReturn | 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]