Skip to content

Latest commit

 

History

History
215 lines (156 loc) · 6.39 KB

ProductApi.md

File metadata and controls

215 lines (156 loc) · 6.39 KB

Membercare\Client\ProductApi

All URIs are relative to /

Method HTTP request Description
getProduct GET /api/v1/products/{id} Get all Products
getProductGroups GET /api/v1/products/groups Get all ProductGroups
getProducts GET /api/v1/products Get all Products
getProductsByProductGroup GET /api/v1/products/group/{productGroupId}/products Get all Products

getProduct

\Membercare\Client\Model\Product getProduct($id, $token)

Get all Products

Example

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

$apiInstance = new Membercare\Client\Api\ProductApi(
    // 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 = 789; // int | 
$token = "token_example"; // string | access token

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

Parameters

Name Type Description Notes
id int
token string access token

Return type

\Membercare\Client\Model\Product

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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

getProductGroups

\Membercare\Client\Model\ProductGroup[] getProductGroups($token, $page, $page_size)

Get all ProductGroups

Example

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

$apiInstance = new Membercare\Client\Api\ProductApi(
    // 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()
);
$token = "token_example"; // string | access token
$page = 1; // int | 
$page_size = 50; // int | 

try {
    $result = $apiInstance->getProductGroups($token, $page, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductApi->getProductGroups: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
token string access token
page int [optional] [default to 1]
page_size int [optional] [default to 50]

Return type

\Membercare\Client\Model\ProductGroup[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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

getProducts

\Membercare\Client\Model\ProductPagedResult getProducts($token, $page, $page_size)

Get all Products

Example

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

$apiInstance = new Membercare\Client\Api\ProductApi(
    // 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()
);
$token = "token_example"; // string | access token
$page = 1; // int | 
$page_size = 50; // int | 

try {
    $result = $apiInstance->getProducts($token, $page, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductApi->getProducts: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
token string access token
page int [optional] [default to 1]
page_size int [optional] [default to 50]

Return type

\Membercare\Client\Model\ProductPagedResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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

getProductsByProductGroup

\Membercare\Client\Model\ProductPagedResult getProductsByProductGroup($product_group_id, $token, $page, $page_size)

Get all Products

Example

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

$apiInstance = new Membercare\Client\Api\ProductApi(
    // 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()
);
$product_group_id = 56; // int | 
$token = "token_example"; // string | access token
$page = 1; // int | 
$page_size = 50; // int | 

try {
    $result = $apiInstance->getProductsByProductGroup($product_group_id, $token, $page, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductApi->getProductsByProductGroup: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
product_group_id int
token string access token
page int [optional] [default to 1]
page_size int [optional] [default to 50]

Return type

\Membercare\Client\Model\ProductPagedResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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