seatsio 41.1.0 → 42.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/seatsio/domain.rb +1 -1
- data/lib/seatsio/events.rb +28 -5
- data/lib/seatsio/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0caea0654fe8f1c56917f0f36f5e24692ccb39b71e1c58082fcdfc05c6b9f3f1
|
4
|
+
data.tar.gz: 0c286cb3da66b467d305c51dcf12bc8417e35d0d8d97391fd5e8eb3a257bf480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1bd2a4919e3d33a3f4494ca4bf1b94facdb875f8466d330c42fe1f057fcd3e6204bd9d4f8eb183dbf7999202140c4ab09946b04433a95815995e5aae50e5377
|
7
|
+
data.tar.gz: 8f4baa6c8b2814c250d7b318772aacbb846cfe9008805fed7d2416c3bc0bac36849471e02aaeedebefc847a6196ac0ad8c585d963ad77a0c3c3ce12b66a94757
|
data/Gemfile.lock
CHANGED
data/lib/seatsio/domain.rb
CHANGED
data/lib/seatsio/events.rb
CHANGED
@@ -18,11 +18,11 @@ module Seatsio
|
|
18
18
|
@channels = ChannelsClient.new(@http_client)
|
19
19
|
end
|
20
20
|
|
21
|
-
def create(chart_key: nil, event_key: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil)
|
21
|
+
def create(chart_key: nil, event_key: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil, categories: nil)
|
22
22
|
payload = build_event_request(chart_key: chart_key, event_key: event_key,
|
23
23
|
table_booking_config: table_booking_config,
|
24
24
|
social_distancing_ruleset_key: social_distancing_ruleset_key,
|
25
|
-
object_categories: object_categories)
|
25
|
+
object_categories: object_categories, categories: categories)
|
26
26
|
response = @http_client.post("events", payload)
|
27
27
|
Event.new(response)
|
28
28
|
end
|
@@ -33,8 +33,14 @@ module Seatsio
|
|
33
33
|
Events.new(response).events
|
34
34
|
end
|
35
35
|
|
36
|
-
def update(key:, chart_key: nil, event_key: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil)
|
37
|
-
payload = build_event_request(
|
36
|
+
def update(key:, chart_key: nil, event_key: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil, categories: nil)
|
37
|
+
payload = build_event_request(
|
38
|
+
chart_key: chart_key,
|
39
|
+
event_key: event_key,
|
40
|
+
table_booking_config: table_booking_config,
|
41
|
+
social_distancing_ruleset_key: social_distancing_ruleset_key,
|
42
|
+
object_categories: object_categories,
|
43
|
+
categories: categories)
|
38
44
|
@http_client.post("/events/#{key}", payload)
|
39
45
|
end
|
40
46
|
|
@@ -162,13 +168,14 @@ module Seatsio
|
|
162
168
|
payload
|
163
169
|
end
|
164
170
|
|
165
|
-
def build_event_request(chart_key: nil, event_key: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil)
|
171
|
+
def build_event_request(chart_key: nil, event_key: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil, categories: nil)
|
166
172
|
result = {}
|
167
173
|
result["chartKey"] = chart_key if chart_key
|
168
174
|
result["eventKey"] = event_key if event_key
|
169
175
|
result["tableBookingConfig"] = table_booking_config_to_request(table_booking_config) if table_booking_config != nil
|
170
176
|
result["socialDistancingRulesetKey"] = social_distancing_ruleset_key if social_distancing_ruleset_key != nil
|
171
177
|
result["objectCategories"] = object_categories if object_categories != nil
|
178
|
+
result["categories"] = categories_to_request(categories) if categories != nil
|
172
179
|
result
|
173
180
|
end
|
174
181
|
|
@@ -185,6 +192,9 @@ module Seatsio
|
|
185
192
|
r = {}
|
186
193
|
r["eventKey"] = param[:event_key] if param[:event_key] != nil
|
187
194
|
r["tableBookingConfig"] = table_booking_config_to_request(param[:table_booking_config]) if param[:table_booking_config] != nil
|
195
|
+
r["socialDistancingRulesetKey"] = param[:social_distancing_ruleset_key] if param[:social_distancing_ruleset_key] != nil
|
196
|
+
r["objectCategories"] = param[:object_categories] if param[:object_categories] != nil
|
197
|
+
r["categories"] = categories_to_request(param[:categories]) if param[:categories] != nil
|
188
198
|
result.push(r)
|
189
199
|
end
|
190
200
|
result
|
@@ -197,5 +207,18 @@ module Seatsio
|
|
197
207
|
result
|
198
208
|
end
|
199
209
|
|
210
|
+
def categories_to_request(categories)
|
211
|
+
result = []
|
212
|
+
categories.each do |category|
|
213
|
+
r = {}
|
214
|
+
r["key"] = category.key if category.key != nil
|
215
|
+
r["label"] = category.label if category.label != nil
|
216
|
+
r["color"] = category.color if category.color != nil
|
217
|
+
r["accessible"] = category.accessible if category.accessible != nil
|
218
|
+
result.push(r)
|
219
|
+
end
|
220
|
+
result
|
221
|
+
end
|
222
|
+
|
200
223
|
end
|
201
224
|
end
|
data/lib/seatsio/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seatsio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 42.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seats.io
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
requirements: []
|
168
|
-
rubygems_version: 3.
|
168
|
+
rubygems_version: 3.3.5
|
169
169
|
signing_key:
|
170
170
|
specification_version: 4
|
171
171
|
summary: the official Seats.io Ruby client library
|