@ns8/ns8-shopify-switches
Advanced tools
Comparing version 1.0.73 to 1.0.74
@@ -90,2 +90,13 @@ "use strict"; | ||
const { id, name, currency, billing_address, shipping_address, customer, total_price, line_items = [], created_at, client_details: { accept_language, browser_ip, user_agent, }, } = shopifyOrder; | ||
const addresses = []; | ||
if (billing_address) { | ||
addresses.push(mapAddress(billing_address, 'BILLING')); | ||
} | ||
if (shipping_address) { | ||
addresses.push(mapAddress(shipping_address, 'SHIPPING')); | ||
} | ||
let protectCustomer; | ||
if (customer) { | ||
protectCustomer = mapCustomer(customer); | ||
} | ||
return new ns8_protect_models_1.Order({ | ||
@@ -95,8 +106,5 @@ name, | ||
shopId, | ||
addresses, | ||
platformId: id.toString(), | ||
addresses: [ | ||
mapAddress(billing_address, 'BILLING'), | ||
mapAddress(shipping_address, 'SHIPPING'), | ||
], | ||
customer: mapCustomer(customer), | ||
customer: protectCustomer, | ||
platformCreatedAt: new Date(created_at), | ||
@@ -103,0 +111,0 @@ totalPrice: parseFloat(total_price), |
{ | ||
"name": "@ns8/ns8-shopify-switches", | ||
"version": "1.0.73", | ||
"version": "1.0.74", | ||
"description": "Custom switches for the shopify integration", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36271
461