seatsio 46.4.0 → 47.1.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: 3824265f4fa3503706d2ff540811ba800cb54a8bda20275a0a2e4fd60360fd20
4
- data.tar.gz: cd98586c6f62d266bace0399071723ae264d5a3aa589fb5a9be652d96efb315e
3
+ metadata.gz: 77a568ec547928ed45362987ed807137c86700f907b9782f56f1d5b1432c0000
4
+ data.tar.gz: ea5b77dc0fe6b3952eda39fbd25d5c62df96971b365c61ec39db51750ea9272e
5
5
  SHA512:
6
- metadata.gz: 2439c7565167efb750ea35d493b715ba6e37c15c5a779e633280f662dd825e5a87695abf51a1823e92f0d146618b054f3919267f6d718cf8a46f8a6045f8b458
7
- data.tar.gz: 034706e48cd74fad51eff174bf05a4c3cb4447248583945adfe0f8d8d75a90963a253428b40fd1b07cae49eb682a730e9d0779fcea703228058a556446fc0ba1
6
+ metadata.gz: 842f3bb6bcf2a2c5247541a891d4157abd49de98baa11bd2b295d348b909cc2661865c00f358da97b451b435322031ecb7187c8386c87e51e1712bf1716da0a9
7
+ data.tar.gz: dc899a3be61c5fbc40dc96f5792e3d5aa881eb89467b8371066a43a39e853afcdbfadca5bee50e52c396657e201ad3d29dd46b4255448ca335dc54bfece193d3
@@ -24,3 +24,5 @@ jobs:
24
24
  with:
25
25
  timezone: Europe/Brussels
26
26
  - run: bundle exec rake
27
+ env:
28
+ DEMO_COMPANY_SECRET_KEY: ${{ secrets.DEMO_COMPANY_SECRET_KEY }}
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seatsio (46.4.0)
4
+ seatsio (47.1.0)
5
5
  rest-client (~> 2.0, >= 2.0.2)
6
6
 
7
7
  GEM
@@ -419,18 +419,22 @@ module Seatsio
419
419
  end
420
420
 
421
421
  class UsageSummaryForAllMonths
422
- attr_reader :items
422
+ attr_reader :usage_cutoff_date, :usage
423
423
 
424
424
  def initialize(data)
425
- items = []
426
- data.each do |item|
427
- items << UsageSummaryForMonth.new(item)
425
+ usage = []
426
+ data['usage'].each do |item|
427
+ usage << UsageSummaryForMonth.new(item)
428
428
  end
429
- @items = items
429
+ @usage = usage
430
+ @usage_cutoff_date = DateTime.iso8601(data['usageCutoffDate'])
430
431
  end
431
432
  end
432
433
 
433
434
  class UsageSummaryForMonth
435
+
436
+ attr_reader :month, :num_used_objects
437
+
434
438
  def initialize(data)
435
439
  @month = Month.from_json(data['month'])
436
440
  @num_used_objects = data['numUsedObjects']
@@ -489,7 +493,7 @@ module Seatsio
489
493
 
490
494
  class UsageForObjectV1
491
495
 
492
- attr_reader :object, :num_first_bookings, :first_booking_date, :num_first_bookings, :num_first_bookings_or_selections
496
+ attr_reader :object, :num_first_bookings, :first_booking_date, :num_first_selections, :num_first_bookings_or_selections
493
497
 
494
498
  def initialize(data)
495
499
  @object = data['object']
@@ -516,9 +520,7 @@ module Seatsio
516
520
  attr_reader :year, :month
517
521
 
518
522
  def self.from_json(data)
519
- @year = data['year']
520
- @month = data['month']
521
- self
523
+ return Month.new(data['year'], data['month'])
522
524
  end
523
525
 
524
526
  def initialize(year, month)
@@ -35,6 +35,18 @@ module Seatsio
35
35
  @http_client.post("/events/#{key}", payload)
36
36
  end
37
37
 
38
+ def override_season_object_status(key:, objects:)
39
+ request = {}
40
+ request[:objects] = objects
41
+ @http_client.post("events/#{key}/actions/override-season-status", request)
42
+ end
43
+
44
+ def use_season_object_status(key:, objects:)
45
+ request = {}
46
+ request[:objects] = objects
47
+ @http_client.post("events/#{key}/actions/use-season-status", request)
48
+ end
49
+
38
50
  def update_extra_data(key:, object:, extra_data: nil)
39
51
  payload = build_extra_data_request(extra_data)
40
52
  @http_client.post("events/#{key}/objects/#{object}/actions/update-extra-data", payload)
@@ -11,7 +11,7 @@ module Seatsio
11
11
  end
12
12
 
13
13
  def summary_for_all_months
14
- url = "reports/usage"
14
+ url = "reports/usage?version=2"
15
15
  body = @http_client.get(url)
16
16
  UsageSummaryForAllMonths.new(body)
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module Seatsio
2
- VERSION = "46.4.0"
2
+ VERSION = "47.1.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: 46.4.0
4
+ version: 47.1.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: 2023-10-16 00:00:00.000000000 Z
11
+ date: 2023-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client