Documentation

VariantsApi 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

RESOURCE_NAME  = 'variants'
VARIANT_ENDPOINT  = 'catalog/products/%d/variants/%d'
VARIANTS_ENDPOINT  = 'catalog/products/%d/variants'
__construct()  : mixed
create()  : ProductVariantResponse
delete()  : ResponseInterface
get()  : ProductVariantResponse
getAll()  : ProductVariantsResponse
getClient()  : Client
getParentResourceId()  : int|null
getResourceId()  : int|null
metafield()  : ProductVariantMetafieldsApi
metafields()  : ProductVariantMetafieldsApi
multipleResourceUrl()  : string
singleResourceUrl()  : string
update()  : ProductVariantResponse

Constants

RESOURCE_NAME

public mixed RESOURCE_NAME = 'variants'
Tags

VARIANT_ENDPOINT

public mixed VARIANT_ENDPOINT = 'catalog/products/%d/variants/%d'
Tags

VARIANTS_ENDPOINT

public mixed VARIANTS_ENDPOINT = 'catalog/products/%d/variants'
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 —

delete()

public delete() : ResponseInterface
Tags
Return values
ResponseInterface —

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 —

        

Search results