seatsio 32.5.0 → 34.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: 4d21c2748ea74524c6c7889fd9ef694673a5fb9d52c31a8feac6b4de8ec43f69
4
- data.tar.gz: 51678457cdd12e5e6f1ea7f0793d91c2b9cb1560b7fd924a3610cf6d09e4aaa9
3
+ metadata.gz: d8cf426e69e7b398fe7f656998b5918baaadb7366a34d3f69ba6923944e1a5e6
4
+ data.tar.gz: 535d5c8073412db116e808ab2ed465ce788e195396d88660ad4c9aaa682c3465
5
5
  SHA512:
6
- metadata.gz: '08be1edebfa338f7f2563dd4cb00755c2092bb2582c0b24356d0ed33c6764b1b4d3ae8f8e33f4b6b743183d14bafdf063c9e26ab5121fb269e37ff8c62d04c4b'
7
- data.tar.gz: 9394d8015e7314e6543c7de272e687ebfb9267da58cf4d68374f205c98403414765e61c40534fe54ba74b48d43b5bd1929105a722e9897759370ffcb005fa8f3
6
+ metadata.gz: 6c002279fb10b41d5c1c17d4994eb74f6d4e43f5c565475e70abff3bd6944598c004163cd16acda88827e1ea436d909bb181822b20c2900bb7ad2aa4be630997
7
+ data.tar.gz: f1216cf4ed428193d8cc3a2450b090fc49cc226b95ca6cd2efd3033ff00de494a365f398cc21d191f1bec3b533cff32d7eb60d35b2018994e8b04369a50cf536
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  strategy:
14
14
  matrix:
15
- ruby-version: ['2.3']
15
+ ruby-version: ['2.4']
16
16
 
17
17
  steps:
18
18
  - uses: actions/checkout@v2
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.0
1
+ 2.4.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seatsio (32.5.0)
4
+ seatsio (34.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -32,8 +32,8 @@ GEM
32
32
  unf (0.1.4)
33
33
  unf_ext
34
34
  unf_ext (0.0.7.7)
35
- webmock (3.13.0)
36
- addressable (>= 2.3.6)
35
+ webmock (3.14.0)
36
+ addressable (>= 2.8.0)
37
37
  crack (>= 0.3.2)
38
38
  hashdiff (>= 0.4.0, < 2.0.0)
39
39
 
@@ -49,4 +49,4 @@ DEPENDENCIES
49
49
  webmock (~> 3.4, >= 3.4.2)
50
50
 
51
51
  BUNDLED WITH
52
- 1.17.2
52
+ 2.1.4
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Build](https://github.com/seatsio/seatsio-ruby/workflows/Build/badge.svg)](https://github.com/seatsio/seatsio-ruby/actions/workflows/build.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/seatsio.svg)](https://badge.fury.io/rb/seatsio)
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
+ This is the official Ruby client library for the [Seats.io V2 REST API](https://docs.seats.io/docs/api-overview), supporting Ruby 2.4.0+
7
7
 
8
8
  ## Versioning
9
9
 
@@ -52,6 +52,22 @@ client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key")
52
52
  client.events.change_object_status("<EVENT KEY>", ["A-1", "A-2"], "my-custom-status")
53
53
  ```
54
54
 
55
+ ### Retrieving object category and status (and other information)
56
+
57
+ ```ruby
58
+ require('seatsio')
59
+ client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key")
60
+ object_infos = client.events.retrieve_object_infos key: event.key, labels: ['A-1', 'A-2']
61
+
62
+ puts object_infos['A-1'].category_key
63
+ puts object_infos['A-1'].category_label
64
+ puts object_infos['A-1'].status
65
+
66
+ puts object_infos['A-2'].category_key
67
+ puts object_infos['A-2'].category_label
68
+ puts object_infos['A-2'].status
69
+ ```
70
+
55
71
  ### Listing all charts
56
72
 
57
73
  ```ruby
@@ -73,7 +89,8 @@ Each page is Enumerable, and it has `next_page_starts_after` and `previous_page_
73
89
 
74
90
  ```ruby
75
91
  # ... user initially opens the screen ...
76
-
92
+ require('seatsio')
93
+ client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key")
77
94
  firstPage = client.charts.list.first_page()
78
95
  firstPage.each do |chart|
79
96
  puts chart.key
@@ -82,7 +99,8 @@ end
82
99
 
83
100
  ```ruby
84
101
  # ... user clicks on 'next page' button ...
85
-
102
+ require('seatsio')
103
+ client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key")
86
104
  nextPage = client.charts.list.page_after(firstPage.next_page_starts_after)
87
105
  nextPage.each do |chart|
88
106
  puts chart.key
@@ -91,7 +109,8 @@ end
91
109
 
92
110
  ```ruby
93
111
  # ... user clicks on 'previous page' button ...
94
-
112
+ require('seatsio')
113
+ client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key")
95
114
  previousPage = client.charts.list.page_before(nextPage.previous_page_ends_before)
96
115
  previousPage.each do |chart|
97
116
  puts chart.key
@@ -102,10 +121,21 @@ end
102
121
 
103
122
  ```ruby
104
123
  require('seatsio')
105
- client = Seatsio::Client.new(Seatsio::Region.EU(), "my-company-admin-key")
124
+ client = Seatsio::Client.new(Seatsio::Region.EU(), "my-company-admin-key") # can be found on https://app.seats.io/company-settings
106
125
  client.workspaces.create name: "a workspace"
107
126
  ```
108
127
 
128
+ ### Creating a chart and an event with the company admin key
129
+
130
+ ```ruby
131
+ require('seatsio')
132
+ # company admin key can be found on https://app.seats.io/company-settings
133
+ # workspace public key can be found on https://app.seats.io/workspace-settings
134
+ client = Seatsio::Client.new(Seatsio::Region.EU(), "my-company-admin-key", "my-workspace-public-key")
135
+ chart = client.charts.create
136
+ event = client.events.create chart_key: chart.key
137
+ ```
138
+
109
139
  # Error handling
110
140
 
111
141
  When an API call results in a 4xx or 5xx error (e.g. when a chart could not be found), a SeatsioException is thrown.
@@ -121,4 +151,15 @@ This exception contains a message string describing what went wrong, and also tw
121
151
  This library supports [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff).
122
152
 
123
153
  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. This happens at most 5 times, before giving up (after approximately 15 seconds).
154
+ 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).
155
+
156
+ We throw a `RateLimitExceededException` (which is a subclass of `SeatsioException`) when exponential backoff eventually fails.
157
+
158
+ To change the maximum number of retries, create the client as follows:
159
+
160
+ ```ruby
161
+ require('seatsio')
162
+ client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key", max_retries = 3)
163
+ ```
164
+
165
+ Passing in 0 disables exponential backoff completely. In that case, the client will never retry a failed request.
@@ -6,8 +6,8 @@ require 'cgi'
6
6
 
7
7
  module Seatsio
8
8
  class ChartReportsClient
9
- def initialize(secret_key, workspace_key, base_url)
10
- @http_client = ::Seatsio::HttpClient.new(secret_key, workspace_key, base_url)
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)
@@ -11,8 +11,8 @@ module Seatsio
11
11
  class ChartsClient
12
12
  attr_reader :archive
13
13
 
14
- def initialize(secret_key, workspace_key, base_url)
15
- @http_client = Seatsio::HttpClient.new(secret_key, workspace_key, base_url)
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
 
@@ -201,25 +201,6 @@ module Seatsio
201
201
  end
202
202
  end
203
203
 
204
- class ObjectStatus
205
- FREE = 'free'
206
- BOOKED = 'booked'
207
- HELD = 'reservedByToken'
208
-
209
- attr_reader :status, :hold_token, :order_id, :ticket_type,
210
- :quantity, :extra_data, :for_sale
211
-
212
- def initialize(data)
213
- @status = data['status']
214
- @hold_token = data['holdToken']
215
- @order_id = data['orderId']
216
- @ticket_type = data['ticketType']
217
- @quantity = data['quantity']
218
- @extra_data = data['extraData']
219
- @for_sale = data['forSale']
220
- end
221
- end
222
-
223
204
  class ChangeObjectStatusResult
224
205
 
225
206
  attr_reader :objects
@@ -261,7 +242,7 @@ module Seatsio
261
242
  end
262
243
  end
263
244
 
264
- class ChartReportItem
245
+ class ChartObjectInfo
265
246
 
266
247
  attr_reader :label, :labels, :ids, :category_key, :category_label, :section, :entrance, :capacity, :object_type,
267
248
  :left_neighbour, :right_neighbour, :book_as_a_whole, :distance_to_focal_point
@@ -292,7 +273,7 @@ module Seatsio
292
273
  data.each do |key, values|
293
274
  items[key] = []
294
275
  values.each do |value|
295
- items[key] << ChartReportItem.new(value)
276
+ items[key] << ChartObjectInfo.new(value)
296
277
  end
297
278
  end
298
279
  @items = items
@@ -307,7 +288,7 @@ module Seatsio
307
288
  if data.is_a? Array
308
289
  items = []
309
290
  data.each do |item|
310
- items << EventReportItem.new(item)
291
+ items << EventObjectInfo.new(item)
311
292
  end
312
293
  @items = items
313
294
  elsif data.nil?
@@ -317,7 +298,7 @@ module Seatsio
317
298
  data.each do |key, values|
318
299
  items[key] = []
319
300
  values.each do |value|
320
- items[key] << EventReportItem.new(value)
301
+ items[key] << EventObjectInfo.new(value)
321
302
  end
322
303
  end
323
304
  @items = items
@@ -325,13 +306,17 @@ module Seatsio
325
306
  end
326
307
  end
327
308
 
328
- class EventReportItem
309
+ class EventObjectInfo
310
+ FREE = 'free'
311
+ BOOKED = 'booked'
312
+ HELD = 'reservedByToken'
313
+
329
314
  attr_reader :labels, :ids, :label, :order_id, :extra_data, :capacity, :status,
330
315
  :category_key, :entrance, :object_type, :hold_token, :category_label,
331
316
  :ticket_type, :num_booked, :num_free, :num_held, :for_sale, :section,
332
317
  :is_accessible, :is_companion_seat, :has_restricted_view, :displayed_object_type,
333
318
  :left_neighbour, :right_neighbour, :is_selectable, :is_disabled_by_social_distancing, :channel,
334
- :book_as_a_whole, :distance_to_focal_point
319
+ :book_as_a_whole, :distance_to_focal_point, :holds
335
320
 
336
321
  def initialize(data)
337
322
  @status = data['status']
@@ -363,6 +348,7 @@ module Seatsio
363
348
  @channel = data['channel']
364
349
  @book_as_a_whole = data['bookAsAWhole']
365
350
  @distance_to_focal_point = data['distanceToFocalPoint']
351
+ @holds = data['holds']
366
352
  end
367
353
  end
368
354
 
@@ -506,7 +492,7 @@ module Seatsio
506
492
  def to_object_details(data)
507
493
  object_details = {}
508
494
  data.each do |key, value|
509
- object_details[key] = EventReportItem.new(value)
495
+ object_details[key] = EventObjectInfo.new(value)
510
496
  end
511
497
  object_details
512
498
  end
@@ -7,8 +7,8 @@ require 'cgi'
7
7
  module Seatsio
8
8
  # Client for fetching event reports
9
9
  class EventReportsClient
10
- def initialize(secret_key, workspace_key, base_url)
11
- @http_client = ::Seatsio::HttpClient.new(secret_key, workspace_key, base_url)
10
+ def initialize(http_client)
11
+ @http_client = http_client
12
12
  end
13
13
 
14
14
  def by_status(event_key, status = nil)
@@ -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(secret_key, workspace_key, base_url)
15
- @http_client = ::Seatsio::HttpClient.new(secret_key, workspace_key, base_url)
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)
@@ -43,14 +43,23 @@ module Seatsio
43
43
  @http_client.post("events/#{key}/actions/update-extra-data", payload)
44
44
  end
45
45
 
46
- def retrieve_object_status(key:, object_key:)
47
- url = "events/#{key}/objects/#{CGI::escape(object_key).gsub('+', '%20')}"
48
- response = @http_client.get(url)
49
- ObjectStatus.new(response)
46
+ def retrieve_object_info(key:, label:)
47
+ result = retrieve_object_infos key: key, labels: [label]
48
+ result[label]
49
+ end
50
+
51
+ def retrieve_object_infos(key:, labels:)
52
+ url = "events/#{key}/objects"
53
+ query_params = URI.encode_www_form(labels.map { |label| ['label', label]})
54
+ response = @http_client.get(url, query_params)
55
+ response.each do |key, value|
56
+ response[key] = EventObjectInfo.new(value)
57
+ end
58
+ response
50
59
  end
51
60
 
52
61
  def book(event_key_or_keys, object_or_objects, hold_token: nil, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil, ignore_social_distancing: nil)
53
- self.change_object_status(event_key_or_keys, object_or_objects, ObjectStatus::BOOKED, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, ignore_channels: ignore_channels, channel_keys: channel_keys, ignore_social_distancing: ignore_social_distancing)
62
+ self.change_object_status(event_key_or_keys, object_or_objects, Seatsio::EventObjectInfo::BOOKED, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, ignore_channels: ignore_channels, channel_keys: channel_keys, ignore_social_distancing: ignore_social_distancing)
54
63
  end
55
64
 
56
65
  def change_object_status(event_key_or_keys, object_or_objects, status, hold_token: nil, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil, ignore_social_distancing: nil)
@@ -72,7 +81,7 @@ module Seatsio
72
81
  end
73
82
 
74
83
  def hold(event_key_or_keys, object_or_objects, hold_token, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil, ignore_social_distancing: nil)
75
- change_object_status(event_key_or_keys, object_or_objects, ObjectStatus::HELD, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, ignore_channels: ignore_channels, channel_keys: channel_keys, ignore_social_distancing: ignore_social_distancing)
84
+ change_object_status(event_key_or_keys, object_or_objects, Seatsio::EventObjectInfo::HELD, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, ignore_channels: ignore_channels, channel_keys: channel_keys, ignore_social_distancing: ignore_social_distancing)
76
85
  end
77
86
 
78
87
  def change_best_available_object_status(key, number, status, categories: nil, hold_token: nil, extra_data: nil, ticket_types: nil, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil)
@@ -82,15 +91,15 @@ module Seatsio
82
91
  end
83
92
 
84
93
  def book_best_available(key, number, categories: nil, hold_token: nil, order_id: nil, keep_extra_data: nil, extra_data: nil, ticket_types: nil, ignore_channels: nil, channel_keys: nil)
85
- change_best_available_object_status(key, number, ObjectStatus::BOOKED, categories: categories, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, extra_data: extra_data, ticket_types: ticket_types, ignore_channels: ignore_channels, channel_keys: channel_keys)
94
+ change_best_available_object_status(key, number, Seatsio::EventObjectInfo::BOOKED, categories: categories, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, extra_data: extra_data, ticket_types: ticket_types, ignore_channels: ignore_channels, channel_keys: channel_keys)
86
95
  end
87
96
 
88
97
  def hold_best_available(key, number, hold_token, categories: nil, order_id: nil, keep_extra_data: nil, extra_data: nil, ticket_types: nil, ignore_channels: nil, channel_keys: nil)
89
- change_best_available_object_status(key, number, ObjectStatus::HELD, categories: categories, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, extra_data: extra_data, ticket_types: ticket_types, ignore_channels: ignore_channels, channel_keys: channel_keys)
98
+ change_best_available_object_status(key, number, Seatsio::EventObjectInfo::HELD, categories: categories, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, extra_data: extra_data, ticket_types: ticket_types, ignore_channels: ignore_channels, channel_keys: channel_keys)
90
99
  end
91
100
 
92
101
  def release(event_key_or_keys, object_or_objects, hold_token: nil, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil)
93
- change_object_status(event_key_or_keys, object_or_objects, ObjectStatus::FREE, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, ignore_channels: ignore_channels, channel_keys: channel_keys)
102
+ change_object_status(event_key_or_keys, object_or_objects, Seatsio::EventObjectInfo::FREE, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, ignore_channels: ignore_channels, channel_keys: channel_keys)
94
103
  end
95
104
 
96
105
  def delete(key:)
@@ -3,6 +3,9 @@ module Seatsio
3
3
  class SeatsioException < StandardError
4
4
  end
5
5
 
6
+ class RateLimitExceededException < SeatsioException
7
+ end
8
+
6
9
  class NoMorePagesException < SeatsioException
7
10
  end
8
11
 
@@ -11,8 +11,8 @@ module Seatsio
11
11
 
12
12
  class HoldTokensClient
13
13
  # @return [Seatsio::HoldTokensClient]
14
- def initialize(secret_key, workspace_key, base_url)
15
- @http_client = ::Seatsio::HttpClient.new(secret_key, workspace_key, base_url)
14
+ def initialize(http_client)
15
+ @http_client = http_client
16
16
  end
17
17
 
18
18
  def create(expires_in_minutes: nil)
@@ -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)
@@ -18,12 +19,18 @@ module Seatsio
18
19
  unless @workspace_key.nil?
19
20
  headers[:'X-Workspace-Key'] = @workspace_key
20
21
  end
21
- if args[2].include? :params
22
- headers[:params] = args[2][:params]
23
- end
24
22
 
25
23
  url = "#{@base_url}/#{args[1]}"
26
24
 
25
+ if args[2].include? :params
26
+ params = args[2][:params]
27
+ if params.is_a? Hash
28
+ headers[:params] = params
29
+ else
30
+ url += "?" + params
31
+ end
32
+ end
33
+
27
34
  request_options = { method: args[0], url: url, headers: headers }
28
35
 
29
36
  if args[0] == :post
@@ -41,7 +48,11 @@ module Seatsio
41
48
  rescue RestClient::NotFound => e
42
49
  raise Exception::NotFoundException.new(e.response)
43
50
  rescue RestClient::ExceptionWithResponse => e
44
- raise Exception::SeatsioException.new(e.response)
51
+ if e.response.code == 429
52
+ raise Exception::RateLimitExceededException.new(e.response)
53
+ else
54
+ raise Exception::SeatsioException.new(e.response)
55
+ end
45
56
  rescue RestClient::Exceptions::Timeout
46
57
  raise Exception::SeatsioException.new("Timeout ERROR")
47
58
  rescue SocketError
@@ -55,7 +66,7 @@ module Seatsio
55
66
  begin
56
67
  return RestClient::Request.execute(request_options)
57
68
  rescue RestClient::ExceptionWithResponse => e
58
- if e.response.code != 429 || retry_count >= 5
69
+ if e.response.code != 429 || retry_count >= @max_retries
59
70
  raise e
60
71
  else
61
72
  wait_time = (2 ** (retry_count + 2)) / 10.0
@@ -8,8 +8,8 @@ require "seatsio/domain"
8
8
 
9
9
  module Seatsio
10
10
  class SubaccountsClient
11
- def initialize(secret_key, workspace_key, base_url)
12
- @http_client = ::Seatsio::HttpClient.new(secret_key, workspace_key, base_url)
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(secret_key, workspace_key, base_url)
10
- @http_client = ::Seatsio::HttpClient.new(secret_key, workspace_key, base_url)
9
+ def initialize(http_client)
10
+ @http_client = http_client
11
11
  end
12
12
 
13
13
  def summary_for_all_months
@@ -1,3 +1,3 @@
1
1
  module Seatsio
2
- VERSION = "32.5.0"
2
+ VERSION = "34.0.0"
3
3
  end
@@ -9,8 +9,8 @@ require "seatsio/domain"
9
9
  module Seatsio
10
10
  class WorkspacesClient
11
11
 
12
- def initialize(secret_key, base_url)
13
- @http_client = ::Seatsio::HttpClient.new(secret_key, nil, base_url)
12
+ def initialize(http_client)
13
+ @http_client = http_client
14
14
  end
15
15
 
16
16
  def create(name:, is_test: nil)
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
- @charts = ChartsClient.new(secret_key, workspace_key, base_url)
19
- @subaccounts = SubaccountsClient.new(secret_key, workspace_key, base_url)
20
- @workspaces = WorkspacesClient.new(secret_key, base_url)
21
- @events = EventsClient.new(secret_key, workspace_key, base_url)
22
- @hold_tokens = HoldTokensClient.new(secret_key, workspace_key, base_url)
23
- @chart_reports = ChartReportsClient.new(secret_key, workspace_key, base_url)
24
- @event_reports = EventReportsClient.new(secret_key, workspace_key, base_url)
25
- @usage_reports = UsageReportsClient.new(secret_key, workspace_key, base_url)
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
 
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.5.0
4
+ version: 34.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: 2021-08-02 00:00:00.000000000 Z
11
+ date: 2021-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler