Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var FiddlerProxy = require('mozu-node-sdk/plugins/fiddler-proxy');
- var apiContext = require('mozu-node-sdk/clients/platform/application')();
- apiContext.plugins = [FiddlerProxy];
- var locationResource = require('mozu-node-sdk/clients/commerce/admin/location')(apiContext);
- var location =
- {
- "code": "retailops1",
- "locationTypes": [{ "code": "warehouse", "name": "Warehouse" }],
- "fulfillmentTypes": [{ "code": "DS", "name": "Direct Ship", "shippingRequired": true }],
- "shippingOriginContact":
- {
- "firstName": "",
- "middleNameOrInitial": "",
- "lastNameOrSurname": "",
- "companyOrOrganization": "My Company",
- "phoneNumber": "(555) 555-5555",
- "email": "fake@email.com"
- },
- "isDisabled": false,
- "name": "Retailops Default Location",
- "description": "",
- "address":
- {
- "address1": "123 Example Ave",
- "address2": "",
- "address3": "",
- "address4": "",
- "cityOrTown": "San Diego",
- "stateOrProvince": "CA",
- "countryCode": "US",
- "postalOrZipCode": "80301",
- "addressType": "Commercial",
- "addressIsValidated": false
- },
- "geo": { "lat": null, "lng": null },
- "phone": "",
- "fax": "",
- "note": "",
- "supportsInventory": false,
- "allowFulfillmentWithNoStock": false,
- "tags": [],
- "regularHours": { "sunday": { "label": "" }, "monday": { "label": "" }, "tuesday": { "label": "" }, "wednesday": { "label": "" }, "thursday": { "label": "" }, "friday": { "label": "" }, "saturday": { "label": "" } }
- }
- locationResource.addLocation(location)
- .then(log)
- .catch(reportError);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement