seatsio 49.1.0 → 51.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 285ffbd182b6d73f6023a367c14581f1f39a09fc246d7eabf571715fdc509c41
|
4
|
+
data.tar.gz: 864401f99af9031337bf44851a5999b429281110d53412adaa568e01af929857
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d82491de94898575328a20b0b0e622e1daa69ae3bc71474265045139e773becdb8ecbe65b8584500d07a57395cdff59d158c88482af7a5e7a3258edfbf3cef3
|
7
|
+
data.tar.gz: 970ad2ac76711a0795b972ccc1deb6bb755b8205749729fe46d1aa421f77272c515cc69380cf1cf5c97df47012d91cb1a70a3216253b453cc2bea6898cff7230
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
seatsio (
|
4
|
+
seatsio (51.0.0)
|
5
5
|
rest-client (~> 2.0, >= 2.0.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -33,7 +33,7 @@ GEM
|
|
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.
|
36
|
+
rexml (3.3.9)
|
37
37
|
webmock (3.24.0)
|
38
38
|
addressable (>= 2.8.0)
|
39
39
|
crack (>= 0.3.2)
|
data/lib/seatsio/domain.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
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)
|
1
|
+
def create_change_object_status_request(type, 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
|
+
result[:type] = type
|
3
4
|
result[:objects] = normalize(object_or_objects)
|
4
|
-
result[:type] =
|
5
|
-
result[:status] = status
|
5
|
+
result[:type] = type
|
6
|
+
result[:status] = status if type != Seatsio::StatusChangeType::RELEASE
|
6
7
|
result[:holdToken] = hold_token if hold_token != nil
|
7
8
|
result[:orderId] = order_id if order_id != nil
|
8
9
|
if event_key_or_keys.is_a? Array
|
@@ -18,24 +19,6 @@ def create_change_object_status_request(object_or_objects, status, hold_token, o
|
|
18
19
|
result
|
19
20
|
end
|
20
21
|
|
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
|
-
|
39
22
|
def normalize(object_or_objects)
|
40
23
|
if object_or_objects.is_a? Array
|
41
24
|
if object_or_objects.length == 0
|
data/lib/seatsio/events.rb
CHANGED
@@ -30,8 +30,8 @@ module Seatsio
|
|
30
30
|
Events.new(response).events
|
31
31
|
end
|
32
32
|
|
33
|
-
def update(key:,
|
34
|
-
payload = build_event_request(
|
33
|
+
def update(key:, event_key: nil, name: nil, date: nil, table_booking_config: nil, object_categories: nil, categories: nil, is_in_the_past: nil)
|
34
|
+
payload = build_event_request(nil, event_key, name, date, table_booking_config, object_categories, categories, channels: nil, is_in_the_past: is_in_the_past)
|
35
35
|
@http_client.post("events/#{key}", payload)
|
36
36
|
end
|
37
37
|
|
@@ -81,7 +81,7 @@ module Seatsio
|
|
81
81
|
end
|
82
82
|
|
83
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)
|
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)
|
84
|
+
request = create_change_object_status_request(Seatsio::StatusChangeType::CHANGE_STATUS_TO, 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)
|
85
85
|
request[:params] = {
|
86
86
|
:expand => 'objects'
|
87
87
|
}
|
@@ -117,7 +117,7 @@ module Seatsio
|
|
117
117
|
end
|
118
118
|
|
119
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)
|
120
|
-
request =
|
120
|
+
request = create_change_object_status_request(Seatsio::StatusChangeType::RELEASE, object_or_objects, nil, hold_token, order_id, event_key_or_keys, keep_extra_data, ignore_channels, channel_keys, nil, nil)
|
121
121
|
request[:params] = {
|
122
122
|
:expand => 'objects'
|
123
123
|
}
|
data/lib/seatsio/version.rb
CHANGED
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: 51.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-
|
11
|
+
date: 2024-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -135,7 +135,6 @@ files:
|
|
135
135
|
- lib/seatsio/event_reports.rb
|
136
136
|
- lib/seatsio/events.rb
|
137
137
|
- lib/seatsio/events/change_best_available_object_status_request.rb
|
138
|
-
- lib/seatsio/events/change_object_status_in_batch_request.rb
|
139
138
|
- lib/seatsio/events/change_object_status_request.rb
|
140
139
|
- lib/seatsio/exception.rb
|
141
140
|
- lib/seatsio/hold_tokens.rb
|
@@ -1,6 +0,0 @@
|
|
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, ignore_channels = nil, channel_keys = nil)
|
2
|
-
result = create_change_object_status_request(object_or_objects, status, hold_token, order_id, '', keep_extra_data, ignore_channels, channel_keys)
|
3
|
-
result.delete(:events)
|
4
|
-
result[:event] = event_key
|
5
|
-
result
|
6
|
-
end
|