seatschart 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +191 -16
  3. data/lib/seatschart/api/audit_api.rb +2 -2
  4. data/lib/seatschart/api/charts_api.rb +808 -75
  5. data/lib/seatschart/api/embed_api.rb +18 -7
  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 +1594 -112
  9. data/lib/seatschart/api/health_api.rb +244 -0
  10. data/lib/seatschart/api/listings_api.rb +884 -0
  11. data/lib/seatschart/api/map_designer_api.rb +11 -9
  12. data/lib/seatschart/api/object_status_api.rb +2 -2
  13. data/lib/seatschart/api/public_api.rb +350 -0
  14. data/lib/seatschart/api/sandboxes_api.rb +672 -0
  15. data/lib/seatschart/api/seasons_api.rb +455 -42
  16. data/lib/seatschart/api/seats_api.rb +13 -32
  17. data/lib/seatschart/api/usage_api.rb +20 -17
  18. data/lib/seatschart/api/webhooks_api.rb +2 -2
  19. data/lib/seatschart/api/workspace_api.rb +306 -20
  20. data/lib/seatschart/models/api_error.rb +307 -0
  21. data/lib/seatschart/models/api_error_params_value.rb +105 -0
  22. data/lib/seatschart/models/delete_api_sandboxes_by_sandbox_id200_response.rb +255 -0
  23. data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +78 -4
  24. data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency.rb +318 -0
  25. data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency_api_keys_inner.rb +297 -0
  26. data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +38 -4
  27. data/lib/seatschart/models/get_api_sandboxes200_response.rb +239 -0
  28. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner.rb +431 -0
  29. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_rate_limits.rb +270 -0
  30. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_usage.rb +287 -0
  31. data/lib/seatschart/models/get_api_status200_response.rb +387 -0
  32. data/lib/seatschart/models/get_api_status200_response_components_inner.rb +330 -0
  33. data/lib/seatschart/models/get_api_status200_response_components_inner_days_inner.rb +301 -0
  34. data/lib/seatschart/models/get_api_status200_response_incidents_inner.rb +374 -0
  35. data/lib/seatschart/models/get_api_status200_response_maintenance_inner.rb +350 -0
  36. data/lib/seatschart/models/get_api_status503_response.rb +271 -0
  37. data/lib/seatschart/models/get_api_workspace_buyer_extra_data200_response.rb +241 -0
  38. data/lib/seatschart/models/get_api_workspace_defaults200_response.rb +254 -0
  39. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer.rb +246 -0
  40. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer_built_in.rb +270 -0
  41. data/lib/seatschart/models/get_api_workspace_settings200_response_effective.rb +20 -4
  42. data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +13 -4
  43. data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +32 -4
  44. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +34 -5
  45. data/lib/seatschart/models/patch_api_events_by_event_id_listings_by_listing_id_request.rb +379 -0
  46. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +16 -6
  47. data/lib/seatschart/models/patch_api_listing_types_by_key_request.rb +376 -0
  48. data/lib/seatschart/models/patch_api_seasons_by_season_id_partial_seasons_by_partial_season_id_request.rb +268 -0
  49. data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +41 -5
  50. data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +1 -1
  51. data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +25 -4
  52. data/lib/seatschart/models/patch_api_workspace_defaults_request.rb +224 -0
  53. data/lib/seatschart/models/patch_api_workspace_defaults_request_renderer.rb +249 -0
  54. data/lib/seatschart/models/patch_api_workspace_settings_request.rb +18 -7
  55. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +39 -1
  56. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +1 -0
  57. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner_accessibility.rb +6 -6
  58. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +64 -6
  59. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +1 -1
  60. data/lib/seatschart/models/post_api_embed_tokens_request.rb +18 -15
  61. data/lib/seatschart/models/post_api_embed_tokens_request_safe_mode_options.rb +226 -0
  62. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner.rb +0 -11
  63. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request.rb +251 -0
  64. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request_events_inner.rb +322 -0
  65. data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +42 -1
  66. data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request.rb +13 -26
  67. data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request_listing.rb +392 -0
  68. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request.rb +277 -0
  69. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request_for_sale_inner.rb +319 -0
  70. data/lib/seatschart/models/post_api_events_by_event_id_actions_mark_everything_as_not_for_sale_request.rb +215 -0
  71. data/lib/seatschart/models/post_api_events_by_event_id_listings_by_listing_id_actions_mark_sold_request.rb +243 -0
  72. data/lib/seatschart/models/post_api_events_by_event_id_listings_request.rb +435 -0
  73. data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner.rb +104 -0
  74. data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner_any_of.rb +325 -0
  75. data/lib/seatschart/models/post_api_events_by_event_id_map_publish_request.rb +215 -0
  76. data/lib/seatschart/models/post_api_events_request.rb +42 -1
  77. data/lib/seatschart/models/{patch_api_events_by_event_id_request_categories_inner.rb → post_api_events_request_categories_inner.rb} +3 -3
  78. data/lib/seatschart/models/post_api_extract_seats200_response.rb +459 -0
  79. data/lib/seatschart/models/post_api_extract_seats200_response_seats_inner.rb +323 -0
  80. data/lib/seatschart/models/post_api_extract_seats200_response_suggested_inner.rb +320 -0
  81. data/lib/seatschart/models/post_api_extract_seats_request.rb +124 -4
  82. data/lib/seatschart/models/post_api_extract_seats_request_examples.rb +105 -0
  83. data/lib/seatschart/models/post_api_extract_seats_request_examples_any_of_inner.rb +293 -0
  84. data/lib/seatschart/models/post_api_extract_seats_request_negatives.rb +105 -0
  85. data/lib/seatschart/models/post_api_extract_seats_request_region.rb +105 -0
  86. data/lib/seatschart/models/post_api_extract_seats_request_region_any_of.rb +363 -0
  87. data/lib/seatschart/models/post_api_ga_confirm_request.rb +0 -44
  88. data/lib/seatschart/models/post_api_ga_release_request.rb +0 -11
  89. data/lib/seatschart/models/post_api_ga_reserve_request.rb +0 -33
  90. data/lib/seatschart/models/post_api_hold_tokens_request.rb +0 -22
  91. data/lib/seatschart/models/post_api_listing_types_request.rb +439 -0
  92. data/lib/seatschart/models/post_api_quotes_request.rb +0 -22
  93. data/lib/seatschart/models/post_api_sandboxes201_response.rb +245 -0
  94. data/lib/seatschart/models/post_api_sandboxes201_response_admin_key.rb +286 -0
  95. data/lib/seatschart/models/post_api_sandboxes201_response_copied.rb +313 -0
  96. data/lib/seatschart/models/post_api_sandboxes201_response_copied_charts_inner.rb +281 -0
  97. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_inner.rb +281 -0
  98. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_with_own_map_inner.rb +265 -0
  99. data/lib/seatschart/models/post_api_sandboxes201_response_copied_key_conflicts_inner.rb +287 -0
  100. data/lib/seatschart/models/post_api_sandboxes201_response_copied_seasons_inner.rb +312 -0
  101. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production200_response.rb +313 -0
  102. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production_request.rb +255 -0
  103. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_join200_response.rb +271 -0
  104. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +268 -0
  105. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset_request.rb +225 -0
  106. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response.rb +253 -0
  107. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response_api_key.rb +286 -0
  108. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key_request.rb +252 -0
  109. data/lib/seatschart/models/post_api_sandboxes_request.rb +319 -0
  110. data/lib/seatschart/models/post_api_seasons_by_season_id_partial_seasons_request.rb +27 -1
  111. data/lib/seatschart/models/post_api_seasons_request.rb +40 -4
  112. data/lib/seatschart/models/post_api_seats_best_available_request.rb +0 -11
  113. data/lib/seatschart/models/post_api_seats_confirm_request.rb +5 -49
  114. data/lib/seatschart/models/post_api_seats_release_request.rb +5 -16
  115. data/lib/seatschart/models/post_api_seats_reserve_request.rb +5 -27
  116. data/lib/seatschart/models/post_api_viewer_tokens_request.rb +0 -11
  117. data/lib/seatschart/models/post_api_webhooks_request.rb +1 -1
  118. data/lib/seatschart/models/post_api_workspaces_request.rb +1 -1
  119. data/lib/seatschart/models/put_api_charts_by_chart_id_map_draft_request.rb +349 -0
  120. data/lib/seatschart/models/put_api_workspace_buyer_extra_data_request.rb +260 -0
  121. data/lib/seatschart/models/put_internal_status_notices_request.rb +242 -0
  122. data/lib/seatschart/models/put_internal_status_notices_request_notices_inner.rb +445 -0
  123. data/lib/seatschart/retry.rb +106 -7
  124. data/lib/seatschart/version.rb +1 -1
  125. data/lib/seatschart.rb +69 -2
  126. metadata +71 -4
  127. data/lib/seatschart/api/default_api.rb +0 -763
@@ -0,0 +1,297 @@
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 GetApiMonitoringRequests200ResponseConcurrencyApiKeysInner
18
+ # API key id.
19
+ attr_accessor :id
20
+
21
+ # Key name (null when the key was deleted).
22
+ attr_accessor :name
23
+
24
+ # Non-secret key prefix.
25
+ attr_accessor :prefix
26
+
27
+ # Requests of this key in flight now on the API instance that answered.
28
+ attr_accessor :current
29
+
30
+ attr_accessor :peak_last_hour
31
+
32
+ attr_accessor :peak_last_day
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'id' => :'id',
38
+ :'name' => :'name',
39
+ :'prefix' => :'prefix',
40
+ :'current' => :'current',
41
+ :'peak_last_hour' => :'peakLastHour',
42
+ :'peak_last_day' => :'peakLastDay'
43
+ }
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'id' => :'String',
55
+ :'name' => :'String',
56
+ :'prefix' => :'String',
57
+ :'current' => :'Integer',
58
+ :'peak_last_hour' => :'Integer',
59
+ :'peak_last_day' => :'Integer'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ :'name',
67
+ :'prefix',
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::GetApiMonitoringRequests200ResponseConcurrencyApiKeysInner` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::GetApiMonitoringRequests200ResponseConcurrencyApiKeysInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'id')
87
+ self.id = attributes[:'id']
88
+ else
89
+ self.id = nil
90
+ end
91
+
92
+ if attributes.key?(:'name')
93
+ self.name = attributes[:'name']
94
+ else
95
+ self.name = nil
96
+ end
97
+
98
+ if attributes.key?(:'prefix')
99
+ self.prefix = attributes[:'prefix']
100
+ else
101
+ self.prefix = nil
102
+ end
103
+
104
+ if attributes.key?(:'current')
105
+ self.current = attributes[:'current']
106
+ else
107
+ self.current = nil
108
+ end
109
+
110
+ if attributes.key?(:'peak_last_hour')
111
+ self.peak_last_hour = attributes[:'peak_last_hour']
112
+ else
113
+ self.peak_last_hour = nil
114
+ end
115
+
116
+ if attributes.key?(:'peak_last_day')
117
+ self.peak_last_day = attributes[:'peak_last_day']
118
+ else
119
+ self.peak_last_day = nil
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
127
+ invalid_properties = Array.new
128
+ if @id.nil?
129
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
130
+ end
131
+
132
+ if @current.nil?
133
+ invalid_properties.push('invalid value for "current", current cannot be nil.')
134
+ end
135
+
136
+ if @peak_last_hour.nil?
137
+ invalid_properties.push('invalid value for "peak_last_hour", peak_last_hour cannot be nil.')
138
+ end
139
+
140
+ if @peak_last_day.nil?
141
+ invalid_properties.push('invalid value for "peak_last_day", peak_last_day cannot be nil.')
142
+ end
143
+
144
+ invalid_properties
145
+ end
146
+
147
+ # Check to see if the all the properties in the model are valid
148
+ # @return true if the model is valid
149
+ def valid?
150
+ warn '[DEPRECATED] the `valid?` method is obsolete'
151
+ return false if @id.nil?
152
+ return false if @current.nil?
153
+ return false if @peak_last_hour.nil?
154
+ return false if @peak_last_day.nil?
155
+ true
156
+ end
157
+
158
+ # Checks equality by comparing each attribute.
159
+ # @param [Object] Object to be compared
160
+ def ==(o)
161
+ return true if self.equal?(o)
162
+ self.class == o.class &&
163
+ id == o.id &&
164
+ name == o.name &&
165
+ prefix == o.prefix &&
166
+ current == o.current &&
167
+ peak_last_hour == o.peak_last_hour &&
168
+ peak_last_day == o.peak_last_day
169
+ end
170
+
171
+ # @see the `==` method
172
+ # @param [Object] Object to be compared
173
+ def eql?(o)
174
+ self == o
175
+ end
176
+
177
+ # Calculates hash code according to all attributes.
178
+ # @return [Integer] Hash code
179
+ def hash
180
+ [id, name, prefix, current, peak_last_hour, peak_last_day].hash
181
+ end
182
+
183
+ # Builds the object from hash
184
+ # @param [Hash] attributes Model attributes in the form of hash
185
+ # @return [Object] Returns the model itself
186
+ def self.build_from_hash(attributes)
187
+ return nil unless attributes.is_a?(Hash)
188
+ attributes = attributes.transform_keys(&:to_sym)
189
+ transformed_hash = {}
190
+ openapi_types.each_pair do |key, type|
191
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
192
+ transformed_hash["#{key}"] = nil
193
+ elsif type =~ /\AArray<(.*)>/i
194
+ # check to ensure the input is an array given that the attribute
195
+ # is documented as an array but the input is not
196
+ if attributes[attribute_map[key]].is_a?(Array)
197
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
198
+ end
199
+ elsif !attributes[attribute_map[key]].nil?
200
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
201
+ end
202
+ end
203
+ new(transformed_hash)
204
+ end
205
+
206
+ # Deserializes the data based on type
207
+ # @param string type Data type
208
+ # @param string value Value to be deserialized
209
+ # @return [Object] Deserialized data
210
+ def self._deserialize(type, value)
211
+ case type.to_sym
212
+ when :Time
213
+ Time.parse(value)
214
+ when :Date
215
+ Date.parse(value)
216
+ when :String
217
+ value.to_s
218
+ when :Integer
219
+ value.to_i
220
+ when :Float
221
+ value.to_f
222
+ when :Boolean
223
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
224
+ true
225
+ else
226
+ false
227
+ end
228
+ when :Object
229
+ # generic object (usually a Hash), return directly
230
+ value
231
+ when /\AArray<(?<inner_type>.+)>\z/
232
+ inner_type = Regexp.last_match[:inner_type]
233
+ value.map { |v| _deserialize(inner_type, v) }
234
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
235
+ k_type = Regexp.last_match[:k_type]
236
+ v_type = Regexp.last_match[:v_type]
237
+ {}.tap do |hash|
238
+ value.each do |k, v|
239
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
240
+ end
241
+ end
242
+ else # model
243
+ # models (e.g. Pet) or oneOf
244
+ klass = SeatsChart.const_get(type)
245
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
246
+ end
247
+ end
248
+
249
+ # Returns the string representation of the object
250
+ # @return [String] String presentation of the object
251
+ def to_s
252
+ to_hash.to_s
253
+ end
254
+
255
+ # to_body is an alias to to_hash (backward compatibility)
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_body
258
+ to_hash
259
+ end
260
+
261
+ # Returns the object in the form of hash
262
+ # @return [Hash] Returns the object in the form of hash
263
+ def to_hash
264
+ hash = {}
265
+ self.class.attribute_map.each_pair do |attr, param|
266
+ value = self.send(attr)
267
+ if value.nil?
268
+ is_nullable = self.class.openapi_nullable.include?(attr)
269
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
270
+ end
271
+
272
+ hash[param] = _to_hash(value)
273
+ end
274
+ hash
275
+ end
276
+
277
+ # Outputs non-array value in the form of hash
278
+ # For object, use to_hash. Otherwise, just return the value
279
+ # @param [Object] value Any valid value
280
+ # @return [Hash] Returns the value in the form of hash
281
+ def _to_hash(value)
282
+ if value.is_a?(Array)
283
+ value.compact.map { |v| _to_hash(v) }
284
+ elsif value.is_a?(Hash)
285
+ {}.tap do |hash|
286
+ value.each { |k, v| hash[k] = _to_hash(v) }
287
+ end
288
+ elsif value.respond_to? :to_hash
289
+ value.to_hash
290
+ else
291
+ value
292
+ end
293
+ end
294
+
295
+ end
296
+
297
+ end
@@ -26,6 +26,12 @@ module SeatsChart
26
26
 
27
27
  attr_accessor :api_rejected
28
28
 
29
+ # Peak in-flight (concurrent) requests in the bucket.
30
+ attr_accessor :concurrent
31
+
32
+ # True when requests were refused with 429 in the bucket (either lane).
33
+ attr_accessor :limited
34
+
29
35
  # Attribute mapping from ruby-style variable name to JSON key.
30
36
  def self.attribute_map
31
37
  {
@@ -33,7 +39,9 @@ module SeatsChart
33
39
  :'sales' => :'sales',
34
40
  :'api' => :'api',
35
41
  :'sales_rejected' => :'salesRejected',
36
- :'api_rejected' => :'apiRejected'
42
+ :'api_rejected' => :'apiRejected',
43
+ :'concurrent' => :'concurrent',
44
+ :'limited' => :'limited'
37
45
  }
38
46
  end
39
47
 
@@ -49,7 +57,9 @@ module SeatsChart
49
57
  :'sales' => :'Integer',
50
58
  :'api' => :'Integer',
51
59
  :'sales_rejected' => :'Integer',
52
- :'api_rejected' => :'Integer'
60
+ :'api_rejected' => :'Integer',
61
+ :'concurrent' => :'Integer',
62
+ :'limited' => :'Boolean'
53
63
  }
54
64
  end
55
65
 
@@ -103,6 +113,18 @@ module SeatsChart
103
113
  else
104
114
  self.api_rejected = nil
105
115
  end
116
+
117
+ if attributes.key?(:'concurrent')
118
+ self.concurrent = attributes[:'concurrent']
119
+ else
120
+ self.concurrent = nil
121
+ end
122
+
123
+ if attributes.key?(:'limited')
124
+ self.limited = attributes[:'limited']
125
+ else
126
+ self.limited = nil
127
+ end
106
128
  end
107
129
 
108
130
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -130,6 +152,14 @@ module SeatsChart
130
152
  invalid_properties.push('invalid value for "api_rejected", api_rejected cannot be nil.')
131
153
  end
132
154
 
155
+ if @concurrent.nil?
156
+ invalid_properties.push('invalid value for "concurrent", concurrent cannot be nil.')
157
+ end
158
+
159
+ if @limited.nil?
160
+ invalid_properties.push('invalid value for "limited", limited cannot be nil.')
161
+ end
162
+
133
163
  invalid_properties
134
164
  end
135
165
 
@@ -142,6 +172,8 @@ module SeatsChart
142
172
  return false if @api.nil?
143
173
  return false if @sales_rejected.nil?
144
174
  return false if @api_rejected.nil?
175
+ return false if @concurrent.nil?
176
+ return false if @limited.nil?
145
177
  true
146
178
  end
147
179
 
@@ -154,7 +186,9 @@ module SeatsChart
154
186
  sales == o.sales &&
155
187
  api == o.api &&
156
188
  sales_rejected == o.sales_rejected &&
157
- api_rejected == o.api_rejected
189
+ api_rejected == o.api_rejected &&
190
+ concurrent == o.concurrent &&
191
+ limited == o.limited
158
192
  end
159
193
 
160
194
  # @see the `==` method
@@ -166,7 +200,7 @@ module SeatsChart
166
200
  # Calculates hash code according to all attributes.
167
201
  # @return [Integer] Hash code
168
202
  def hash
169
- [t, sales, api, sales_rejected, api_rejected].hash
203
+ [t, sales, api, sales_rejected, api_rejected, concurrent, limited].hash
170
204
  end
171
205
 
172
206
  # Builds the object from hash
@@ -0,0 +1,239 @@
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 GetApiSandboxes200Response
18
+ attr_accessor :items
19
+
20
+ attr_accessor :limit
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'items' => :'items',
26
+ :'limit' => :'limit'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'items' => :'Array<GetApiSandboxes200ResponseItemsInner>',
39
+ :'limit' => :'Integer'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::GetApiSandboxes200Response` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::GetApiSandboxes200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'items')
65
+ if (value = attributes[:'items']).is_a?(Array)
66
+ self.items = value
67
+ end
68
+ else
69
+ self.items = nil
70
+ end
71
+
72
+ if attributes.key?(:'limit')
73
+ self.limit = attributes[:'limit']
74
+ else
75
+ self.limit = nil
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ if @items.nil?
85
+ invalid_properties.push('invalid value for "items", items cannot be nil.')
86
+ end
87
+
88
+ if @limit.nil?
89
+ invalid_properties.push('invalid value for "limit", limit cannot be nil.')
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ return false if @items.nil?
100
+ return false if @limit.nil?
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ items == o.items &&
110
+ limit == o.limit
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [items, limit].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Deserializes the data based on type
149
+ # @param string type Data type
150
+ # @param string value Value to be deserialized
151
+ # @return [Object] Deserialized data
152
+ def self._deserialize(type, value)
153
+ case type.to_sym
154
+ when :Time
155
+ Time.parse(value)
156
+ when :Date
157
+ Date.parse(value)
158
+ when :String
159
+ value.to_s
160
+ when :Integer
161
+ value.to_i
162
+ when :Float
163
+ value.to_f
164
+ when :Boolean
165
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
+ true
167
+ else
168
+ false
169
+ end
170
+ when :Object
171
+ # generic object (usually a Hash), return directly
172
+ value
173
+ when /\AArray<(?<inner_type>.+)>\z/
174
+ inner_type = Regexp.last_match[:inner_type]
175
+ value.map { |v| _deserialize(inner_type, v) }
176
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
+ k_type = Regexp.last_match[:k_type]
178
+ v_type = Regexp.last_match[:v_type]
179
+ {}.tap do |hash|
180
+ value.each do |k, v|
181
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
182
+ end
183
+ end
184
+ else # model
185
+ # models (e.g. Pet) or oneOf
186
+ klass = SeatsChart.const_get(type)
187
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map { |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+
237
+ end
238
+
239
+ end