seatsio 48.10.0 → 49.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 861fc4ac16ee67b0f5631960d1a418fa6e1e90e31b394f98e5adc61d4d212afa
4
- data.tar.gz: bdfa3f099a5bf2f2289488586b05420c09dc4afd9c9b6a2dc0226be9e5c7ddc3
3
+ metadata.gz: 6175463282510d75486458379a84007b4c26ed1ef43f2dfb8c551d4d6d9d98e8
4
+ data.tar.gz: 6dae48abb18631f7a1b4b96043f94607319bf00c59d51959e7abe12de45febeb
5
5
  SHA512:
6
- metadata.gz: daeef014ea994a46f49a27209f1d8958c782a181d979dd127cfa912c22416dbb9fb96dba9105a4a12225f49d39523976f290f863724f5a88e9a76ac4ac30d867
7
- data.tar.gz: b7701abd97f25a302ac9663bed81b2c5b589a28ff19cf7e42c6c952906a873b5e28e4d4139a823b5548c3b485aaca2621e078aa35db5bb1af52388cc195fb391
6
+ metadata.gz: b219657e0671ed52b0b5b1b74b0bd4c3c2e11dd812cc5add61adffccbee38f9e696badd1eed59ec979b9e2f4d9802c634544121386d49b23dcd92329e64da62e
7
+ data.tar.gz: 9d16071d76d05e3557369086b1ba5c1cacabc49b1170f867facc2f5e5bd184ae9be7bd11a831d6f62f4a950b1b0d8764ad9a8e9a069c328668c5938a51c10c97
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seatsio (48.10.0)
4
+ seatsio (49.0.0)
5
5
  rest-client (~> 2.0, >= 2.0.2)
6
6
 
7
7
  GEM
@@ -14,7 +14,7 @@ GEM
14
14
  bigdecimal
15
15
  rexml
16
16
  domain_name (0.6.20240107)
17
- hashdiff (1.1.0)
17
+ hashdiff (1.1.1)
18
18
  http-accept (1.7.0)
19
19
  http-cookie (1.0.6)
20
20
  domain_name (~> 0.5)
@@ -23,20 +23,18 @@ GEM
23
23
  mime-types-data (3.2024.0702)
24
24
  minitest (5.25.1)
25
25
  netrc (0.11.0)
26
- parallel (1.25.1)
27
- parallel_tests (4.7.1)
26
+ parallel (1.26.3)
27
+ parallel_tests (4.7.2)
28
28
  parallel
29
- public_suffix (6.0.0)
29
+ public_suffix (6.0.1)
30
30
  rake (13.2.1)
31
31
  rest-client (2.1.0)
32
32
  http-accept (>= 1.7.0, < 2.0)
33
33
  http-cookie (>= 1.0.2, < 2.0)
34
34
  mime-types (>= 1.16, < 4.0)
35
35
  netrc (~> 0.8)
36
- rexml (3.3.6)
37
- strscan
38
- strscan (3.1.0)
39
- webmock (3.23.1)
36
+ rexml (3.3.8)
37
+ webmock (3.24.0)
40
38
  addressable (>= 2.8.0)
41
39
  crack (>= 0.3.2)
42
40
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -1,6 +1,7 @@
1
1
  def create_change_object_status_request(object_or_objects, status, hold_token, order_id, event_key_or_keys, keep_extra_data, ignore_channels, channel_keys, allowed_previous_statuses, rejected_previous_statuses)
2
2
  result = {}
3
3
  result[:objects] = normalize(object_or_objects)
4
+ result[:type] = 'CHANGE_STATUS_TO'
4
5
  result[:status] = status
5
6
  result[:holdToken] = hold_token if hold_token != nil
6
7
  result[:orderId] = order_id if order_id != nil
@@ -17,6 +18,24 @@ def create_change_object_status_request(object_or_objects, status, hold_token, o
17
18
  result
18
19
  end
19
20
 
21
+ def create_release_objects_request(object_or_objects, hold_token, order_id, event_key_or_keys, keep_extra_data, ignore_channels, channel_keys)
22
+ result = {}
23
+ result[:objects] = normalize(object_or_objects)
24
+ result[:type] = "RELEASE"
25
+ result[:holdToken] = hold_token if hold_token != nil
26
+ result[:orderId] = order_id if order_id != nil
27
+ if event_key_or_keys.is_a? Array
28
+ result[:events] = event_key_or_keys
29
+ else
30
+ result[:events] = [event_key_or_keys]
31
+ end
32
+ result[:keepExtraData] = keep_extra_data if keep_extra_data != nil
33
+ result[:ignoreChannels] = ignore_channels if ignore_channels != nil
34
+ result[:channelKeys] = channel_keys if channel_keys != nil
35
+ result
36
+ end
37
+
38
+
20
39
  def normalize(object_or_objects)
21
40
  if object_or_objects.is_a? Array
22
41
  if object_or_objects.length == 0
@@ -113,7 +113,12 @@ module Seatsio
113
113
  end
114
114
 
115
115
  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)
116
- 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)
116
+ request = create_release_objects_request(object_or_objects, hold_token, order_id, event_key_or_keys, keep_extra_data, ignore_channels, channel_keys)
117
+ request[:params] = {
118
+ :expand => 'objects'
119
+ }
120
+ response = @http_client.post("events/groups/actions/change-object-status", request)
121
+ ChangeObjectStatusResult.new(response)
117
122
  end
118
123
 
119
124
  def delete(key:)
@@ -1,3 +1,3 @@
1
1
  module Seatsio
2
- VERSION = "48.10.0"
2
+ VERSION = "49.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seatsio
3
3
  version: !ruby/object:Gem::Version
4
- version: 48.10.0
4
+ version: 49.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: 2024-10-01 00:00:00.000000000 Z
11
+ date: 2024-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client