File tree 2 files changed +32
-0
lines changed
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 {
315
315
additionalHeaders
316
316
)
317
317
}
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
+ }
318
343
}
319
344
320
345
class ShopperCatalogEndpoint extends ShopperCatalogQuery {
Original file line number Diff line number Diff line change @@ -167,6 +167,13 @@ export interface ShopperCatalogProductsEndpoint
167
167
token ?: string
168
168
additionalHeaders ?: ShopperCatalogAdditionalHeaders
169
169
} ) : Promise < ShopperCatalogResourcePage < ProductResponse > >
170
+
171
+ GetRelatedProducts ( options : {
172
+ productId : string
173
+ customRelationshipSlug : string
174
+ token ?: string
175
+ additionalHeaders ?: ShopperCatalogAdditionalHeaders
176
+ } ) : Promise < ShopperCatalogResourcePage < ProductResponse > >
170
177
}
171
178
172
179
export interface NodesShopperCatalogEndpoint
You can’t perform that action at this time.
0 commit comments