@ns8/ns8-shopify-switches
Advanced tools
Comparing version 1.0.165 to 1.0.166
@@ -5,7 +5,7 @@ "use strict"; | ||
const getShopifyClient_1 = require("./getShopifyClient"); | ||
const mapCustomer = (customer) => { | ||
const { id, first_name = '', last_name = '', email = 'apps@ns8.com', phone, total_spent, created_at, default_address, } = customer; | ||
const mapCustomer = (customer, billingAddress) => { | ||
const { id, first_name = '', last_name = '', email, total_spent, created_at, default_address, } = customer; | ||
return new ns8_protect_models_1.Customer({ | ||
email, | ||
phone, | ||
phone: customer.phone || billingAddress.phone, | ||
platformId: id.toString(), | ||
@@ -225,3 +225,3 @@ firstName: first_name || default_address.first_name, | ||
if (customer) { | ||
protectCustomer = mapCustomer(customer); | ||
protectCustomer = mapCustomer(customer, billing_address); | ||
} | ||
@@ -228,0 +228,0 @@ return new ns8_protect_models_1.Order({ |
{ | ||
"name": "@ns8/ns8-shopify-switches", | ||
"version": "1.0.165", | ||
"version": "1.0.166", | ||
"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
78808