seatsio 21 → 23.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/.ruby-version +1 -0
- data/Gemfile.lock +4 -22
- data/README.md +16 -12
- data/lib/seatsio.rb +1 -3
- data/lib/seatsio/charts.rb +6 -0
- data/lib/seatsio/domain.rb +28 -40
- data/lib/seatsio/events.rb +10 -1
- data/lib/seatsio/events/change_object_status_in_batch_request.rb +6 -0
- data/lib/seatsio/version.rb +1 -1
- data/lib/seatsio/workspaces.rb +5 -0
- data/seatsio.gemspec +1 -2
- metadata +6 -19
- data/lib/seatsio/accounts.rb +0 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22c363c33d731b9e45fdc8d7dfeb11f3d6e3da8ecd011fe3cb14c9a6b06d0948
|
|
4
|
+
data.tar.gz: 0c7e49e0cecd99e3022dd289bea7c396b13cc880cef3cb59fdc601acd3132a4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 91c4e7fa934f02eb15d78156acfe65b5eebdfa4867b5122ecee11feb4630ce7ad995431059b261c182636b9bbfbf2fa9cc1ed7381bc6f6d0a79ffa3b33072169
|
|
7
|
+
data.tar.gz: acce633d528b56f0f40e83c7cf15b2b5391468af2b4295abcf8c8c3ab3858cf179ae58cca55e58e31577e85eeac4dceee54982eb8ce66df9e6f1af5e8723028e
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.3.0
|
data/Gemfile.lock
CHANGED
|
@@ -1,49 +1,32 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
seatsio (
|
|
4
|
+
seatsio (23.6.0)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
9
|
addressable (2.6.0)
|
|
10
10
|
public_suffix (>= 2.0.2, < 4.0)
|
|
11
|
-
coveralls (0.8.23)
|
|
12
|
-
json (>= 1.8, < 3)
|
|
13
|
-
simplecov (~> 0.16.1)
|
|
14
|
-
term-ansicolor (~> 1.3)
|
|
15
|
-
thor (>= 0.19.4, < 2.0)
|
|
16
|
-
tins (~> 1.6)
|
|
17
11
|
crack (0.4.3)
|
|
18
12
|
safe_yaml (~> 1.0.0)
|
|
19
|
-
docile (1.3.1)
|
|
20
13
|
domain_name (0.5.20180417)
|
|
21
14
|
unf (>= 0.0.5, < 1.0.0)
|
|
22
15
|
hashdiff (0.4.0)
|
|
23
16
|
http-cookie (1.0.3)
|
|
24
17
|
domain_name (~> 0.5)
|
|
25
|
-
json (2.2.0)
|
|
26
18
|
mime-types (3.2.2)
|
|
27
19
|
mime-types-data (~> 3.2015)
|
|
28
20
|
mime-types-data (3.2019.0331)
|
|
29
21
|
minitest (5.11.3)
|
|
30
22
|
netrc (0.11.0)
|
|
31
23
|
public_suffix (3.1.0)
|
|
32
|
-
rake (
|
|
24
|
+
rake (13.0.1)
|
|
33
25
|
rest-client (2.0.2)
|
|
34
26
|
http-cookie (>= 1.0.2, < 2.0)
|
|
35
27
|
mime-types (>= 1.16, < 4.0)
|
|
36
28
|
netrc (~> 0.8)
|
|
37
29
|
safe_yaml (1.0.5)
|
|
38
|
-
simplecov (0.16.1)
|
|
39
|
-
docile (~> 1.1)
|
|
40
|
-
json (>= 1.8, < 3)
|
|
41
|
-
simplecov-html (~> 0.10.0)
|
|
42
|
-
simplecov-html (0.10.2)
|
|
43
|
-
term-ansicolor (1.7.1)
|
|
44
|
-
tins (~> 1.0)
|
|
45
|
-
thor (0.20.3)
|
|
46
|
-
tins (1.20.3)
|
|
47
30
|
unf (0.1.4)
|
|
48
31
|
unf_ext
|
|
49
32
|
unf_ext (0.0.7.6)
|
|
@@ -57,12 +40,11 @@ PLATFORMS
|
|
|
57
40
|
|
|
58
41
|
DEPENDENCIES
|
|
59
42
|
bundler (~> 1.16)
|
|
60
|
-
coveralls (~> 0.8.22)
|
|
61
43
|
minitest (~> 5.0)
|
|
62
|
-
rake (~>
|
|
44
|
+
rake (~> 13.0)
|
|
63
45
|
rest-client (~> 2.0, >= 2.0.2)
|
|
64
46
|
seatsio!
|
|
65
47
|
webmock (~> 3.4, >= 3.4.2)
|
|
66
48
|
|
|
67
49
|
BUNDLED WITH
|
|
68
|
-
1.
|
|
50
|
+
1.16.1
|
data/README.md
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
# seatsio-ruby, the official Seats.io Ruby client library
|
|
2
2
|
|
|
3
3
|
[](https://travis-ci.org/seatsio/seatsio-ruby)
|
|
4
|
-
[](https://coveralls.io/github/seatsio/seatsio-ruby?branch=master)
|
|
5
4
|
|
|
6
5
|
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+
|
|
7
6
|
|
|
7
|
+
## Versioning
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
seatsio-ruby only uses major version numbers: v5, v6, v7 etc. Each release - backwards compatible or not - receives a new major version number.
|
|
12
|
-
|
|
13
|
-
The reason: we want to play safe and assume that each release might break backwards compatibility.
|
|
9
|
+
seatsio-ruby follows semver since v23.3.0.
|
|
14
10
|
|
|
15
11
|
## Examples
|
|
16
12
|
|
|
@@ -18,7 +14,7 @@ The reason: we want to play safe and assume that each release might break backwa
|
|
|
18
14
|
|
|
19
15
|
```ruby
|
|
20
16
|
require('seatsio')
|
|
21
|
-
client = Seatsio::Client.new("my-secret-key") # can be found on https://app.seats.io/settings
|
|
17
|
+
client = Seatsio::Client.new("my-workspace-secret-key") # can be found on https://app.seats.io/workspace-settings
|
|
22
18
|
chart = client.charts.create
|
|
23
19
|
event = client.events.create key: chart.key
|
|
24
20
|
```
|
|
@@ -27,7 +23,7 @@ event = client.events.create key: chart.key
|
|
|
27
23
|
|
|
28
24
|
```ruby
|
|
29
25
|
require('seatsio')
|
|
30
|
-
client = Seatsio::Client.new("my-secret-key")
|
|
26
|
+
client = Seatsio::Client.new("my-workspace-secret-key")
|
|
31
27
|
client.events.book(event.key, ["A-1", "A-2"])
|
|
32
28
|
```
|
|
33
29
|
|
|
@@ -35,7 +31,7 @@ client.events.book(event.key, ["A-1", "A-2"])
|
|
|
35
31
|
|
|
36
32
|
```ruby
|
|
37
33
|
require('seatsio')
|
|
38
|
-
client = Seatsio::Client.new("my-secret-key")
|
|
34
|
+
client = Seatsio::Client.new("my-workspace-secret-key")
|
|
39
35
|
client.events.release(event.key, ["A-1", "A-2"])
|
|
40
36
|
```
|
|
41
37
|
|
|
@@ -43,7 +39,7 @@ client.events.release(event.key, ["A-1", "A-2"])
|
|
|
43
39
|
|
|
44
40
|
```ruby
|
|
45
41
|
require('seatsio')
|
|
46
|
-
client = Seatsio::Client.new("my-secret-key")
|
|
42
|
+
client = Seatsio::Client.new("my-workspace-secret-key")
|
|
47
43
|
client.events.book(event.key, ["A-1", "A-2"], "a-hold-token")
|
|
48
44
|
```
|
|
49
45
|
|
|
@@ -51,7 +47,7 @@ client.events.book(event.key, ["A-1", "A-2"], "a-hold-token")
|
|
|
51
47
|
|
|
52
48
|
```ruby
|
|
53
49
|
require('seatsio')
|
|
54
|
-
client = Seatsio::Client.new("my-secret-key")
|
|
50
|
+
client = Seatsio::Client.new("my-workspace-secret-key")
|
|
55
51
|
client.events.change_object_status("<EVENT KEY>", ["A-1", "A-2"], "my-custom-status")
|
|
56
52
|
```
|
|
57
53
|
|
|
@@ -59,7 +55,7 @@ client.events.change_object_status("
|
|
|
59
55
|
|
|
60
56
|
```ruby
|
|
61
57
|
require('seatsio')
|
|
62
|
-
client = Seatsio::Client.new("my-secret-key")
|
|
58
|
+
client = Seatsio::Client.new("my-workspace-secret-key")
|
|
63
59
|
charts = client.charts.list
|
|
64
60
|
charts.each do |chart|
|
|
65
61
|
puts chart.key
|
|
@@ -101,6 +97,14 @@ previousPage.each do |chart|
|
|
|
101
97
|
end
|
|
102
98
|
```
|
|
103
99
|
|
|
100
|
+
### Creating a workspace
|
|
101
|
+
|
|
102
|
+
```ruby
|
|
103
|
+
require('seatsio')
|
|
104
|
+
client = Seatsio::Client.new("my-company-admin-key")
|
|
105
|
+
client.workspaces.create name: "a workspace"
|
|
106
|
+
```
|
|
107
|
+
|
|
104
108
|
# Error handling
|
|
105
109
|
|
|
106
110
|
When an API call results in a 4xx or 5xx error (e.g. when a chart could not be found), a SeatsioException is thrown.
|
data/lib/seatsio.rb
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
require 'seatsio/version'
|
|
2
2
|
require 'seatsio/charts'
|
|
3
|
-
require 'seatsio/accounts'
|
|
4
3
|
require 'seatsio/subaccounts'
|
|
5
4
|
require 'seatsio/workspaces'
|
|
6
5
|
require 'seatsio/events'
|
|
@@ -12,12 +11,11 @@ require 'seatsio/usage_reports'
|
|
|
12
11
|
module Seatsio
|
|
13
12
|
# Main Seatsio Class
|
|
14
13
|
class Client
|
|
15
|
-
attr_reader :charts, :
|
|
14
|
+
attr_reader :charts, :subaccounts, :workspaces, :events,
|
|
16
15
|
:hold_tokens, :chart_reports, :event_reports, :usage_reports
|
|
17
16
|
|
|
18
17
|
def initialize(secret_key, workspace_key = nil, base_url = 'https://api.seatsio.net')
|
|
19
18
|
@charts = ChartsClient.new(secret_key, workspace_key, base_url)
|
|
20
|
-
@accounts = AccountsClient.new(secret_key, workspace_key, base_url)
|
|
21
19
|
@subaccounts = SubaccountsClient.new(secret_key, workspace_key, base_url)
|
|
22
20
|
@workspaces = WorkspacesClient.new(secret_key, base_url)
|
|
23
21
|
@events = EventsClient.new(secret_key, workspace_key, base_url)
|
data/lib/seatsio/charts.rb
CHANGED
|
@@ -57,6 +57,12 @@ module Seatsio
|
|
|
57
57
|
Domain::Chart.new(response)
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
+
def copy_to_workspace(chart_key, to_workspace_key)
|
|
61
|
+
url = "charts/#{chart_key}/version/published/actions/copy-to-workspace/#{to_workspace_key}"
|
|
62
|
+
response = @http_client.post url
|
|
63
|
+
Domain::Chart.new(response)
|
|
64
|
+
end
|
|
65
|
+
|
|
60
66
|
def copy_draft_version(key)
|
|
61
67
|
response = @http_client.post("charts/#{key}/version/draft/actions/copy")
|
|
62
68
|
Domain::Chart.new(response)
|
data/lib/seatsio/domain.rb
CHANGED
|
@@ -118,48 +118,16 @@ module Seatsio::Domain
|
|
|
118
118
|
end
|
|
119
119
|
end
|
|
120
120
|
|
|
121
|
-
class
|
|
122
|
-
attr_reader :
|
|
123
|
-
:validate_unlabeled_objects
|
|
124
|
-
|
|
125
|
-
def initialize(data)
|
|
126
|
-
@validate_duplicate_labels = data['VALIDATE_DUPLICATE_LABELS']
|
|
127
|
-
@validate_objects_without_categories = data['VALIDATE_OBJECTS_WITHOUT_CATEGORIES']
|
|
128
|
-
@validate_unlabeled_objects = data['VALIDATE_UNLABELED_OBJECTS']
|
|
129
|
-
end
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
class AccountSettings
|
|
133
|
-
attr_reader :draft_chart_drawings_enabled, :hold_on_select_for_gas, :chart_validation
|
|
134
|
-
|
|
135
|
-
def initialize(data)
|
|
136
|
-
@draft_chart_drawings_enabled = data['draftChartDrawingsEnabled']
|
|
137
|
-
@hold_on_select_for_gas = data['holdOnSelectForGAs']
|
|
138
|
-
@chart_validation = ChartValidationSettings.new(data['chartValidation'])
|
|
139
|
-
end
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
class Account
|
|
143
|
-
attr_reader :id, :secret_key, :designer_key, :name,
|
|
144
|
-
:email, :active, :settings
|
|
121
|
+
class Subaccount
|
|
122
|
+
attr_reader :id, :secret_key, :designer_key, :public_key, :name, :active
|
|
145
123
|
|
|
146
124
|
def initialize(data)
|
|
147
125
|
@id = data['id']
|
|
126
|
+
@public_key = data['publicKey']
|
|
148
127
|
@secret_key = data['secretKey']
|
|
149
128
|
@designer_key = data['designerKey']
|
|
150
129
|
@name = data['name']
|
|
151
|
-
@email = data['email']
|
|
152
130
|
@active = data['active']
|
|
153
|
-
@settings = AccountSettings.new(data['settings']) if data['settings'] != nil
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
class Subaccount < Account
|
|
158
|
-
attr_reader :public_key, :workspace
|
|
159
|
-
|
|
160
|
-
def initialize(data)
|
|
161
|
-
super
|
|
162
|
-
@public_key = data['publicKey']
|
|
163
131
|
end
|
|
164
132
|
end
|
|
165
133
|
|
|
@@ -203,6 +171,15 @@ module Seatsio::Domain
|
|
|
203
171
|
end
|
|
204
172
|
end
|
|
205
173
|
|
|
174
|
+
class ChangeObjectStatusInBatchResult
|
|
175
|
+
|
|
176
|
+
attr_reader :results
|
|
177
|
+
|
|
178
|
+
def initialize(data)
|
|
179
|
+
@results = data['results'].map { |r| ChangeObjectStatusResult.new(r) }
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
206
183
|
class HoldToken
|
|
207
184
|
|
|
208
185
|
attr_reader :hold_token, :expires_at, :expires_in_seconds, :workspace_key
|
|
@@ -228,7 +205,8 @@ module Seatsio::Domain
|
|
|
228
205
|
|
|
229
206
|
class ChartReportItem
|
|
230
207
|
|
|
231
|
-
attr_reader :label, :labels, :category_key, :category_label, :section, :entrance, :capacity, :object_type
|
|
208
|
+
attr_reader :label, :labels, :category_key, :category_label, :section, :entrance, :capacity, :object_type,
|
|
209
|
+
:left_neighbour, :right_neighbour
|
|
232
210
|
|
|
233
211
|
def initialize(data)
|
|
234
212
|
@label = data['label']
|
|
@@ -239,6 +217,8 @@ module Seatsio::Domain
|
|
|
239
217
|
@entrance = data['entrance']
|
|
240
218
|
@capacity = data['capacity']
|
|
241
219
|
@object_type = data['objectType']
|
|
220
|
+
@left_neighbour = data['leftNeighbour']
|
|
221
|
+
@right_neighbour = data['rightNeighbour']
|
|
242
222
|
end
|
|
243
223
|
end
|
|
244
224
|
|
|
@@ -287,7 +267,9 @@ module Seatsio::Domain
|
|
|
287
267
|
class EventReportItem
|
|
288
268
|
attr_reader :labels, :label, :order_id, :extra_data, :capacity, :status,
|
|
289
269
|
:category_key, :entrance, :object_type, :hold_token, :category_label,
|
|
290
|
-
:ticket_type, :num_booked, :num_free, :num_held, :for_sale, :section
|
|
270
|
+
:ticket_type, :num_booked, :num_free, :num_held, :for_sale, :section,
|
|
271
|
+
:is_accessible, :is_companion_seat, :has_restricted_view, :displayed_object_type,
|
|
272
|
+
:left_neighbour, :right_neighbour
|
|
291
273
|
|
|
292
274
|
def initialize(data)
|
|
293
275
|
@status = data['status']
|
|
@@ -307,6 +289,12 @@ module Seatsio::Domain
|
|
|
307
289
|
@capacity = data['capacity']
|
|
308
290
|
@object_type = data['objectType']
|
|
309
291
|
@extra_data = data['extraData']
|
|
292
|
+
@is_accessible = data['isAccessible']
|
|
293
|
+
@is_companion_seat = data['isCompanionSeat']
|
|
294
|
+
@has_restricted_view = data['hasRestrictedView']
|
|
295
|
+
@displayed_object_type = data['displayedObjectType']
|
|
296
|
+
@left_neighbour = data['leftNeighbour']
|
|
297
|
+
@right_neighbour = data['rightNeighbour']
|
|
310
298
|
end
|
|
311
299
|
end
|
|
312
300
|
|
|
@@ -338,7 +326,7 @@ module Seatsio::Domain
|
|
|
338
326
|
|
|
339
327
|
def initialize(data)
|
|
340
328
|
@subaccount = data['subaccount'] ? UsageSubaccount.new(data['subaccount']) : nil
|
|
341
|
-
@usage_by_chart = data['usageByChart'].map {|usage| UsageByChart.new(usage)}
|
|
329
|
+
@usage_by_chart = data['usageByChart'].map { |usage| UsageByChart.new(usage) }
|
|
342
330
|
end
|
|
343
331
|
end
|
|
344
332
|
|
|
@@ -356,8 +344,8 @@ module Seatsio::Domain
|
|
|
356
344
|
attr_reader :chart, :usage_by_event
|
|
357
345
|
|
|
358
346
|
def initialize(data)
|
|
359
|
-
@chart = data['chart'] ? UsageChart.new(data['chart']) :
|
|
360
|
-
@usage_by_event = data['usageByEvent'].map {|usage| UsageByEvent.new(usage)}
|
|
347
|
+
@chart = data['chart'] ? UsageChart.new(data['chart']) : nil
|
|
348
|
+
@usage_by_event = data['usageByEvent'].map { |usage| UsageByEvent.new(usage) }
|
|
361
349
|
end
|
|
362
350
|
end
|
|
363
351
|
|
data/lib/seatsio/events.rb
CHANGED
|
@@ -59,12 +59,21 @@ module Seatsio
|
|
|
59
59
|
def change_object_status(event_key_or_keys, object_or_objects, status, hold_token = nil, order_id = nil, keep_extra_data = nil)
|
|
60
60
|
request = create_change_object_status_request(object_or_objects, status, hold_token, order_id, event_key_or_keys, keep_extra_data)
|
|
61
61
|
request[:params] = {
|
|
62
|
-
|
|
62
|
+
:expand => 'objects'
|
|
63
63
|
}
|
|
64
64
|
response = @http_client.post("seasons/actions/change-object-status", request)
|
|
65
65
|
Domain::ChangeObjectStatusResult.new(response)
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
def change_object_status_in_batch(status_change_requests)
|
|
69
|
+
request = {
|
|
70
|
+
:statusChanges => status_change_requests,
|
|
71
|
+
:params => { :expand => 'objects' }
|
|
72
|
+
}
|
|
73
|
+
response = @http_client.post("events/actions/change-object-status", request)
|
|
74
|
+
Domain::ChangeObjectStatusInBatchResult.new(response).results
|
|
75
|
+
end
|
|
76
|
+
|
|
68
77
|
def hold(event_key_or_keys, object_or_objects, hold_token, order_id = nil, keep_extra_data = nil)
|
|
69
78
|
change_object_status(event_key_or_keys, object_or_objects, Domain::ObjectStatus::HELD, hold_token, order_id, keep_extra_data)
|
|
70
79
|
end
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
def create_change_object_status_in_batch_request(event_key, object_or_objects, status, hold_token = nil , order_id = nil, keep_extra_data = nil)
|
|
2
|
+
result = create_change_object_status_request(object_or_objects, status, hold_token, order_id, '', keep_extra_data)
|
|
3
|
+
result.delete(:events)
|
|
4
|
+
result[:event] = event_key
|
|
5
|
+
result
|
|
6
|
+
end
|
data/lib/seatsio/version.rb
CHANGED
data/lib/seatsio/workspaces.rb
CHANGED
|
@@ -27,6 +27,11 @@ module Seatsio
|
|
|
27
27
|
@http_client.post("workspaces/#{key}", body)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
def regenerate_secret_key(key:)
|
|
31
|
+
response = @http_client.post("workspaces/#{key}/actions/regenerate-secret-key")
|
|
32
|
+
response['secretKey']
|
|
33
|
+
end
|
|
34
|
+
|
|
30
35
|
def list(filter: nil)
|
|
31
36
|
extended_cursor = cursor
|
|
32
37
|
extended_cursor.set_query_param('filter', filter)
|
data/seatsio.gemspec
CHANGED
|
@@ -21,9 +21,8 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.require_paths = ["lib"]
|
|
22
22
|
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.16"
|
|
24
|
-
spec.add_development_dependency "rake", "~>
|
|
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'
|
|
27
|
-
spec.add_development_dependency "coveralls", "~> 0.8.22"
|
|
28
27
|
spec.add_development_dependency 'webmock', '~> 3.4', '>= 3.4.2'
|
|
29
28
|
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:
|
|
4
|
+
version: 23.6.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-
|
|
11
|
+
date: 2020-05-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
33
|
+
version: '13.0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
40
|
+
version: '13.0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: minitest
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -72,20 +72,6 @@ dependencies:
|
|
|
72
72
|
- - ">="
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
74
|
version: 2.0.2
|
|
75
|
-
- !ruby/object:Gem::Dependency
|
|
76
|
-
name: coveralls
|
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
|
78
|
-
requirements:
|
|
79
|
-
- - "~>"
|
|
80
|
-
- !ruby/object:Gem::Version
|
|
81
|
-
version: 0.8.22
|
|
82
|
-
type: :development
|
|
83
|
-
prerelease: false
|
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
85
|
-
requirements:
|
|
86
|
-
- - "~>"
|
|
87
|
-
- !ruby/object:Gem::Version
|
|
88
|
-
version: 0.8.22
|
|
89
75
|
- !ruby/object:Gem::Dependency
|
|
90
76
|
name: webmock
|
|
91
77
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -115,6 +101,7 @@ extra_rdoc_files: []
|
|
|
115
101
|
files:
|
|
116
102
|
- ".editorconfig"
|
|
117
103
|
- ".gitignore"
|
|
104
|
+
- ".ruby-version"
|
|
118
105
|
- ".travis.yml"
|
|
119
106
|
- Gemfile
|
|
120
107
|
- Gemfile.lock
|
|
@@ -123,13 +110,13 @@ files:
|
|
|
123
110
|
- bin/console
|
|
124
111
|
- bin/setup
|
|
125
112
|
- lib/seatsio.rb
|
|
126
|
-
- lib/seatsio/accounts.rb
|
|
127
113
|
- lib/seatsio/chart_reports.rb
|
|
128
114
|
- lib/seatsio/charts.rb
|
|
129
115
|
- lib/seatsio/domain.rb
|
|
130
116
|
- lib/seatsio/event_reports.rb
|
|
131
117
|
- lib/seatsio/events.rb
|
|
132
118
|
- lib/seatsio/events/change_best_available_object_status_request.rb
|
|
119
|
+
- lib/seatsio/events/change_object_status_in_batch_request.rb
|
|
133
120
|
- lib/seatsio/events/change_object_status_request.rb
|
|
134
121
|
- lib/seatsio/exception.rb
|
|
135
122
|
- lib/seatsio/hold_tokens.rb
|
data/lib/seatsio/accounts.rb
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require "seatsio/exception"
|
|
2
|
-
require "base64"
|
|
3
|
-
require "seatsio/httpClient"
|
|
4
|
-
require "seatsio/domain"
|
|
5
|
-
require "json"
|
|
6
|
-
require "cgi"
|
|
7
|
-
require "seatsio/domain"
|
|
8
|
-
|
|
9
|
-
module Seatsio
|
|
10
|
-
class AccountsClient
|
|
11
|
-
def initialize(secret_key, workspace_key, base_url)
|
|
12
|
-
@http_client = ::Seatsio::HttpClient.new(secret_key, workspace_key, base_url)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def retrieve_my_account
|
|
16
|
-
response = @http_client.get('accounts/me')
|
|
17
|
-
Domain::Account.new(response)
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|