oshpark 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/oshpark.rb +2 -0
- data/lib/oshpark/order_item.rb +44 -0
- data/lib/oshpark/order_item_option_selection.rb +9 -0
- data/lib/oshpark/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93f9cb0eba00704df61db79967ffa89ec46e7960
|
4
|
+
data.tar.gz: d33415dc53c8bb71cf26efd1e22fddc0ca6fab8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 252709f29aa94bd1dae99f4abc95e50391aaae965ed22096903a6b4e38f65ad943173890f0172a7ab8593688e2e9a551ea9ee0e383b80ff1c044e2af6d1b75b0
|
7
|
+
data.tar.gz: 50971cd5dd49b431937e8f1fb0eb5ffa720f16f1ef0dd32f057511a9151658c9885fbfbbf66455b1a0f566cdf12dfdb82bb6950e2c1caecc2c5839293be3e008
|
data/Gemfile.lock
CHANGED
data/lib/oshpark.rb
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
module Oshpark
|
2
|
+
class OrderItem
|
3
|
+
def self.attrs
|
4
|
+
%w| name batches batch_cost sub_total price quantity state confirmed_at panelized_at
|
5
|
+
ordered_at fabbed_at shipped_at project_id panel_id order_item_option_selections |
|
6
|
+
end
|
7
|
+
|
8
|
+
include Model
|
9
|
+
|
10
|
+
def project
|
11
|
+
Oshpark::Project.find @project_id if @project_id
|
12
|
+
end
|
13
|
+
|
14
|
+
def panel
|
15
|
+
Oshpark::Panel.find @panel_id if @panel_id
|
16
|
+
end
|
17
|
+
|
18
|
+
def order_item_option_selections
|
19
|
+
Array(@order_item_option_selections).map do |json|
|
20
|
+
Oshpark::OrderItemOptionSelection.from_json json
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def confirmed_at
|
25
|
+
time_from @confirmed_at
|
26
|
+
end
|
27
|
+
|
28
|
+
def panelized_at
|
29
|
+
time_from @panelized
|
30
|
+
end
|
31
|
+
|
32
|
+
def ordered_at
|
33
|
+
time_from @ordered_at
|
34
|
+
end
|
35
|
+
|
36
|
+
def fabbed_at
|
37
|
+
time_from @fabbed_at
|
38
|
+
end
|
39
|
+
|
40
|
+
def shipped_at
|
41
|
+
time_from @shipped_at
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
data/lib/oshpark/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oshpark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Harton
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -221,6 +221,8 @@ files:
|
|
221
221
|
- lib/oshpark/layer.rb
|
222
222
|
- lib/oshpark/model.rb
|
223
223
|
- lib/oshpark/order.rb
|
224
|
+
- lib/oshpark/order_item.rb
|
225
|
+
- lib/oshpark/order_item_option_selection.rb
|
224
226
|
- lib/oshpark/order_option.rb
|
225
227
|
- lib/oshpark/panel.rb
|
226
228
|
- lib/oshpark/project.rb
|