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
|
@@ -0,0 +1,319 @@
|
|
|
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 PostApiSandboxesRequest
|
|
18
|
+
attr_accessor :display_name
|
|
19
|
+
|
|
20
|
+
# Copy the production charts (every non-archived chart, up to 50). Default false.
|
|
21
|
+
attr_accessor :copy_charts
|
|
22
|
+
|
|
23
|
+
# Charts of the production workspace to copy (default: every non-archived chart, up to 50, by name).
|
|
24
|
+
attr_accessor :chart_ids
|
|
25
|
+
|
|
26
|
+
# Also copy the events of each copied published chart (up to 200 per call, newest first) with their for-sale configuration: for-sale flags, channels (new channel keys), GA place quotas, category overrides, event categories, table booking, sales rules, synced prices and the event-level layout. Seasons and partial seasons of the copied events are copied too (fresh ids, remapped members). Nothing sold or held is copied.
|
|
27
|
+
attr_accessor :include_events
|
|
28
|
+
|
|
29
|
+
# Mint a full-access `sk_test_` key for the sandbox, returned once in `adminKey`. Default true.
|
|
30
|
+
attr_accessor :create_admin_key
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'display_name' => :'displayName',
|
|
36
|
+
:'copy_charts' => :'copyCharts',
|
|
37
|
+
:'chart_ids' => :'chartIds',
|
|
38
|
+
:'include_events' => :'includeEvents',
|
|
39
|
+
:'create_admin_key' => :'createAdminKey'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
|
44
|
+
def self.acceptable_attributes
|
|
45
|
+
attribute_map.values
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute type mapping.
|
|
49
|
+
def self.openapi_types
|
|
50
|
+
{
|
|
51
|
+
:'display_name' => :'String',
|
|
52
|
+
:'copy_charts' => :'Boolean',
|
|
53
|
+
:'chart_ids' => :'Array<String>',
|
|
54
|
+
:'include_events' => :'Boolean',
|
|
55
|
+
:'create_admin_key' => :'Boolean'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# List of attributes with nullable: true
|
|
60
|
+
def self.openapi_nullable
|
|
61
|
+
Set.new([
|
|
62
|
+
])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
if (!attributes.is_a?(Hash))
|
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiSandboxesRequest` initialize method"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiSandboxesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
76
|
+
end
|
|
77
|
+
h[k.to_sym] = v
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'display_name')
|
|
81
|
+
self.display_name = attributes[:'display_name']
|
|
82
|
+
else
|
|
83
|
+
self.display_name = nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'copy_charts')
|
|
87
|
+
self.copy_charts = attributes[:'copy_charts']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'chart_ids')
|
|
91
|
+
if (value = attributes[:'chart_ids']).is_a?(Array)
|
|
92
|
+
self.chart_ids = value
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'include_events')
|
|
97
|
+
self.include_events = attributes[:'include_events']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'create_admin_key')
|
|
101
|
+
self.create_admin_key = attributes[:'create_admin_key']
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
if @display_name.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @display_name.to_s.length > 512
|
|
115
|
+
invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 512.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @display_name.to_s.length < 1
|
|
119
|
+
invalid_properties.push('invalid value for "display_name", the character length must be great than or equal to 1.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if !@chart_ids.nil? && @chart_ids.length > 50
|
|
123
|
+
invalid_properties.push('invalid value for "chart_ids", number of items must be less than or equal to 50.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if !@chart_ids.nil? && @chart_ids.length < 1
|
|
127
|
+
invalid_properties.push('invalid value for "chart_ids", number of items must be greater than or equal to 1.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
invalid_properties
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Check to see if the all the properties in the model are valid
|
|
134
|
+
# @return true if the model is valid
|
|
135
|
+
def valid?
|
|
136
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
137
|
+
return false if @display_name.nil?
|
|
138
|
+
return false if @display_name.to_s.length > 512
|
|
139
|
+
return false if @display_name.to_s.length < 1
|
|
140
|
+
return false if !@chart_ids.nil? && @chart_ids.length > 50
|
|
141
|
+
return false if !@chart_ids.nil? && @chart_ids.length < 1
|
|
142
|
+
true
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Custom attribute writer method with validation
|
|
146
|
+
# @param [Object] display_name Value to be assigned
|
|
147
|
+
def display_name=(display_name)
|
|
148
|
+
if display_name.nil?
|
|
149
|
+
fail ArgumentError, 'display_name cannot be nil'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if display_name.to_s.length > 512
|
|
153
|
+
fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 512.'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if display_name.to_s.length < 1
|
|
157
|
+
fail ArgumentError, 'invalid value for "display_name", the character length must be great than or equal to 1.'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
@display_name = display_name
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Custom attribute writer method with validation
|
|
164
|
+
# @param [Object] chart_ids Value to be assigned
|
|
165
|
+
def chart_ids=(chart_ids)
|
|
166
|
+
if chart_ids.nil?
|
|
167
|
+
fail ArgumentError, 'chart_ids cannot be nil'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if chart_ids.length > 50
|
|
171
|
+
fail ArgumentError, 'invalid value for "chart_ids", number of items must be less than or equal to 50.'
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if chart_ids.length < 1
|
|
175
|
+
fail ArgumentError, 'invalid value for "chart_ids", number of items must be greater than or equal to 1.'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
@chart_ids = chart_ids
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Checks equality by comparing each attribute.
|
|
182
|
+
# @param [Object] Object to be compared
|
|
183
|
+
def ==(o)
|
|
184
|
+
return true if self.equal?(o)
|
|
185
|
+
self.class == o.class &&
|
|
186
|
+
display_name == o.display_name &&
|
|
187
|
+
copy_charts == o.copy_charts &&
|
|
188
|
+
chart_ids == o.chart_ids &&
|
|
189
|
+
include_events == o.include_events &&
|
|
190
|
+
create_admin_key == o.create_admin_key
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# @see the `==` method
|
|
194
|
+
# @param [Object] Object to be compared
|
|
195
|
+
def eql?(o)
|
|
196
|
+
self == o
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Calculates hash code according to all attributes.
|
|
200
|
+
# @return [Integer] Hash code
|
|
201
|
+
def hash
|
|
202
|
+
[display_name, copy_charts, chart_ids, include_events, create_admin_key].hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Builds the object from hash
|
|
206
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
207
|
+
# @return [Object] Returns the model itself
|
|
208
|
+
def self.build_from_hash(attributes)
|
|
209
|
+
return nil unless attributes.is_a?(Hash)
|
|
210
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
211
|
+
transformed_hash = {}
|
|
212
|
+
openapi_types.each_pair do |key, type|
|
|
213
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
214
|
+
transformed_hash["#{key}"] = nil
|
|
215
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
216
|
+
# check to ensure the input is an array given that the attribute
|
|
217
|
+
# is documented as an array but the input is not
|
|
218
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
219
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
220
|
+
end
|
|
221
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
222
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
new(transformed_hash)
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Deserializes the data based on type
|
|
229
|
+
# @param string type Data type
|
|
230
|
+
# @param string value Value to be deserialized
|
|
231
|
+
# @return [Object] Deserialized data
|
|
232
|
+
def self._deserialize(type, value)
|
|
233
|
+
case type.to_sym
|
|
234
|
+
when :Time
|
|
235
|
+
Time.parse(value)
|
|
236
|
+
when :Date
|
|
237
|
+
Date.parse(value)
|
|
238
|
+
when :String
|
|
239
|
+
value.to_s
|
|
240
|
+
when :Integer
|
|
241
|
+
value.to_i
|
|
242
|
+
when :Float
|
|
243
|
+
value.to_f
|
|
244
|
+
when :Boolean
|
|
245
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
246
|
+
true
|
|
247
|
+
else
|
|
248
|
+
false
|
|
249
|
+
end
|
|
250
|
+
when :Object
|
|
251
|
+
# generic object (usually a Hash), return directly
|
|
252
|
+
value
|
|
253
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
254
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
255
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
256
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
257
|
+
k_type = Regexp.last_match[:k_type]
|
|
258
|
+
v_type = Regexp.last_match[:v_type]
|
|
259
|
+
{}.tap do |hash|
|
|
260
|
+
value.each do |k, v|
|
|
261
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
else # model
|
|
265
|
+
# models (e.g. Pet) or oneOf
|
|
266
|
+
klass = SeatsChart.const_get(type)
|
|
267
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Returns the string representation of the object
|
|
272
|
+
# @return [String] String presentation of the object
|
|
273
|
+
def to_s
|
|
274
|
+
to_hash.to_s
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
278
|
+
# @return [Hash] Returns the object in the form of hash
|
|
279
|
+
def to_body
|
|
280
|
+
to_hash
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Returns the object in the form of hash
|
|
284
|
+
# @return [Hash] Returns the object in the form of hash
|
|
285
|
+
def to_hash
|
|
286
|
+
hash = {}
|
|
287
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
288
|
+
value = self.send(attr)
|
|
289
|
+
if value.nil?
|
|
290
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
291
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
hash[param] = _to_hash(value)
|
|
295
|
+
end
|
|
296
|
+
hash
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Outputs non-array value in the form of hash
|
|
300
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
301
|
+
# @param [Object] value Any valid value
|
|
302
|
+
# @return [Hash] Returns the value in the form of hash
|
|
303
|
+
def _to_hash(value)
|
|
304
|
+
if value.is_a?(Array)
|
|
305
|
+
value.compact.map { |v| _to_hash(v) }
|
|
306
|
+
elsif value.is_a?(Hash)
|
|
307
|
+
{}.tap do |hash|
|
|
308
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
309
|
+
end
|
|
310
|
+
elsif value.respond_to? :to_hash
|
|
311
|
+
value.to_hash
|
|
312
|
+
else
|
|
313
|
+
value
|
|
314
|
+
end
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
end
|
|
@@ -17,12 +17,16 @@ module SeatsChart
|
|
|
17
17
|
class PostApiSeasonsBySeasonIdPartialSeasonsRequest
|
|
18
18
|
attr_accessor :name
|
|
19
19
|
|
|
20
|
+
# Partner `key`: unique within the season, 1–100 URL-safe characters, never UUID-shaped; usable in place of the partial season id in every partial season path (`/seasons/{seasonIdOrKey}/partial-seasons/{partialSeasonIdOrKey}`), and as body `seasonId` of booking and status changes when no season and no other partial season of the workspace uses it.
|
|
21
|
+
attr_accessor :key
|
|
22
|
+
|
|
20
23
|
attr_accessor :event_ids
|
|
21
24
|
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
26
|
def self.attribute_map
|
|
24
27
|
{
|
|
25
28
|
:'name' => :'name',
|
|
29
|
+
:'key' => :'key',
|
|
26
30
|
:'event_ids' => :'eventIds'
|
|
27
31
|
}
|
|
28
32
|
end
|
|
@@ -36,6 +40,7 @@ module SeatsChart
|
|
|
36
40
|
def self.openapi_types
|
|
37
41
|
{
|
|
38
42
|
:'name' => :'String',
|
|
43
|
+
:'key' => :'String',
|
|
39
44
|
:'event_ids' => :'Array<String>'
|
|
40
45
|
}
|
|
41
46
|
end
|
|
@@ -43,6 +48,7 @@ module SeatsChart
|
|
|
43
48
|
# List of attributes with nullable: true
|
|
44
49
|
def self.openapi_nullable
|
|
45
50
|
Set.new([
|
|
51
|
+
:'key',
|
|
46
52
|
])
|
|
47
53
|
end
|
|
48
54
|
|
|
@@ -67,6 +73,10 @@ module SeatsChart
|
|
|
67
73
|
self.name = nil
|
|
68
74
|
end
|
|
69
75
|
|
|
76
|
+
if attributes.key?(:'key')
|
|
77
|
+
self.key = attributes[:'key']
|
|
78
|
+
end
|
|
79
|
+
|
|
70
80
|
if attributes.key?(:'event_ids')
|
|
71
81
|
if (value = attributes[:'event_ids']).is_a?(Array)
|
|
72
82
|
self.event_ids = value
|
|
@@ -91,6 +101,10 @@ module SeatsChart
|
|
|
91
101
|
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
92
102
|
end
|
|
93
103
|
|
|
104
|
+
if !@key.nil? && @key.to_s.length > 100
|
|
105
|
+
invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 100.')
|
|
106
|
+
end
|
|
107
|
+
|
|
94
108
|
if !@event_ids.nil? && @event_ids.length > 50
|
|
95
109
|
invalid_properties.push('invalid value for "event_ids", number of items must be less than or equal to 50.')
|
|
96
110
|
end
|
|
@@ -105,6 +119,7 @@ module SeatsChart
|
|
|
105
119
|
return false if @name.nil?
|
|
106
120
|
return false if @name.to_s.length > 512
|
|
107
121
|
return false if @name.to_s.length < 1
|
|
122
|
+
return false if !@key.nil? && @key.to_s.length > 100
|
|
108
123
|
return false if !@event_ids.nil? && @event_ids.length > 50
|
|
109
124
|
true
|
|
110
125
|
end
|
|
@@ -127,6 +142,16 @@ module SeatsChart
|
|
|
127
142
|
@name = name
|
|
128
143
|
end
|
|
129
144
|
|
|
145
|
+
# Custom attribute writer method with validation
|
|
146
|
+
# @param [Object] key Value to be assigned
|
|
147
|
+
def key=(key)
|
|
148
|
+
if !key.nil? && key.to_s.length > 100
|
|
149
|
+
fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 100.'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
@key = key
|
|
153
|
+
end
|
|
154
|
+
|
|
130
155
|
# Custom attribute writer method with validation
|
|
131
156
|
# @param [Object] event_ids Value to be assigned
|
|
132
157
|
def event_ids=(event_ids)
|
|
@@ -147,6 +172,7 @@ module SeatsChart
|
|
|
147
172
|
return true if self.equal?(o)
|
|
148
173
|
self.class == o.class &&
|
|
149
174
|
name == o.name &&
|
|
175
|
+
key == o.key &&
|
|
150
176
|
event_ids == o.event_ids
|
|
151
177
|
end
|
|
152
178
|
|
|
@@ -159,7 +185,7 @@ module SeatsChart
|
|
|
159
185
|
# Calculates hash code according to all attributes.
|
|
160
186
|
# @return [Integer] Hash code
|
|
161
187
|
def hash
|
|
162
|
-
[name, event_ids].hash
|
|
188
|
+
[name, key, event_ids].hash
|
|
163
189
|
end
|
|
164
190
|
|
|
165
191
|
# Builds the object from hash
|
|
@@ -17,6 +17,9 @@ module SeatsChart
|
|
|
17
17
|
class PostApiSeasonsRequest
|
|
18
18
|
attr_accessor :name
|
|
19
19
|
|
|
20
|
+
# Partner key: unique per workspace, 1–100 URL-safe characters (letters, digits, `_ . ~ -`, starting with a letter or digit), never UUID-shaped. Every season route accepts the key in place of the id (path, body and query `seasonId`), like event and chart keys.
|
|
21
|
+
attr_accessor :key
|
|
22
|
+
|
|
20
23
|
attr_accessor :chart_id
|
|
21
24
|
|
|
22
25
|
attr_accessor :source_event_id
|
|
@@ -27,14 +30,19 @@ module SeatsChart
|
|
|
27
30
|
# Create this many season events (requires chartId).
|
|
28
31
|
attr_accessor :number_of_events
|
|
29
32
|
|
|
33
|
+
# 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.
|
|
34
|
+
attr_accessor :bookings_propagated
|
|
35
|
+
|
|
30
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
37
|
def self.attribute_map
|
|
32
38
|
{
|
|
33
39
|
:'name' => :'name',
|
|
40
|
+
:'key' => :'key',
|
|
34
41
|
:'chart_id' => :'chartId',
|
|
35
42
|
:'source_event_id' => :'sourceEventId',
|
|
36
43
|
:'event_keys' => :'eventKeys',
|
|
37
|
-
:'number_of_events' => :'numberOfEvents'
|
|
44
|
+
:'number_of_events' => :'numberOfEvents',
|
|
45
|
+
:'bookings_propagated' => :'bookingsPropagated'
|
|
38
46
|
}
|
|
39
47
|
end
|
|
40
48
|
|
|
@@ -47,16 +55,19 @@ module SeatsChart
|
|
|
47
55
|
def self.openapi_types
|
|
48
56
|
{
|
|
49
57
|
:'name' => :'String',
|
|
58
|
+
:'key' => :'String',
|
|
50
59
|
:'chart_id' => :'String',
|
|
51
60
|
:'source_event_id' => :'String',
|
|
52
61
|
:'event_keys' => :'Array<String>',
|
|
53
|
-
:'number_of_events' => :'Integer'
|
|
62
|
+
:'number_of_events' => :'Integer',
|
|
63
|
+
:'bookings_propagated' => :'Boolean'
|
|
54
64
|
}
|
|
55
65
|
end
|
|
56
66
|
|
|
57
67
|
# List of attributes with nullable: true
|
|
58
68
|
def self.openapi_nullable
|
|
59
69
|
Set.new([
|
|
70
|
+
:'key',
|
|
60
71
|
:'chart_id',
|
|
61
72
|
:'source_event_id',
|
|
62
73
|
])
|
|
@@ -83,6 +94,10 @@ module SeatsChart
|
|
|
83
94
|
self.name = nil
|
|
84
95
|
end
|
|
85
96
|
|
|
97
|
+
if attributes.key?(:'key')
|
|
98
|
+
self.key = attributes[:'key']
|
|
99
|
+
end
|
|
100
|
+
|
|
86
101
|
if attributes.key?(:'chart_id')
|
|
87
102
|
self.chart_id = attributes[:'chart_id']
|
|
88
103
|
end
|
|
@@ -100,6 +115,10 @@ module SeatsChart
|
|
|
100
115
|
if attributes.key?(:'number_of_events')
|
|
101
116
|
self.number_of_events = attributes[:'number_of_events']
|
|
102
117
|
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'bookings_propagated')
|
|
120
|
+
self.bookings_propagated = attributes[:'bookings_propagated']
|
|
121
|
+
end
|
|
103
122
|
end
|
|
104
123
|
|
|
105
124
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -119,6 +138,10 @@ module SeatsChart
|
|
|
119
138
|
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
120
139
|
end
|
|
121
140
|
|
|
141
|
+
if !@key.nil? && @key.to_s.length > 100
|
|
142
|
+
invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 100.')
|
|
143
|
+
end
|
|
144
|
+
|
|
122
145
|
if !@chart_id.nil? && @chart_id.to_s.length > 36
|
|
123
146
|
invalid_properties.push('invalid value for "chart_id", the character length must be smaller than or equal to 36.')
|
|
124
147
|
end
|
|
@@ -161,6 +184,7 @@ module SeatsChart
|
|
|
161
184
|
return false if @name.nil?
|
|
162
185
|
return false if @name.to_s.length > 512
|
|
163
186
|
return false if @name.to_s.length < 1
|
|
187
|
+
return false if !@key.nil? && @key.to_s.length > 100
|
|
164
188
|
return false if !@chart_id.nil? && @chart_id.to_s.length > 36
|
|
165
189
|
return false if !@chart_id.nil? && @chart_id.to_s.length < 36
|
|
166
190
|
return false if !@source_event_id.nil? && @source_event_id.to_s.length > 36
|
|
@@ -190,6 +214,16 @@ module SeatsChart
|
|
|
190
214
|
@name = name
|
|
191
215
|
end
|
|
192
216
|
|
|
217
|
+
# Custom attribute writer method with validation
|
|
218
|
+
# @param [Object] key Value to be assigned
|
|
219
|
+
def key=(key)
|
|
220
|
+
if !key.nil? && key.to_s.length > 100
|
|
221
|
+
fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 100.'
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
@key = key
|
|
225
|
+
end
|
|
226
|
+
|
|
193
227
|
# Custom attribute writer method with validation
|
|
194
228
|
# @param [Object] chart_id Value to be assigned
|
|
195
229
|
def chart_id=(chart_id)
|
|
@@ -260,10 +294,12 @@ module SeatsChart
|
|
|
260
294
|
return true if self.equal?(o)
|
|
261
295
|
self.class == o.class &&
|
|
262
296
|
name == o.name &&
|
|
297
|
+
key == o.key &&
|
|
263
298
|
chart_id == o.chart_id &&
|
|
264
299
|
source_event_id == o.source_event_id &&
|
|
265
300
|
event_keys == o.event_keys &&
|
|
266
|
-
number_of_events == o.number_of_events
|
|
301
|
+
number_of_events == o.number_of_events &&
|
|
302
|
+
bookings_propagated == o.bookings_propagated
|
|
267
303
|
end
|
|
268
304
|
|
|
269
305
|
# @see the `==` method
|
|
@@ -275,7 +311,7 @@ module SeatsChart
|
|
|
275
311
|
# Calculates hash code according to all attributes.
|
|
276
312
|
# @return [Integer] Hash code
|
|
277
313
|
def hash
|
|
278
|
-
[name, chart_id, source_event_id, event_keys, number_of_events].hash
|
|
314
|
+
[name, key, chart_id, source_event_id, event_keys, number_of_events, bookings_propagated].hash
|
|
279
315
|
end
|
|
280
316
|
|
|
281
317
|
# Builds the object from hash
|
|
@@ -375,11 +375,6 @@ module SeatsChart
|
|
|
375
375
|
invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.')
|
|
376
376
|
end
|
|
377
377
|
|
|
378
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
379
|
-
if !@user_id.nil? && @user_id !~ pattern
|
|
380
|
-
invalid_properties.push("invalid value for \"user_id\", must conform to the pattern #{pattern}.")
|
|
381
|
-
end
|
|
382
|
-
|
|
383
378
|
invalid_properties
|
|
384
379
|
end
|
|
385
380
|
|
|
@@ -413,7 +408,6 @@ module SeatsChart
|
|
|
413
408
|
return false if !@hold_token.nil? && @hold_token.to_s.length < 36
|
|
414
409
|
return false if !@user_id.nil? && @user_id.to_s.length > 256
|
|
415
410
|
return false if !@user_id.nil? && @user_id.to_s.length < 1
|
|
416
|
-
return false if !@user_id.nil? && @user_id !~ Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
417
411
|
status_validator = EnumAttributeValidator.new('String', ["booked", "reservedByToken"])
|
|
418
412
|
return false unless status_validator.valid?(@status)
|
|
419
413
|
true
|
|
@@ -634,11 +628,6 @@ module SeatsChart
|
|
|
634
628
|
fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.'
|
|
635
629
|
end
|
|
636
630
|
|
|
637
|
-
pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
|
|
638
|
-
if user_id !~ pattern
|
|
639
|
-
fail ArgumentError, "invalid value for \"user_id\", must conform to the pattern #{pattern}."
|
|
640
|
-
end
|
|
641
|
-
|
|
642
631
|
@user_id = user_id
|
|
643
632
|
end
|
|
644
633
|
|