Client Extensions

IProductsResourceClient extensions

  • GetProductsBatch builds on top of ProductResourceClient.GetProducts by combining batch requests when productIds has more than the limit allowed by OCAPI (24 items).
Task<PoqResponse<TProductResult>> GetProductsBatch<TProductResult>(SfccAuthInfo authInfo, IList<string> productIds, string? currency, string? locale, bool? allImages, string? expand = null, IList<string>? inventoryIds = null)

Usage:

var result = await _productResourceClient.GetProductsBatch<SfccProductResult>(new SfccAuthInfo(), productIds, "GBP", "en", null);