seatschart 0.2.0 → 0.4.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 +199 -19
- data/lib/seatschart/api/audit_api.rb +2 -2
- data/lib/seatschart/api/auth_api.rb +81 -4
- data/lib/seatschart/api/billing_api.rb +4 -0
- data/lib/seatschart/api/charts_api.rb +810 -77
- 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 +1491 -175
- 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 +356 -6
- 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 +1815 -363
- 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/delete_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +237 -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 +80 -5
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response.rb +239 -0
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response_api_keys_inner.rb +321 -0
- data/lib/seatschart/models/get_api_workspaces_created_by_api_parameter.rb +103 -0
- data/lib/seatschart/models/get_api_workspaces_overview_created_by_api_parameter.rb +103 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +12 -2
- 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/patch_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +221 -0
- data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id_request.rb +292 -0
- data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_request.rb +288 -0
- data/lib/seatschart/models/post_api_auth_new_workspace_request.rb +294 -0
- 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/{put_api_charts_by_chart_id_map_draft_request.rb → post_api_extract_seats_request_region_any_of.rb} +111 -96
- 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_workspaces200_response.rb +468 -0
- data/lib/seatschart/models/post_api_workspaces200_response_api_key.rb +332 -0
- data/lib/seatschart/models/post_api_workspaces200_response_template.rb +260 -0
- data/lib/seatschart/models/post_api_workspaces200_response_template_webhooks_inner.rb +284 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete200_response.rb +319 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete_request.rb +281 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations_request.rb +300 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response.rb +237 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response_api_key.rb +338 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys_request.rb +299 -0
- data/lib/seatschart/models/post_api_workspaces_request.rb +101 -5
- data/lib/seatschart/models/post_api_workspaces_request_issue_key.rb +294 -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 +73 -3
- metadata +75 -5
- data/lib/seatschart/api/default_api.rb +0 -763
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
module GetApiWorkspacesOverviewCreatedByApiParameter
|
|
18
|
+
class << self
|
|
19
|
+
# List of class defined in anyOf (OpenAPI v3)
|
|
20
|
+
def openapi_any_of
|
|
21
|
+
[
|
|
22
|
+
:'Boolean'
|
|
23
|
+
]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds the object
|
|
27
|
+
# @param [Mixed] Data to be matched against the list of anyOf items
|
|
28
|
+
# @return [Object] Returns the model or the data itself
|
|
29
|
+
def build(data)
|
|
30
|
+
# Go through the list of anyOf items and attempt to identify the appropriate one.
|
|
31
|
+
# Note:
|
|
32
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
33
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
34
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
35
|
+
# - TODO: logging when debugging is set.
|
|
36
|
+
openapi_any_of.each do |klass|
|
|
37
|
+
begin
|
|
38
|
+
next if klass == :AnyType # "nullable: true"
|
|
39
|
+
typed_data = find_and_cast_into_type(klass, data)
|
|
40
|
+
return typed_data if typed_data
|
|
41
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
openapi_any_of.include?(:AnyType) ? data : nil
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
private
|
|
49
|
+
|
|
50
|
+
SchemaMismatchError = Class.new(StandardError)
|
|
51
|
+
|
|
52
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
53
|
+
def find_and_cast_into_type(klass, data)
|
|
54
|
+
return if data.nil?
|
|
55
|
+
|
|
56
|
+
case klass.to_s
|
|
57
|
+
when 'Boolean'
|
|
58
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
59
|
+
when 'Float'
|
|
60
|
+
return data if data.instance_of?(Float)
|
|
61
|
+
when 'Integer'
|
|
62
|
+
return data if data.instance_of?(Integer)
|
|
63
|
+
when 'Time'
|
|
64
|
+
return Time.parse(data)
|
|
65
|
+
when 'Date'
|
|
66
|
+
return Date.parse(data)
|
|
67
|
+
when 'String'
|
|
68
|
+
return data if data.instance_of?(String)
|
|
69
|
+
when 'Object' # "type: object"
|
|
70
|
+
return data if data.instance_of?(Hash)
|
|
71
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
72
|
+
if data.instance_of?(Array)
|
|
73
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
74
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
75
|
+
end
|
|
76
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
77
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
78
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
79
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
80
|
+
end
|
|
81
|
+
else # model
|
|
82
|
+
const = SeatsChart.const_get(klass)
|
|
83
|
+
if const
|
|
84
|
+
if const.respond_to?(:openapi_any_of) # nested anyOf model
|
|
85
|
+
model = const.build(data)
|
|
86
|
+
return model if model
|
|
87
|
+
else
|
|
88
|
+
# raise if data contains keys that are not known to the model
|
|
89
|
+
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
90
|
+
model = const.build_from_hash(data)
|
|
91
|
+
return model if model
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
raise # if no match by now, raise
|
|
97
|
+
rescue
|
|
98
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
end
|
|
@@ -35,6 +35,9 @@ module SeatsChart
|
|
|
35
35
|
# Switch the event to another published chart of the workspace (see description).
|
|
36
36
|
attr_accessor :chart_id
|
|
37
37
|
|
|
38
|
+
# 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`).
|
|
39
|
+
attr_accessor :withdraw_affected_listings
|
|
40
|
+
|
|
38
41
|
# Event-only categories (replaces the list; null clears).
|
|
39
42
|
attr_accessor :categories
|
|
40
43
|
|
|
@@ -53,6 +56,7 @@ module SeatsChart
|
|
|
53
56
|
:'for_sale_per_category' => :'forSalePerCategory',
|
|
54
57
|
:'key' => :'key',
|
|
55
58
|
:'chart_id' => :'chartId',
|
|
59
|
+
:'withdraw_affected_listings' => :'withdrawAffectedListings',
|
|
56
60
|
:'categories' => :'categories',
|
|
57
61
|
:'object_categories' => :'objectCategories'
|
|
58
62
|
}
|
|
@@ -75,7 +79,8 @@ module SeatsChart
|
|
|
75
79
|
:'for_sale_per_category' => :'Hash<String, Boolean>',
|
|
76
80
|
:'key' => :'String',
|
|
77
81
|
:'chart_id' => :'String',
|
|
78
|
-
:'
|
|
82
|
+
:'withdraw_affected_listings' => :'Boolean',
|
|
83
|
+
:'categories' => :'Array<PostApiEventsRequestCategoriesInner>',
|
|
79
84
|
:'object_categories' => :'Hash<String, String>'
|
|
80
85
|
}
|
|
81
86
|
end
|
|
@@ -146,6 +151,10 @@ module SeatsChart
|
|
|
146
151
|
self.chart_id = attributes[:'chart_id']
|
|
147
152
|
end
|
|
148
153
|
|
|
154
|
+
if attributes.key?(:'withdraw_affected_listings')
|
|
155
|
+
self.withdraw_affected_listings = attributes[:'withdraw_affected_listings']
|
|
156
|
+
end
|
|
157
|
+
|
|
149
158
|
if attributes.key?(:'categories')
|
|
150
159
|
if (value = attributes[:'categories']).is_a?(Array)
|
|
151
160
|
self.categories = value
|
|
@@ -315,6 +324,7 @@ module SeatsChart
|
|
|
315
324
|
for_sale_per_category == o.for_sale_per_category &&
|
|
316
325
|
key == o.key &&
|
|
317
326
|
chart_id == o.chart_id &&
|
|
327
|
+
withdraw_affected_listings == o.withdraw_affected_listings &&
|
|
318
328
|
categories == o.categories &&
|
|
319
329
|
object_categories == o.object_categories
|
|
320
330
|
end
|
|
@@ -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, withdraw_affected_listings, categories, object_categories].hash
|
|
332
342
|
end
|
|
333
343
|
|
|
334
344
|
# Builds the object from hash
|
|
@@ -22,12 +22,16 @@ module SeatsChart
|
|
|
22
22
|
|
|
23
23
|
attr_accessor :source_event_id
|
|
24
24
|
|
|
25
|
+
# seats.io seasons whose bookings do not propagate. `true` (default): a season booking (`seasonId` on hold / reserve, confirm and change-object-status) locks the object in every live member event. `false`: the season source event is the season's own inventory — season bookings lock the object there only and the other member events keep selling it on their own. For-sale configuration, channels and category sync are not affected. Season reports default their `seasonBookingsPropagated` parameter to this value. Changing it never moves existing bookings; it decides where later season bookings go.
|
|
26
|
+
attr_accessor :bookings_propagated
|
|
27
|
+
|
|
25
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
29
|
def self.attribute_map
|
|
27
30
|
{
|
|
28
31
|
:'name' => :'name',
|
|
29
32
|
:'key' => :'key',
|
|
30
|
-
:'source_event_id' => :'sourceEventId'
|
|
33
|
+
:'source_event_id' => :'sourceEventId',
|
|
34
|
+
:'bookings_propagated' => :'bookingsPropagated'
|
|
31
35
|
}
|
|
32
36
|
end
|
|
33
37
|
|
|
@@ -41,7 +45,8 @@ module SeatsChart
|
|
|
41
45
|
{
|
|
42
46
|
:'name' => :'String',
|
|
43
47
|
:'key' => :'String',
|
|
44
|
-
:'source_event_id' => :'String'
|
|
48
|
+
:'source_event_id' => :'String',
|
|
49
|
+
:'bookings_propagated' => :'Boolean'
|
|
45
50
|
}
|
|
46
51
|
end
|
|
47
52
|
|
|
@@ -49,7 +54,7 @@ module SeatsChart
|
|
|
49
54
|
def self.openapi_nullable
|
|
50
55
|
Set.new([
|
|
51
56
|
:'key',
|
|
52
|
-
:'source_event_id'
|
|
57
|
+
:'source_event_id',
|
|
53
58
|
])
|
|
54
59
|
end
|
|
55
60
|
|
|
@@ -79,6 +84,10 @@ module SeatsChart
|
|
|
79
84
|
if attributes.key?(:'source_event_id')
|
|
80
85
|
self.source_event_id = attributes[:'source_event_id']
|
|
81
86
|
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'bookings_propagated')
|
|
89
|
+
self.bookings_propagated = attributes[:'bookings_propagated']
|
|
90
|
+
end
|
|
82
91
|
end
|
|
83
92
|
|
|
84
93
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -170,7 +179,8 @@ module SeatsChart
|
|
|
170
179
|
self.class == o.class &&
|
|
171
180
|
name == o.name &&
|
|
172
181
|
key == o.key &&
|
|
173
|
-
source_event_id == o.source_event_id
|
|
182
|
+
source_event_id == o.source_event_id &&
|
|
183
|
+
bookings_propagated == o.bookings_propagated
|
|
174
184
|
end
|
|
175
185
|
|
|
176
186
|
# @see the `==` method
|
|
@@ -182,7 +192,7 @@ module SeatsChart
|
|
|
182
192
|
# Calculates hash code according to all attributes.
|
|
183
193
|
# @return [Integer] Hash code
|
|
184
194
|
def hash
|
|
185
|
-
[name, key, source_event_id].hash
|
|
195
|
+
[name, key, source_event_id, bookings_propagated].hash
|
|
186
196
|
end
|
|
187
197
|
|
|
188
198
|
# Builds the object from hash
|
|
@@ -46,6 +46,8 @@ module SeatsChart
|
|
|
46
46
|
|
|
47
47
|
attr_accessor :orphan_gap
|
|
48
48
|
|
|
49
|
+
attr_accessor :images_size
|
|
50
|
+
|
|
49
51
|
class EnumAttributeValidator
|
|
50
52
|
attr_reader :datatype
|
|
51
53
|
attr_reader :allowable_values
|
|
@@ -85,7 +87,8 @@ module SeatsChart
|
|
|
85
87
|
:'multiple_object_types' => :'multiple_object_types',
|
|
86
88
|
:'missing_focal_point' => :'missing_focal_point',
|
|
87
89
|
:'zone_missing_focal_point' => :'zone_missing_focal_point',
|
|
88
|
-
:'orphan_gap' => :'orphan_gap'
|
|
90
|
+
:'orphan_gap' => :'orphan_gap',
|
|
91
|
+
:'images_size' => :'images_size'
|
|
89
92
|
}
|
|
90
93
|
end
|
|
91
94
|
|
|
@@ -111,7 +114,8 @@ module SeatsChart
|
|
|
111
114
|
:'multiple_object_types' => :'String',
|
|
112
115
|
:'missing_focal_point' => :'String',
|
|
113
116
|
:'zone_missing_focal_point' => :'String',
|
|
114
|
-
:'orphan_gap' => :'String'
|
|
117
|
+
:'orphan_gap' => :'String',
|
|
118
|
+
:'images_size' => :'String'
|
|
115
119
|
}
|
|
116
120
|
end
|
|
117
121
|
|
|
@@ -195,6 +199,10 @@ module SeatsChart
|
|
|
195
199
|
if attributes.key?(:'orphan_gap')
|
|
196
200
|
self.orphan_gap = attributes[:'orphan_gap']
|
|
197
201
|
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'images_size')
|
|
204
|
+
self.images_size = attributes[:'images_size']
|
|
205
|
+
end
|
|
198
206
|
end
|
|
199
207
|
|
|
200
208
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -239,6 +247,8 @@ module SeatsChart
|
|
|
239
247
|
return false unless zone_missing_focal_point_validator.valid?(@zone_missing_focal_point)
|
|
240
248
|
orphan_gap_validator = EnumAttributeValidator.new('String', ["off", "warning", "error"])
|
|
241
249
|
return false unless orphan_gap_validator.valid?(@orphan_gap)
|
|
250
|
+
images_size_validator = EnumAttributeValidator.new('String', ["off", "warning", "error"])
|
|
251
|
+
return false unless images_size_validator.valid?(@images_size)
|
|
242
252
|
true
|
|
243
253
|
end
|
|
244
254
|
|
|
@@ -392,6 +402,16 @@ module SeatsChart
|
|
|
392
402
|
@orphan_gap = orphan_gap
|
|
393
403
|
end
|
|
394
404
|
|
|
405
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
406
|
+
# @param [Object] images_size Object to be assigned
|
|
407
|
+
def images_size=(images_size)
|
|
408
|
+
validator = EnumAttributeValidator.new('String', ["off", "warning", "error"])
|
|
409
|
+
unless validator.valid?(images_size)
|
|
410
|
+
fail ArgumentError, "invalid value for \"images_size\", must be one of #{validator.allowable_values}."
|
|
411
|
+
end
|
|
412
|
+
@images_size = images_size
|
|
413
|
+
end
|
|
414
|
+
|
|
395
415
|
# Checks equality by comparing each attribute.
|
|
396
416
|
# @param [Object] Object to be compared
|
|
397
417
|
def ==(o)
|
|
@@ -411,7 +431,8 @@ module SeatsChart
|
|
|
411
431
|
multiple_object_types == o.multiple_object_types &&
|
|
412
432
|
missing_focal_point == o.missing_focal_point &&
|
|
413
433
|
zone_missing_focal_point == o.zone_missing_focal_point &&
|
|
414
|
-
orphan_gap == o.orphan_gap
|
|
434
|
+
orphan_gap == o.orphan_gap &&
|
|
435
|
+
images_size == o.images_size
|
|
415
436
|
end
|
|
416
437
|
|
|
417
438
|
# @see the `==` method
|
|
@@ -423,7 +444,7 @@ module SeatsChart
|
|
|
423
444
|
# Calculates hash code according to all attributes.
|
|
424
445
|
# @return [Integer] Hash code
|
|
425
446
|
def hash
|
|
426
|
-
[no_objects, empty_label, duplicate_label, uncategorized, overlap, table_too_small, ga_invalid_capacity, ga_table_capacity, empty_floor, empty_section, outside_section, multiple_object_types, missing_focal_point, zone_missing_focal_point, orphan_gap].hash
|
|
447
|
+
[no_objects, empty_label, duplicate_label, uncategorized, overlap, table_too_small, ga_invalid_capacity, ga_table_capacity, empty_floor, empty_section, outside_section, multiple_object_types, missing_focal_point, zone_missing_focal_point, orphan_gap, images_size].hash
|
|
427
448
|
end
|
|
428
449
|
|
|
429
450
|
# Builds the object from hash
|
|
@@ -0,0 +1,224 @@
|
|
|
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 PatchApiWorkspaceDefaultsRequest
|
|
18
|
+
attr_accessor :renderer
|
|
19
|
+
|
|
20
|
+
# `false`: publish designer changes directly (no draft step).
|
|
21
|
+
attr_accessor :draft_chart_drawings_enabled
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'renderer' => :'renderer',
|
|
27
|
+
:'draft_chart_drawings_enabled' => :'draftChartDrawingsEnabled'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns all the JSON keys this model knows about
|
|
32
|
+
def self.acceptable_attributes
|
|
33
|
+
attribute_map.values
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Attribute type mapping.
|
|
37
|
+
def self.openapi_types
|
|
38
|
+
{
|
|
39
|
+
:'renderer' => :'PatchApiWorkspaceDefaultsRequestRenderer',
|
|
40
|
+
:'draft_chart_drawings_enabled' => :'Boolean'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PatchApiWorkspaceDefaultsRequest` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
59
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PatchApiWorkspaceDefaultsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
61
|
+
end
|
|
62
|
+
h[k.to_sym] = v
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if attributes.key?(:'renderer')
|
|
66
|
+
self.renderer = attributes[:'renderer']
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
if attributes.key?(:'draft_chart_drawings_enabled')
|
|
70
|
+
self.draft_chart_drawings_enabled = attributes[:'draft_chart_drawings_enabled']
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
invalid_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Check to see if the all the properties in the model are valid
|
|
83
|
+
# @return true if the model is valid
|
|
84
|
+
def valid?
|
|
85
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
86
|
+
true
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Checks equality by comparing each attribute.
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def ==(o)
|
|
92
|
+
return true if self.equal?(o)
|
|
93
|
+
self.class == o.class &&
|
|
94
|
+
renderer == o.renderer &&
|
|
95
|
+
draft_chart_drawings_enabled == o.draft_chart_drawings_enabled
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# @see the `==` method
|
|
99
|
+
# @param [Object] Object to be compared
|
|
100
|
+
def eql?(o)
|
|
101
|
+
self == o
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Calculates hash code according to all attributes.
|
|
105
|
+
# @return [Integer] Hash code
|
|
106
|
+
def hash
|
|
107
|
+
[renderer, draft_chart_drawings_enabled].hash
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Builds the object from hash
|
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
112
|
+
# @return [Object] Returns the model itself
|
|
113
|
+
def self.build_from_hash(attributes)
|
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
|
115
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
116
|
+
transformed_hash = {}
|
|
117
|
+
openapi_types.each_pair do |key, type|
|
|
118
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
119
|
+
transformed_hash["#{key}"] = nil
|
|
120
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
121
|
+
# check to ensure the input is an array given that the attribute
|
|
122
|
+
# is documented as an array but the input is not
|
|
123
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
124
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
125
|
+
end
|
|
126
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
127
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
new(transformed_hash)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Deserializes the data based on type
|
|
134
|
+
# @param string type Data type
|
|
135
|
+
# @param string value Value to be deserialized
|
|
136
|
+
# @return [Object] Deserialized data
|
|
137
|
+
def self._deserialize(type, value)
|
|
138
|
+
case type.to_sym
|
|
139
|
+
when :Time
|
|
140
|
+
Time.parse(value)
|
|
141
|
+
when :Date
|
|
142
|
+
Date.parse(value)
|
|
143
|
+
when :String
|
|
144
|
+
value.to_s
|
|
145
|
+
when :Integer
|
|
146
|
+
value.to_i
|
|
147
|
+
when :Float
|
|
148
|
+
value.to_f
|
|
149
|
+
when :Boolean
|
|
150
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
151
|
+
true
|
|
152
|
+
else
|
|
153
|
+
false
|
|
154
|
+
end
|
|
155
|
+
when :Object
|
|
156
|
+
# generic object (usually a Hash), return directly
|
|
157
|
+
value
|
|
158
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
159
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
160
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
161
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
162
|
+
k_type = Regexp.last_match[:k_type]
|
|
163
|
+
v_type = Regexp.last_match[:v_type]
|
|
164
|
+
{}.tap do |hash|
|
|
165
|
+
value.each do |k, v|
|
|
166
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
else # model
|
|
170
|
+
# models (e.g. Pet) or oneOf
|
|
171
|
+
klass = SeatsChart.const_get(type)
|
|
172
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Returns the string representation of the object
|
|
177
|
+
# @return [String] String presentation of the object
|
|
178
|
+
def to_s
|
|
179
|
+
to_hash.to_s
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
|
184
|
+
def to_body
|
|
185
|
+
to_hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Returns the object in the form of hash
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_hash
|
|
191
|
+
hash = {}
|
|
192
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
193
|
+
value = self.send(attr)
|
|
194
|
+
if value.nil?
|
|
195
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
196
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
hash[param] = _to_hash(value)
|
|
200
|
+
end
|
|
201
|
+
hash
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Outputs non-array value in the form of hash
|
|
205
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
206
|
+
# @param [Object] value Any valid value
|
|
207
|
+
# @return [Hash] Returns the value in the form of hash
|
|
208
|
+
def _to_hash(value)
|
|
209
|
+
if value.is_a?(Array)
|
|
210
|
+
value.compact.map { |v| _to_hash(v) }
|
|
211
|
+
elsif value.is_a?(Hash)
|
|
212
|
+
{}.tap do |hash|
|
|
213
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
214
|
+
end
|
|
215
|
+
elsif value.respond_to? :to_hash
|
|
216
|
+
value.to_hash
|
|
217
|
+
else
|
|
218
|
+
value
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
end
|