seatsio 23.6.0 → 23.7.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 +2 -2
- data/Rakefile +7 -0
- data/lib/seatsio/domain.rb +26 -2
- data/lib/seatsio/events.rb +8 -0
- 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: 3e0a832bc8680b57d66e65becb775ddfdd971d08be16a8161b79bf0a217543db
|
4
|
+
data.tar.gz: c40d677bd0dea2bde3c492408c09a2cc79f3fcb8518d439c68f17f65f1c3c419
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48d9cc13e42919696a9bcf58b5d0c05016049e3930db5f0a3499f42bc86d2a6400a85da2d0e761883e507b5623a8e8b87befe1c81217865c575a446b567072b8
|
7
|
+
data.tar.gz: 68da6c6511e13ae20d77471c67da82d7d962db355852c91a5d9342b24a885c9f67ae98a2a70adbd68b86eb5c4822e0d4e22f89c649100426d9f9396b087b8a78
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -8,4 +8,11 @@ Rake::TestTask.new(:test) do |t|
|
|
8
8
|
t.warning = false
|
9
9
|
end
|
10
10
|
|
11
|
+
Rake::TestTask.new(:singletest) do |t|
|
12
|
+
t.libs << "test"
|
13
|
+
t.libs << "lib"
|
14
|
+
t.test_files = FileList["test/**/update_channels_test.rb", "test/**/assign_objects_to_channels_test.rb"]
|
15
|
+
t.warning = false
|
16
|
+
end
|
17
|
+
|
11
18
|
task :default => :test
|
data/lib/seatsio/domain.rb
CHANGED
@@ -71,10 +71,31 @@ module Seatsio::Domain
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
+
class Channel
|
75
|
+
attr_reader :key, :name, :color, :index, :objects
|
76
|
+
|
77
|
+
def initialize(key, name, color, index, objects)
|
78
|
+
@key = key
|
79
|
+
@name = name
|
80
|
+
@color = color
|
81
|
+
@index = index
|
82
|
+
@objects = objects
|
83
|
+
end
|
84
|
+
|
85
|
+
def == (other)
|
86
|
+
self.key == other.key &&
|
87
|
+
self.name == other.name &&
|
88
|
+
self.color == other.color &&
|
89
|
+
self.index == other.index &&
|
90
|
+
self.objects == other.objects
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
|
74
95
|
class Event
|
75
96
|
|
76
97
|
attr_accessor :id, :key, :chart_key, :book_whole_tables, :supports_best_available,
|
77
|
-
:table_booking_modes, :for_sale_config, :created_on, :updated_on
|
98
|
+
:table_booking_modes, :for_sale_config, :created_on, :updated_on, :channels
|
78
99
|
|
79
100
|
def initialize(data)
|
80
101
|
@id = data['id']
|
@@ -86,6 +107,9 @@ module Seatsio::Domain
|
|
86
107
|
@for_sale_config = ForSaleConfig.new(data['forSaleConfig']) if data['forSaleConfig']
|
87
108
|
@created_on = parse_date(data['createdOn'])
|
88
109
|
@updated_on = parse_date(data['updatedOn'])
|
110
|
+
@channels = data['channels'].map {
|
111
|
+
|d| Channel.new(d['key'], d['name'], d['color'], d['index'], d['objects'])
|
112
|
+
} if data['channels']
|
89
113
|
end
|
90
114
|
|
91
115
|
def self.create_list(list = [])
|
@@ -206,7 +230,7 @@ module Seatsio::Domain
|
|
206
230
|
class ChartReportItem
|
207
231
|
|
208
232
|
attr_reader :label, :labels, :category_key, :category_label, :section, :entrance, :capacity, :object_type,
|
209
|
-
|
233
|
+
:left_neighbour, :right_neighbour
|
210
234
|
|
211
235
|
def initialize(data)
|
212
236
|
@label = data['label']
|
data/lib/seatsio/events.rb
CHANGED
@@ -136,6 +136,14 @@ module Seatsio
|
|
136
136
|
@http_client.post("events/#{key}/actions/mark-as-for-sale", request)
|
137
137
|
end
|
138
138
|
|
139
|
+
def update_channels(key:, channels:)
|
140
|
+
@http_client.post("events/#{key}/channels/update", channels: channels)
|
141
|
+
end
|
142
|
+
|
143
|
+
def assign_objects_to_channels(key:, channelConfig:)
|
144
|
+
@http_client.post("events/#{key}/channels/assign-objects", channelConfig: channelConfig)
|
145
|
+
end
|
146
|
+
|
139
147
|
private
|
140
148
|
|
141
149
|
def build_parameters_for_mark_as_sale(objects: nil, categories: nil)
|
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: 23.
|
4
|
+
version: 23.7.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: 2020-
|
11
|
+
date: 2020-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|