seatschart 0.1.0 → 0.2.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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -3
  3. data/lib/seatschart/api/charts_api.rb +9 -9
  4. data/lib/seatschart/api/embed_api.rb +13 -2
  5. data/lib/seatschart/api/event_log_api.rb +2 -2
  6. data/lib/seatschart/api/events_api.rb +186 -20
  7. data/lib/seatschart/api/listings_api.rb +884 -0
  8. data/lib/seatschart/api/object_status_api.rb +2 -2
  9. data/lib/seatschart/api/seasons_api.rb +113 -8
  10. data/lib/seatschart/api/seats_api.rb +3 -22
  11. data/lib/seatschart/api/usage_api.rb +4 -4
  12. data/lib/seatschart/api/webhooks_api.rb +2 -2
  13. data/lib/seatschart/api/workspace_api.rb +4 -4
  14. data/lib/seatschart/models/api_error.rb +307 -0
  15. data/lib/seatschart/models/api_error_params_value.rb +105 -0
  16. data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +17 -1
  17. data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency.rb +318 -0
  18. data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency_api_keys_inner.rb +297 -0
  19. data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +21 -4
  20. data/lib/seatschart/models/get_api_workspace_settings200_response_effective.rb +20 -4
  21. data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +13 -4
  22. data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +32 -4
  23. data/lib/seatschart/models/patch_api_events_by_event_id_listings_by_listing_id_request.rb +379 -0
  24. data/lib/seatschart/models/patch_api_listing_types_by_key_request.rb +376 -0
  25. data/lib/seatschart/models/patch_api_seasons_by_season_id_partial_seasons_by_partial_season_id_request.rb +268 -0
  26. data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +27 -1
  27. data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +1 -1
  28. data/lib/seatschart/models/patch_api_workspace_settings_request.rb +12 -1
  29. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner_accessibility.rb +6 -6
  30. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner.rb +0 -11
  31. data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request.rb +13 -26
  32. data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request_listing.rb +392 -0
  33. data/lib/seatschart/models/post_api_events_by_event_id_actions_mark_everything_as_not_for_sale_request.rb +215 -0
  34. data/lib/seatschart/models/post_api_events_by_event_id_listings_by_listing_id_actions_mark_sold_request.rb +243 -0
  35. data/lib/seatschart/models/post_api_events_by_event_id_listings_request.rb +435 -0
  36. data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner.rb +104 -0
  37. data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner_any_of.rb +325 -0
  38. data/lib/seatschart/models/post_api_ga_confirm_request.rb +0 -44
  39. data/lib/seatschart/models/post_api_ga_release_request.rb +0 -11
  40. data/lib/seatschart/models/post_api_ga_reserve_request.rb +0 -33
  41. data/lib/seatschart/models/post_api_hold_tokens_request.rb +0 -22
  42. data/lib/seatschart/models/post_api_listing_types_request.rb +439 -0
  43. data/lib/seatschart/models/post_api_quotes_request.rb +0 -22
  44. data/lib/seatschart/models/post_api_seasons_by_season_id_partial_seasons_request.rb +27 -1
  45. data/lib/seatschart/models/post_api_seasons_request.rb +27 -1
  46. data/lib/seatschart/models/post_api_seats_best_available_request.rb +0 -11
  47. data/lib/seatschart/models/post_api_seats_confirm_request.rb +0 -44
  48. data/lib/seatschart/models/post_api_seats_release_request.rb +0 -11
  49. data/lib/seatschart/models/post_api_seats_reserve_request.rb +0 -22
  50. data/lib/seatschart/models/post_api_viewer_tokens_request.rb +0 -11
  51. data/lib/seatschart/models/post_api_webhooks_request.rb +1 -1
  52. data/lib/seatschart/models/put_api_charts_by_chart_id_map_draft_request.rb +348 -0
  53. data/lib/seatschart/version.rb +1 -1
  54. data/lib/seatschart.rb +16 -0
  55. metadata +17 -1
@@ -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
 
@@ -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