seatsio 36.3.0 → 38.0.0
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/seatsio/charts.rb +8 -0
- data/lib/seatsio/domain.rb +55 -19
- data/lib/seatsio/seasons.rb +1 -1
- data/lib/seatsio/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3e4409411cb73aa535359e45d2fd273be5f22ea573700504083760d9f62367f
|
4
|
+
data.tar.gz: c72a6ab7a5dc1ef2c5a036077f8ac7d4a9bcdeba9eb1ed2c541010358c68b214
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '049fda47eb204dabf25624ed3695d955f824d3463d9e43fbbc82b5ff7fe2919167885d9eb373fd0af82c8ce9aba65afbdb2248cc504e18411ae0a757000bbf3b'
|
7
|
+
data.tar.gz: 40b02cba281f9a763da24c3d505cb42cd094a0a488e13889523556cb0e21e581e3bac860285a2149049712201a56b4aa8e145107427d28b121621874f3f86bc8
|
data/Gemfile.lock
CHANGED
data/lib/seatsio/charts.rb
CHANGED
@@ -38,6 +38,14 @@ module Seatsio
|
|
38
38
|
@http_client.post("charts/#{key}", payload)
|
39
39
|
end
|
40
40
|
|
41
|
+
def add_category(key, category)
|
42
|
+
@http_client.post("charts/#{key}/categories", category)
|
43
|
+
end
|
44
|
+
|
45
|
+
def remove_category(key, category_key)
|
46
|
+
@http_client.delete("charts/#{key}/categories/#{category_key}")
|
47
|
+
end
|
48
|
+
|
41
49
|
def add_tag(key, tag)
|
42
50
|
@http_client.post("charts/#{key}/tags/#{CGI::escape(tag)}")
|
43
51
|
end
|
data/lib/seatsio/domain.rb
CHANGED
@@ -70,6 +70,41 @@ module Seatsio
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
+
class Category
|
74
|
+
|
75
|
+
attr_reader :key, :label, :color, :accessible
|
76
|
+
|
77
|
+
def initialize(key, label, color, accessible)
|
78
|
+
@key = key
|
79
|
+
@label = label
|
80
|
+
@color = color
|
81
|
+
@accessible = accessible
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.from_json(data)
|
85
|
+
if data
|
86
|
+
Category.new(data['key'], data['label'], data['color'], data['accessible'])
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def self.create_list(list = [])
|
91
|
+
result = []
|
92
|
+
|
93
|
+
list.each do |item|
|
94
|
+
result << Category.from_json(item)
|
95
|
+
end
|
96
|
+
|
97
|
+
result
|
98
|
+
end
|
99
|
+
|
100
|
+
def == (other)
|
101
|
+
key == other.key &&
|
102
|
+
label == other.label &&
|
103
|
+
color == other.color &&
|
104
|
+
accessible == other.accessible
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
73
108
|
class TableBookingConfig
|
74
109
|
|
75
110
|
attr_reader :mode, :tables
|
@@ -114,11 +149,11 @@ module Seatsio
|
|
114
149
|
end
|
115
150
|
|
116
151
|
def == (other)
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
152
|
+
key == other.key &&
|
153
|
+
name == other.name &&
|
154
|
+
color == other.color &&
|
155
|
+
index == other.index &&
|
156
|
+
objects == other.objects
|
122
157
|
end
|
123
158
|
|
124
159
|
end
|
@@ -129,7 +164,7 @@ module Seatsio
|
|
129
164
|
:table_booking_config, :for_sale_config, :created_on, :updated_on, :channels,
|
130
165
|
:social_distancing_ruleset_key, :is_top_level_season, :is_partial_season,
|
131
166
|
:is_event_in_season, :top_level_season_key,
|
132
|
-
:social_distancing_ruleset_key, :object_categories
|
167
|
+
:social_distancing_ruleset_key, :object_categories, :categories
|
133
168
|
|
134
169
|
def initialize(data)
|
135
170
|
@id = data['id']
|
@@ -149,6 +184,7 @@ module Seatsio
|
|
149
184
|
@is_event_in_season = data['isEventInSeason']
|
150
185
|
@top_level_season_key = data['topLevelSeasonKey']
|
151
186
|
@object_categories = data['objectCategories']
|
187
|
+
@categories = Category.create_list(data['categories']) if data['categories']
|
152
188
|
end
|
153
189
|
|
154
190
|
def is_season
|
@@ -580,19 +616,19 @@ module Seatsio
|
|
580
616
|
end
|
581
617
|
|
582
618
|
def == (other)
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
619
|
+
name == other.name &&
|
620
|
+
number_of_disabled_seats_to_the_sides == other.number_of_disabled_seats_to_the_sides &&
|
621
|
+
disable_seats_in_front_and_behind == other.disable_seats_in_front_and_behind &&
|
622
|
+
disable_diagonal_seats_in_front_and_behind == other.disable_diagonal_seats_in_front_and_behind &&
|
623
|
+
number_of_disabled_aisle_seats == other.number_of_disabled_aisle_seats &&
|
624
|
+
max_group_size == other.max_group_size &&
|
625
|
+
max_occupancy_absolute == other.max_occupancy_absolute &&
|
626
|
+
max_occupancy_percentage == other.max_occupancy_percentage &&
|
627
|
+
one_group_per_table == other.one_group_per_table &&
|
628
|
+
fixed_group_layout == other.fixed_group_layout &&
|
629
|
+
disabled_seats == other.disabled_seats &&
|
630
|
+
enabled_seats == other.enabled_seats &&
|
631
|
+
index == other.index
|
596
632
|
end
|
597
633
|
end
|
598
634
|
|
data/lib/seatsio/seasons.rb
CHANGED
@@ -38,7 +38,7 @@ module Seatsio
|
|
38
38
|
request['eventKeys'] = event_keys if event_keys
|
39
39
|
request['numberOfEvents'] = number_of_events if number_of_events
|
40
40
|
response = @http_client.post("/seasons/#{key}/actions/create-events", request)
|
41
|
-
|
41
|
+
Events.new(response).events
|
42
42
|
end
|
43
43
|
|
44
44
|
def add_events_to_partial_season(top_level_season_key:, partial_season_key:, event_keys:)
|
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: 38.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-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|