This file contains hidden or 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
[ | |
{ | |
"comment": "[BackOrder#276236] ", | |
"createdate": "2020-08-29T00:00:00", | |
"createtime": "2063-10-08T00:00:00", | |
"currencycode": "NZD", | |
"currencycomment": "", | |
"entrydate": "2021-01-19T00:00:00", | |
"freight": 0.0, | |
"hasreturn": false, |
This file contains hidden or 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
Output.shipping_rates = Input.shipping_rates.sort_by(&:price).reverse! |
This file contains hidden or 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
MINIMUM_ORDER_AMOUNT = 150 #dollars required in cart to get discount | |
MESSAGE = "Free shipping on all orders over $150" #promotional message | |
if Input.cart.subtotal_price_was >= (Money.new(cents:100) * MINIMUM_ORDER_AMOUNT) | |
Input.shipping_rates.each do |shipping_rate| | |
next unless shipping_rate.name == "Standard Shipping" | |
shipping_rate.apply_discount(shipping_rate.price, message: MESSAGE) | |
end | |
end |
This file contains hidden or 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
var csv = require('csv-array'); | |
csv.parseCSV("test.csv", function (data) { | |
var array = data; | |
for (let item of array) { | |
console.log(item.attribute) | |
} | |
}); |
This file contains hidden or 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
'use strict' | |
var timeout = function timeout(ms) { | |
return new Promise(function (res) { | |
return setTimeout(res, ms); | |
}); | |
}; | |
function convinceMe(convince) { | |
let unixTime = Math.round(+new Date() / 1000) |