Created
December 10, 2015 21:42
-
-
Save allenmichael/1a49db18d3018ce08f91 to your computer and use it in GitHub Desktop.
Create a digital package
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 order = orderResource.GetOrderAsync(orderId).Result; | |
var digitalPackageResource = new Mozu.Api.Resources.Commerce.Orders.DigitalPackageResource(_apiContext); | |
var digitalPackageItem = new Mozu.Api.Contracts.CommerceRuntime.Fulfillment.DigitalPackageItem() | |
{ | |
ProductCode = order.Items[0].Product.ProductCode, | |
Quantity = order.Items[0].Quantity | |
}; | |
var digitalPackage = new Mozu.Api.Contracts.CommerceRuntime.Fulfillment.DigitalPackage() | |
{ | |
Items = new List<Mozu.Api.Contracts.CommerceRuntime.Fulfillment.DigitalPackageItem>() { digitalPackageItem }, | |
FulfillmentLocationCode = "Digital", | |
}; | |
var packageResult = digitalPackageResource.CreateDigitalPackageAsync(digitalPackage, order.Id).Result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment