ts_orderchecker 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ts_orderchecker.rb +2 -0
- data/lib/ts_orderchecker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 820c2824facfbf6d5a8356befbb2644f21dd518b
|
4
|
+
data.tar.gz: 1414b6a73b0278a08c57eb3c91e8d12a3e510604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10d15dec71bc17571d744b516d2836f536e2abdb4274b567468c47aabd4cffd8964cec4e6fb96ed59bb2a1c7572d841e629cbd1f6a9b48833283a7b39cbdec2e
|
7
|
+
data.tar.gz: c2eb9a811c49bb6d762f510772d0a4a56eefa38840db4fdf8fbd35080f63d6ca7e89b0122c20025092d1ab55e28b903ac3405739d1ac3035646d00d25ad7bed7
|
data/lib/ts_orderchecker.rb
CHANGED
@@ -16,6 +16,7 @@ module TsOrderchecker
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.exists_on_caseblocks(order_no)
|
19
|
+
puts "Checking #{order_no}"
|
19
20
|
response = RestClient.get "#{ENV['CB_API_ENDPOINT']}/case_blocks/search.json?auth_token=#{ENV['CB_API_TOKEN']}&case_type_id=#{ENV['CB_TS_TYPE_ID']}&query=order_number:#{order_no}"
|
20
21
|
response.code==200 && JSON.parse(response.body).count > 0
|
21
22
|
rescue => e
|
@@ -26,6 +27,7 @@ module TsOrderchecker
|
|
26
27
|
|
27
28
|
def self.notify_by_email(order_row, template, recipients)
|
28
29
|
subject = "Order not in CaseBlocks #{order_row['number']}"
|
30
|
+
puts subject
|
29
31
|
payload = {
|
30
32
|
template_name: template,
|
31
33
|
message: {subject: subject, to: recipients.map{|r| {name: r, email: r} } },
|