Skip to content

Latest commit

 

History

History
284 lines (191 loc) · 7.06 KB

ProductsApi.md

File metadata and controls

284 lines (191 loc) · 7.06 KB

OpenAPI\Client\ProductsApi

All URIs are relative to https://api.wall.et, except if the operation defines another base path.

Method HTTP request Description
archiveProduct() DELETE /v2/products/{id} Archive product
createProduct() POST /v2/products Create product
fetchAllProducts() GET /v2/products/all Fetch all products
restoreProduct() PATCH /v2/products/{id} Restore product
updateProduct() PUT /v2/products/{id} Update product

archiveProduct()

archiveProduct($id): \OpenAPI\Client\Model\Product

Archive product

Example

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



$apiInstance = new OpenAPI\Client\Api\ProductsApi(
    // 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()
);
$id = NULL; // mixed

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

Parameters

Name Type Description Notes
id mixed

Return type

\OpenAPI\Client\Model\Product

Authorization

No authorization required

HTTP request headers

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

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

createProduct()

createProduct($wt_product_create_params): \OpenAPI\Client\Model\Product

Create product

Example

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



$apiInstance = new OpenAPI\Client\Api\ProductsApi(
    // 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()
);
$wt_product_create_params = new \OpenAPI\Client\Model\WTProductCreateParams(); // \OpenAPI\Client\Model\WTProductCreateParams

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

Parameters

Name Type Description Notes
wt_product_create_params \OpenAPI\Client\Model\WTProductCreateParams

Return type

\OpenAPI\Client\Model\Product

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

fetchAllProducts()

fetchAllProducts($is_archive_included): mixed

Fetch all products

Example

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



$apiInstance = new OpenAPI\Client\Api\ProductsApi(
    // 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()
);
$is_archive_included = True; // bool

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

Parameters

Name Type Description Notes
is_archive_included bool [optional]

Return type

mixed

Authorization

No authorization required

HTTP request headers

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

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

restoreProduct()

restoreProduct($id): \OpenAPI\Client\Model\Product

Restore product

Example

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



$apiInstance = new OpenAPI\Client\Api\ProductsApi(
    // 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()
);
$id = NULL; // mixed

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

Parameters

Name Type Description Notes
id mixed

Return type

\OpenAPI\Client\Model\Product

Authorization

No authorization required

HTTP request headers

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

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

updateProduct()

updateProduct($id, $wt_product_update_params): \OpenAPI\Client\Model\Product

Update product

Example

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



$apiInstance = new OpenAPI\Client\Api\ProductsApi(
    // 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()
);
$id = NULL; // mixed
$wt_product_update_params = new \OpenAPI\Client\Model\WTProductUpdateParams(); // \OpenAPI\Client\Model\WTProductUpdateParams

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

Parameters

Name Type Description Notes
id mixed
wt_product_update_params \OpenAPI\Client\Model\WTProductUpdateParams

Return type

\OpenAPI\Client\Model\Product

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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