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.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +199 -19
  3. data/lib/seatschart/api/audit_api.rb +2 -2
  4. data/lib/seatschart/api/auth_api.rb +81 -4
  5. data/lib/seatschart/api/billing_api.rb +4 -0
  6. data/lib/seatschart/api/charts_api.rb +810 -77
  7. data/lib/seatschart/api/embed_api.rb +5 -5
  8. data/lib/seatschart/api/embed_origins_api.rb +63 -2
  9. data/lib/seatschart/api/event_log_api.rb +2 -2
  10. data/lib/seatschart/api/events_api.rb +1491 -175
  11. data/lib/seatschart/api/health_api.rb +244 -0
  12. data/lib/seatschart/api/map_designer_api.rb +11 -9
  13. data/lib/seatschart/api/public_api.rb +356 -6
  14. data/lib/seatschart/api/sandboxes_api.rb +672 -0
  15. data/lib/seatschart/api/seasons_api.rb +344 -36
  16. data/lib/seatschart/api/seats_api.rb +10 -10
  17. data/lib/seatschart/api/usage_api.rb +18 -15
  18. data/lib/seatschart/api/webhooks_api.rb +2 -2
  19. data/lib/seatschart/api/workspace_api.rb +1815 -363
  20. data/lib/seatschart/models/api_error.rb +4 -4
  21. data/lib/seatschart/models/delete_api_sandboxes_by_sandbox_id200_response.rb +255 -0
  22. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +237 -0
  23. data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +62 -4
  24. data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +21 -4
  25. data/lib/seatschart/models/get_api_sandboxes200_response.rb +239 -0
  26. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner.rb +431 -0
  27. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_rate_limits.rb +270 -0
  28. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_usage.rb +287 -0
  29. data/lib/seatschart/models/get_api_status200_response.rb +387 -0
  30. data/lib/seatschart/models/get_api_status200_response_components_inner.rb +330 -0
  31. data/lib/seatschart/models/get_api_status200_response_components_inner_days_inner.rb +301 -0
  32. data/lib/seatschart/models/get_api_status200_response_incidents_inner.rb +374 -0
  33. data/lib/seatschart/models/get_api_status200_response_maintenance_inner.rb +350 -0
  34. data/lib/seatschart/models/get_api_status503_response.rb +271 -0
  35. data/lib/seatschart/models/get_api_workspace_buyer_extra_data200_response.rb +241 -0
  36. data/lib/seatschart/models/get_api_workspace_defaults200_response.rb +254 -0
  37. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer.rb +246 -0
  38. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer_built_in.rb +270 -0
  39. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +80 -5
  40. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response.rb +239 -0
  41. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response_api_keys_inner.rb +321 -0
  42. data/lib/seatschart/models/get_api_workspaces_created_by_api_parameter.rb +103 -0
  43. data/lib/seatschart/models/get_api_workspaces_overview_created_by_api_parameter.rb +103 -0
  44. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +12 -2
  45. data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +15 -5
  46. data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +25 -4
  47. data/lib/seatschart/models/patch_api_workspace_defaults_request.rb +224 -0
  48. data/lib/seatschart/models/patch_api_workspace_defaults_request_renderer.rb +249 -0
  49. data/lib/seatschart/models/patch_api_workspace_settings_request.rb +6 -6
  50. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +221 -0
  51. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id_request.rb +292 -0
  52. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_request.rb +288 -0
  53. data/lib/seatschart/models/post_api_auth_new_workspace_request.rb +294 -0
  54. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +39 -1
  55. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +1 -0
  56. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +64 -6
  57. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +1 -1
  58. data/lib/seatschart/models/post_api_embed_tokens_request.rb +18 -15
  59. data/lib/seatschart/models/post_api_embed_tokens_request_safe_mode_options.rb +226 -0
  60. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request.rb +251 -0
  61. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request_events_inner.rb +322 -0
  62. data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +42 -1
  63. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request.rb +277 -0
  64. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request_for_sale_inner.rb +319 -0
  65. data/lib/seatschart/models/post_api_events_by_event_id_map_publish_request.rb +215 -0
  66. data/lib/seatschart/models/post_api_events_request.rb +42 -1
  67. data/lib/seatschart/models/{patch_api_events_by_event_id_request_categories_inner.rb → post_api_events_request_categories_inner.rb} +3 -3
  68. data/lib/seatschart/models/post_api_extract_seats200_response.rb +459 -0
  69. data/lib/seatschart/models/post_api_extract_seats200_response_seats_inner.rb +323 -0
  70. data/lib/seatschart/models/post_api_extract_seats200_response_suggested_inner.rb +320 -0
  71. data/lib/seatschart/models/post_api_extract_seats_request.rb +124 -4
  72. data/lib/seatschart/models/post_api_extract_seats_request_examples.rb +105 -0
  73. data/lib/seatschart/models/post_api_extract_seats_request_examples_any_of_inner.rb +293 -0
  74. data/lib/seatschart/models/post_api_extract_seats_request_negatives.rb +105 -0
  75. data/lib/seatschart/models/post_api_extract_seats_request_region.rb +105 -0
  76. 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
  77. data/lib/seatschart/models/post_api_sandboxes201_response.rb +245 -0
  78. data/lib/seatschart/models/post_api_sandboxes201_response_admin_key.rb +286 -0
  79. data/lib/seatschart/models/post_api_sandboxes201_response_copied.rb +313 -0
  80. data/lib/seatschart/models/post_api_sandboxes201_response_copied_charts_inner.rb +281 -0
  81. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_inner.rb +281 -0
  82. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_with_own_map_inner.rb +265 -0
  83. data/lib/seatschart/models/post_api_sandboxes201_response_copied_key_conflicts_inner.rb +287 -0
  84. data/lib/seatschart/models/post_api_sandboxes201_response_copied_seasons_inner.rb +312 -0
  85. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production200_response.rb +313 -0
  86. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production_request.rb +255 -0
  87. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_join200_response.rb +271 -0
  88. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +268 -0
  89. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset_request.rb +225 -0
  90. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response.rb +253 -0
  91. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response_api_key.rb +286 -0
  92. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key_request.rb +252 -0
  93. data/lib/seatschart/models/post_api_sandboxes_request.rb +319 -0
  94. data/lib/seatschart/models/post_api_seasons_request.rb +14 -4
  95. data/lib/seatschart/models/post_api_seats_confirm_request.rb +5 -5
  96. data/lib/seatschart/models/post_api_seats_release_request.rb +5 -5
  97. data/lib/seatschart/models/post_api_seats_reserve_request.rb +5 -5
  98. data/lib/seatschart/models/post_api_workspaces200_response.rb +468 -0
  99. data/lib/seatschart/models/post_api_workspaces200_response_api_key.rb +332 -0
  100. data/lib/seatschart/models/post_api_workspaces200_response_template.rb +260 -0
  101. data/lib/seatschart/models/post_api_workspaces200_response_template_webhooks_inner.rb +284 -0
  102. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete200_response.rb +319 -0
  103. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete_request.rb +281 -0
  104. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations_request.rb +300 -0
  105. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response.rb +237 -0
  106. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response_api_key.rb +338 -0
  107. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys_request.rb +299 -0
  108. data/lib/seatschart/models/post_api_workspaces_request.rb +101 -5
  109. data/lib/seatschart/models/post_api_workspaces_request_issue_key.rb +294 -0
  110. data/lib/seatschart/models/put_api_workspace_buyer_extra_data_request.rb +260 -0
  111. data/lib/seatschart/models/put_internal_status_notices_request.rb +242 -0
  112. data/lib/seatschart/models/put_internal_status_notices_request_notices_inner.rb +445 -0
  113. data/lib/seatschart/retry.rb +106 -7
  114. data/lib/seatschart/version.rb +1 -1
  115. data/lib/seatschart.rb +73 -3
  116. metadata +75 -5
  117. data/lib/seatschart/api/default_api.rb +0 -763
@@ -0,0 +1,322 @@
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 PostApiEventsActionsEditForSaleConfigRequestEventsInner
18
+ # Event UUID or event key.
19
+ attr_accessor :event
20
+
21
+ # Objects, GA places and categories to put on sale.
22
+ attr_accessor :for_sale
23
+
24
+ # Objects, GA places and categories to take off sale.
25
+ attr_accessor :not_for_sale
26
+
27
+ # Sync live season siblings when this event is the season source (default false).
28
+ attr_accessor :cascade_season
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'event' => :'event',
34
+ :'for_sale' => :'forSale',
35
+ :'not_for_sale' => :'notForSale',
36
+ :'cascade_season' => :'cascadeSeason'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'event' => :'String',
49
+ :'for_sale' => :'Array<PostApiEventsByEventIdActionsEditForSaleConfigRequestForSaleInner>',
50
+ :'not_for_sale' => :'Array<PostApiEventsByEventIdActionsEditForSaleConfigRequestForSaleInner>',
51
+ :'cascade_season' => :'Boolean'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiEventsActionsEditForSaleConfigRequestEventsInner` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiEventsActionsEditForSaleConfigRequestEventsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'event')
77
+ self.event = attributes[:'event']
78
+ else
79
+ self.event = nil
80
+ end
81
+
82
+ if attributes.key?(:'for_sale')
83
+ if (value = attributes[:'for_sale']).is_a?(Array)
84
+ self.for_sale = value
85
+ end
86
+ end
87
+
88
+ if attributes.key?(:'not_for_sale')
89
+ if (value = attributes[:'not_for_sale']).is_a?(Array)
90
+ self.not_for_sale = value
91
+ end
92
+ end
93
+
94
+ if attributes.key?(:'cascade_season')
95
+ self.cascade_season = attributes[:'cascade_season']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
103
+ invalid_properties = Array.new
104
+ if @event.nil?
105
+ invalid_properties.push('invalid value for "event", event cannot be nil.')
106
+ end
107
+
108
+ if @event.to_s.length > 100
109
+ invalid_properties.push('invalid value for "event", the character length must be smaller than or equal to 100.')
110
+ end
111
+
112
+ if @event.to_s.length < 1
113
+ invalid_properties.push('invalid value for "event", the character length must be great than or equal to 1.')
114
+ end
115
+
116
+ if !@for_sale.nil? && @for_sale.length > 10000
117
+ invalid_properties.push('invalid value for "for_sale", number of items must be less than or equal to 10000.')
118
+ end
119
+
120
+ if !@not_for_sale.nil? && @not_for_sale.length > 10000
121
+ invalid_properties.push('invalid value for "not_for_sale", number of items must be less than or equal to 10000.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @event.nil?
132
+ return false if @event.to_s.length > 100
133
+ return false if @event.to_s.length < 1
134
+ return false if !@for_sale.nil? && @for_sale.length > 10000
135
+ return false if !@not_for_sale.nil? && @not_for_sale.length > 10000
136
+ true
137
+ end
138
+
139
+ # Custom attribute writer method with validation
140
+ # @param [Object] event Value to be assigned
141
+ def event=(event)
142
+ if event.nil?
143
+ fail ArgumentError, 'event cannot be nil'
144
+ end
145
+
146
+ if event.to_s.length > 100
147
+ fail ArgumentError, 'invalid value for "event", the character length must be smaller than or equal to 100.'
148
+ end
149
+
150
+ if event.to_s.length < 1
151
+ fail ArgumentError, 'invalid value for "event", the character length must be great than or equal to 1.'
152
+ end
153
+
154
+ @event = event
155
+ end
156
+
157
+ # Custom attribute writer method with validation
158
+ # @param [Object] for_sale Value to be assigned
159
+ def for_sale=(for_sale)
160
+ if for_sale.nil?
161
+ fail ArgumentError, 'for_sale cannot be nil'
162
+ end
163
+
164
+ if for_sale.length > 10000
165
+ fail ArgumentError, 'invalid value for "for_sale", number of items must be less than or equal to 10000.'
166
+ end
167
+
168
+ @for_sale = for_sale
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] not_for_sale Value to be assigned
173
+ def not_for_sale=(not_for_sale)
174
+ if not_for_sale.nil?
175
+ fail ArgumentError, 'not_for_sale cannot be nil'
176
+ end
177
+
178
+ if not_for_sale.length > 10000
179
+ fail ArgumentError, 'invalid value for "not_for_sale", number of items must be less than or equal to 10000.'
180
+ end
181
+
182
+ @not_for_sale = not_for_sale
183
+ end
184
+
185
+ # Checks equality by comparing each attribute.
186
+ # @param [Object] Object to be compared
187
+ def ==(o)
188
+ return true if self.equal?(o)
189
+ self.class == o.class &&
190
+ event == o.event &&
191
+ for_sale == o.for_sale &&
192
+ not_for_sale == o.not_for_sale &&
193
+ cascade_season == o.cascade_season
194
+ end
195
+
196
+ # @see the `==` method
197
+ # @param [Object] Object to be compared
198
+ def eql?(o)
199
+ self == o
200
+ end
201
+
202
+ # Calculates hash code according to all attributes.
203
+ # @return [Integer] Hash code
204
+ def hash
205
+ [event, for_sale, not_for_sale, cascade_season].hash
206
+ end
207
+
208
+ # Builds the object from hash
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ # @return [Object] Returns the model itself
211
+ def self.build_from_hash(attributes)
212
+ return nil unless attributes.is_a?(Hash)
213
+ attributes = attributes.transform_keys(&:to_sym)
214
+ transformed_hash = {}
215
+ openapi_types.each_pair do |key, type|
216
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
217
+ transformed_hash["#{key}"] = nil
218
+ elsif type =~ /\AArray<(.*)>/i
219
+ # check to ensure the input is an array given that the attribute
220
+ # is documented as an array but the input is not
221
+ if attributes[attribute_map[key]].is_a?(Array)
222
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
223
+ end
224
+ elsif !attributes[attribute_map[key]].nil?
225
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
226
+ end
227
+ end
228
+ new(transformed_hash)
229
+ end
230
+
231
+ # Deserializes the data based on type
232
+ # @param string type Data type
233
+ # @param string value Value to be deserialized
234
+ # @return [Object] Deserialized data
235
+ def self._deserialize(type, value)
236
+ case type.to_sym
237
+ when :Time
238
+ Time.parse(value)
239
+ when :Date
240
+ Date.parse(value)
241
+ when :String
242
+ value.to_s
243
+ when :Integer
244
+ value.to_i
245
+ when :Float
246
+ value.to_f
247
+ when :Boolean
248
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
249
+ true
250
+ else
251
+ false
252
+ end
253
+ when :Object
254
+ # generic object (usually a Hash), return directly
255
+ value
256
+ when /\AArray<(?<inner_type>.+)>\z/
257
+ inner_type = Regexp.last_match[:inner_type]
258
+ value.map { |v| _deserialize(inner_type, v) }
259
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
260
+ k_type = Regexp.last_match[:k_type]
261
+ v_type = Regexp.last_match[:v_type]
262
+ {}.tap do |hash|
263
+ value.each do |k, v|
264
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
265
+ end
266
+ end
267
+ else # model
268
+ # models (e.g. Pet) or oneOf
269
+ klass = SeatsChart.const_get(type)
270
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
271
+ end
272
+ end
273
+
274
+ # Returns the string representation of the object
275
+ # @return [String] String presentation of the object
276
+ def to_s
277
+ to_hash.to_s
278
+ end
279
+
280
+ # to_body is an alias to to_hash (backward compatibility)
281
+ # @return [Hash] Returns the object in the form of hash
282
+ def to_body
283
+ to_hash
284
+ end
285
+
286
+ # Returns the object in the form of hash
287
+ # @return [Hash] Returns the object in the form of hash
288
+ def to_hash
289
+ hash = {}
290
+ self.class.attribute_map.each_pair do |attr, param|
291
+ value = self.send(attr)
292
+ if value.nil?
293
+ is_nullable = self.class.openapi_nullable.include?(attr)
294
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
295
+ end
296
+
297
+ hash[param] = _to_hash(value)
298
+ end
299
+ hash
300
+ end
301
+
302
+ # Outputs non-array value in the form of hash
303
+ # For object, use to_hash. Otherwise, just return the value
304
+ # @param [Object] value Any valid value
305
+ # @return [Hash] Returns the value in the form of hash
306
+ def _to_hash(value)
307
+ if value.is_a?(Array)
308
+ value.compact.map { |v| _to_hash(v) }
309
+ elsif value.is_a?(Hash)
310
+ {}.tap do |hash|
311
+ value.each { |k, v| hash[k] = _to_hash(v) }
312
+ end
313
+ elsif value.respond_to? :to_hash
314
+ value.to_hash
315
+ else
316
+ value
317
+ end
318
+ end
319
+
320
+ end
321
+
322
+ end
@@ -19,6 +19,12 @@ module SeatsChart
19
19
 
20
20
  attr_accessor :date
21
21
 
22
+ # Event-only categories (seats.io event `categories`; same rules as PATCH /events/{eventId}).
23
+ attr_accessor :categories
24
+
25
+ # Object label (seat label or GA area name) → category key (event category key, chart category id or name); same rules as PATCH /events/{eventId}.
26
+ attr_accessor :object_categories
27
+
22
28
  # Optional partner key, unique per workspace, accepted wherever an event id is (URL-safe, not UUID-shaped).
23
29
  attr_accessor :key
24
30
 
@@ -37,6 +43,8 @@ module SeatsChart
37
43
  {
38
44
  :'name' => :'name',
39
45
  :'date' => :'date',
46
+ :'categories' => :'categories',
47
+ :'object_categories' => :'objectCategories',
40
48
  :'key' => :'key',
41
49
  :'table_booking_config' => :'tableBookingConfig',
42
50
  :'category_overrides' => :'categoryOverrides',
@@ -55,6 +63,8 @@ module SeatsChart
55
63
  {
56
64
  :'name' => :'String',
57
65
  :'date' => :'String',
66
+ :'categories' => :'Array<PostApiEventsRequestCategoriesInner>',
67
+ :'object_categories' => :'Hash<String, String>',
58
68
  :'key' => :'String',
59
69
  :'table_booking_config' => :'PostApiEventsRequestTableBookingConfig',
60
70
  :'category_overrides' => :'Hash<String, PostApiEventsRequestCategoryOverridesValue>',
@@ -66,6 +76,8 @@ module SeatsChart
66
76
  # List of attributes with nullable: true
67
77
  def self.openapi_nullable
68
78
  Set.new([
79
+ :'categories',
80
+ :'object_categories',
69
81
  :'table_booking_config',
70
82
  :'category_overrides',
71
83
  ])
@@ -96,6 +108,18 @@ module SeatsChart
96
108
  self.date = attributes[:'date']
97
109
  end
98
110
 
111
+ if attributes.key?(:'categories')
112
+ if (value = attributes[:'categories']).is_a?(Array)
113
+ self.categories = value
114
+ end
115
+ end
116
+
117
+ if attributes.key?(:'object_categories')
118
+ if (value = attributes[:'object_categories']).is_a?(Hash)
119
+ self.object_categories = value
120
+ end
121
+ end
122
+
99
123
  if attributes.key?(:'key')
100
124
  self.key = attributes[:'key']
101
125
  end
@@ -146,6 +170,10 @@ module SeatsChart
146
170
  invalid_properties.push('invalid value for "date", the character length must be great than or equal to 10.')
147
171
  end
148
172
 
173
+ if !@categories.nil? && @categories.length > 128
174
+ invalid_properties.push('invalid value for "categories", number of items must be less than or equal to 128.')
175
+ end
176
+
149
177
  if !@key.nil? && @key.to_s.length > 100
150
178
  invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 100.')
151
179
  end
@@ -175,6 +203,7 @@ module SeatsChart
175
203
  return false if @name.to_s.length < 1
176
204
  return false if !@date.nil? && @date.to_s.length > 64
177
205
  return false if !@date.nil? && @date.to_s.length < 10
206
+ return false if !@categories.nil? && @categories.length > 128
178
207
  return false if !@key.nil? && @key.to_s.length > 100
179
208
  return false if !@key.nil? && @key.to_s.length < 1
180
209
  return false if !@key.nil? && @key !~ Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~-]{0,99}$/)
@@ -218,6 +247,16 @@ module SeatsChart
218
247
  @date = date
219
248
  end
220
249
 
250
+ # Custom attribute writer method with validation
251
+ # @param [Object] categories Value to be assigned
252
+ def categories=(categories)
253
+ if !categories.nil? && categories.length > 128
254
+ fail ArgumentError, 'invalid value for "categories", number of items must be less than or equal to 128.'
255
+ end
256
+
257
+ @categories = categories
258
+ end
259
+
221
260
  # Custom attribute writer method with validation
222
261
  # @param [Object] key Value to be assigned
223
262
  def key=(key)
@@ -262,6 +301,8 @@ module SeatsChart
262
301
  self.class == o.class &&
263
302
  name == o.name &&
264
303
  date == o.date &&
304
+ categories == o.categories &&
305
+ object_categories == o.object_categories &&
265
306
  key == o.key &&
266
307
  table_booking_config == o.table_booking_config &&
267
308
  category_overrides == o.category_overrides &&
@@ -278,7 +319,7 @@ module SeatsChart
278
319
  # Calculates hash code according to all attributes.
279
320
  # @return [Integer] Hash code
280
321
  def hash
281
- [name, date, key, table_booking_config, category_overrides, channels, for_sale_config].hash
322
+ [name, date, categories, object_categories, key, table_booking_config, category_overrides, channels, for_sale_config].hash
282
323
  end
283
324
 
284
325
  # Builds the object from hash
@@ -0,0 +1,277 @@
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 PostApiEventsByEventIdActionsEditForSaleConfigRequest
18
+ # Objects, GA places and categories to put on sale.
19
+ attr_accessor :for_sale
20
+
21
+ # Objects, GA places and categories to take off sale.
22
+ attr_accessor :not_for_sale
23
+
24
+ # Sync live season siblings when this event is the season source (default false).
25
+ attr_accessor :cascade_season
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'for_sale' => :'forSale',
31
+ :'not_for_sale' => :'notForSale',
32
+ :'cascade_season' => :'cascadeSeason'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'for_sale' => :'Array<PostApiEventsByEventIdActionsEditForSaleConfigRequestForSaleInner>',
45
+ :'not_for_sale' => :'Array<PostApiEventsByEventIdActionsEditForSaleConfigRequestForSaleInner>',
46
+ :'cascade_season' => :'Boolean'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiEventsByEventIdActionsEditForSaleConfigRequest` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiEventsByEventIdActionsEditForSaleConfigRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'for_sale')
72
+ if (value = attributes[:'for_sale']).is_a?(Array)
73
+ self.for_sale = value
74
+ end
75
+ end
76
+
77
+ if attributes.key?(:'not_for_sale')
78
+ if (value = attributes[:'not_for_sale']).is_a?(Array)
79
+ self.not_for_sale = value
80
+ end
81
+ end
82
+
83
+ if attributes.key?(:'cascade_season')
84
+ self.cascade_season = attributes[:'cascade_season']
85
+ end
86
+ end
87
+
88
+ # Show invalid properties with the reasons. Usually used together with valid?
89
+ # @return Array for valid properties with the reasons
90
+ def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
92
+ invalid_properties = Array.new
93
+ if !@for_sale.nil? && @for_sale.length > 10000
94
+ invalid_properties.push('invalid value for "for_sale", number of items must be less than or equal to 10000.')
95
+ end
96
+
97
+ if !@not_for_sale.nil? && @not_for_sale.length > 10000
98
+ invalid_properties.push('invalid value for "not_for_sale", number of items must be less than or equal to 10000.')
99
+ end
100
+
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
108
+ return false if !@for_sale.nil? && @for_sale.length > 10000
109
+ return false if !@not_for_sale.nil? && @not_for_sale.length > 10000
110
+ true
111
+ end
112
+
113
+ # Custom attribute writer method with validation
114
+ # @param [Object] for_sale Value to be assigned
115
+ def for_sale=(for_sale)
116
+ if for_sale.nil?
117
+ fail ArgumentError, 'for_sale cannot be nil'
118
+ end
119
+
120
+ if for_sale.length > 10000
121
+ fail ArgumentError, 'invalid value for "for_sale", number of items must be less than or equal to 10000.'
122
+ end
123
+
124
+ @for_sale = for_sale
125
+ end
126
+
127
+ # Custom attribute writer method with validation
128
+ # @param [Object] not_for_sale Value to be assigned
129
+ def not_for_sale=(not_for_sale)
130
+ if not_for_sale.nil?
131
+ fail ArgumentError, 'not_for_sale cannot be nil'
132
+ end
133
+
134
+ if not_for_sale.length > 10000
135
+ fail ArgumentError, 'invalid value for "not_for_sale", number of items must be less than or equal to 10000.'
136
+ end
137
+
138
+ @not_for_sale = not_for_sale
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param [Object] Object to be compared
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ for_sale == o.for_sale &&
147
+ not_for_sale == o.not_for_sale &&
148
+ cascade_season == o.cascade_season
149
+ end
150
+
151
+ # @see the `==` method
152
+ # @param [Object] Object to be compared
153
+ def eql?(o)
154
+ self == o
155
+ end
156
+
157
+ # Calculates hash code according to all attributes.
158
+ # @return [Integer] Hash code
159
+ def hash
160
+ [for_sale, not_for_sale, cascade_season].hash
161
+ end
162
+
163
+ # Builds the object from hash
164
+ # @param [Hash] attributes Model attributes in the form of hash
165
+ # @return [Object] Returns the model itself
166
+ def self.build_from_hash(attributes)
167
+ return nil unless attributes.is_a?(Hash)
168
+ attributes = attributes.transform_keys(&:to_sym)
169
+ transformed_hash = {}
170
+ openapi_types.each_pair do |key, type|
171
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
172
+ transformed_hash["#{key}"] = nil
173
+ elsif type =~ /\AArray<(.*)>/i
174
+ # check to ensure the input is an array given that the attribute
175
+ # is documented as an array but the input is not
176
+ if attributes[attribute_map[key]].is_a?(Array)
177
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
178
+ end
179
+ elsif !attributes[attribute_map[key]].nil?
180
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
181
+ end
182
+ end
183
+ new(transformed_hash)
184
+ end
185
+
186
+ # Deserializes the data based on type
187
+ # @param string type Data type
188
+ # @param string value Value to be deserialized
189
+ # @return [Object] Deserialized data
190
+ def self._deserialize(type, value)
191
+ case type.to_sym
192
+ when :Time
193
+ Time.parse(value)
194
+ when :Date
195
+ Date.parse(value)
196
+ when :String
197
+ value.to_s
198
+ when :Integer
199
+ value.to_i
200
+ when :Float
201
+ value.to_f
202
+ when :Boolean
203
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
204
+ true
205
+ else
206
+ false
207
+ end
208
+ when :Object
209
+ # generic object (usually a Hash), return directly
210
+ value
211
+ when /\AArray<(?<inner_type>.+)>\z/
212
+ inner_type = Regexp.last_match[:inner_type]
213
+ value.map { |v| _deserialize(inner_type, v) }
214
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
215
+ k_type = Regexp.last_match[:k_type]
216
+ v_type = Regexp.last_match[:v_type]
217
+ {}.tap do |hash|
218
+ value.each do |k, v|
219
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
220
+ end
221
+ end
222
+ else # model
223
+ # models (e.g. Pet) or oneOf
224
+ klass = SeatsChart.const_get(type)
225
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
226
+ end
227
+ end
228
+
229
+ # Returns the string representation of the object
230
+ # @return [String] String presentation of the object
231
+ def to_s
232
+ to_hash.to_s
233
+ end
234
+
235
+ # to_body is an alias to to_hash (backward compatibility)
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_body
238
+ to_hash
239
+ end
240
+
241
+ # Returns the object in the form of hash
242
+ # @return [Hash] Returns the object in the form of hash
243
+ def to_hash
244
+ hash = {}
245
+ self.class.attribute_map.each_pair do |attr, param|
246
+ value = self.send(attr)
247
+ if value.nil?
248
+ is_nullable = self.class.openapi_nullable.include?(attr)
249
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
250
+ end
251
+
252
+ hash[param] = _to_hash(value)
253
+ end
254
+ hash
255
+ end
256
+
257
+ # Outputs non-array value in the form of hash
258
+ # For object, use to_hash. Otherwise, just return the value
259
+ # @param [Object] value Any valid value
260
+ # @return [Hash] Returns the value in the form of hash
261
+ def _to_hash(value)
262
+ if value.is_a?(Array)
263
+ value.compact.map { |v| _to_hash(v) }
264
+ elsif value.is_a?(Hash)
265
+ {}.tap do |hash|
266
+ value.each { |k, v| hash[k] = _to_hash(v) }
267
+ end
268
+ elsif value.respond_to? :to_hash
269
+ value.to_hash
270
+ else
271
+ value
272
+ end
273
+ end
274
+
275
+ end
276
+
277
+ end