OptionsApi
extends ResourceApi
in package
V3ApiBase
Add constructors and some basic scaffolding that will work for all API classes regardless of which endpoints they implement
Tags
Table of Contents
- OPTION_ENDPOINT = 'catalog/products/%d/options/%d'
- OPTIONS_ENDPOINT = 'catalog/products/%d/options'
- RESOURCE_NAME = 'options'
- __construct() : mixed
- create() : OptionResponse
- delete() : ResponseInterface
- get() : OptionResponse
- getAll() : OptionsResponse
- getClient() : Client
- getParentResourceId() : int|null
- getResourceId() : int|null
- multipleResourceUrl() : string
- singleResourceUrl() : string
- update() : OptionResponse
- value() : ProductOptionValuesApi
- values() : ProductOptionValuesApi
Constants
OPTION_ENDPOINT
public
mixed
OPTION_ENDPOINT
= 'catalog/products/%d/options/%d'
Tags
OPTIONS_ENDPOINT
public
mixed
OPTIONS_ENDPOINT
= 'catalog/products/%d/options'
Tags
RESOURCE_NAME
public
mixed
RESOURCE_NAME
= 'options'
Tags
Methods
__construct()
public
__construct(Client $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed
Parameters
- $client : Client
- $resourceId : int|null = null
- $parentResourceId : int|null = null
Tags
Return values
mixed —create()
public
create(ProductOption $option) : OptionResponse
Parameters
- $option : ProductOption
Tags
Return values
OptionResponse —delete()
public
delete() : ResponseInterface
Tags
Return values
ResponseInterface —get()
public
get() : OptionResponse
Tags
Return values
OptionResponse —getAll()
public
getAll([array<string|int, mixed> $filters = [] ][, int $page = 1 ][, int $limit = 250 ]) : OptionsResponse
Parameters
- $filters : array<string|int, mixed> = []
- $page : int = 1
- $limit : int = 250
Tags
Return values
OptionsResponse —getClient()
public
getClient() : Client
Tags
Return values
Client —getParentResourceId()
public
getParentResourceId() : int|null
Tags
Return values
int|null —getResourceId()
public
getResourceId() : int|null
Tags
Return values
int|null —multipleResourceUrl()
public
abstract multipleResourceUrl() : string
Tags
Return values
string —singleResourceUrl()
public
abstract singleResourceUrl() : string
Tags
Return values
string —update()
public
update(ProductOption $option) : OptionResponse
Parameters
- $option : ProductOption
Tags
Return values
OptionResponse —value()
public
value(int $valueId) : ProductOptionValuesApi
Parameters
- $valueId : int
Tags
Return values
ProductOptionValuesApi —values()
public
values() : ProductOptionValuesApi