seatsio 48.11.0 → 49.1.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: d4b0980beb088d055b65000e56b698fd32bf9b0fbb75e54aad00e9fc6e80781f
4
- data.tar.gz: ac56f1a189ee52caac91bcbdf76f7eb6070645c34685bee69b094885e76f6699
3
+ metadata.gz: e759ed6b746bb53cb8eb199507479705cfa7796d32353b33c4ddc993bfb6ce76
4
+ data.tar.gz: 14851178dfabcf9a676e92a14e7755ef1e4e22c63b3c9ff1849accea7c3d6fcd
5
5
  SHA512:
6
- metadata.gz: f33cf99fc1135f696b2798ac0cc3e71994200e3b93c61a7ac741bcc883fa8227b04565d06a0215ef5460817a7ca1abe15d68e4988007a167337701e223f464f2
7
- data.tar.gz: 865329254492b388b90c12647b763a0a77d86f62ed0969bacf165f1392fdfce89a4b6e6d6c6a072d1084c0a5a6e4ac7bb6662512174f012434d16736257867e4
6
+ metadata.gz: 8251f917e42c1386d661f44aa2e74c1a6600bf5c6309899ad52dd2ab9ecf7501f27dcfa08bea7b560d4447b4a035b20b34d2dda1a63c2273674128159819bb8d
7
+ data.tar.gz: 27bbbb8fcbb80f16aabbf391bdc855b73201885d7f76fa8b30308baca85918499f5225335d3a4ec8208f8c0db717b93fa8555631145c8e76e4fecff3dbb240d1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seatsio (48.11.0)
4
+ seatsio (49.1.0)
5
5
  rest-client (~> 2.0, >= 2.0.2)
6
6
 
7
7
  GEM
@@ -419,6 +419,7 @@ module Seatsio
419
419
  FREE = 'free'
420
420
  BOOKED = 'booked'
421
421
  HELD = 'reservedByToken'
422
+ RESALE = 'resale'
422
423
 
423
424
  attr_reader :labels, :ids, :label, :order_id, :extra_data, :capacity, :status,
424
425
  :category_key, :entrance, :object_type, :hold_token, :category_label,
@@ -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
@@ -76,6 +76,10 @@ module Seatsio
76
76
  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)
77
77
  end
78
78
 
79
+ def put_up_for_resale(event_key_or_keys, object_or_objects)
80
+ self.change_object_status(event_key_or_keys, object_or_objects, Seatsio::EventObjectInfo::RESALE)
81
+ end
82
+
79
83
  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, allowed_previous_statuses: nil, rejected_previous_statuses: nil)
80
84
  request = 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)
81
85
  request[:params] = {
@@ -113,7 +117,12 @@ module Seatsio
113
117
  end
114
118
 
115
119
  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)
120
+ request = create_release_objects_request(object_or_objects, hold_token, order_id, event_key_or_keys, keep_extra_data, ignore_channels, channel_keys)
121
+ request[:params] = {
122
+ :expand => 'objects'
123
+ }
124
+ response = @http_client.post("events/groups/actions/change-object-status", request)
125
+ ChangeObjectStatusResult.new(response)
117
126
  end
118
127
 
119
128
  def delete(key:)
@@ -1,3 +1,3 @@
1
1
  module Seatsio
2
- VERSION = "48.11.0"
2
+ VERSION = "49.1.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.11.0
4
+ version: 49.1.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-02 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