This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Update_Product_Property() | |
{ | |
dynamic predefinedProduct = new System.Dynamic.ExpandoObject(); | |
predefinedProduct.ProductCode = "MANDO-HUD"; | |
predefinedProduct.Attribute = "tenant~availability"; | |
predefinedProduct.PropertyValue = "Usually Ships in 2 to 4 Weeks"; | |
var productResource = new Mozu.Api.Resources.Commerce.Catalog.Admin.ProductResource(_apiContext); | |
var productAttributeResource = new Mozu.Api.Resources.Commerce.Catalog.Admin.Attributedefinition.AttributeResource(_apiContext); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var FiddlerProxy = require('mozu-node-sdk/plugins/fiddler-proxy'); | |
var apiContext = require('mozu-node-sdk/clients/platform/application')(); | |
apiContext.plugins = [FiddlerProxy]; | |
var entityListResource = require('mozu-node-sdk/clients/platform/entityList')(apiContext); | |
var entityContainerResource = require('mozu-node-sdk/clients/platform/entitylists/entityContainer')(apiContext); | |
//When you add a nameSpace here, it needs to match the adding application's nameSpace | |
//A namespace is taken from your developer account, and it is the first value in your application key (e.g. Grobelny.New_Application.1.0.0.Release) | |
var entityList = { | |
"contextLevel": "site", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var customerResource = new Mozu.Api.Resources.Commerce.Customer.CustomerAccountResource(_apiContext); | |
//This will only set the field "isPasswordChangeRequired" on the customer's loginState to true. | |
customerResource.SetPasswordChangeRequiredAsync(true, 1002).Wait(); | |
var resetInfo = new Mozu.Api.Contracts.Customer.ResetPasswordInfo() | |
{ | |
EmailAddress = "[email protected]", | |
UserName = "[email protected]" | |
}; | |
customerResource.ResetPasswordAsync(resetInfo).Wait(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var shippingSettings = { | |
"carrierIds": [ | |
"custom", | |
"ups", | |
"usps", | |
"fedex" | |
], | |
"destinationAddress": { | |
"countryCode": "US", | |
"postalOrZipCode": "78759" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var productStorefrontResource = new Mozu.Api.Resources.Commerce.Catalog.Storefront.ProductResource(_apiContext); | |
var product = productStorefrontResource.GetProductAsync("MANDO-ARMOR-1").Result; | |
var productOptions = new Mozu.Api.Contracts.ProductRuntime.ProductOptionSelections() | |
{ | |
Options = new List<Mozu.Api.Contracts.ProductRuntime.ProductOptionSelection>() | |
{ | |
new Mozu.Api.Contracts.ProductRuntime.ProductOptionSelection() | |
{ | |
AttributeFQN = "tenant~size", | |
Value = "L" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Additional headers not present in the Mozu Node SDK constants.js. | |
//These headers are present on some Mozu Event Request objects, but are used mainly for metadata purposes. | |
module.exports = { | |
TENANTDOMAIN: 'tenant-domain', | |
LOCALE: 'locale', | |
CURRENCY: 'currency', | |
CORRELATION: 'correlation' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
var_dump(file_exists("Contracts/AppDev/AppAuthInfo.php")); | |
require_once('../vendor/autoload.php'); | |
use Mozu\Api\Contracts\AppDev\AppAuthInfo; | |
use Mozu\Api\MozuConfig; | |
use Mozu\Api\ApiContext; | |
use Mozu\Api\DataViewMode; | |
use Mozu\Api\Security\AppAuthenticator; | |
use Mozu\Api\Resources\Platform\TenantResource; | |
use Mozu\Api\Resources\Commerce\Catalog\Admin\Products\ProductVariationResource; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var productVariantResource = new Mozu.Api.Resources.Commerce.Catalog.Admin.Products.ProductVariationResource(_apiContext); | |
var productResource = new Mozu.Api.Resources.Commerce.Catalog.Admin.ProductResource(_apiContext); | |
var productCollectionsTaskList = new List<Task<Mozu.Api.Contracts.ProductAdmin.ProductCollection>>(); | |
var productVariantsCollection = new Dictionary<String, List<Tuple<String, Mozu.Api.Contracts.ProductAdmin.ProductVariation>>>(); | |
var baseProducts = new List<Mozu.Api.Contracts.ProductAdmin.Product>(); | |
var startIndex = 0; | |
var pageSize = 200; | |
var initialProductCollection = productResource.GetProductsAsync(pageSize: pageSize, startIndex: 0).Result; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
var_dump(file_exists("Contracts/AppDev/AppAuthInfo.php")); | |
require_once('../vendor/autoload.php'); | |
use Mozu\Api\Contracts\AppDev\AppAuthInfo; | |
use Mozu\Api\MozuConfig; | |
use Mozu\Api\ApiContext; |