seatschart 0.2.0 → 0.3.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/README.md +162 -15
- data/lib/seatschart/api/audit_api.rb +2 -2
- data/lib/seatschart/api/charts_api.rb +799 -66
- data/lib/seatschart/api/embed_api.rb +5 -5
- data/lib/seatschart/api/embed_origins_api.rb +63 -2
- data/lib/seatschart/api/event_log_api.rb +2 -2
- data/lib/seatschart/api/events_api.rb +1471 -155
- data/lib/seatschart/api/health_api.rb +244 -0
- data/lib/seatschart/api/map_designer_api.rb +11 -9
- data/lib/seatschart/api/public_api.rb +350 -0
- data/lib/seatschart/api/sandboxes_api.rb +672 -0
- data/lib/seatschart/api/seasons_api.rb +344 -36
- data/lib/seatschart/api/seats_api.rb +10 -10
- data/lib/seatschart/api/usage_api.rb +18 -15
- data/lib/seatschart/api/webhooks_api.rb +2 -2
- data/lib/seatschart/api/workspace_api.rb +306 -20
- data/lib/seatschart/models/api_error.rb +4 -4
- data/lib/seatschart/models/delete_api_sandboxes_by_sandbox_id200_response.rb +255 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +62 -4
- data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +21 -4
- data/lib/seatschart/models/get_api_sandboxes200_response.rb +239 -0
- data/lib/seatschart/models/get_api_sandboxes200_response_items_inner.rb +431 -0
- data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_rate_limits.rb +270 -0
- data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_usage.rb +287 -0
- data/lib/seatschart/models/get_api_status200_response.rb +387 -0
- data/lib/seatschart/models/get_api_status200_response_components_inner.rb +330 -0
- data/lib/seatschart/models/get_api_status200_response_components_inner_days_inner.rb +301 -0
- data/lib/seatschart/models/get_api_status200_response_incidents_inner.rb +374 -0
- data/lib/seatschart/models/get_api_status200_response_maintenance_inner.rb +350 -0
- data/lib/seatschart/models/get_api_status503_response.rb +271 -0
- data/lib/seatschart/models/get_api_workspace_buyer_extra_data200_response.rb +241 -0
- data/lib/seatschart/models/get_api_workspace_defaults200_response.rb +254 -0
- data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer.rb +246 -0
- data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer_built_in.rb +270 -0
- data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +34 -5
- data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +16 -6
- data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +15 -5
- data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +25 -4
- data/lib/seatschart/models/patch_api_workspace_defaults_request.rb +224 -0
- data/lib/seatschart/models/patch_api_workspace_defaults_request_renderer.rb +249 -0
- data/lib/seatschart/models/patch_api_workspace_settings_request.rb +6 -6
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +39 -1
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +1 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +64 -6
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +1 -1
- data/lib/seatschart/models/post_api_embed_tokens_request.rb +18 -15
- data/lib/seatschart/models/post_api_embed_tokens_request_safe_mode_options.rb +226 -0
- data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request.rb +251 -0
- data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request_events_inner.rb +322 -0
- data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +42 -1
- data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request.rb +277 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request_for_sale_inner.rb +319 -0
- data/lib/seatschart/models/post_api_events_by_event_id_map_publish_request.rb +215 -0
- data/lib/seatschart/models/post_api_events_request.rb +42 -1
- data/lib/seatschart/models/{patch_api_events_by_event_id_request_categories_inner.rb → post_api_events_request_categories_inner.rb} +3 -3
- data/lib/seatschart/models/post_api_extract_seats200_response.rb +459 -0
- data/lib/seatschart/models/post_api_extract_seats200_response_seats_inner.rb +323 -0
- data/lib/seatschart/models/post_api_extract_seats200_response_suggested_inner.rb +320 -0
- data/lib/seatschart/models/post_api_extract_seats_request.rb +124 -4
- data/lib/seatschart/models/post_api_extract_seats_request_examples.rb +105 -0
- data/lib/seatschart/models/post_api_extract_seats_request_examples_any_of_inner.rb +293 -0
- data/lib/seatschart/models/post_api_extract_seats_request_negatives.rb +105 -0
- data/lib/seatschart/models/post_api_extract_seats_request_region.rb +105 -0
- data/lib/seatschart/models/post_api_extract_seats_request_region_any_of.rb +363 -0
- data/lib/seatschart/models/post_api_sandboxes201_response.rb +245 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_admin_key.rb +286 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied.rb +313 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied_charts_inner.rb +281 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_inner.rb +281 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_with_own_map_inner.rb +265 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied_key_conflicts_inner.rb +287 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied_seasons_inner.rb +312 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production200_response.rb +313 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production_request.rb +255 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_join200_response.rb +271 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +268 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset_request.rb +225 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response.rb +253 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response_api_key.rb +286 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key_request.rb +252 -0
- data/lib/seatschart/models/post_api_sandboxes_request.rb +319 -0
- data/lib/seatschart/models/post_api_seasons_request.rb +14 -4
- data/lib/seatschart/models/post_api_seats_confirm_request.rb +5 -5
- data/lib/seatschart/models/post_api_seats_release_request.rb +5 -5
- data/lib/seatschart/models/post_api_seats_reserve_request.rb +5 -5
- data/lib/seatschart/models/post_api_workspaces_request.rb +1 -1
- data/lib/seatschart/models/put_api_charts_by_chart_id_map_draft_request.rb +1 -0
- data/lib/seatschart/models/put_api_workspace_buyer_extra_data_request.rb +260 -0
- data/lib/seatschart/models/put_internal_status_notices_request.rb +242 -0
- data/lib/seatschart/models/put_internal_status_notices_request_notices_inner.rb +445 -0
- data/lib/seatschart/retry.rb +106 -7
- data/lib/seatschart/version.rb +1 -1
- data/lib/seatschart.rb +53 -2
- metadata +55 -4
- data/lib/seatschart/api/default_api.rb +0 -763
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SeatsChart API
|
|
3
|
+
|
|
4
|
+
#Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.11.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SeatsChart
|
|
17
|
+
# Renderer defaults this workspace sets; an absent option uses the built-in default.
|
|
18
|
+
class GetApiWorkspaceDefaults200ResponseRenderer
|
|
19
|
+
# Buyers may select more than one object (built-in: true).
|
|
20
|
+
attr_accessor :multi_select_enabled
|
|
21
|
+
|
|
22
|
+
# The fullscreen button of the seat map (built-in: true).
|
|
23
|
+
attr_accessor :show_full_screen_button
|
|
24
|
+
|
|
25
|
+
# A selected companion seat needs a selected accessible seat next to it (built-in: true, warn-only).
|
|
26
|
+
attr_accessor :companion_seat_validation_enabled
|
|
27
|
+
|
|
28
|
+
# Confirming a quantity in a general admission area holds the places at once (built-in: true).
|
|
29
|
+
attr_accessor :hold_on_select_for_gas
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'multi_select_enabled' => :'multiSelectEnabled',
|
|
35
|
+
:'show_full_screen_button' => :'showFullScreenButton',
|
|
36
|
+
:'companion_seat_validation_enabled' => :'companionSeatValidationEnabled',
|
|
37
|
+
:'hold_on_select_for_gas' => :'holdOnSelectForGAs'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'multi_select_enabled' => :'Boolean',
|
|
50
|
+
:'show_full_screen_button' => :'Boolean',
|
|
51
|
+
:'companion_seat_validation_enabled' => :'Boolean',
|
|
52
|
+
:'hold_on_select_for_gas' => :'Boolean'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::GetApiWorkspaceDefaults200ResponseRenderer` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::GetApiWorkspaceDefaults200ResponseRenderer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'multi_select_enabled')
|
|
78
|
+
self.multi_select_enabled = attributes[:'multi_select_enabled']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'show_full_screen_button')
|
|
82
|
+
self.show_full_screen_button = attributes[:'show_full_screen_button']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'companion_seat_validation_enabled')
|
|
86
|
+
self.companion_seat_validation_enabled = attributes[:'companion_seat_validation_enabled']
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'hold_on_select_for_gas')
|
|
90
|
+
self.hold_on_select_for_gas = attributes[:'hold_on_select_for_gas']
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
95
|
+
# @return Array for valid properties with the reasons
|
|
96
|
+
def list_invalid_properties
|
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
106
|
+
true
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Checks equality by comparing each attribute.
|
|
110
|
+
# @param [Object] Object to be compared
|
|
111
|
+
def ==(o)
|
|
112
|
+
return true if self.equal?(o)
|
|
113
|
+
self.class == o.class &&
|
|
114
|
+
multi_select_enabled == o.multi_select_enabled &&
|
|
115
|
+
show_full_screen_button == o.show_full_screen_button &&
|
|
116
|
+
companion_seat_validation_enabled == o.companion_seat_validation_enabled &&
|
|
117
|
+
hold_on_select_for_gas == o.hold_on_select_for_gas
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# @see the `==` method
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def eql?(o)
|
|
123
|
+
self == o
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Calculates hash code according to all attributes.
|
|
127
|
+
# @return [Integer] Hash code
|
|
128
|
+
def hash
|
|
129
|
+
[multi_select_enabled, show_full_screen_button, companion_seat_validation_enabled, hold_on_select_for_gas].hash
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Builds the object from hash
|
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
134
|
+
# @return [Object] Returns the model itself
|
|
135
|
+
def self.build_from_hash(attributes)
|
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
|
137
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
138
|
+
transformed_hash = {}
|
|
139
|
+
openapi_types.each_pair do |key, type|
|
|
140
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = nil
|
|
142
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
143
|
+
# check to ensure the input is an array given that the attribute
|
|
144
|
+
# is documented as an array but the input is not
|
|
145
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
146
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
147
|
+
end
|
|
148
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
149
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
new(transformed_hash)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Deserializes the data based on type
|
|
156
|
+
# @param string type Data type
|
|
157
|
+
# @param string value Value to be deserialized
|
|
158
|
+
# @return [Object] Deserialized data
|
|
159
|
+
def self._deserialize(type, value)
|
|
160
|
+
case type.to_sym
|
|
161
|
+
when :Time
|
|
162
|
+
Time.parse(value)
|
|
163
|
+
when :Date
|
|
164
|
+
Date.parse(value)
|
|
165
|
+
when :String
|
|
166
|
+
value.to_s
|
|
167
|
+
when :Integer
|
|
168
|
+
value.to_i
|
|
169
|
+
when :Float
|
|
170
|
+
value.to_f
|
|
171
|
+
when :Boolean
|
|
172
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
173
|
+
true
|
|
174
|
+
else
|
|
175
|
+
false
|
|
176
|
+
end
|
|
177
|
+
when :Object
|
|
178
|
+
# generic object (usually a Hash), return directly
|
|
179
|
+
value
|
|
180
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
181
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
182
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
183
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
184
|
+
k_type = Regexp.last_match[:k_type]
|
|
185
|
+
v_type = Regexp.last_match[:v_type]
|
|
186
|
+
{}.tap do |hash|
|
|
187
|
+
value.each do |k, v|
|
|
188
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
else # model
|
|
192
|
+
# models (e.g. Pet) or oneOf
|
|
193
|
+
klass = SeatsChart.const_get(type)
|
|
194
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Returns the string representation of the object
|
|
199
|
+
# @return [String] String presentation of the object
|
|
200
|
+
def to_s
|
|
201
|
+
to_hash.to_s
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
|
206
|
+
def to_body
|
|
207
|
+
to_hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Returns the object in the form of hash
|
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
|
212
|
+
def to_hash
|
|
213
|
+
hash = {}
|
|
214
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
215
|
+
value = self.send(attr)
|
|
216
|
+
if value.nil?
|
|
217
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
218
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
hash[param] = _to_hash(value)
|
|
222
|
+
end
|
|
223
|
+
hash
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Outputs non-array value in the form of hash
|
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
228
|
+
# @param [Object] value Any valid value
|
|
229
|
+
# @return [Hash] Returns the value in the form of hash
|
|
230
|
+
def _to_hash(value)
|
|
231
|
+
if value.is_a?(Array)
|
|
232
|
+
value.compact.map { |v| _to_hash(v) }
|
|
233
|
+
elsif value.is_a?(Hash)
|
|
234
|
+
{}.tap do |hash|
|
|
235
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
236
|
+
end
|
|
237
|
+
elsif value.respond_to? :to_hash
|
|
238
|
+
value.to_hash
|
|
239
|
+
else
|
|
240
|
+
value
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
end
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SeatsChart API
|
|
3
|
+
|
|
4
|
+
#Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.11.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SeatsChart
|
|
17
|
+
# What the seat map does when neither the embed nor the workspace sets an option.
|
|
18
|
+
class GetApiWorkspaceDefaults200ResponseRendererBuiltIn
|
|
19
|
+
attr_accessor :multi_select_enabled
|
|
20
|
+
|
|
21
|
+
attr_accessor :show_full_screen_button
|
|
22
|
+
|
|
23
|
+
attr_accessor :companion_seat_validation_enabled
|
|
24
|
+
|
|
25
|
+
attr_accessor :hold_on_select_for_gas
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'multi_select_enabled' => :'multiSelectEnabled',
|
|
31
|
+
:'show_full_screen_button' => :'showFullScreenButton',
|
|
32
|
+
:'companion_seat_validation_enabled' => :'companionSeatValidationEnabled',
|
|
33
|
+
:'hold_on_select_for_gas' => :'holdOnSelectForGAs'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'multi_select_enabled' => :'Boolean',
|
|
46
|
+
:'show_full_screen_button' => :'Boolean',
|
|
47
|
+
:'companion_seat_validation_enabled' => :'Boolean',
|
|
48
|
+
:'hold_on_select_for_gas' => :'Boolean'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
+
def initialize(attributes = {})
|
|
61
|
+
if (!attributes.is_a?(Hash))
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::GetApiWorkspaceDefaults200ResponseRendererBuiltIn` initialize method"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::GetApiWorkspaceDefaults200ResponseRendererBuiltIn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'multi_select_enabled')
|
|
74
|
+
self.multi_select_enabled = attributes[:'multi_select_enabled']
|
|
75
|
+
else
|
|
76
|
+
self.multi_select_enabled = nil
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'show_full_screen_button')
|
|
80
|
+
self.show_full_screen_button = attributes[:'show_full_screen_button']
|
|
81
|
+
else
|
|
82
|
+
self.show_full_screen_button = nil
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'companion_seat_validation_enabled')
|
|
86
|
+
self.companion_seat_validation_enabled = attributes[:'companion_seat_validation_enabled']
|
|
87
|
+
else
|
|
88
|
+
self.companion_seat_validation_enabled = nil
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'hold_on_select_for_gas')
|
|
92
|
+
self.hold_on_select_for_gas = attributes[:'hold_on_select_for_gas']
|
|
93
|
+
else
|
|
94
|
+
self.hold_on_select_for_gas = nil
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
99
|
+
# @return Array for valid properties with the reasons
|
|
100
|
+
def list_invalid_properties
|
|
101
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
102
|
+
invalid_properties = Array.new
|
|
103
|
+
if @multi_select_enabled.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "multi_select_enabled", multi_select_enabled cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if @show_full_screen_button.nil?
|
|
108
|
+
invalid_properties.push('invalid value for "show_full_screen_button", show_full_screen_button cannot be nil.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if @companion_seat_validation_enabled.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "companion_seat_validation_enabled", companion_seat_validation_enabled cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if @hold_on_select_for_gas.nil?
|
|
116
|
+
invalid_properties.push('invalid value for "hold_on_select_for_gas", hold_on_select_for_gas cannot be nil.')
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
invalid_properties
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Check to see if the all the properties in the model are valid
|
|
123
|
+
# @return true if the model is valid
|
|
124
|
+
def valid?
|
|
125
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
126
|
+
return false if @multi_select_enabled.nil?
|
|
127
|
+
return false if @show_full_screen_button.nil?
|
|
128
|
+
return false if @companion_seat_validation_enabled.nil?
|
|
129
|
+
return false if @hold_on_select_for_gas.nil?
|
|
130
|
+
true
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Checks equality by comparing each attribute.
|
|
134
|
+
# @param [Object] Object to be compared
|
|
135
|
+
def ==(o)
|
|
136
|
+
return true if self.equal?(o)
|
|
137
|
+
self.class == o.class &&
|
|
138
|
+
multi_select_enabled == o.multi_select_enabled &&
|
|
139
|
+
show_full_screen_button == o.show_full_screen_button &&
|
|
140
|
+
companion_seat_validation_enabled == o.companion_seat_validation_enabled &&
|
|
141
|
+
hold_on_select_for_gas == o.hold_on_select_for_gas
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# @see the `==` method
|
|
145
|
+
# @param [Object] Object to be compared
|
|
146
|
+
def eql?(o)
|
|
147
|
+
self == o
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Calculates hash code according to all attributes.
|
|
151
|
+
# @return [Integer] Hash code
|
|
152
|
+
def hash
|
|
153
|
+
[multi_select_enabled, show_full_screen_button, companion_seat_validation_enabled, hold_on_select_for_gas].hash
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Builds the object from hash
|
|
157
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
158
|
+
# @return [Object] Returns the model itself
|
|
159
|
+
def self.build_from_hash(attributes)
|
|
160
|
+
return nil unless attributes.is_a?(Hash)
|
|
161
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
162
|
+
transformed_hash = {}
|
|
163
|
+
openapi_types.each_pair do |key, type|
|
|
164
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
165
|
+
transformed_hash["#{key}"] = nil
|
|
166
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
167
|
+
# check to ensure the input is an array given that the attribute
|
|
168
|
+
# is documented as an array but the input is not
|
|
169
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
170
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
171
|
+
end
|
|
172
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
173
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
new(transformed_hash)
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Deserializes the data based on type
|
|
180
|
+
# @param string type Data type
|
|
181
|
+
# @param string value Value to be deserialized
|
|
182
|
+
# @return [Object] Deserialized data
|
|
183
|
+
def self._deserialize(type, value)
|
|
184
|
+
case type.to_sym
|
|
185
|
+
when :Time
|
|
186
|
+
Time.parse(value)
|
|
187
|
+
when :Date
|
|
188
|
+
Date.parse(value)
|
|
189
|
+
when :String
|
|
190
|
+
value.to_s
|
|
191
|
+
when :Integer
|
|
192
|
+
value.to_i
|
|
193
|
+
when :Float
|
|
194
|
+
value.to_f
|
|
195
|
+
when :Boolean
|
|
196
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
197
|
+
true
|
|
198
|
+
else
|
|
199
|
+
false
|
|
200
|
+
end
|
|
201
|
+
when :Object
|
|
202
|
+
# generic object (usually a Hash), return directly
|
|
203
|
+
value
|
|
204
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
205
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
206
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
207
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
208
|
+
k_type = Regexp.last_match[:k_type]
|
|
209
|
+
v_type = Regexp.last_match[:v_type]
|
|
210
|
+
{}.tap do |hash|
|
|
211
|
+
value.each do |k, v|
|
|
212
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
else # model
|
|
216
|
+
# models (e.g. Pet) or oneOf
|
|
217
|
+
klass = SeatsChart.const_get(type)
|
|
218
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Returns the string representation of the object
|
|
223
|
+
# @return [String] String presentation of the object
|
|
224
|
+
def to_s
|
|
225
|
+
to_hash.to_s
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
|
230
|
+
def to_body
|
|
231
|
+
to_hash
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Returns the object in the form of hash
|
|
235
|
+
# @return [Hash] Returns the object in the form of hash
|
|
236
|
+
def to_hash
|
|
237
|
+
hash = {}
|
|
238
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
239
|
+
value = self.send(attr)
|
|
240
|
+
if value.nil?
|
|
241
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
242
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
hash[param] = _to_hash(value)
|
|
246
|
+
end
|
|
247
|
+
hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Outputs non-array value in the form of hash
|
|
251
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
252
|
+
# @param [Object] value Any valid value
|
|
253
|
+
# @return [Hash] Returns the value in the form of hash
|
|
254
|
+
def _to_hash(value)
|
|
255
|
+
if value.is_a?(Array)
|
|
256
|
+
value.compact.map { |v| _to_hash(v) }
|
|
257
|
+
elsif value.is_a?(Hash)
|
|
258
|
+
{}.tap do |hash|
|
|
259
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
260
|
+
end
|
|
261
|
+
elsif value.respond_to? :to_hash
|
|
262
|
+
value.to_hash
|
|
263
|
+
else
|
|
264
|
+
value
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
end
|
|
@@ -41,6 +41,9 @@ module SeatsChart
|
|
|
41
41
|
# Production workspace a test workspace was created from.
|
|
42
42
|
attr_accessor :parent_workspace_id
|
|
43
43
|
|
|
44
|
+
# `sandbox` exactly when `isTest` (see `/sandboxes`).
|
|
45
|
+
attr_accessor :kind
|
|
46
|
+
|
|
44
47
|
class EnumAttributeValidator
|
|
45
48
|
attr_reader :datatype
|
|
46
49
|
attr_reader :allowable_values
|
|
@@ -76,7 +79,8 @@ module SeatsChart
|
|
|
76
79
|
:'is_current' => :'isCurrent',
|
|
77
80
|
:'is_default' => :'isDefault',
|
|
78
81
|
:'is_test' => :'isTest',
|
|
79
|
-
:'parent_workspace_id' => :'parentWorkspaceId'
|
|
82
|
+
:'parent_workspace_id' => :'parentWorkspaceId',
|
|
83
|
+
:'kind' => :'kind'
|
|
80
84
|
}
|
|
81
85
|
end
|
|
82
86
|
|
|
@@ -98,7 +102,8 @@ module SeatsChart
|
|
|
98
102
|
:'is_current' => :'Boolean',
|
|
99
103
|
:'is_default' => :'Boolean',
|
|
100
104
|
:'is_test' => :'Boolean',
|
|
101
|
-
:'parent_workspace_id' => :'String'
|
|
105
|
+
:'parent_workspace_id' => :'String',
|
|
106
|
+
:'kind' => :'String'
|
|
102
107
|
}
|
|
103
108
|
end
|
|
104
109
|
|
|
@@ -106,7 +111,7 @@ module SeatsChart
|
|
|
106
111
|
def self.openapi_nullable
|
|
107
112
|
Set.new([
|
|
108
113
|
:'deactivated_at',
|
|
109
|
-
:'parent_workspace_id'
|
|
114
|
+
:'parent_workspace_id',
|
|
110
115
|
])
|
|
111
116
|
end
|
|
112
117
|
|
|
@@ -190,6 +195,12 @@ module SeatsChart
|
|
|
190
195
|
else
|
|
191
196
|
self.parent_workspace_id = nil
|
|
192
197
|
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'kind')
|
|
200
|
+
self.kind = attributes[:'kind']
|
|
201
|
+
else
|
|
202
|
+
self.kind = nil
|
|
203
|
+
end
|
|
193
204
|
end
|
|
194
205
|
|
|
195
206
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -233,6 +244,10 @@ module SeatsChart
|
|
|
233
244
|
invalid_properties.push('invalid value for "is_test", is_test cannot be nil.')
|
|
234
245
|
end
|
|
235
246
|
|
|
247
|
+
if @kind.nil?
|
|
248
|
+
invalid_properties.push('invalid value for "kind", kind cannot be nil.')
|
|
249
|
+
end
|
|
250
|
+
|
|
236
251
|
invalid_properties
|
|
237
252
|
end
|
|
238
253
|
|
|
@@ -253,6 +268,9 @@ module SeatsChart
|
|
|
253
268
|
return false if @is_current.nil?
|
|
254
269
|
return false if @is_default.nil?
|
|
255
270
|
return false if @is_test.nil?
|
|
271
|
+
return false if @kind.nil?
|
|
272
|
+
kind_validator = EnumAttributeValidator.new('String', ["production", "sandbox"])
|
|
273
|
+
return false unless kind_validator.valid?(@kind)
|
|
256
274
|
true
|
|
257
275
|
end
|
|
258
276
|
|
|
@@ -276,6 +294,16 @@ module SeatsChart
|
|
|
276
294
|
@status = status
|
|
277
295
|
end
|
|
278
296
|
|
|
297
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
298
|
+
# @param [Object] kind Object to be assigned
|
|
299
|
+
def kind=(kind)
|
|
300
|
+
validator = EnumAttributeValidator.new('String', ["production", "sandbox"])
|
|
301
|
+
unless validator.valid?(kind)
|
|
302
|
+
fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
|
|
303
|
+
end
|
|
304
|
+
@kind = kind
|
|
305
|
+
end
|
|
306
|
+
|
|
279
307
|
# Checks equality by comparing each attribute.
|
|
280
308
|
# @param [Object] Object to be compared
|
|
281
309
|
def ==(o)
|
|
@@ -291,7 +319,8 @@ module SeatsChart
|
|
|
291
319
|
is_current == o.is_current &&
|
|
292
320
|
is_default == o.is_default &&
|
|
293
321
|
is_test == o.is_test &&
|
|
294
|
-
parent_workspace_id == o.parent_workspace_id
|
|
322
|
+
parent_workspace_id == o.parent_workspace_id &&
|
|
323
|
+
kind == o.kind
|
|
295
324
|
end
|
|
296
325
|
|
|
297
326
|
# @see the `==` method
|
|
@@ -303,7 +332,7 @@ module SeatsChart
|
|
|
303
332
|
# Calculates hash code according to all attributes.
|
|
304
333
|
# @return [Integer] Hash code
|
|
305
334
|
def hash
|
|
306
|
-
[workspace_id, display_name, role, plan_id, subscription_status, status, deactivated_at, is_current, is_default, is_test, parent_workspace_id].hash
|
|
335
|
+
[workspace_id, display_name, role, plan_id, subscription_status, status, deactivated_at, is_current, is_default, is_test, parent_workspace_id, kind].hash
|
|
307
336
|
end
|
|
308
337
|
|
|
309
338
|
# Builds the object from hash
|
|
@@ -41,6 +41,9 @@ module SeatsChart
|
|
|
41
41
|
# Object label (seat label or GA area name) → category key (event category key, chart category id or name). Replaces the map; null clears.
|
|
42
42
|
attr_accessor :object_categories
|
|
43
43
|
|
|
44
|
+
# Chart switch only: withdraw the active listings whose objects have no counterpart in the target chart, in the same transaction (409 `listing_has_holds` while any of their objects is held). Without it such a switch is refused with 409 `listing_objects_removed` (`listings`).
|
|
45
|
+
attr_accessor :withdraw_affected_listings
|
|
46
|
+
|
|
44
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
48
|
def self.attribute_map
|
|
46
49
|
{
|
|
@@ -54,7 +57,8 @@ module SeatsChart
|
|
|
54
57
|
:'key' => :'key',
|
|
55
58
|
:'chart_id' => :'chartId',
|
|
56
59
|
:'categories' => :'categories',
|
|
57
|
-
:'object_categories' => :'objectCategories'
|
|
60
|
+
:'object_categories' => :'objectCategories',
|
|
61
|
+
:'withdraw_affected_listings' => :'withdrawAffectedListings'
|
|
58
62
|
}
|
|
59
63
|
end
|
|
60
64
|
|
|
@@ -75,8 +79,9 @@ module SeatsChart
|
|
|
75
79
|
:'for_sale_per_category' => :'Hash<String, Boolean>',
|
|
76
80
|
:'key' => :'String',
|
|
77
81
|
:'chart_id' => :'String',
|
|
78
|
-
:'categories' => :'Array<
|
|
79
|
-
:'object_categories' => :'Hash<String, String>'
|
|
82
|
+
:'categories' => :'Array<PostApiEventsRequestCategoriesInner>',
|
|
83
|
+
:'object_categories' => :'Hash<String, String>',
|
|
84
|
+
:'withdraw_affected_listings' => :'Boolean'
|
|
80
85
|
}
|
|
81
86
|
end
|
|
82
87
|
|
|
@@ -87,7 +92,7 @@ module SeatsChart
|
|
|
87
92
|
:'category_overrides',
|
|
88
93
|
:'key',
|
|
89
94
|
:'categories',
|
|
90
|
-
:'object_categories'
|
|
95
|
+
:'object_categories',
|
|
91
96
|
])
|
|
92
97
|
end
|
|
93
98
|
|
|
@@ -157,6 +162,10 @@ module SeatsChart
|
|
|
157
162
|
self.object_categories = value
|
|
158
163
|
end
|
|
159
164
|
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'withdraw_affected_listings')
|
|
167
|
+
self.withdraw_affected_listings = attributes[:'withdraw_affected_listings']
|
|
168
|
+
end
|
|
160
169
|
end
|
|
161
170
|
|
|
162
171
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -316,7 +325,8 @@ module SeatsChart
|
|
|
316
325
|
key == o.key &&
|
|
317
326
|
chart_id == o.chart_id &&
|
|
318
327
|
categories == o.categories &&
|
|
319
|
-
object_categories == o.object_categories
|
|
328
|
+
object_categories == o.object_categories &&
|
|
329
|
+
withdraw_affected_listings == o.withdraw_affected_listings
|
|
320
330
|
end
|
|
321
331
|
|
|
322
332
|
# @see the `==` method
|
|
@@ -328,7 +338,7 @@ module SeatsChart
|
|
|
328
338
|
# Calculates hash code according to all attributes.
|
|
329
339
|
# @return [Integer] Hash code
|
|
330
340
|
def hash
|
|
331
|
-
[is_in_the_past, name, currency, date, table_booking_config, category_overrides, for_sale_per_category, key, chart_id, categories, object_categories].hash
|
|
341
|
+
[is_in_the_past, name, currency, date, table_booking_config, category_overrides, for_sale_per_category, key, chart_id, categories, object_categories, withdraw_affected_listings].hash
|
|
332
342
|
end
|
|
333
343
|
|
|
334
344
|
# Builds the object from hash
|