ProductImagesApi extends ResourceApi
V3ApiBase
Add constructors and some basic scaffolding that will work for all API classes regardless of which endpoints they implement
Table of Contents
- IMAGE_ENDPOINT = 'catalog/products/%d/images/%d'
- IMAGES_ENDPOINT = 'catalog/products/%d/images'
- RESOURCE_NAME = 'images'
- __construct() : mixed
- create() : ProductImageResponse
- get() : ProductImageResponse
- getAll() : ProductImagesResponse
- getClient() : Client
- getParentResourceId() : int|null
- getResourceId() : int|null
Constants
IMAGE_ENDPOINT
public
mixed
IMAGE_ENDPOINT
= 'catalog/products/%d/images/%d'
IMAGES_ENDPOINT
public
mixed
IMAGES_ENDPOINT
= 'catalog/products/%d/images'
RESOURCE_NAME
public
mixed
RESOURCE_NAME
= 'images'
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
Return values
mixed —create()
public
create(ProductImage $productImage) : ProductImageResponse
Parameters
- $productImage : ProductImage
Return values
ProductImageResponse —get()
public
get() : ProductImageResponse
Return values
ProductImageResponse —getAll()
public
getAll([array<string|int, mixed> $filters = [] ][, int $page = 1 ][, int $limit = 250 ]) : ProductImagesResponse
Parameters
- $filters : array<string|int, mixed> = []
- $page : int = 1
- $limit : int = 250
Return values
ProductImagesResponse —getClient()
public
getClient() : Client
Return values
Client —getParentResourceId()
public
getParentResourceId() : int|null
Return values
int|null —getResourceId()
public
getResourceId() : int|null