seatschart 0.1.1 → 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 +191 -16
- data/lib/seatschart/api/audit_api.rb +2 -2
- data/lib/seatschart/api/charts_api.rb +808 -75
- data/lib/seatschart/api/embed_api.rb +18 -7
- 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 +1594 -112
- data/lib/seatschart/api/health_api.rb +244 -0
- data/lib/seatschart/api/listings_api.rb +884 -0
- data/lib/seatschart/api/map_designer_api.rb +11 -9
- data/lib/seatschart/api/object_status_api.rb +2 -2
- 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 +455 -42
- data/lib/seatschart/api/seats_api.rb +13 -32
- data/lib/seatschart/api/usage_api.rb +20 -17
- 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 +307 -0
- data/lib/seatschart/models/api_error_params_value.rb +105 -0
- data/lib/seatschart/models/delete_api_sandboxes_by_sandbox_id200_response.rb +255 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +78 -4
- data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency.rb +318 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency_api_keys_inner.rb +297 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +38 -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_workspace_settings200_response_effective.rb +20 -4
- data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +13 -4
- data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +32 -4
- data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +34 -5
- data/lib/seatschart/models/patch_api_events_by_event_id_listings_by_listing_id_request.rb +379 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +16 -6
- data/lib/seatschart/models/patch_api_listing_types_by_key_request.rb +376 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_partial_seasons_by_partial_season_id_request.rb +268 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +41 -5
- data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +1 -1
- 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 +18 -7
- 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_actions_validate_request_seats_inner_accessibility.rb +6 -6
- 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_change_object_status_request_status_changes_inner.rb +0 -11
- 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_change_object_status_request.rb +13 -26
- data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request_listing.rb +392 -0
- 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_actions_mark_everything_as_not_for_sale_request.rb +215 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_by_listing_id_actions_mark_sold_request.rb +243 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_request.rb +435 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner.rb +104 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner_any_of.rb +325 -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_ga_confirm_request.rb +0 -44
- data/lib/seatschart/models/post_api_ga_release_request.rb +0 -11
- data/lib/seatschart/models/post_api_ga_reserve_request.rb +0 -33
- data/lib/seatschart/models/post_api_hold_tokens_request.rb +0 -22
- data/lib/seatschart/models/post_api_listing_types_request.rb +439 -0
- data/lib/seatschart/models/post_api_quotes_request.rb +0 -22
- 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_by_season_id_partial_seasons_request.rb +27 -1
- data/lib/seatschart/models/post_api_seasons_request.rb +40 -4
- data/lib/seatschart/models/post_api_seats_best_available_request.rb +0 -11
- data/lib/seatschart/models/post_api_seats_confirm_request.rb +5 -49
- data/lib/seatschart/models/post_api_seats_release_request.rb +5 -16
- data/lib/seatschart/models/post_api_seats_reserve_request.rb +5 -27
- data/lib/seatschart/models/post_api_viewer_tokens_request.rb +0 -11
- data/lib/seatschart/models/post_api_webhooks_request.rb +1 -1
- 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 +349 -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 +69 -2
- metadata +71 -4
- data/lib/seatschart/api/default_api.rb +0 -763
|
@@ -173,11 +173,6 @@ module SeatsChart
|
|
|
173
173
|
invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.')
|
|
174
174
|
end
|
|
175
175
|
|
|
176
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
177
|
-
if @user_id !~ pattern
|
|
178
|
-
invalid_properties.push("invalid value for \"user_id\", must conform to the pattern #{pattern}.")
|
|
179
|
-
end
|
|
180
|
-
|
|
181
176
|
if !@channel.nil? && @channel.to_s.length > 32
|
|
182
177
|
invalid_properties.push('invalid value for "channel", the character length must be smaller than or equal to 32.')
|
|
183
178
|
end
|
|
@@ -194,11 +189,6 @@ module SeatsChart
|
|
|
194
189
|
invalid_properties.push('invalid value for "ticket_buyer_id", the character length must be great than or equal to 1.')
|
|
195
190
|
end
|
|
196
191
|
|
|
197
|
-
pattern = Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
198
|
-
if !@ticket_buyer_id.nil? && @ticket_buyer_id !~ pattern
|
|
199
|
-
invalid_properties.push("invalid value for \"ticket_buyer_id\", must conform to the pattern #{pattern}.")
|
|
200
|
-
end
|
|
201
|
-
|
|
202
192
|
if !@ticket_type_id.nil? && @ticket_type_id.to_s.length > 64
|
|
203
193
|
invalid_properties.push('invalid value for "ticket_type_id", the character length must be smaller than or equal to 64.')
|
|
204
194
|
end
|
|
@@ -207,11 +197,6 @@ module SeatsChart
|
|
|
207
197
|
invalid_properties.push('invalid value for "ticket_type_id", the character length must be great than or equal to 1.')
|
|
208
198
|
end
|
|
209
199
|
|
|
210
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
211
|
-
if !@ticket_type_id.nil? && @ticket_type_id !~ pattern
|
|
212
|
-
invalid_properties.push("invalid value for \"ticket_type_id\", must conform to the pattern #{pattern}.")
|
|
213
|
-
end
|
|
214
|
-
|
|
215
200
|
invalid_properties
|
|
216
201
|
end
|
|
217
202
|
|
|
@@ -231,15 +216,12 @@ module SeatsChart
|
|
|
231
216
|
return false if @user_id.nil?
|
|
232
217
|
return false if @user_id.to_s.length > 256
|
|
233
218
|
return false if @user_id.to_s.length < 1
|
|
234
|
-
return false if @user_id !~ Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
235
219
|
return false if !@channel.nil? && @channel.to_s.length > 32
|
|
236
220
|
return false if !@channel.nil? && @channel.to_s.length < 1
|
|
237
221
|
return false if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length > 256
|
|
238
222
|
return false if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length < 1
|
|
239
|
-
return false if !@ticket_buyer_id.nil? && @ticket_buyer_id !~ Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
240
223
|
return false if !@ticket_type_id.nil? && @ticket_type_id.to_s.length > 64
|
|
241
224
|
return false if !@ticket_type_id.nil? && @ticket_type_id.to_s.length < 1
|
|
242
|
-
return false if !@ticket_type_id.nil? && @ticket_type_id !~ Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
243
225
|
true
|
|
244
226
|
end
|
|
245
227
|
|
|
@@ -312,11 +294,6 @@ module SeatsChart
|
|
|
312
294
|
fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.'
|
|
313
295
|
end
|
|
314
296
|
|
|
315
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
316
|
-
if user_id !~ pattern
|
|
317
|
-
fail ArgumentError, "invalid value for \"user_id\", must conform to the pattern #{pattern}."
|
|
318
|
-
end
|
|
319
|
-
|
|
320
297
|
@user_id = user_id
|
|
321
298
|
end
|
|
322
299
|
|
|
@@ -353,11 +330,6 @@ module SeatsChart
|
|
|
353
330
|
fail ArgumentError, 'invalid value for "ticket_buyer_id", the character length must be great than or equal to 1.'
|
|
354
331
|
end
|
|
355
332
|
|
|
356
|
-
pattern = Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
357
|
-
if ticket_buyer_id !~ pattern
|
|
358
|
-
fail ArgumentError, "invalid value for \"ticket_buyer_id\", must conform to the pattern #{pattern}."
|
|
359
|
-
end
|
|
360
|
-
|
|
361
333
|
@ticket_buyer_id = ticket_buyer_id
|
|
362
334
|
end
|
|
363
335
|
|
|
@@ -376,11 +348,6 @@ module SeatsChart
|
|
|
376
348
|
fail ArgumentError, 'invalid value for "ticket_type_id", the character length must be great than or equal to 1.'
|
|
377
349
|
end
|
|
378
350
|
|
|
379
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
380
|
-
if ticket_type_id !~ pattern
|
|
381
|
-
fail ArgumentError, "invalid value for \"ticket_type_id\", must conform to the pattern #{pattern}."
|
|
382
|
-
end
|
|
383
|
-
|
|
384
351
|
@ticket_type_id = ticket_type_id
|
|
385
352
|
end
|
|
386
353
|
|
|
@@ -121,11 +121,6 @@ module SeatsChart
|
|
|
121
121
|
invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.')
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
125
|
-
if @user_id !~ pattern
|
|
126
|
-
invalid_properties.push("invalid value for \"user_id\", must conform to the pattern #{pattern}.")
|
|
127
|
-
end
|
|
128
|
-
|
|
129
124
|
if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length > 256
|
|
130
125
|
invalid_properties.push('invalid value for "ticket_buyer_id", the character length must be smaller than or equal to 256.')
|
|
131
126
|
end
|
|
@@ -134,11 +129,6 @@ module SeatsChart
|
|
|
134
129
|
invalid_properties.push('invalid value for "ticket_buyer_id", the character length must be great than or equal to 1.')
|
|
135
130
|
end
|
|
136
131
|
|
|
137
|
-
pattern = Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
138
|
-
if !@ticket_buyer_id.nil? && @ticket_buyer_id !~ pattern
|
|
139
|
-
invalid_properties.push("invalid value for \"ticket_buyer_id\", must conform to the pattern #{pattern}.")
|
|
140
|
-
end
|
|
141
|
-
|
|
142
132
|
if !@expires_in_minutes.nil? && @expires_in_minutes > 120
|
|
143
133
|
invalid_properties.push('invalid value for "expires_in_minutes", must be smaller than or equal to 120.')
|
|
144
134
|
end
|
|
@@ -160,10 +150,8 @@ module SeatsChart
|
|
|
160
150
|
return false if @user_id.nil?
|
|
161
151
|
return false if @user_id.to_s.length > 256
|
|
162
152
|
return false if @user_id.to_s.length < 1
|
|
163
|
-
return false if @user_id !~ Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
164
153
|
return false if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length > 256
|
|
165
154
|
return false if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length < 1
|
|
166
|
-
return false if !@ticket_buyer_id.nil? && @ticket_buyer_id !~ Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
167
155
|
return false if !@expires_in_minutes.nil? && @expires_in_minutes > 120
|
|
168
156
|
return false if !@expires_in_minutes.nil? && @expires_in_minutes < 1
|
|
169
157
|
true
|
|
@@ -202,11 +190,6 @@ module SeatsChart
|
|
|
202
190
|
fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.'
|
|
203
191
|
end
|
|
204
192
|
|
|
205
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
206
|
-
if user_id !~ pattern
|
|
207
|
-
fail ArgumentError, "invalid value for \"user_id\", must conform to the pattern #{pattern}."
|
|
208
|
-
end
|
|
209
|
-
|
|
210
193
|
@user_id = user_id
|
|
211
194
|
end
|
|
212
195
|
|
|
@@ -225,11 +208,6 @@ module SeatsChart
|
|
|
225
208
|
fail ArgumentError, 'invalid value for "ticket_buyer_id", the character length must be great than or equal to 1.'
|
|
226
209
|
end
|
|
227
210
|
|
|
228
|
-
pattern = Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
229
|
-
if ticket_buyer_id !~ pattern
|
|
230
|
-
fail ArgumentError, "invalid value for \"ticket_buyer_id\", must conform to the pattern #{pattern}."
|
|
231
|
-
end
|
|
232
|
-
|
|
233
211
|
@ticket_buyer_id = ticket_buyer_id
|
|
234
212
|
end
|
|
235
213
|
|
|
@@ -0,0 +1,439 @@
|
|
|
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
|
+
class PostApiListingTypesRequest
|
|
18
|
+
attr_accessor :key
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
# `resale`: objects resold by their owner (listingType filter `resale`); `primary`: first-hand inventory sold as a listing.
|
|
23
|
+
attr_accessor :kind
|
|
24
|
+
|
|
25
|
+
# CSS hex color `#rrggbb`.
|
|
26
|
+
attr_accessor :background_color
|
|
27
|
+
|
|
28
|
+
# CSS hex color `#rrggbb`.
|
|
29
|
+
attr_accessor :icon_color
|
|
30
|
+
|
|
31
|
+
# Icon name (FontAwesome 4.7 names, as seats.io).
|
|
32
|
+
attr_accessor :icon
|
|
33
|
+
|
|
34
|
+
class EnumAttributeValidator
|
|
35
|
+
attr_reader :datatype
|
|
36
|
+
attr_reader :allowable_values
|
|
37
|
+
|
|
38
|
+
def initialize(datatype, allowable_values)
|
|
39
|
+
@allowable_values = allowable_values.map do |value|
|
|
40
|
+
case datatype.to_s
|
|
41
|
+
when /Integer/i
|
|
42
|
+
value.to_i
|
|
43
|
+
when /Float/i
|
|
44
|
+
value.to_f
|
|
45
|
+
else
|
|
46
|
+
value
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def valid?(value)
|
|
52
|
+
!value || allowable_values.include?(value)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
57
|
+
def self.attribute_map
|
|
58
|
+
{
|
|
59
|
+
:'key' => :'key',
|
|
60
|
+
:'name' => :'name',
|
|
61
|
+
:'kind' => :'kind',
|
|
62
|
+
:'background_color' => :'backgroundColor',
|
|
63
|
+
:'icon_color' => :'iconColor',
|
|
64
|
+
:'icon' => :'icon'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns all the JSON keys this model knows about
|
|
69
|
+
def self.acceptable_attributes
|
|
70
|
+
attribute_map.values
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Attribute type mapping.
|
|
74
|
+
def self.openapi_types
|
|
75
|
+
{
|
|
76
|
+
:'key' => :'String',
|
|
77
|
+
:'name' => :'String',
|
|
78
|
+
:'kind' => :'String',
|
|
79
|
+
:'background_color' => :'String',
|
|
80
|
+
:'icon_color' => :'String',
|
|
81
|
+
:'icon' => :'String'
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# List of attributes with nullable: true
|
|
86
|
+
def self.openapi_nullable
|
|
87
|
+
Set.new([
|
|
88
|
+
:'background_color',
|
|
89
|
+
:'icon_color',
|
|
90
|
+
:'icon'
|
|
91
|
+
])
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Initializes the object
|
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
96
|
+
def initialize(attributes = {})
|
|
97
|
+
if (!attributes.is_a?(Hash))
|
|
98
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiListingTypesRequest` initialize method"
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
102
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
103
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiListingTypesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
105
|
+
end
|
|
106
|
+
h[k.to_sym] = v
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'key')
|
|
110
|
+
self.key = attributes[:'key']
|
|
111
|
+
else
|
|
112
|
+
self.key = nil
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'name')
|
|
116
|
+
self.name = attributes[:'name']
|
|
117
|
+
else
|
|
118
|
+
self.name = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'kind')
|
|
122
|
+
self.kind = attributes[:'kind']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'background_color')
|
|
126
|
+
self.background_color = attributes[:'background_color']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'icon_color')
|
|
130
|
+
self.icon_color = attributes[:'icon_color']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'icon')
|
|
134
|
+
self.icon = attributes[:'icon']
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
139
|
+
# @return Array for valid properties with the reasons
|
|
140
|
+
def list_invalid_properties
|
|
141
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
142
|
+
invalid_properties = Array.new
|
|
143
|
+
if @key.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if @key.to_s.length > 64
|
|
148
|
+
invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 64.')
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if @key.to_s.length < 1
|
|
152
|
+
invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
pattern = Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
|
|
156
|
+
if @key !~ pattern
|
|
157
|
+
invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if @name.nil?
|
|
161
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if @name.to_s.length > 120
|
|
165
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 120.')
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if @name.to_s.length < 1
|
|
169
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
pattern = Regexp.new(/^#[0-9a-fA-F]{6}$/)
|
|
173
|
+
if !@background_color.nil? && @background_color !~ pattern
|
|
174
|
+
invalid_properties.push("invalid value for \"background_color\", must conform to the pattern #{pattern}.")
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
pattern = Regexp.new(/^#[0-9a-fA-F]{6}$/)
|
|
178
|
+
if !@icon_color.nil? && @icon_color !~ pattern
|
|
179
|
+
invalid_properties.push("invalid value for \"icon_color\", must conform to the pattern #{pattern}.")
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if !@icon.nil? && @icon.to_s.length > 48
|
|
183
|
+
invalid_properties.push('invalid value for "icon", the character length must be smaller than or equal to 48.')
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if !@icon.nil? && @icon.to_s.length < 1
|
|
187
|
+
invalid_properties.push('invalid value for "icon", the character length must be great than or equal to 1.')
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
invalid_properties
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Check to see if the all the properties in the model are valid
|
|
194
|
+
# @return true if the model is valid
|
|
195
|
+
def valid?
|
|
196
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
197
|
+
return false if @key.nil?
|
|
198
|
+
return false if @key.to_s.length > 64
|
|
199
|
+
return false if @key.to_s.length < 1
|
|
200
|
+
return false if @key !~ Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
|
|
201
|
+
return false if @name.nil?
|
|
202
|
+
return false if @name.to_s.length > 120
|
|
203
|
+
return false if @name.to_s.length < 1
|
|
204
|
+
kind_validator = EnumAttributeValidator.new('String', ["primary", "resale"])
|
|
205
|
+
return false unless kind_validator.valid?(@kind)
|
|
206
|
+
return false if !@background_color.nil? && @background_color !~ Regexp.new(/^#[0-9a-fA-F]{6}$/)
|
|
207
|
+
return false if !@icon_color.nil? && @icon_color !~ Regexp.new(/^#[0-9a-fA-F]{6}$/)
|
|
208
|
+
return false if !@icon.nil? && @icon.to_s.length > 48
|
|
209
|
+
return false if !@icon.nil? && @icon.to_s.length < 1
|
|
210
|
+
true
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Custom attribute writer method with validation
|
|
214
|
+
# @param [Object] key Value to be assigned
|
|
215
|
+
def key=(key)
|
|
216
|
+
if key.nil?
|
|
217
|
+
fail ArgumentError, 'key cannot be nil'
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if key.to_s.length > 64
|
|
221
|
+
fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 64.'
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if key.to_s.length < 1
|
|
225
|
+
fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.'
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
pattern = Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
|
|
229
|
+
if key !~ pattern
|
|
230
|
+
fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
@key = key
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Custom attribute writer method with validation
|
|
237
|
+
# @param [Object] name Value to be assigned
|
|
238
|
+
def name=(name)
|
|
239
|
+
if name.nil?
|
|
240
|
+
fail ArgumentError, 'name cannot be nil'
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if name.to_s.length > 120
|
|
244
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 120.'
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if name.to_s.length < 1
|
|
248
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
@name = name
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
255
|
+
# @param [Object] kind Object to be assigned
|
|
256
|
+
def kind=(kind)
|
|
257
|
+
validator = EnumAttributeValidator.new('String', ["primary", "resale"])
|
|
258
|
+
unless validator.valid?(kind)
|
|
259
|
+
fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
|
|
260
|
+
end
|
|
261
|
+
@kind = kind
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Custom attribute writer method with validation
|
|
265
|
+
# @param [Object] background_color Value to be assigned
|
|
266
|
+
def background_color=(background_color)
|
|
267
|
+
pattern = Regexp.new(/^#[0-9a-fA-F]{6}$/)
|
|
268
|
+
if !background_color.nil? && background_color !~ pattern
|
|
269
|
+
fail ArgumentError, "invalid value for \"background_color\", must conform to the pattern #{pattern}."
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
@background_color = background_color
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Custom attribute writer method with validation
|
|
276
|
+
# @param [Object] icon_color Value to be assigned
|
|
277
|
+
def icon_color=(icon_color)
|
|
278
|
+
pattern = Regexp.new(/^#[0-9a-fA-F]{6}$/)
|
|
279
|
+
if !icon_color.nil? && icon_color !~ pattern
|
|
280
|
+
fail ArgumentError, "invalid value for \"icon_color\", must conform to the pattern #{pattern}."
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
@icon_color = icon_color
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Custom attribute writer method with validation
|
|
287
|
+
# @param [Object] icon Value to be assigned
|
|
288
|
+
def icon=(icon)
|
|
289
|
+
if !icon.nil? && icon.to_s.length > 48
|
|
290
|
+
fail ArgumentError, 'invalid value for "icon", the character length must be smaller than or equal to 48.'
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
if !icon.nil? && icon.to_s.length < 1
|
|
294
|
+
fail ArgumentError, 'invalid value for "icon", the character length must be great than or equal to 1.'
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
@icon = icon
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Checks equality by comparing each attribute.
|
|
301
|
+
# @param [Object] Object to be compared
|
|
302
|
+
def ==(o)
|
|
303
|
+
return true if self.equal?(o)
|
|
304
|
+
self.class == o.class &&
|
|
305
|
+
key == o.key &&
|
|
306
|
+
name == o.name &&
|
|
307
|
+
kind == o.kind &&
|
|
308
|
+
background_color == o.background_color &&
|
|
309
|
+
icon_color == o.icon_color &&
|
|
310
|
+
icon == o.icon
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# @see the `==` method
|
|
314
|
+
# @param [Object] Object to be compared
|
|
315
|
+
def eql?(o)
|
|
316
|
+
self == o
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Calculates hash code according to all attributes.
|
|
320
|
+
# @return [Integer] Hash code
|
|
321
|
+
def hash
|
|
322
|
+
[key, name, kind, background_color, icon_color, icon].hash
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# Builds the object from hash
|
|
326
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
327
|
+
# @return [Object] Returns the model itself
|
|
328
|
+
def self.build_from_hash(attributes)
|
|
329
|
+
return nil unless attributes.is_a?(Hash)
|
|
330
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
331
|
+
transformed_hash = {}
|
|
332
|
+
openapi_types.each_pair do |key, type|
|
|
333
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
334
|
+
transformed_hash["#{key}"] = nil
|
|
335
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
336
|
+
# check to ensure the input is an array given that the attribute
|
|
337
|
+
# is documented as an array but the input is not
|
|
338
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
339
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
340
|
+
end
|
|
341
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
342
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
343
|
+
end
|
|
344
|
+
end
|
|
345
|
+
new(transformed_hash)
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Deserializes the data based on type
|
|
349
|
+
# @param string type Data type
|
|
350
|
+
# @param string value Value to be deserialized
|
|
351
|
+
# @return [Object] Deserialized data
|
|
352
|
+
def self._deserialize(type, value)
|
|
353
|
+
case type.to_sym
|
|
354
|
+
when :Time
|
|
355
|
+
Time.parse(value)
|
|
356
|
+
when :Date
|
|
357
|
+
Date.parse(value)
|
|
358
|
+
when :String
|
|
359
|
+
value.to_s
|
|
360
|
+
when :Integer
|
|
361
|
+
value.to_i
|
|
362
|
+
when :Float
|
|
363
|
+
value.to_f
|
|
364
|
+
when :Boolean
|
|
365
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
366
|
+
true
|
|
367
|
+
else
|
|
368
|
+
false
|
|
369
|
+
end
|
|
370
|
+
when :Object
|
|
371
|
+
# generic object (usually a Hash), return directly
|
|
372
|
+
value
|
|
373
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
374
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
375
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
376
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
377
|
+
k_type = Regexp.last_match[:k_type]
|
|
378
|
+
v_type = Regexp.last_match[:v_type]
|
|
379
|
+
{}.tap do |hash|
|
|
380
|
+
value.each do |k, v|
|
|
381
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
382
|
+
end
|
|
383
|
+
end
|
|
384
|
+
else # model
|
|
385
|
+
# models (e.g. Pet) or oneOf
|
|
386
|
+
klass = SeatsChart.const_get(type)
|
|
387
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
388
|
+
end
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# Returns the string representation of the object
|
|
392
|
+
# @return [String] String presentation of the object
|
|
393
|
+
def to_s
|
|
394
|
+
to_hash.to_s
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
398
|
+
# @return [Hash] Returns the object in the form of hash
|
|
399
|
+
def to_body
|
|
400
|
+
to_hash
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
# Returns the object in the form of hash
|
|
404
|
+
# @return [Hash] Returns the object in the form of hash
|
|
405
|
+
def to_hash
|
|
406
|
+
hash = {}
|
|
407
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
408
|
+
value = self.send(attr)
|
|
409
|
+
if value.nil?
|
|
410
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
411
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
hash[param] = _to_hash(value)
|
|
415
|
+
end
|
|
416
|
+
hash
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
# Outputs non-array value in the form of hash
|
|
420
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
421
|
+
# @param [Object] value Any valid value
|
|
422
|
+
# @return [Hash] Returns the value in the form of hash
|
|
423
|
+
def _to_hash(value)
|
|
424
|
+
if value.is_a?(Array)
|
|
425
|
+
value.compact.map { |v| _to_hash(v) }
|
|
426
|
+
elsif value.is_a?(Hash)
|
|
427
|
+
{}.tap do |hash|
|
|
428
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
429
|
+
end
|
|
430
|
+
elsif value.respond_to? :to_hash
|
|
431
|
+
value.to_hash
|
|
432
|
+
else
|
|
433
|
+
value
|
|
434
|
+
end
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
end
|
|
@@ -123,11 +123,6 @@ module SeatsChart
|
|
|
123
123
|
invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.')
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
127
|
-
if @user_id !~ pattern
|
|
128
|
-
invalid_properties.push("invalid value for \"user_id\", must conform to the pattern #{pattern}.")
|
|
129
|
-
end
|
|
130
|
-
|
|
131
126
|
if @hold_token.nil?
|
|
132
127
|
invalid_properties.push('invalid value for "hold_token", hold_token cannot be nil.')
|
|
133
128
|
end
|
|
@@ -140,11 +135,6 @@ module SeatsChart
|
|
|
140
135
|
invalid_properties.push('invalid value for "ticket_type_id", the character length must be great than or equal to 1.')
|
|
141
136
|
end
|
|
142
137
|
|
|
143
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
144
|
-
if !@ticket_type_id.nil? && @ticket_type_id !~ pattern
|
|
145
|
-
invalid_properties.push("invalid value for \"ticket_type_id\", must conform to the pattern #{pattern}.")
|
|
146
|
-
end
|
|
147
|
-
|
|
148
138
|
invalid_properties
|
|
149
139
|
end
|
|
150
140
|
|
|
@@ -156,11 +146,9 @@ module SeatsChart
|
|
|
156
146
|
return false if @user_id.nil?
|
|
157
147
|
return false if @user_id.to_s.length > 256
|
|
158
148
|
return false if @user_id.to_s.length < 1
|
|
159
|
-
return false if @user_id !~ Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
160
149
|
return false if @hold_token.nil?
|
|
161
150
|
return false if !@ticket_type_id.nil? && @ticket_type_id.to_s.length > 64
|
|
162
151
|
return false if !@ticket_type_id.nil? && @ticket_type_id.to_s.length < 1
|
|
163
|
-
return false if !@ticket_type_id.nil? && @ticket_type_id !~ Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
164
152
|
true
|
|
165
153
|
end
|
|
166
154
|
|
|
@@ -179,11 +167,6 @@ module SeatsChart
|
|
|
179
167
|
fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.'
|
|
180
168
|
end
|
|
181
169
|
|
|
182
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
183
|
-
if user_id !~ pattern
|
|
184
|
-
fail ArgumentError, "invalid value for \"user_id\", must conform to the pattern #{pattern}."
|
|
185
|
-
end
|
|
186
|
-
|
|
187
170
|
@user_id = user_id
|
|
188
171
|
end
|
|
189
172
|
|
|
@@ -202,11 +185,6 @@ module SeatsChart
|
|
|
202
185
|
fail ArgumentError, 'invalid value for "ticket_type_id", the character length must be great than or equal to 1.'
|
|
203
186
|
end
|
|
204
187
|
|
|
205
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
206
|
-
if ticket_type_id !~ pattern
|
|
207
|
-
fail ArgumentError, "invalid value for \"ticket_type_id\", must conform to the pattern #{pattern}."
|
|
208
|
-
end
|
|
209
|
-
|
|
210
188
|
@ticket_type_id = ticket_type_id
|
|
211
189
|
end
|
|
212
190
|
|