order2cb 0.0.6 → 0.0.7

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: cb0ef624ce31beb07e043171461ca95b570be6bc
4
- data.tar.gz: e7f2be3b40dd6a72ddda61f1e8216b549f9bb198
3
+ metadata.gz: 1e2c5038c4f0f9ee2cc0f5c8a97a99c1d41800d2
4
+ data.tar.gz: 1affe00b1ec5ece28a35433fd60550e0e4d13782
5
5
  SHA512:
6
- metadata.gz: fd82ee4dbd1c54a995712d98ebae21c1ca98b0b9c0107c15100df0f01296d693bb988434cb7c4713489704400d64229b62f5f10cd6c7922869897ee00204596a
7
- data.tar.gz: a306e514a9e9c56b1d8d17b2d408d9ed937ba83423f7d75e1eab314e66f5fb65bc1c6e69a04ca736ea264369393ede64f716f2a55b3141a4485641bd5a3782bb
6
+ metadata.gz: dae875b8bcdd8febfd4a7e3c54fdf2965ed170664cd64f9ecde65bf67cd64ea7d724bb40ccd70b696ab0d7d132e99dc377acbead818545f100222f54327e63e7
7
+ data.tar.gz: a13f50736bd1b88a7b76e2c668a2743825ea4b005dd4cffc64306491a01d937be9710353ef438f844cc3a0e42dc09205a6e82bcbe5d2891f1668d3b3ec29939e
@@ -71,6 +71,10 @@ module Order2cb
71
71
  'tyre_shopper_risk_assessment' => @data['risk_score'],
72
72
  'tyre_shopper_risk_assessment_notes' => @data['risk_score_reasons'],
73
73
  'order_source' => 'TyreShopper',
74
+ 'is_van_tyre' => short_codes.include?("VN"),
75
+ 'is_winter_tyre' => short_codes.include?("WN"),
76
+ 'is_4x4_tyre' => short_codes.include?("4X"),
77
+ 'is_run_flat_tyre' => short_codes.include?("RF"),
74
78
  # set time to + 5 hours
75
79
  'fitting_date' => @data['fitting_date'] + 5.hours,
76
80
  'am_pm' => @data['fitting_day_part'],
@@ -79,6 +83,10 @@ module Order2cb
79
83
  }
80
84
  end
81
85
 
86
+ def short_codes
87
+ @data["short_code"].to_s.upcase.split("-")
88
+ end
89
+
82
90
  def fitting_centre
83
91
  channel_fields = $db_client.query("SELECT exp_channel_fields.* FROM exp_channel_fields JOIN exp_channels on exp_channels.channel_id = exp_channel_fields.group_id WHERE exp_channels.channel_name = 'branches'")
84
92
  data_field_id = $db_client.query("SELECT exp_channel_fields.field_id FROM exp_channel_fields JOIN exp_channels on exp_channels.channel_id = exp_channel_fields.group_id WHERE exp_channels.channel_name = 'branches' and exp_channel_fields.field_name = 'dataflex_id'").first["field_id"]
@@ -1,3 +1,3 @@
1
1
  module Order2cb
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
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.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - EmergeAdapt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-15 00:00:00.000000000 Z
11
+ date: 2016-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler