seatsio 46.4.0 → 47.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3824265f4fa3503706d2ff540811ba800cb54a8bda20275a0a2e4fd60360fd20
4
- data.tar.gz: cd98586c6f62d266bace0399071723ae264d5a3aa589fb5a9be652d96efb315e
3
+ metadata.gz: e2fcd1444010136b5977dc451c4999e12c24798a0ff24d378f9755955d34a595
4
+ data.tar.gz: e3cc6b0a73fc70b37b766c462ae014d0196f6d753359082d6e979a825ea12ca1
5
5
  SHA512:
6
- metadata.gz: 2439c7565167efb750ea35d493b715ba6e37c15c5a779e633280f662dd825e5a87695abf51a1823e92f0d146618b054f3919267f6d718cf8a46f8a6045f8b458
7
- data.tar.gz: 034706e48cd74fad51eff174bf05a4c3cb4447248583945adfe0f8d8d75a90963a253428b40fd1b07cae49eb682a730e9d0779fcea703228058a556446fc0ba1
6
+ metadata.gz: 7f71931db3feb288dbf7da5c445101ec09b92f8aeba44d76ebc0b75c30d2402caa6681f9c867d7a2e3395c765d4500c90cd43c6d50f36e3ad0591e07be6860f5
7
+ data.tar.gz: 132f811a541aaa97a314a263ba7f114e152d2466c582904772df1be0af8589c4b0c6b192f5520f8fe93259081f64a2073223a93e650926a9bce45337d66fc081
@@ -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.0.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)
@@ -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.0.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.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: 2023-10-16 00:00:00.000000000 Z
11
+ date: 2023-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client