Created
October 21, 2020 02:56
-
-
Save jphungcode/77615d6e7b8ef34b0b51a20ef74497c6 to your computer and use it in GitHub Desktop.
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
const pfcEndpoint = "http://www.pfcexpress.com/webservice/v2/CreateShipment.aspx"; | |
let lineItems = []; | |
// creating an update line items array for the necessary object attributes for PFC | |
for (let i = 0; i <= data.line_items.length - 1; i++) { | |
let item = data.line_items[i]; | |
let temp_item = { | |
SKU: item.sku, | |
EnName: item.name, | |
CnName: "", | |
MaterialQuantity: item.quantity, | |
Weight: item.meta[0].weight, | |
Price: item.price, | |
ProducingArea: "China", | |
HSCode: "", | |
Length: item.meta[0].length, | |
Width: item.meta[0].width, | |
High: item.meta[0].high, | |
}; | |
lineItems.push(temp_item); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment