Skip to content

Latest commit

 

History

History
295 lines (206 loc) · 9.97 KB

ShippingsApi.md

File metadata and controls

295 lines (206 loc) · 9.97 KB

Swagger\Client\ShippingsApi

All URIs are relative to https://api.facestore.pt/v1

Method HTTP request Description
addShipping POST /shippings
deleteShippingById DELETE /shippings/{id}/
getShippingById GET /shippings/{id}/
getShippings GET /shippings
updateShippingById PUT /shippings/{id}/

addShipping

\Swagger\Client\Model\InlineResponse2013 addShipping($shipping)

Creates a new shipping in the store.

Example

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

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

$apiInstance = new Swagger\Client\Api\ShippingsApi(
    // 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
);
$shipping = new \Swagger\Client\Model\Shipping(); // \Swagger\Client\Model\Shipping | Shipping to add to the store

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

Parameters

Name Type Description Notes
shipping \Swagger\Client\Model\Shipping Shipping to add to the store

Return type

\Swagger\Client\Model\InlineResponse2013

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

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

deleteShippingById

deleteShippingById($id)

deletes a single shipping based on the ID supplied

Example

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

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

$apiInstance = new Swagger\Client\Api\ShippingsApi(
    // 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 = 789; // int | ID of shipping to delete

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

Parameters

Name Type Description Notes
id int ID of shipping to delete

Return type

void (empty response body)

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

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

getShippingById

\Swagger\Client\Model\InlineResponse2013 getShippingById($id, $includes)

Returns a shipping based on a single ID

Example

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

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

$apiInstance = new Swagger\Client\Api\ShippingsApi(
    // 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 = 789; // int | ID of shipping to fetch
$includes = array("includes_example"); // string[] | Include associated objects within response

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

Parameters

Name Type Description Notes
id int ID of shipping to fetch
includes string[] Include associated objects within response [optional]

Return type

\Swagger\Client\Model\InlineResponse2013

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

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

getShippings

\Swagger\Client\Model\InlineResponse2005 getShippings($includes, $limit, $order_by)

Returns all shippings from the system that the user has access to

Example

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

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

$apiInstance = new Swagger\Client\Api\ShippingsApi(
    // 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
);
$includes = array("includes_example"); // string[] | Include associated objects within response
$limit = 56; // int | max records to return
$order_by = array("order_by_example"); // string[] | Specify the field to be sorted, examples:  - `?order_by=id|desc` - `?order_by=updated_at|desc,position|asc`

try {
    $result = $apiInstance->getShippings($includes, $limit, $order_by);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ShippingsApi->getShippings: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
includes string[] Include associated objects within response [optional]
limit int max records to return [optional]
order_by string[] Specify the field to be sorted, examples: - `?order_by=id desc` - `?order_by=updated_at

Return type

\Swagger\Client\Model\InlineResponse2005

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

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

updateShippingById

\Swagger\Client\Model\InlineResponse2013 updateShippingById($id, $tax)

update a single shipping based on the ID supplied

Example

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

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

$apiInstance = new Swagger\Client\Api\ShippingsApi(
    // 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 = 789; // int | ID of shipping to update
$tax = new \Swagger\Client\Model\Shipping(); // \Swagger\Client\Model\Shipping | Shipping to update in store

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

Parameters

Name Type Description Notes
id int ID of shipping to update
tax \Swagger\Client\Model\Shipping Shipping to update in store

Return type

\Swagger\Client\Model\InlineResponse2013

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

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