Skip to content

Instantly share code, notes, and snippets.

@Mozu-CS
Created January 14, 2016 21:06
Show Gist options
  • Save Mozu-CS/0ce3308ec7326ab252ed to your computer and use it in GitHub Desktop.
Save Mozu-CS/0ce3308ec7326ab252ed to your computer and use it in GitHub Desktop.
Change ApiContext values to access different master catalogs in the same tenant.
[TestMethod]
public void Get_Product_From_Another_Master_Catalog()
{
_apiContext.SiteId = null;
_apiContext.MasterCatalogId = 2;
var productResourceMC2 = new Mozu.Api.Resources.Commerce.Catalog.Admin.ProductResource(_apiContext);
var productInMC2 = productResourceMC2.GetProductAsync("MAND-ARM-001").Result;
_apiContext.MasterCatalogId = 1;
var productResourceMC1 = new Mozu.Api.Resources.Commerce.Catalog.Admin.ProductResource(_apiContext);
var productInMC1 = productResourceMC1.GetProductAsync("MAND-ARM-001").Result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment