seatsio 23.6.0 → 23.7.0

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
  SHA256:
3
- metadata.gz: 22c363c33d731b9e45fdc8d7dfeb11f3d6e3da8ecd011fe3cb14c9a6b06d0948
4
- data.tar.gz: 0c7e49e0cecd99e3022dd289bea7c396b13cc880cef3cb59fdc601acd3132a4a
3
+ metadata.gz: 3e0a832bc8680b57d66e65becb775ddfdd971d08be16a8161b79bf0a217543db
4
+ data.tar.gz: c40d677bd0dea2bde3c492408c09a2cc79f3fcb8518d439c68f17f65f1c3c419
5
5
  SHA512:
6
- metadata.gz: 91c4e7fa934f02eb15d78156acfe65b5eebdfa4867b5122ecee11feb4630ce7ad995431059b261c182636b9bbfbf2fa9cc1ed7381bc6f6d0a79ffa3b33072169
7
- data.tar.gz: acce633d528b56f0f40e83c7cf15b2b5391468af2b4295abcf8c8c3ab3858cf179ae58cca55e58e31577e85eeac4dceee54982eb8ce66df9e6f1af5e8723028e
6
+ metadata.gz: 48d9cc13e42919696a9bcf58b5d0c05016049e3930db5f0a3499f42bc86d2a6400a85da2d0e761883e507b5623a8e8b87befe1c81217865c575a446b567072b8
7
+ data.tar.gz: 68da6c6511e13ae20d77471c67da82d7d962db355852c91a5d9342b24a885c9f67ae98a2a70adbd68b86eb5c4822e0d4e22f89c649100426d9f9396b087b8a78
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seatsio (23.6.0)
4
+ seatsio (23.7.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -47,4 +47,4 @@ DEPENDENCIES
47
47
  webmock (~> 3.4, >= 3.4.2)
48
48
 
49
49
  BUNDLED WITH
50
- 1.16.1
50
+ 1.17.2
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
@@ -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
- :left_neighbour, :right_neighbour
233
+ :left_neighbour, :right_neighbour
210
234
 
211
235
  def initialize(data)
212
236
  @label = data['label']
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Seatsio
2
- VERSION = "23.6.0"
2
+ VERSION = "23.7.0"
3
3
  end
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.6.0
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-05-27 00:00:00.000000000 Z
11
+ date: 2020-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler