omniorder 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: 797f0af13bcfa4627aa6a123ba34bbde2b471d73
4
- data.tar.gz: 93add816bee91c523b972efc180a6f6d04ad5fe6
3
+ metadata.gz: d7e7efc2ebd649ff319459de8a0760bcd6331001
4
+ data.tar.gz: 711d3f5d76e2650a6a499926b0be94bd31f346ee
5
5
  SHA512:
6
- metadata.gz: 26a793eaff12bdefb446d2936eca79f0440e815535538b8e79be17a4ef85fe5ee373eab92ebe5f733e1a44ed3f836935023f94c34be0574561ad390df19946ab
7
- data.tar.gz: 5cc5b99c959e7c84656c6dbea7914a45c1876da9dea4771a455c319c2a41602c1329ee33bc306433928d322bea3f07df643cc50f5b5fc969682c96adb13b79b2
6
+ metadata.gz: 29329c7d41987a63e67eda25e248ec7655216f0d4dfbf65660b91b1af5d5f09084395247547f9f866272a7395e8d1483650fb2e0cb44f4611624071b5f026fbd
7
+ data.tar.gz: 501165b13166f32f1b514a839fe4cc43e17693f2b94096c92f79add4b78e09edee7133a8f227043168b711929aa9f9a7160c32d9d6d0518b32d5d8f40816c6f8
@@ -20,6 +20,16 @@ module Omniorder
20
20
  def from_name(name)
21
21
  Utils.constantize "Omniorder::ImportStrategy::#{Utils.camelize name}"
22
22
  end
23
+
24
+ def after_build_order(&block)
25
+ if block_given?
26
+ @after_build_order_block = block
27
+ end
28
+ end
29
+
30
+ def after_build_order_block
31
+ @after_build_order_block
32
+ end
23
33
  end
24
34
 
25
35
  def initialize(import, options = {})
@@ -49,6 +59,14 @@ module Omniorder
49
59
  country
50
60
  end
51
61
  end
62
+
63
+ def after_build_order(order, order_info)
64
+ if self.class.after_build_order_block
65
+ self.class.after_build_order_block.call(order, order_info)
66
+ end
67
+
68
+ order
69
+ end
52
70
  end
53
71
  end
54
72
  end
@@ -57,7 +57,7 @@ module Omniorder
57
57
  order.add_product_by_code(line_item_info['sku'].to_s, line_item_info['quantity'].to_i)
58
58
  end
59
59
 
60
- order
60
+ after_build_order order, order_info
61
61
  end
62
62
 
63
63
  def create_customer(order, customer_info)
@@ -1,3 +1,3 @@
1
1
  module Omniorder
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniorder
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
  - Howard Wilson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-20 00:00:00.000000000 Z
11
+ date: 2014-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: crack