This file contains 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
{ | |
"success": true, | |
"total": 1, | |
"items": [ | |
{ | |
"priceListCode": "100", | |
"productCode": "pc00001", | |
"productName": "test product", | |
"currencyCode": "USD", | |
"startDate": "2017-12-13T03:13:00.000Z", |
This file contains 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
/** | |
* Implementation for embedded.commerce.payments.action.before | |
* This custom function will receive the following context object: | |
{ | |
"exec": { | |
"setActionAmount": { | |
"parameters": [ | |
{ | |
"name": "amount", |
This file contains 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 CreateOrderNote(ApiContext apiContext, string orderNumber) | |
{ | |
var orderResource = new OrderResource(apiContext); | |
var orderNoteResource = new OrderNoteResource(apiContext); | |
var existingOrder = orderResource.GetOrdersAsync(filter: String.Format("OrderNumber eq '{0}'", Convert.ToInt32(orderNumber))) | |
.Result | |
.Items | |
.FirstOrDefault(); |
This file contains 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 ImportOrder() | |
{ | |
//create an instance of the order resource | |
var orderResource = new Mozu.Api.Resources.Commerce.OrderResource(_apiContext); | |
//map the order | |
var order = MapOrder(); | |
//call create order method |
This file contains 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
{ | |
"id": "", | |
"name": "10 Percent Off - 5700380", | |
"friendlyDescription": "Save 10 percent off on this fancy nest Camera", | |
"doesNotApplyToSalePrice": false, | |
"doesNotApplyToProductsWithSalePrice": false, | |
"scope": "LineItem", | |
"target": "Product", | |
"includeAllProducts": false, | |
"excludeItemsWithExistingProductDiscounts": false, |
This file contains 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 OrderItemResource = require('mozu-node-sdk/clients/commerce/orders/orderItem'); | |
var OrderResource = require('mozu-node-sdk/clients/commerce/order'); | |
module.exports = function (context, callback) { | |
var orderResource = new OrderResource(context.apiContext); | |
orderResource.context['user-claims'] = null; | |
var orderItemResource = new OrderItemResource(context.apiContext); | |
orderItemResource.context['user-claims'] = null; |
This file contains 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
using System; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Mozu.Api; | |
using Autofac; | |
using Mozu.Api.ToolKit.Config; | |
namespace Mozu_BED_Training_Exercise_8 | |
{ | |
[TestClass] | |
public class MozuDataConnectorTests |
This file contains 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 Fulfill_Order_Pickups() | |
{ | |
var orderResource = new Mozu.Api.Resources.Commerce.OrderResource(_apiContext); | |
var pickupResource = new Mozu.Api.Resources.Commerce.Orders.PickupResource(_apiContext); | |
var fulfillmentInfoResource = new Mozu.Api.Resources.Commerce.Orders.FulfillmentInfoResource(_apiContext); | |
var fulfillmentActionResource = new Mozu.Api.Resources.Commerce.Orders.FulfillmentActionResource(_apiContext); |
This file contains 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 Create_Order_Package_And_Fulfill() | |
{ | |
var orderResource = new Mozu.Api.Resources.Commerce.OrderResource(_apiContext); | |
var packageResource = new Mozu.Api.Resources.Commerce.Orders.PackageResource(_apiContext); | |
var shipmentResource = new Mozu.Api.Resources.Commerce.Orders.ShipmentResource(_apiContext); | |
var fulfillmentInfoResource = new Mozu.Api.Resources.Commerce.Orders.FulfillmentInfoResource(_apiContext); | |
var fulfillmentActionResource = new Mozu.Api.Resources.Commerce.Orders.FulfillmentActionResource(_apiContext); | |
var filter = string.Format("OrderNumber eq '{0}'", "34"); |
This file contains 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_Customer_RecomputeLifeTimeBalance() | |
{ | |
//create instance of customer account resource | |
var accountResource = new Mozu.Api.Resources.Commerce.Customer | |
.CustomerAccountResource(_apiContext); | |
var existingAcct = accountResource.GetAccountsAsync(filter: "EmailAddress eq 'jakelantern@mozu.com'") | |
.Result | |
.Items | |
.First(); |
NewerOlder