I have been using the CatalogApi SearchCatalogObjectsAsync in the API explorer and it returns my product as expected.
If I add the generate code in my project it does return the products but not the same way as the API.
var objectTypes = new List<string>();
objectTypes.Add("ITEM");
var body = new SearchCatalogObjectsRequest.Builder()
.ObjectTypes(objectTypes)
.IncludeRelatedObjects(true)
.Limit(10)
.IncludeCategoryPathToRoot(false)
.Build();
var catalogResponse = await _squareClient.CatalogApi.SearchCatalogObjectsAsync(body: body);
While I can see things like “ecom_image_uris” and image data information in the API explorer in my code they all come back null. Things like “ImageData” is always null.
I am trying to load 20 products per page and display the product name, image and price.
Using .NET core with the official nugget package.
What am I missing?