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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ee78c703d525696803787f9a3b4f84d6249404d
4
- data.tar.gz: c329b89fc0acdbdcd5b2fffc5712e69868db28b1
3
+ metadata.gz: 93f9cb0eba00704df61db79967ffa89ec46e7960
4
+ data.tar.gz: d33415dc53c8bb71cf26efd1e22fddc0ca6fab8e
5
5
  SHA512:
6
- metadata.gz: bd155da443cc8ff5467e0aa0fc4d1201738149203c990942ecbef3382b1433250aed80fb446ca5080fac53c670657b4b1872a8abc05430e8f91b716db4b8c878
7
- data.tar.gz: fe3cd0d02b224992ffbd1c1454a654b52a2952a240f88fed5756d95fb63872f98111e06918d617dd6ec9a058f5c7a68168bccb2a680c211193813574394ea7e5
6
+ metadata.gz: 252709f29aa94bd1dae99f4abc95e50391aaae965ed22096903a6b4e38f65ad943173890f0172a7ab8593688e2e9a551ea9ee0e383b80ff1c044e2af6d1b75b0
7
+ data.tar.gz: 50971cd5dd49b431937e8f1fb0eb5ffa720f16f1ef0dd32f057511a9151658c9885fbfbbf66455b1a0f566cdf12dfdb82bb6950e2c1caecc2c5839293be3e008
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oshpark (0.0.3)
4
+ oshpark (0.0.5)
5
5
  micro_token
6
6
  thor
7
7
 
@@ -16,6 +16,8 @@ require "oshpark/upload"
16
16
  require "oshpark/token"
17
17
  require "oshpark/address"
18
18
  require "oshpark/shipping_rate"
19
+ require "oshpark/order_item"
20
+ require "oshpark/order_item_option_selection"
19
21
 
20
22
  module Oshpark
21
23
 
@@ -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
@@ -0,0 +1,9 @@
1
+ module Oshpark
2
+ class OrderItemOptionSelection
3
+ def self.attrs
4
+ %w| id name price |
5
+ end
6
+
7
+ include Model
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Oshpark
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
3
3
  end
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.3
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-14 00:00:00.000000000 Z
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