omnivore-io 0.0.4 → 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/lib/omnivore-io/api/ticket.rb +13 -0
- data/lib/omnivore-io/api/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: 179ac90d612dd9ac2c9aa617deb070fdb5cccd7f
|
4
|
+
data.tar.gz: a9c1308015e69e48cfad712389ce9ea0f528100f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d4673c8d0c2698d3f184e027e16b64daf7127f014182a8a06a4b1b9163f829157412029442b545ec33e535012645f65601d1149ea680d2ef4966173e85ce6df
|
7
|
+
data.tar.gz: 57c3992dafa72e51e7406ef305de2c12410f4b902b4ad1007291788acb983c9cd8bff9f631631b0c66924a08c2d32bf9663c3b40de6d93c54409de892262abff
|
@@ -11,6 +11,12 @@ module OmnivoreIO
|
|
11
11
|
self.modifiers = (attributes['modifiers'] || []).map{|modifier_json| OmnivoreIO::Modifier.new(nil, modifier_json) }
|
12
12
|
end
|
13
13
|
|
14
|
+
def as_json(options={})
|
15
|
+
json = super
|
16
|
+
json[:menu_item] = self.menu_item.as_json
|
17
|
+
json
|
18
|
+
end
|
19
|
+
|
14
20
|
end
|
15
21
|
|
16
22
|
class Ticket
|
@@ -46,6 +52,13 @@ module OmnivoreIO
|
|
46
52
|
self.merge! self.client.open_ticket(self.location_id, payload)
|
47
53
|
end
|
48
54
|
|
55
|
+
def as_json(options={})
|
56
|
+
json = super
|
57
|
+
json[:items] = self.items.map{ |item| item.as_json }
|
58
|
+
json[:order_type] = self.order_type.as_json
|
59
|
+
json
|
60
|
+
end
|
61
|
+
|
49
62
|
end
|
50
63
|
|
51
64
|
class API
|