Socket
Socket
Sign inDemoInstall

@ns8/ns8-shopify-switches

Package Overview
Dependencies
78
Maintainers
13
Versions
195
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.153 to 1.0.154

46

dist/ShopifyCreateOrderActionSwitch.js

@@ -147,24 +147,34 @@ "use strict";

let session;
if (client_details && Object.keys(client_details).length) {
if (test && (!client_details || Object.keys(client_details).length === 0)) {
session = makeTestSession();
}
else if (client_details && Object.keys(client_details).length > 0) {
session = mapSession(client_details);
}
else if (test) {
session = makeTestSession();
if (session) {
return new ns8_protect_models_1.Order({
name,
currency,
merchantId,
addresses,
session,
platformId: id.toString(),
customer: protectCustomer,
platformCreatedAt: new Date(created_at),
totalPrice: parseFloat(total_price),
transactions: mapTransactions(shopifyTransactionList),
lineItems: mapLineItems(line_items),
hasGiftCard: hasGiftCard(line_items),
platformStatus: 'Active',
});
}
return new ns8_protect_models_1.Order({
name,
currency,
merchantId,
addresses,
session,
platformId: id.toString(),
customer: protectCustomer,
platformCreatedAt: new Date(created_at),
totalPrice: parseFloat(total_price),
transactions: mapTransactions(shopifyTransactionList),
lineItems: mapLineItems(line_items),
hasGiftCard: hasGiftCard(line_items),
platformStatus: 'Active',
});
console.log('This order cannot be created due to lack of session data.' +
`Domain: ${switchContext.merchant.domain} ` +
`Shopify Order ID: ${order_id}`);
}
else {
console.log('Order transaction not qualified to create a new order. ' +
`Domain: ${switchContext.merchant.domain} ` +
`Shopify Order ID: ${order_id}`);
}
}

@@ -171,0 +181,0 @@ }

{
"name": "@ns8/ns8-shopify-switches",
"version": "1.0.153",
"version": "1.0.154",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc