File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,31 @@ class Products extends ShopperCatalogProductsQuery {
315315 additionalHeaders
316316 )
317317 }
318+
319+ GetRelatedProducts ( {
320+ productId,
321+ customRelationshipSlug,
322+ token = null ,
323+ additionalHeaders = null
324+ } ) {
325+ const { limit, offset, filter, includes } = this
326+
327+ return this . request . send (
328+ buildURL ( `catalog/${ this . endpoint } /${ productId } /relationships/${ customRelationshipSlug } /products` , {
329+ limit,
330+ offset,
331+ filter,
332+ includes
333+ } ) ,
334+ 'GET' ,
335+ undefined ,
336+ token ,
337+ undefined ,
338+ false ,
339+ undefined ,
340+ additionalHeaders
341+ )
342+ }
318343}
319344
320345class ShopperCatalogEndpoint extends ShopperCatalogQuery {
Original file line number Diff line number Diff line change @@ -167,6 +167,13 @@ export interface ShopperCatalogProductsEndpoint
167167 token ?: string
168168 additionalHeaders ?: ShopperCatalogAdditionalHeaders
169169 } ) : Promise < ShopperCatalogResourcePage < ProductResponse > >
170+
171+ GetRelatedProducts ( options : {
172+ productId : string
173+ customRelationshipSlug : string
174+ token ?: string
175+ additionalHeaders ?: ShopperCatalogAdditionalHeaders
176+ } ) : Promise < ShopperCatalogResourcePage < ProductResponse > >
170177}
171178
172179export interface NodesShopperCatalogEndpoint
You can’t perform that action at this time.
0 commit comments