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