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,252 @@
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 PostApiSandboxesBySandboxIdAdminKeyRequest
18
+ attr_accessor :name
19
+
20
+ # Rotate: revoke every other key of the sandbox in the same transaction. Default false.
21
+ attr_accessor :revoke_existing
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'name' => :'name',
27
+ :'revoke_existing' => :'revokeExisting'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'name' => :'String',
40
+ :'revoke_existing' => :'Boolean'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiSandboxesBySandboxIdAdminKeyRequest` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiSandboxesBySandboxIdAdminKeyRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'name')
66
+ self.name = attributes[:'name']
67
+ end
68
+
69
+ if attributes.key?(:'revoke_existing')
70
+ self.revoke_existing = attributes[:'revoke_existing']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ if !@name.nil? && @name.to_s.length > 256
80
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 256.')
81
+ end
82
+
83
+ if !@name.nil? && @name.to_s.length < 1
84
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
85
+ end
86
+
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
+ return false if !@name.nil? && @name.to_s.length > 256
95
+ return false if !@name.nil? && @name.to_s.length < 1
96
+ true
97
+ end
98
+
99
+ # Custom attribute writer method with validation
100
+ # @param [Object] name Value to be assigned
101
+ def name=(name)
102
+ if name.nil?
103
+ fail ArgumentError, 'name cannot be nil'
104
+ end
105
+
106
+ if name.to_s.length > 256
107
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 256.'
108
+ end
109
+
110
+ if name.to_s.length < 1
111
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
112
+ end
113
+
114
+ @name = name
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
+ name == o.name &&
123
+ revoke_existing == o.revoke_existing
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [name, revoke_existing].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ transformed_hash = {}
145
+ openapi_types.each_pair do |key, type|
146
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = nil
148
+ elsif type =~ /\AArray<(.*)>/i
149
+ # check to ensure the input is an array given that the attribute
150
+ # is documented as an array but the input is not
151
+ if attributes[attribute_map[key]].is_a?(Array)
152
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
153
+ end
154
+ elsif !attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
156
+ end
157
+ end
158
+ new(transformed_hash)
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def self._deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = SeatsChart.const_get(type)
200
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -0,0 +1,319 @@
1
+ =begin
2
+ #SeatsChart API
3
+
4
+ #Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SeatsChart
17
+ class PostApiSandboxesRequest
18
+ attr_accessor :display_name
19
+
20
+ # Copy the production charts (every non-archived chart, up to 50). Default false.
21
+ attr_accessor :copy_charts
22
+
23
+ # Charts of the production workspace to copy (default: every non-archived chart, up to 50, by name).
24
+ attr_accessor :chart_ids
25
+
26
+ # Also copy the events of each copied published chart (up to 200 per call, newest first) with their for-sale configuration: for-sale flags, channels (new channel keys), GA place quotas, category overrides, event categories, table booking, sales rules, synced prices and the event-level layout. Seasons and partial seasons of the copied events are copied too (fresh ids, remapped members). Nothing sold or held is copied.
27
+ attr_accessor :include_events
28
+
29
+ # Mint a full-access `sk_test_` key for the sandbox, returned once in `adminKey`. Default true.
30
+ attr_accessor :create_admin_key
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'display_name' => :'displayName',
36
+ :'copy_charts' => :'copyCharts',
37
+ :'chart_ids' => :'chartIds',
38
+ :'include_events' => :'includeEvents',
39
+ :'create_admin_key' => :'createAdminKey'
40
+ }
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ def self.acceptable_attributes
45
+ attribute_map.values
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.openapi_types
50
+ {
51
+ :'display_name' => :'String',
52
+ :'copy_charts' => :'Boolean',
53
+ :'chart_ids' => :'Array<String>',
54
+ :'include_events' => :'Boolean',
55
+ :'create_admin_key' => :'Boolean'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiSandboxesRequest` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiSandboxesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'display_name')
81
+ self.display_name = attributes[:'display_name']
82
+ else
83
+ self.display_name = nil
84
+ end
85
+
86
+ if attributes.key?(:'copy_charts')
87
+ self.copy_charts = attributes[:'copy_charts']
88
+ end
89
+
90
+ if attributes.key?(:'chart_ids')
91
+ if (value = attributes[:'chart_ids']).is_a?(Array)
92
+ self.chart_ids = value
93
+ end
94
+ end
95
+
96
+ if attributes.key?(:'include_events')
97
+ self.include_events = attributes[:'include_events']
98
+ end
99
+
100
+ if attributes.key?(:'create_admin_key')
101
+ self.create_admin_key = attributes[:'create_admin_key']
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ if @display_name.nil?
111
+ invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
112
+ end
113
+
114
+ if @display_name.to_s.length > 512
115
+ invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 512.')
116
+ end
117
+
118
+ if @display_name.to_s.length < 1
119
+ invalid_properties.push('invalid value for "display_name", the character length must be great than or equal to 1.')
120
+ end
121
+
122
+ if !@chart_ids.nil? && @chart_ids.length > 50
123
+ invalid_properties.push('invalid value for "chart_ids", number of items must be less than or equal to 50.')
124
+ end
125
+
126
+ if !@chart_ids.nil? && @chart_ids.length < 1
127
+ invalid_properties.push('invalid value for "chart_ids", number of items must be greater than or equal to 1.')
128
+ end
129
+
130
+ invalid_properties
131
+ end
132
+
133
+ # Check to see if the all the properties in the model are valid
134
+ # @return true if the model is valid
135
+ def valid?
136
+ warn '[DEPRECATED] the `valid?` method is obsolete'
137
+ return false if @display_name.nil?
138
+ return false if @display_name.to_s.length > 512
139
+ return false if @display_name.to_s.length < 1
140
+ return false if !@chart_ids.nil? && @chart_ids.length > 50
141
+ return false if !@chart_ids.nil? && @chart_ids.length < 1
142
+ true
143
+ end
144
+
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] display_name Value to be assigned
147
+ def display_name=(display_name)
148
+ if display_name.nil?
149
+ fail ArgumentError, 'display_name cannot be nil'
150
+ end
151
+
152
+ if display_name.to_s.length > 512
153
+ fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 512.'
154
+ end
155
+
156
+ if display_name.to_s.length < 1
157
+ fail ArgumentError, 'invalid value for "display_name", the character length must be great than or equal to 1.'
158
+ end
159
+
160
+ @display_name = display_name
161
+ end
162
+
163
+ # Custom attribute writer method with validation
164
+ # @param [Object] chart_ids Value to be assigned
165
+ def chart_ids=(chart_ids)
166
+ if chart_ids.nil?
167
+ fail ArgumentError, 'chart_ids cannot be nil'
168
+ end
169
+
170
+ if chart_ids.length > 50
171
+ fail ArgumentError, 'invalid value for "chart_ids", number of items must be less than or equal to 50.'
172
+ end
173
+
174
+ if chart_ids.length < 1
175
+ fail ArgumentError, 'invalid value for "chart_ids", number of items must be greater than or equal to 1.'
176
+ end
177
+
178
+ @chart_ids = chart_ids
179
+ end
180
+
181
+ # Checks equality by comparing each attribute.
182
+ # @param [Object] Object to be compared
183
+ def ==(o)
184
+ return true if self.equal?(o)
185
+ self.class == o.class &&
186
+ display_name == o.display_name &&
187
+ copy_charts == o.copy_charts &&
188
+ chart_ids == o.chart_ids &&
189
+ include_events == o.include_events &&
190
+ create_admin_key == o.create_admin_key
191
+ end
192
+
193
+ # @see the `==` method
194
+ # @param [Object] Object to be compared
195
+ def eql?(o)
196
+ self == o
197
+ end
198
+
199
+ # Calculates hash code according to all attributes.
200
+ # @return [Integer] Hash code
201
+ def hash
202
+ [display_name, copy_charts, chart_ids, include_events, create_admin_key].hash
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def self.build_from_hash(attributes)
209
+ return nil unless attributes.is_a?(Hash)
210
+ attributes = attributes.transform_keys(&:to_sym)
211
+ transformed_hash = {}
212
+ openapi_types.each_pair do |key, type|
213
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
214
+ transformed_hash["#{key}"] = nil
215
+ elsif type =~ /\AArray<(.*)>/i
216
+ # check to ensure the input is an array given that the attribute
217
+ # is documented as an array but the input is not
218
+ if attributes[attribute_map[key]].is_a?(Array)
219
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
220
+ end
221
+ elsif !attributes[attribute_map[key]].nil?
222
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
223
+ end
224
+ end
225
+ new(transformed_hash)
226
+ end
227
+
228
+ # Deserializes the data based on type
229
+ # @param string type Data type
230
+ # @param string value Value to be deserialized
231
+ # @return [Object] Deserialized data
232
+ def self._deserialize(type, value)
233
+ case type.to_sym
234
+ when :Time
235
+ Time.parse(value)
236
+ when :Date
237
+ Date.parse(value)
238
+ when :String
239
+ value.to_s
240
+ when :Integer
241
+ value.to_i
242
+ when :Float
243
+ value.to_f
244
+ when :Boolean
245
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
246
+ true
247
+ else
248
+ false
249
+ end
250
+ when :Object
251
+ # generic object (usually a Hash), return directly
252
+ value
253
+ when /\AArray<(?<inner_type>.+)>\z/
254
+ inner_type = Regexp.last_match[:inner_type]
255
+ value.map { |v| _deserialize(inner_type, v) }
256
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
257
+ k_type = Regexp.last_match[:k_type]
258
+ v_type = Regexp.last_match[:v_type]
259
+ {}.tap do |hash|
260
+ value.each do |k, v|
261
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
262
+ end
263
+ end
264
+ else # model
265
+ # models (e.g. Pet) or oneOf
266
+ klass = SeatsChart.const_get(type)
267
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
268
+ end
269
+ end
270
+
271
+ # Returns the string representation of the object
272
+ # @return [String] String presentation of the object
273
+ def to_s
274
+ to_hash.to_s
275
+ end
276
+
277
+ # to_body is an alias to to_hash (backward compatibility)
278
+ # @return [Hash] Returns the object in the form of hash
279
+ def to_body
280
+ to_hash
281
+ end
282
+
283
+ # Returns the object in the form of hash
284
+ # @return [Hash] Returns the object in the form of hash
285
+ def to_hash
286
+ hash = {}
287
+ self.class.attribute_map.each_pair do |attr, param|
288
+ value = self.send(attr)
289
+ if value.nil?
290
+ is_nullable = self.class.openapi_nullable.include?(attr)
291
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
292
+ end
293
+
294
+ hash[param] = _to_hash(value)
295
+ end
296
+ hash
297
+ end
298
+
299
+ # Outputs non-array value in the form of hash
300
+ # For object, use to_hash. Otherwise, just return the value
301
+ # @param [Object] value Any valid value
302
+ # @return [Hash] Returns the value in the form of hash
303
+ def _to_hash(value)
304
+ if value.is_a?(Array)
305
+ value.compact.map { |v| _to_hash(v) }
306
+ elsif value.is_a?(Hash)
307
+ {}.tap do |hash|
308
+ value.each { |k, v| hash[k] = _to_hash(v) }
309
+ end
310
+ elsif value.respond_to? :to_hash
311
+ value.to_hash
312
+ else
313
+ value
314
+ end
315
+ end
316
+
317
+ end
318
+
319
+ end
@@ -30,6 +30,9 @@ module SeatsChart
30
30
  # Create this many season events (requires chartId).
31
31
  attr_accessor :number_of_events
32
32
 
33
+ # seats.io seasons whose bookings do not propagate. `true` (default): a season booking (`seasonId` on hold / reserve, confirm and change-object-status) locks the object in every live member event. `false`: the season source event is the season's own inventory — season bookings lock the object there only and the other member events keep selling it on their own. For-sale configuration, channels and category sync are not affected. Season reports default their `seasonBookingsPropagated` parameter to this value.
34
+ attr_accessor :bookings_propagated
35
+
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
34
37
  def self.attribute_map
35
38
  {
@@ -38,7 +41,8 @@ module SeatsChart
38
41
  :'chart_id' => :'chartId',
39
42
  :'source_event_id' => :'sourceEventId',
40
43
  :'event_keys' => :'eventKeys',
41
- :'number_of_events' => :'numberOfEvents'
44
+ :'number_of_events' => :'numberOfEvents',
45
+ :'bookings_propagated' => :'bookingsPropagated'
42
46
  }
43
47
  end
44
48
 
@@ -55,7 +59,8 @@ module SeatsChart
55
59
  :'chart_id' => :'String',
56
60
  :'source_event_id' => :'String',
57
61
  :'event_keys' => :'Array<String>',
58
- :'number_of_events' => :'Integer'
62
+ :'number_of_events' => :'Integer',
63
+ :'bookings_propagated' => :'Boolean'
59
64
  }
60
65
  end
61
66
 
@@ -110,6 +115,10 @@ module SeatsChart
110
115
  if attributes.key?(:'number_of_events')
111
116
  self.number_of_events = attributes[:'number_of_events']
112
117
  end
118
+
119
+ if attributes.key?(:'bookings_propagated')
120
+ self.bookings_propagated = attributes[:'bookings_propagated']
121
+ end
113
122
  end
114
123
 
115
124
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -289,7 +298,8 @@ module SeatsChart
289
298
  chart_id == o.chart_id &&
290
299
  source_event_id == o.source_event_id &&
291
300
  event_keys == o.event_keys &&
292
- number_of_events == o.number_of_events
301
+ number_of_events == o.number_of_events &&
302
+ bookings_propagated == o.bookings_propagated
293
303
  end
294
304
 
295
305
  # @see the `==` method
@@ -301,7 +311,7 @@ module SeatsChart
301
311
  # Calculates hash code according to all attributes.
302
312
  # @return [Integer] Hash code
303
313
  def hash
304
- [name, key, chart_id, source_event_id, event_keys, number_of_events].hash
314
+ [name, key, chart_id, source_event_id, event_keys, number_of_events, bookings_propagated].hash
305
315
  end
306
316
 
307
317
  # Builds the object from hash
@@ -252,8 +252,8 @@ module SeatsChart
252
252
  invalid_properties.push('invalid value for "seat_ids", seat_ids cannot be nil.')
253
253
  end
254
254
 
255
- if @seat_ids.length > 64
256
- invalid_properties.push('invalid value for "seat_ids", number of items must be less than or equal to 64.')
255
+ if @seat_ids.length > 1000
256
+ invalid_properties.push('invalid value for "seat_ids", number of items must be less than or equal to 1000.')
257
257
  end
258
258
 
259
259
  if @seat_ids.length < 1
@@ -316,7 +316,7 @@ module SeatsChart
316
316
  return false if @event_id.to_s.length > 36
317
317
  return false if @event_id.to_s.length < 36
318
318
  return false if @seat_ids.nil?
319
- return false if @seat_ids.length > 64
319
+ return false if @seat_ids.length > 1000
320
320
  return false if @seat_ids.length < 1
321
321
  return false if @user_id.nil?
322
322
  return false if @user_id.to_s.length > 256
@@ -434,8 +434,8 @@ module SeatsChart
434
434
  fail ArgumentError, 'seat_ids cannot be nil'
435
435
  end
436
436
 
437
- if seat_ids.length > 64
438
- fail ArgumentError, 'invalid value for "seat_ids", number of items must be less than or equal to 64.'
437
+ if seat_ids.length > 1000
438
+ fail ArgumentError, 'invalid value for "seat_ids", number of items must be less than or equal to 1000.'
439
439
  end
440
440
 
441
441
  if seat_ids.length < 1
@@ -115,8 +115,8 @@ module SeatsChart
115
115
  invalid_properties.push('invalid value for "seat_ids", seat_ids cannot be nil.')
116
116
  end
117
117
 
118
- if @seat_ids.length > 64
119
- invalid_properties.push('invalid value for "seat_ids", number of items must be less than or equal to 64.')
118
+ if @seat_ids.length > 1000
119
+ invalid_properties.push('invalid value for "seat_ids", number of items must be less than or equal to 1000.')
120
120
  end
121
121
 
122
122
  if @seat_ids.length < 1
@@ -154,7 +154,7 @@ module SeatsChart
154
154
  return false if @event_id.to_s.length > 36
155
155
  return false if @event_id.to_s.length < 36
156
156
  return false if @seat_ids.nil?
157
- return false if @seat_ids.length > 64
157
+ return false if @seat_ids.length > 1000
158
158
  return false if @seat_ids.length < 1
159
159
  return false if @user_id.nil?
160
160
  return false if @user_id.to_s.length > 256
@@ -189,8 +189,8 @@ module SeatsChart
189
189
  fail ArgumentError, 'seat_ids cannot be nil'
190
190
  end
191
191
 
192
- if seat_ids.length > 64
193
- fail ArgumentError, 'invalid value for "seat_ids", number of items must be less than or equal to 64.'
192
+ if seat_ids.length > 1000
193
+ fail ArgumentError, 'invalid value for "seat_ids", number of items must be less than or equal to 1000.'
194
194
  end
195
195
 
196
196
  if seat_ids.length < 1