order2cb 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b2ba2dc987349db4e810a7df3dca489e462aa67
4
- data.tar.gz: eabf6bd85bdb41a8f7e76634d4473dbba3ced0fc
3
+ metadata.gz: da361702d2ba4663b746b986131410c4caea266a
4
+ data.tar.gz: 25948e79baa4ddbda39aedbd07e0b3cef6722084
5
5
  SHA512:
6
- metadata.gz: cf54bde6618cc6846f52494aa4242fcf4689a883e59095bd8779e98b2642b7c6401167dbb78fb72f723f12ebfc63597a8d71beb811a162e75d68783adf0a1639
7
- data.tar.gz: db7f5148ff9482a3f336308d7716db2bf0644a88304b20aedf6016088f38ee02b23fcaa70d710763a2e02f39408c9c3525c0ec40a3dcd95e13ab08e5fab129f6
6
+ metadata.gz: a4e0eba75bf05422092e0971860decd9aa2e5dd052c6acf43a1737483caac58a364dd1da0616b7bf041fecae1db7f14bca544a589fb6a04451510af070e780ee
7
+ data.tar.gz: f83a7aafaa92195d92e9378931af965b458e35e1a2d88d1aa9c6c96b99b396f83ea74ef281034fcad3942c0b8ca487916d8bcd0f1ff7e83405fc0e97b35371c9
@@ -26,7 +26,7 @@ module Order2cb
26
26
  end
27
27
 
28
28
  def high_risk?
29
- @data["risk_score"] >= 22 || @data["worldpay_risk_score"] >= 40
29
+ (@data["risk_score"] && @data["risk_score"] >= 22) || (@data["worldpay_risk_score"] && @data["worldpay_risk_score"] >= 40)
30
30
  end
31
31
 
32
32
  def customer
@@ -1,3 +1,3 @@
1
1
  module Order2cb
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/order2cb.rb CHANGED
@@ -90,7 +90,7 @@ module Order2cb
90
90
 
91
91
  end
92
92
 
93
- def orders_to_process(start_time = DateTime.parse(6.hours.ago.to_s))
93
+ def orders_to_process(start_time = DateTime.parse(2.hours.ago.to_s))
94
94
  results = $db_client.query("SELECT * from exp_spree_orders where completed_at > '#{start_time}';")
95
95
  @logger.debug "Found #{results.count} completed orders in the last #{time_ago_in_words(start_time)} to be processed"
96
96
  results
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: order2cb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - EmergeAdapt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-15 00:00:00.000000000 Z
11
+ date: 2015-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler