seatsio 32.0.0 → 32.6.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/.github/dependabot.yml +11 -0
 - data/Gemfile.lock +20 -18
 - data/README.md +14 -4
 - data/lib/seatsio/chart_reports.rb +6 -2
 - data/lib/seatsio/charts.rb +2 -2
 - data/lib/seatsio/domain.rb +8 -4
 - data/lib/seatsio/event_reports.rb +38 -26
 - data/lib/seatsio/events.rb +2 -2
 - data/lib/seatsio/hold_tokens.rb +2 -2
 - data/lib/seatsio/httpClient.rb +3 -2
 - data/lib/seatsio/subaccounts.rb +2 -2
 - data/lib/seatsio/usage_reports.rb +2 -2
 - data/lib/seatsio/version.rb +1 -1
 - data/lib/seatsio/workspaces.rb +15 -2
 - data/lib/seatsio.rb +12 -9
 - data/releasing.md +1 -0
 - data/seatsio.gemspec +1 -1
 - metadata +8 -7
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: c59ef6860b18c605ab3c844cac4f320215a981421129ca2eb7d537acaea1f738
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 25cd36b90507702986d11172e2f0345686e2bf14a372f3af42323b50b37196a5
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 0dee64ba2af519b0b0ae00cbbb68a936d280aa2aafc130c3c7d4ca9dbdcefb302971ac577d15b43b1b3e1a89620501825d02e877f298a2763cbdbdc9b08dbfed
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 6788d6eea52021eb3d04b97533f9594270af300cee70fe80a6e822407d940a3fccd1f821a151ac78f2218d1db22618fa86c48ac5dd05fb9909917e96c3070217
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    | 
         @@ -1,37 +1,39 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            PATH
         
     | 
| 
       2 
2 
     | 
    
         
             
              remote: .
         
     | 
| 
       3 
3 
     | 
    
         
             
              specs:
         
     | 
| 
       4 
     | 
    
         
            -
                seatsio (32. 
     | 
| 
      
 4 
     | 
    
         
            +
                seatsio (32.6.0)
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            GEM
         
     | 
| 
       7 
7 
     | 
    
         
             
              remote: https://rubygems.org/
         
     | 
| 
       8 
8 
     | 
    
         
             
              specs:
         
     | 
| 
       9 
     | 
    
         
            -
                addressable (2. 
     | 
| 
       10 
     | 
    
         
            -
                  public_suffix (>= 2.0.2, <  
     | 
| 
       11 
     | 
    
         
            -
                crack (0.4. 
     | 
| 
       12 
     | 
    
         
            -
                   
     | 
| 
       13 
     | 
    
         
            -
                domain_name (0.5. 
     | 
| 
      
 9 
     | 
    
         
            +
                addressable (2.8.0)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  public_suffix (>= 2.0.2, < 5.0)
         
     | 
| 
      
 11 
     | 
    
         
            +
                crack (0.4.5)
         
     | 
| 
      
 12 
     | 
    
         
            +
                  rexml
         
     | 
| 
      
 13 
     | 
    
         
            +
                domain_name (0.5.20190701)
         
     | 
| 
       14 
14 
     | 
    
         
             
                  unf (>= 0.0.5, < 1.0.0)
         
     | 
| 
       15 
     | 
    
         
            -
                hashdiff (0. 
     | 
| 
      
 15 
     | 
    
         
            +
                hashdiff (1.0.1)
         
     | 
| 
      
 16 
     | 
    
         
            +
                http-accept (1.7.0)
         
     | 
| 
       16 
17 
     | 
    
         
             
                http-cookie (1.0.3)
         
     | 
| 
       17 
18 
     | 
    
         
             
                  domain_name (~> 0.5)
         
     | 
| 
       18 
     | 
    
         
            -
                mime-types (3. 
     | 
| 
      
 19 
     | 
    
         
            +
                mime-types (3.3.1)
         
     | 
| 
       19 
20 
     | 
    
         
             
                  mime-types-data (~> 3.2015)
         
     | 
| 
       20 
     | 
    
         
            -
                mime-types-data (3. 
     | 
| 
       21 
     | 
    
         
            -
                minitest (5. 
     | 
| 
      
 21 
     | 
    
         
            +
                mime-types-data (3.2021.0225)
         
     | 
| 
      
 22 
     | 
    
         
            +
                minitest (5.14.4)
         
     | 
| 
       22 
23 
     | 
    
         
             
                netrc (0.11.0)
         
     | 
| 
       23 
     | 
    
         
            -
                public_suffix ( 
     | 
| 
       24 
     | 
    
         
            -
                rake (13.0. 
     | 
| 
       25 
     | 
    
         
            -
                rest-client (2.0 
     | 
| 
      
 24 
     | 
    
         
            +
                public_suffix (4.0.6)
         
     | 
| 
      
 25 
     | 
    
         
            +
                rake (13.0.6)
         
     | 
| 
      
 26 
     | 
    
         
            +
                rest-client (2.1.0)
         
     | 
| 
      
 27 
     | 
    
         
            +
                  http-accept (>= 1.7.0, < 2.0)
         
     | 
| 
       26 
28 
     | 
    
         
             
                  http-cookie (>= 1.0.2, < 2.0)
         
     | 
| 
       27 
29 
     | 
    
         
             
                  mime-types (>= 1.16, < 4.0)
         
     | 
| 
       28 
30 
     | 
    
         
             
                  netrc (~> 0.8)
         
     | 
| 
       29 
     | 
    
         
            -
                 
     | 
| 
      
 31 
     | 
    
         
            +
                rexml (3.2.5)
         
     | 
| 
       30 
32 
     | 
    
         
             
                unf (0.1.4)
         
     | 
| 
       31 
33 
     | 
    
         
             
                  unf_ext
         
     | 
| 
       32 
     | 
    
         
            -
                unf_ext (0.0.7. 
     | 
| 
       33 
     | 
    
         
            -
                webmock (3. 
     | 
| 
       34 
     | 
    
         
            -
                  addressable (>= 2. 
     | 
| 
      
 34 
     | 
    
         
            +
                unf_ext (0.0.7.7)
         
     | 
| 
      
 35 
     | 
    
         
            +
                webmock (3.14.0)
         
     | 
| 
      
 36 
     | 
    
         
            +
                  addressable (>= 2.8.0)
         
     | 
| 
       35 
37 
     | 
    
         
             
                  crack (>= 0.3.2)
         
     | 
| 
       36 
38 
     | 
    
         
             
                  hashdiff (>= 0.4.0, < 2.0.0)
         
     | 
| 
       37 
39 
     | 
    
         | 
| 
         @@ -39,7 +41,7 @@ PLATFORMS 
     | 
|
| 
       39 
41 
     | 
    
         
             
              ruby
         
     | 
| 
       40 
42 
     | 
    
         | 
| 
       41 
43 
     | 
    
         
             
            DEPENDENCIES
         
     | 
| 
       42 
     | 
    
         
            -
              bundler (~>  
     | 
| 
      
 44 
     | 
    
         
            +
              bundler (~> 2.2)
         
     | 
| 
       43 
45 
     | 
    
         
             
              minitest (~> 5.0)
         
     | 
| 
       44 
46 
     | 
    
         
             
              rake (~> 13.0)
         
     | 
| 
       45 
47 
     | 
    
         
             
              rest-client (~> 2.0, >= 2.0.2)
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,6 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # seatsio-ruby, the official Seats.io Ruby client library
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            
         
     | 
| 
      
 3 
     | 
    
         
            +
            [](https://github.com/seatsio/seatsio-ruby/actions/workflows/build.yml)
         
     | 
| 
      
 4 
     | 
    
         
            +
            [](https://badge.fury.io/rb/seatsio)
         
     | 
| 
       4 
5 
     | 
    
         | 
| 
       5 
6 
     | 
    
         
             
            This is the official Ruby client library for the [Seats.io V2 REST API](https://docs.seats.io/docs/api-overview), supporting Ruby 2.2.0+
         
     | 
| 
       6 
7 
     | 
    
         | 
| 
         @@ -16,7 +17,7 @@ seatsio-ruby follows semver since v23.3.0. 
     | 
|
| 
       16 
17 
     | 
    
         
             
            require('seatsio')
         
     | 
| 
       17 
18 
     | 
    
         
             
            client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key") # can be found on https://app.seats.io/workspace-settings
         
     | 
| 
       18 
19 
     | 
    
         
             
            chart = client.charts.create
         
     | 
| 
       19 
     | 
    
         
            -
            event = client.events.create  
     | 
| 
      
 20 
     | 
    
         
            +
            event = client.events.create chart_key: chart.key
         
     | 
| 
       20 
21 
     | 
    
         
             
            ```
         
     | 
| 
       21 
22 
     | 
    
         | 
| 
       22 
23 
     | 
    
         
             
            ### Booking objects
         
     | 
| 
         @@ -119,5 +120,14 @@ This exception contains a message string describing what went wrong, and also tw 
     | 
|
| 
       119 
120 
     | 
    
         | 
| 
       120 
121 
     | 
    
         
             
            This library supports [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff).
         
     | 
| 
       121 
122 
     | 
    
         | 
| 
       122 
     | 
    
         
            -
            When you send too many concurrent requests, the server returns an error `429 - Too Many Requests`.  
     | 
| 
       123 
     | 
    
         
            -
            If the request still fails with an error `429`,  
     | 
| 
      
 123 
     | 
    
         
            +
            When you send too many concurrent requests, the server returns an error `429 - Too Many Requests`. The client reacts to this by waiting for a while, and then retrying the request.
         
     | 
| 
      
 124 
     | 
    
         
            +
            If the request still fails with an error `429`, it waits a little longer, and try again. By default this happens 5 times, before giving up (after approximately 15 seconds).
         
     | 
| 
      
 125 
     | 
    
         
            +
             
     | 
| 
      
 126 
     | 
    
         
            +
            To change the maximum number of retries, create the client as follows:
         
     | 
| 
      
 127 
     | 
    
         
            +
             
     | 
| 
      
 128 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 129 
     | 
    
         
            +
            require('seatsio')
         
     | 
| 
      
 130 
     | 
    
         
            +
            client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key", max_retries = 3)
         
     | 
| 
      
 131 
     | 
    
         
            +
            ```
         
     | 
| 
      
 132 
     | 
    
         
            +
             
     | 
| 
      
 133 
     | 
    
         
            +
            Passing in 0 disables exponential backoff completely. In that case, the client will never retry a failed request.
         
     | 
| 
         @@ -6,14 +6,18 @@ require 'cgi' 
     | 
|
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            module Seatsio
         
     | 
| 
       8 
8 
     | 
    
         
             
              class ChartReportsClient
         
     | 
| 
       9 
     | 
    
         
            -
                def initialize( 
     | 
| 
       10 
     | 
    
         
            -
                  @http_client =  
     | 
| 
      
 9 
     | 
    
         
            +
                def initialize(http_client)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  @http_client = http_client
         
     | 
| 
       11 
11 
     | 
    
         
             
                end
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
                def by_label(chart_key, book_whole_tables = nil)
         
     | 
| 
       14 
14 
     | 
    
         
             
                  get_chart_report('byLabel', chart_key, book_whole_tables)
         
     | 
| 
       15 
15 
     | 
    
         
             
                end
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
      
 17 
     | 
    
         
            +
                def by_object_type(chart_key, book_whole_tables = nil)
         
     | 
| 
      
 18 
     | 
    
         
            +
                  get_chart_report('byObjectType', chart_key, book_whole_tables)
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
       17 
21 
     | 
    
         
             
                def by_category_key(chart_key, book_whole_tables = nil)
         
     | 
| 
       18 
22 
     | 
    
         
             
                  get_chart_report('byCategoryKey', chart_key, book_whole_tables)
         
     | 
| 
       19 
23 
     | 
    
         
             
                end
         
     | 
    
        data/lib/seatsio/charts.rb
    CHANGED
    
    | 
         @@ -11,8 +11,8 @@ module Seatsio 
     | 
|
| 
       11 
11 
     | 
    
         
             
              class ChartsClient
         
     | 
| 
       12 
12 
     | 
    
         
             
                attr_reader :archive
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
                def initialize( 
     | 
| 
       15 
     | 
    
         
            -
                  @http_client =  
     | 
| 
      
 14 
     | 
    
         
            +
                def initialize(http_client)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  @http_client = http_client
         
     | 
| 
       16 
16 
     | 
    
         
             
                  @archive = Pagination::Cursor.new(Chart, 'charts/archive', @http_client)
         
     | 
| 
       17 
17 
     | 
    
         
             
                end
         
     | 
| 
       18 
18 
     | 
    
         | 
    
        data/lib/seatsio/domain.rb
    CHANGED
    
    | 
         @@ -263,12 +263,13 @@ module Seatsio 
     | 
|
| 
       263 
263 
     | 
    
         | 
| 
       264 
264 
     | 
    
         
             
              class ChartReportItem
         
     | 
| 
       265 
265 
     | 
    
         | 
| 
       266 
     | 
    
         
            -
                attr_reader :label, :labels, :category_key, :category_label, :section, :entrance, :capacity, :object_type,
         
     | 
| 
       267 
     | 
    
         
            -
                            :left_neighbour, :right_neighbour, :book_as_a_whole
         
     | 
| 
      
 266 
     | 
    
         
            +
                attr_reader :label, :labels, :ids, :category_key, :category_label, :section, :entrance, :capacity, :object_type,
         
     | 
| 
      
 267 
     | 
    
         
            +
                            :left_neighbour, :right_neighbour, :book_as_a_whole, :distance_to_focal_point
         
     | 
| 
       268 
268 
     | 
    
         | 
| 
       269 
269 
     | 
    
         
             
                def initialize(data)
         
     | 
| 
       270 
270 
     | 
    
         
             
                  @label = data['label']
         
     | 
| 
       271 
271 
     | 
    
         
             
                  @labels = data['labels']
         
     | 
| 
      
 272 
     | 
    
         
            +
                  @ids = data['ids']
         
     | 
| 
       272 
273 
     | 
    
         
             
                  @category_label = data['categoryLabel']
         
     | 
| 
       273 
274 
     | 
    
         
             
                  @category_key = data['categoryKey']
         
     | 
| 
       274 
275 
     | 
    
         
             
                  @section = data['section']
         
     | 
| 
         @@ -278,6 +279,7 @@ module Seatsio 
     | 
|
| 
       278 
279 
     | 
    
         
             
                  @left_neighbour = data['leftNeighbour']
         
     | 
| 
       279 
280 
     | 
    
         
             
                  @right_neighbour = data['rightNeighbour']
         
     | 
| 
       280 
281 
     | 
    
         
             
                  @book_as_a_whole = data['bookAsAWhole']
         
     | 
| 
      
 282 
     | 
    
         
            +
                  @distance_to_focal_point = data['distanceToFocalPoint']
         
     | 
| 
       281 
283 
     | 
    
         
             
                end
         
     | 
| 
       282 
284 
     | 
    
         
             
              end
         
     | 
| 
       283 
285 
     | 
    
         | 
| 
         @@ -324,17 +326,18 @@ module Seatsio 
     | 
|
| 
       324 
326 
     | 
    
         
             
              end
         
     | 
| 
       325 
327 
     | 
    
         | 
| 
       326 
328 
     | 
    
         
             
              class EventReportItem
         
     | 
| 
       327 
     | 
    
         
            -
                attr_reader :labels, :label, :order_id, :extra_data, :capacity, :status,
         
     | 
| 
      
 329 
     | 
    
         
            +
                attr_reader :labels, :ids, :label, :order_id, :extra_data, :capacity, :status,
         
     | 
| 
       328 
330 
     | 
    
         
             
                            :category_key, :entrance, :object_type, :hold_token, :category_label,
         
     | 
| 
       329 
331 
     | 
    
         
             
                            :ticket_type, :num_booked, :num_free, :num_held, :for_sale, :section,
         
     | 
| 
       330 
332 
     | 
    
         
             
                            :is_accessible, :is_companion_seat, :has_restricted_view, :displayed_object_type,
         
     | 
| 
       331 
333 
     | 
    
         
             
                            :left_neighbour, :right_neighbour, :is_selectable, :is_disabled_by_social_distancing, :channel,
         
     | 
| 
       332 
     | 
    
         
            -
                            :book_as_a_whole
         
     | 
| 
      
 334 
     | 
    
         
            +
                            :book_as_a_whole, :distance_to_focal_point
         
     | 
| 
       333 
335 
     | 
    
         | 
| 
       334 
336 
     | 
    
         
             
                def initialize(data)
         
     | 
| 
       335 
337 
     | 
    
         
             
                  @status = data['status']
         
     | 
| 
       336 
338 
     | 
    
         
             
                  @label = data['label']
         
     | 
| 
       337 
339 
     | 
    
         
             
                  @labels = data['labels']
         
     | 
| 
      
 340 
     | 
    
         
            +
                  @ids = data['ids']
         
     | 
| 
       338 
341 
     | 
    
         
             
                  @category_label = data['categoryLabel']
         
     | 
| 
       339 
342 
     | 
    
         
             
                  @category_key = data['categoryKey']
         
     | 
| 
       340 
343 
     | 
    
         
             
                  @ticket_type = data['ticketType']
         
     | 
| 
         @@ -359,6 +362,7 @@ module Seatsio 
     | 
|
| 
       359 
362 
     | 
    
         
             
                  @is_disabled_by_social_distancing = data['isDisabledBySocialDistancing']
         
     | 
| 
       360 
363 
     | 
    
         
             
                  @channel = data['channel']
         
     | 
| 
       361 
364 
     | 
    
         
             
                  @book_as_a_whole = data['bookAsAWhole']
         
     | 
| 
      
 365 
     | 
    
         
            +
                  @distance_to_focal_point = data['distanceToFocalPoint']
         
     | 
| 
       362 
366 
     | 
    
         
             
                end
         
     | 
| 
       363 
367 
     | 
    
         
             
              end
         
     | 
| 
       364 
368 
     | 
    
         | 
| 
         @@ -7,8 +7,12 @@ require 'cgi' 
     | 
|
| 
       7 
7 
     | 
    
         
             
            module Seatsio
         
     | 
| 
       8 
8 
     | 
    
         
             
              # Client for fetching event reports
         
     | 
| 
       9 
9 
     | 
    
         
             
              class EventReportsClient
         
     | 
| 
       10 
     | 
    
         
            -
                def initialize( 
     | 
| 
       11 
     | 
    
         
            -
                  @http_client =  
     | 
| 
      
 10 
     | 
    
         
            +
                def initialize(http_client)
         
     | 
| 
      
 11 
     | 
    
         
            +
                  @http_client = http_client
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                def by_status(event_key, status = nil)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  fetch_report('byStatus', event_key, status)
         
     | 
| 
       12 
16 
     | 
    
         
             
                end
         
     | 
| 
       13 
17 
     | 
    
         | 
| 
       14 
18 
     | 
    
         
             
                def summary_by_status(event_key)
         
     | 
| 
         @@ -19,6 +23,22 @@ module Seatsio 
     | 
|
| 
       19 
23 
     | 
    
         
             
                  fetch_deep_summary_report('byStatus', event_key)
         
     | 
| 
       20 
24 
     | 
    
         
             
                end
         
     | 
| 
       21 
25 
     | 
    
         | 
| 
      
 26 
     | 
    
         
            +
                def by_object_type(event_key, object_type = nil)
         
     | 
| 
      
 27 
     | 
    
         
            +
                  fetch_report('byObjectType', event_key, object_type)
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                def summary_by_object_type(event_key)
         
     | 
| 
      
 31 
     | 
    
         
            +
                  fetch_summary_report('byObjectType', event_key)
         
     | 
| 
      
 32 
     | 
    
         
            +
                end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                def deep_summary_by_object_type(event_key)
         
     | 
| 
      
 35 
     | 
    
         
            +
                  fetch_deep_summary_report('byObjectType', event_key)
         
     | 
| 
      
 36 
     | 
    
         
            +
                end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
                def by_category_key(event_key, category_key = nil)
         
     | 
| 
      
 39 
     | 
    
         
            +
                  fetch_report('byCategoryKey', event_key, category_key)
         
     | 
| 
      
 40 
     | 
    
         
            +
                end
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
       22 
42 
     | 
    
         
             
                def summary_by_category_key(event_key)
         
     | 
| 
       23 
43 
     | 
    
         
             
                  fetch_summary_report('byCategoryKey', event_key)
         
     | 
| 
       24 
44 
     | 
    
         
             
                end
         
     | 
| 
         @@ -27,6 +47,10 @@ module Seatsio 
     | 
|
| 
       27 
47 
     | 
    
         
             
                  fetch_deep_summary_report('byCategoryKey', event_key)
         
     | 
| 
       28 
48 
     | 
    
         
             
                end
         
     | 
| 
       29 
49 
     | 
    
         | 
| 
      
 50 
     | 
    
         
            +
                def by_category_label(event_key, category_label = nil)
         
     | 
| 
      
 51 
     | 
    
         
            +
                  fetch_report('byCategoryLabel', event_key, category_label)
         
     | 
| 
      
 52 
     | 
    
         
            +
                end
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
       30 
54 
     | 
    
         
             
                def summary_by_category_label(event_key)
         
     | 
| 
       31 
55 
     | 
    
         
             
                  fetch_summary_report('byCategoryLabel', event_key)
         
     | 
| 
       32 
56 
     | 
    
         
             
                end
         
     | 
| 
         @@ -35,6 +59,10 @@ module Seatsio 
     | 
|
| 
       35 
59 
     | 
    
         
             
                  fetch_deep_summary_report('byCategoryLabel', event_key)
         
     | 
| 
       36 
60 
     | 
    
         
             
                end
         
     | 
| 
       37 
61 
     | 
    
         | 
| 
      
 62 
     | 
    
         
            +
                def by_section(event_key, section = nil)
         
     | 
| 
      
 63 
     | 
    
         
            +
                  fetch_report('bySection', event_key, section)
         
     | 
| 
      
 64 
     | 
    
         
            +
                end
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
       38 
66 
     | 
    
         
             
                def summary_by_section(event_key)
         
     | 
| 
       39 
67 
     | 
    
         
             
                  fetch_summary_report('bySection', event_key)
         
     | 
| 
       40 
68 
     | 
    
         
             
                end
         
     | 
| 
         @@ -43,6 +71,10 @@ module Seatsio 
     | 
|
| 
       43 
71 
     | 
    
         
             
                  fetch_deep_summary_report('bySection', event_key)
         
     | 
| 
       44 
72 
     | 
    
         
             
                end
         
     | 
| 
       45 
73 
     | 
    
         | 
| 
      
 74 
     | 
    
         
            +
                def by_selectability(event_key, selectability = nil)
         
     | 
| 
      
 75 
     | 
    
         
            +
                  fetch_report('bySelectability', event_key, selectability)
         
     | 
| 
      
 76 
     | 
    
         
            +
                end
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
       46 
78 
     | 
    
         
             
                def summary_by_selectability(event_key)
         
     | 
| 
       47 
79 
     | 
    
         
             
                  fetch_summary_report('bySelectability', event_key)
         
     | 
| 
       48 
80 
     | 
    
         
             
                end
         
     | 
| 
         @@ -51,6 +83,10 @@ module Seatsio 
     | 
|
| 
       51 
83 
     | 
    
         
             
                  fetch_deep_summary_report('bySelectability', event_key)
         
     | 
| 
       52 
84 
     | 
    
         
             
                end
         
     | 
| 
       53 
85 
     | 
    
         | 
| 
      
 86 
     | 
    
         
            +
                def by_channel(event_key, channelKey = nil)
         
     | 
| 
      
 87 
     | 
    
         
            +
                  fetch_report('byChannel', event_key, channelKey)
         
     | 
| 
      
 88 
     | 
    
         
            +
                end
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
       54 
90 
     | 
    
         
             
                def summary_by_channel(event_key)
         
     | 
| 
       55 
91 
     | 
    
         
             
                  fetch_summary_report('byChannel', event_key)
         
     | 
| 
       56 
92 
     | 
    
         
             
                end
         
     | 
| 
         @@ -63,34 +99,10 @@ module Seatsio 
     | 
|
| 
       63 
99 
     | 
    
         
             
                  fetch_report('byLabel', event_key, label)
         
     | 
| 
       64 
100 
     | 
    
         
             
                end
         
     | 
| 
       65 
101 
     | 
    
         | 
| 
       66 
     | 
    
         
            -
                def by_status(event_key, status = nil)
         
     | 
| 
       67 
     | 
    
         
            -
                  fetch_report('byStatus', event_key, status)
         
     | 
| 
       68 
     | 
    
         
            -
                end
         
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
                def by_category_label(event_key, category_label = nil)
         
     | 
| 
       71 
     | 
    
         
            -
                  fetch_report('byCategoryLabel', event_key, category_label)
         
     | 
| 
       72 
     | 
    
         
            -
                end
         
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
                def by_category_key(event_key, category_key = nil)
         
     | 
| 
       75 
     | 
    
         
            -
                  fetch_report('byCategoryKey', event_key, category_key)
         
     | 
| 
       76 
     | 
    
         
            -
                end
         
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
102 
     | 
    
         
             
                def by_order_id(event_key, order_id = nil)
         
     | 
| 
       79 
103 
     | 
    
         
             
                  fetch_report('byOrderId', event_key, order_id)
         
     | 
| 
       80 
104 
     | 
    
         
             
                end
         
     | 
| 
       81 
105 
     | 
    
         | 
| 
       82 
     | 
    
         
            -
                def by_section(event_key, section = nil)
         
     | 
| 
       83 
     | 
    
         
            -
                  fetch_report('bySection', event_key, section)
         
     | 
| 
       84 
     | 
    
         
            -
                end
         
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
                def by_selectability(event_key, selectability = nil)
         
     | 
| 
       87 
     | 
    
         
            -
                  fetch_report('bySelectability', event_key, selectability)
         
     | 
| 
       88 
     | 
    
         
            -
                end
         
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
                def by_channel(event_key, channelKey = nil)
         
     | 
| 
       91 
     | 
    
         
            -
                  fetch_report('byChannel', event_key, channelKey)
         
     | 
| 
       92 
     | 
    
         
            -
                end
         
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
106 
     | 
    
         
             
                private
         
     | 
| 
       95 
107 
     | 
    
         | 
| 
       96 
108 
     | 
    
         
             
                def fetch_summary_report(report_type, event_key)
         
     | 
    
        data/lib/seatsio/events.rb
    CHANGED
    
    | 
         @@ -11,8 +11,8 @@ require "seatsio/events/change_best_available_object_status_request" 
     | 
|
| 
       11 
11 
     | 
    
         
             
            module Seatsio
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
              class EventsClient
         
     | 
| 
       14 
     | 
    
         
            -
                def initialize( 
     | 
| 
       15 
     | 
    
         
            -
                  @http_client =  
     | 
| 
      
 14 
     | 
    
         
            +
                def initialize(http_client)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  @http_client = http_client
         
     | 
| 
       16 
16 
     | 
    
         
             
                end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
                def create(chart_key: nil, event_key: nil, table_booking_config: nil, social_distancing_ruleset_key: nil)
         
     | 
    
        data/lib/seatsio/hold_tokens.rb
    CHANGED
    
    | 
         @@ -11,8 +11,8 @@ module Seatsio 
     | 
|
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
              class HoldTokensClient
         
     | 
| 
       13 
13 
     | 
    
         
             
                # @return [Seatsio::HoldTokensClient]
         
     | 
| 
       14 
     | 
    
         
            -
                def initialize( 
     | 
| 
       15 
     | 
    
         
            -
                  @http_client =  
     | 
| 
      
 14 
     | 
    
         
            +
                def initialize(http_client)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  @http_client = http_client
         
     | 
| 
       16 
16 
     | 
    
         
             
                end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
                def create(expires_in_minutes: nil)
         
     | 
    
        data/lib/seatsio/httpClient.rb
    CHANGED
    
    | 
         @@ -6,10 +6,11 @@ require "uri" 
     | 
|
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            module Seatsio
         
     | 
| 
       8 
8 
     | 
    
         
             
              class HttpClient
         
     | 
| 
       9 
     | 
    
         
            -
                def initialize(secret_key, workspace_key, base_url)
         
     | 
| 
      
 9 
     | 
    
         
            +
                def initialize(secret_key, workspace_key, base_url, max_retries)
         
     | 
| 
       10 
10 
     | 
    
         
             
                  @secret_key = Base64.encode64(secret_key)
         
     | 
| 
       11 
11 
     | 
    
         
             
                  @workspace_key = workspace_key
         
     | 
| 
       12 
12 
     | 
    
         
             
                  @base_url = base_url
         
     | 
| 
      
 13 
     | 
    
         
            +
                  @max_retries = max_retries
         
     | 
| 
       13 
14 
     | 
    
         
             
                end
         
     | 
| 
       14 
15 
     | 
    
         | 
| 
       15 
16 
     | 
    
         
             
                def execute(*args)
         
     | 
| 
         @@ -55,7 +56,7 @@ module Seatsio 
     | 
|
| 
       55 
56 
     | 
    
         
             
                    begin
         
     | 
| 
       56 
57 
     | 
    
         
             
                      return RestClient::Request.execute(request_options)
         
     | 
| 
       57 
58 
     | 
    
         
             
                    rescue RestClient::ExceptionWithResponse => e
         
     | 
| 
       58 
     | 
    
         
            -
                      if e.response.code != 429 || retry_count >=  
     | 
| 
      
 59 
     | 
    
         
            +
                      if e.response.code != 429 || retry_count >= @max_retries
         
     | 
| 
       59 
60 
     | 
    
         
             
                        raise e
         
     | 
| 
       60 
61 
     | 
    
         
             
                      else
         
     | 
| 
       61 
62 
     | 
    
         
             
                        wait_time = (2 ** (retry_count + 2)) / 10.0
         
     | 
    
        data/lib/seatsio/subaccounts.rb
    CHANGED
    
    | 
         @@ -8,8 +8,8 @@ require "seatsio/domain" 
     | 
|
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            module Seatsio
         
     | 
| 
       10 
10 
     | 
    
         
             
              class SubaccountsClient
         
     | 
| 
       11 
     | 
    
         
            -
                def initialize( 
     | 
| 
       12 
     | 
    
         
            -
                  @http_client =  
     | 
| 
      
 11 
     | 
    
         
            +
                def initialize(http_client)
         
     | 
| 
      
 12 
     | 
    
         
            +
                  @http_client = http_client
         
     | 
| 
       13 
13 
     | 
    
         
             
                end
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
                def create(name: nil)
         
     | 
| 
         @@ -6,8 +6,8 @@ require 'cgi' 
     | 
|
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            module Seatsio
         
     | 
| 
       8 
8 
     | 
    
         
             
              class UsageReportsClient
         
     | 
| 
       9 
     | 
    
         
            -
                def initialize( 
     | 
| 
       10 
     | 
    
         
            -
                  @http_client =  
     | 
| 
      
 9 
     | 
    
         
            +
                def initialize(http_client)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  @http_client = http_client
         
     | 
| 
       11 
11 
     | 
    
         
             
                end
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
                def summary_for_all_months
         
     | 
    
        data/lib/seatsio/version.rb
    CHANGED
    
    
    
        data/lib/seatsio/workspaces.rb
    CHANGED
    
    | 
         @@ -8,8 +8,9 @@ require "seatsio/domain" 
     | 
|
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            module Seatsio
         
     | 
| 
       10 
10 
     | 
    
         
             
              class WorkspacesClient
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                def initialize(http_client)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  @http_client = http_client
         
     | 
| 
       13 
14 
     | 
    
         
             
                end
         
     | 
| 
       14 
15 
     | 
    
         | 
| 
       15 
16 
     | 
    
         
             
                def create(name:, is_test: nil)
         
     | 
| 
         @@ -50,6 +51,18 @@ module Seatsio 
     | 
|
| 
       50 
51 
     | 
    
         
             
                  extended_cursor
         
     | 
| 
       51 
52 
     | 
    
         
             
                end
         
     | 
| 
       52 
53 
     | 
    
         | 
| 
      
 54 
     | 
    
         
            +
                def active(filter: nil)
         
     | 
| 
      
 55 
     | 
    
         
            +
                  extended_cursor = Pagination::Cursor.new(Workspace, 'workspaces/active', @http_client)
         
     | 
| 
      
 56 
     | 
    
         
            +
                  extended_cursor.set_query_param('filter', filter)
         
     | 
| 
      
 57 
     | 
    
         
            +
                  extended_cursor
         
     | 
| 
      
 58 
     | 
    
         
            +
                end
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                def inactive(filter: nil)
         
     | 
| 
      
 61 
     | 
    
         
            +
                  extended_cursor = Pagination::Cursor.new(Workspace, 'workspaces/inactive', @http_client)
         
     | 
| 
      
 62 
     | 
    
         
            +
                  extended_cursor.set_query_param('filter', filter)
         
     | 
| 
      
 63 
     | 
    
         
            +
                  extended_cursor
         
     | 
| 
      
 64 
     | 
    
         
            +
                end
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
       53 
66 
     | 
    
         
             
                def retrieve(key:)
         
     | 
| 
       54 
67 
     | 
    
         
             
                  response = @http_client.get("/workspaces/#{key}")
         
     | 
| 
       55 
68 
     | 
    
         
             
                  Workspace.new(response)
         
     | 
    
        data/lib/seatsio.rb
    CHANGED
    
    | 
         @@ -13,19 +13,22 @@ module Seatsio 
     | 
|
| 
       13 
13 
     | 
    
         
             
                attr_reader :charts, :subaccounts, :workspaces, :events,
         
     | 
| 
       14 
14 
     | 
    
         
             
                            :hold_tokens, :chart_reports, :event_reports, :usage_reports
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
                def initialize(region, secret_key, workspace_key = nil)
         
     | 
| 
      
 16 
     | 
    
         
            +
                def initialize(region, secret_key, workspace_key = nil, max_retries = 5)
         
     | 
| 
       17 
17 
     | 
    
         
             
                  base_url = region.url
         
     | 
| 
       18 
     | 
    
         
            -
                  @ 
     | 
| 
       19 
     | 
    
         
            -
                  @ 
     | 
| 
       20 
     | 
    
         
            -
                  @ 
     | 
| 
       21 
     | 
    
         
            -
                  @ 
     | 
| 
       22 
     | 
    
         
            -
                  @ 
     | 
| 
       23 
     | 
    
         
            -
                  @ 
     | 
| 
       24 
     | 
    
         
            -
                  @ 
     | 
| 
       25 
     | 
    
         
            -
                  @ 
     | 
| 
      
 18 
     | 
    
         
            +
                  @http_client = Seatsio::HttpClient.new(secret_key, workspace_key, base_url, max_retries)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  @charts = ChartsClient.new(@http_client)
         
     | 
| 
      
 20 
     | 
    
         
            +
                  @subaccounts = SubaccountsClient.new(@http_client)
         
     | 
| 
      
 21 
     | 
    
         
            +
                  @workspaces = WorkspacesClient.new(@http_client)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  @events = EventsClient.new(@http_client)
         
     | 
| 
      
 23 
     | 
    
         
            +
                  @hold_tokens = HoldTokensClient.new(@http_client)
         
     | 
| 
      
 24 
     | 
    
         
            +
                  @chart_reports = ChartReportsClient.new(@http_client)
         
     | 
| 
      
 25 
     | 
    
         
            +
                  @event_reports = EventReportsClient.new(@http_client)
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @usage_reports = UsageReportsClient.new(@http_client)
         
     | 
| 
       26 
27 
     | 
    
         
             
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
       27 
29 
     | 
    
         
             
              end
         
     | 
| 
       28 
30 
     | 
    
         | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
       29 
32 
     | 
    
         
             
              class Region
         
     | 
| 
       30 
33 
     | 
    
         
             
                attr_reader :url
         
     | 
| 
       31 
34 
     | 
    
         | 
    
        data/releasing.md
    CHANGED
    
    
    
        data/seatsio.gemspec
    CHANGED
    
    | 
         @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       20 
20 
     | 
    
         
             
              spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         
     | 
| 
       21 
21 
     | 
    
         
             
              spec.require_paths = ["lib"]
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
              spec.add_development_dependency "bundler", "~>  
     | 
| 
      
 23 
     | 
    
         
            +
              spec.add_development_dependency "bundler", "~> 2.2"
         
     | 
| 
       24 
24 
     | 
    
         
             
              spec.add_development_dependency "rake", "~> 13.0"
         
     | 
| 
       25 
25 
     | 
    
         
             
              spec.add_development_dependency "minitest", "~> 5.0"
         
     | 
| 
       26 
26 
     | 
    
         
             
              spec.add_development_dependency "rest-client", '~> 2.0', '>= 2.0.2'
         
     | 
    
        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: 32. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 32.6.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Seats.io
         
     | 
| 
       8 
     | 
    
         
            -
            autorequire:
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2021- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-09-14 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -16,14 +16,14 @@ dependencies: 
     | 
|
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
17 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '2.2'
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :development
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
24 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '2.2'
         
     | 
| 
       27 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
28 
     | 
    
         
             
              name: rake
         
     | 
| 
       29 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -100,6 +100,7 @@ extensions: [] 
     | 
|
| 
       100 
100 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       101 
101 
     | 
    
         
             
            files:
         
     | 
| 
       102 
102 
     | 
    
         
             
            - ".editorconfig"
         
     | 
| 
      
 103 
     | 
    
         
            +
            - ".github/dependabot.yml"
         
     | 
| 
       103 
104 
     | 
    
         
             
            - ".github/workflows/build.yml"
         
     | 
| 
       104 
105 
     | 
    
         
             
            - ".github/workflows/publish.yml"
         
     | 
| 
       105 
106 
     | 
    
         
             
            - ".gitignore"
         
     | 
| 
         @@ -133,7 +134,7 @@ files: 
     | 
|
| 
       133 
134 
     | 
    
         
             
            homepage: http://seats.io
         
     | 
| 
       134 
135 
     | 
    
         
             
            licenses: []
         
     | 
| 
       135 
136 
     | 
    
         
             
            metadata: {}
         
     | 
| 
       136 
     | 
    
         
            -
            post_install_message:
         
     | 
| 
      
 137 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
       137 
138 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       138 
139 
     | 
    
         
             
            require_paths:
         
     | 
| 
       139 
140 
     | 
    
         
             
            - lib
         
     | 
| 
         @@ -149,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       149 
150 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       150 
151 
     | 
    
         
             
            requirements: []
         
     | 
| 
       151 
152 
     | 
    
         
             
            rubygems_version: 3.1.2
         
     | 
| 
       152 
     | 
    
         
            -
            signing_key:
         
     | 
| 
      
 153 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
       153 
154 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       154 
155 
     | 
    
         
             
            summary: the official Seats.io Ruby client library
         
     | 
| 
       155 
156 
     | 
    
         
             
            test_files: []
         
     |