seatschart 0.3.0 → 0.5.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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +79 -11
  3. data/lib/seatschart/api/audit_api.rb +2 -2
  4. data/lib/seatschart/api/auth_api.rb +85 -8
  5. data/lib/seatschart/api/billing_api.rb +93 -8
  6. data/lib/seatschart/api/charts_api.rb +63 -63
  7. data/lib/seatschart/api/events_api.rb +130 -124
  8. data/lib/seatschart/api/public_api.rb +6 -6
  9. data/lib/seatschart/api/seasons_api.rb +88 -88
  10. data/lib/seatschart/api/seats_api.rb +6 -6
  11. data/lib/seatschart/api/usage_api.rb +4 -4
  12. data/lib/seatschart/api/workspace_api.rb +1229 -51
  13. data/lib/seatschart/models/{api_error.rb → api_error_body.rb} +7 -7
  14. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +237 -0
  15. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_members_by_user_id200_response.rb +221 -0
  16. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +50 -4
  17. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_invitations200_response.rb +239 -0
  18. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_invitations200_response_invitations_inner.rb +286 -0
  19. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response.rb +239 -0
  20. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response_api_keys_inner.rb +321 -0
  21. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_members200_response.rb +239 -0
  22. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_members200_response_members_inner.rb +288 -0
  23. data/lib/seatschart/models/get_api_workspaces_overview200_response.rb +288 -0
  24. data/lib/seatschart/models/get_api_workspaces_overview200_response_account.rb +270 -0
  25. data/lib/seatschart/models/get_api_workspaces_overview200_response_account_charts.rb +233 -0
  26. data/lib/seatschart/models/get_api_workspaces_overview200_response_account_plan.rb +237 -0
  27. data/lib/seatschart/models/get_api_workspaces_overview200_response_items_inner.rb +439 -0
  28. data/lib/seatschart/models/get_api_workspaces_overview200_response_items_inner_revenue.rb +234 -0
  29. data/lib/seatschart/models/get_api_workspaces_overview200_response_items_inner_usage.rb +271 -0
  30. data/lib/seatschart/models/get_api_workspaces_overview200_response_seats.rb +431 -0
  31. data/lib/seatschart/models/get_api_workspaces_overview200_response_seats_overage.rb +233 -0
  32. data/lib/seatschart/models/get_api_workspaces_overview200_response_seats_projected.rb +237 -0
  33. data/lib/seatschart/models/get_api_workspaces_overview200_response_totals.rb +318 -0
  34. data/lib/seatschart/models/get_api_workspaces_overview200_response_totals_revenue.rb +238 -0
  35. data/lib/seatschart/models/get_api_workspaces_overview200_response_totals_seats.rb +253 -0
  36. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +15 -15
  37. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +221 -0
  38. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id_request.rb +292 -0
  39. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_request.rb +288 -0
  40. data/lib/seatschart/models/post_api_auth_new_workspace_request.rb +294 -0
  41. data/lib/seatschart/models/post_api_billing_actions_change_plan_request.rb +256 -0
  42. data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request_objects_inner.rb +0 -2
  43. data/lib/seatschart/models/post_api_sandboxes201_response.rb +0 -4
  44. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +0 -2
  45. data/lib/seatschart/models/post_api_workspaces200_response.rb +464 -0
  46. data/lib/seatschart/models/post_api_workspaces200_response_api_key.rb +332 -0
  47. data/lib/seatschart/models/post_api_workspaces200_response_template.rb +260 -0
  48. data/lib/seatschart/models/post_api_workspaces200_response_template_webhooks_inner.rb +284 -0
  49. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete200_response.rb +319 -0
  50. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete_request.rb +281 -0
  51. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations201_response.rb +238 -0
  52. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations201_response_invitation.rb +286 -0
  53. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations_request.rb +300 -0
  54. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response.rb +237 -0
  55. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response_api_key.rb +338 -0
  56. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys_request.rb +299 -0
  57. data/lib/seatschart/models/post_api_workspaces_request.rb +100 -4
  58. data/lib/seatschart/models/post_api_workspaces_request_issue_key.rb +294 -0
  59. data/lib/seatschart/version.rb +1 -1
  60. data/lib/seatschart/workspaces.rb +172 -0
  61. data/lib/seatschart.rb +41 -2
  62. metadata +43 -4
  63. data/lib/seatschart/models/put_api_charts_by_chart_id_map_draft_request.rb +0 -349
@@ -1,349 +0,0 @@
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 PutApiChartsByChartIdMapDraftRequest
18
- attr_accessor :seats
19
-
20
- # Layout shapes (sections, zones, GA areas, tables, icons…) and one `layoutMeta`. `layoutMeta.settings3d` holds the authored 3D (elevation / rake per section or zone, floors, light preset, spectator target) and the 3D billboards: `billboards` (at most 64 boards, each `{ id, points: [{x, y}] (2-64, map px), height?: m (0.2-20, default 1), elevation?: m (-20-100), scroll?: \"reverse\" | \"off\" }`) and `billboardImages` (at most 12 sponsor images shared by every board, in scroll order: base64 WebP / PNG / JPEG data URLs, stored to the map-asset CDN when configured, or map-asset URLs). Invalid values are refused with 400 `validation_error`, never clamped. `settings3d.seatPicking` (boolean) is the chart-level \"Allow 3D seat picking\" switch (absent: on for charts that author 3D). Optional fields published only when set: tables `oneSide` (rectangular, every guest on one long side) and `openSpaces` (1-20 empty chair positions); text `bold` / `italic`; decorative shapes `layer: \"foreground\"` (drawn above the seats for buyers, never interactive); `layoutMeta.floors[].abbreviation` (at most 6 characters) and `layoutMeta.displayTypes` (object id → displayed type, at most 64 characters, seats.io `displayObjectType`). Designer-only metadata (`bytes` on images, `layoutMeta.backgroundBytes`) feeds the `images_size` check and is never published.
21
- attr_accessor :shapes
22
-
23
- attr_accessor :background
24
-
25
- attr_accessor :reference
26
-
27
- # Draft version this save is based on (`draftUpdatedAt` from the last load or save; null for a never-saved draft). When given and the stored draft changed meanwhile, the save is refused with 409 `draft_conflict` (designer autosave). Omit it for last-writer-wins.
28
- attr_accessor :base_draft_updated_at
29
-
30
- # Attribute mapping from ruby-style variable name to JSON key.
31
- def self.attribute_map
32
- {
33
- :'seats' => :'seats',
34
- :'shapes' => :'shapes',
35
- :'background' => :'background',
36
- :'reference' => :'reference',
37
- :'base_draft_updated_at' => :'baseDraftUpdatedAt'
38
- }
39
- end
40
-
41
- # Returns all the JSON keys this model knows about
42
- def self.acceptable_attributes
43
- attribute_map.values
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.openapi_types
48
- {
49
- :'seats' => :'Array<PostApiChartsByChartIdActionsValidateRequestSeatsInner>',
50
- :'shapes' => :'Array<Object>',
51
- :'background' => :'String',
52
- :'reference' => :'String',
53
- :'base_draft_updated_at' => :'String'
54
- }
55
- end
56
-
57
- # List of attributes with nullable: true
58
- def self.openapi_nullable
59
- Set.new([
60
- :'background',
61
- :'reference',
62
- :'base_draft_updated_at'
63
- ])
64
- end
65
-
66
- # Initializes the object
67
- # @param [Hash] attributes Model attributes in the form of hash
68
- def initialize(attributes = {})
69
- if (!attributes.is_a?(Hash))
70
- fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PutApiChartsByChartIdMapDraftRequest` initialize method"
71
- end
72
-
73
- # check to see if the attribute exists and convert string to symbol for hash key
74
- attributes = attributes.each_with_object({}) { |(k, v), h|
75
- if (!self.class.attribute_map.key?(k.to_sym))
76
- fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PutApiChartsByChartIdMapDraftRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
- end
78
- h[k.to_sym] = v
79
- }
80
-
81
- if attributes.key?(:'seats')
82
- if (value = attributes[:'seats']).is_a?(Array)
83
- self.seats = value
84
- end
85
- else
86
- self.seats = nil
87
- end
88
-
89
- if attributes.key?(:'shapes')
90
- if (value = attributes[:'shapes']).is_a?(Array)
91
- self.shapes = value
92
- end
93
- end
94
-
95
- if attributes.key?(:'background')
96
- self.background = attributes[:'background']
97
- end
98
-
99
- if attributes.key?(:'reference')
100
- self.reference = attributes[:'reference']
101
- end
102
-
103
- if attributes.key?(:'base_draft_updated_at')
104
- self.base_draft_updated_at = attributes[:'base_draft_updated_at']
105
- end
106
- end
107
-
108
- # Show invalid properties with the reasons. Usually used together with valid?
109
- # @return Array for valid properties with the reasons
110
- def list_invalid_properties
111
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
112
- invalid_properties = Array.new
113
- if @seats.nil?
114
- invalid_properties.push('invalid value for "seats", seats cannot be nil.')
115
- end
116
-
117
- if @seats.length > 50000
118
- invalid_properties.push('invalid value for "seats", number of items must be less than or equal to 50000.')
119
- end
120
-
121
- if !@shapes.nil? && @shapes.length > 5000
122
- invalid_properties.push('invalid value for "shapes", number of items must be less than or equal to 5000.')
123
- end
124
-
125
- if !@background.nil? && @background.to_s.length > 2000000
126
- invalid_properties.push('invalid value for "background", the character length must be smaller than or equal to 2000000.')
127
- end
128
-
129
- if !@reference.nil? && @reference.to_s.length > 2000000
130
- invalid_properties.push('invalid value for "reference", the character length must be smaller than or equal to 2000000.')
131
- end
132
-
133
- if !@base_draft_updated_at.nil? && @base_draft_updated_at.to_s.length > 40
134
- invalid_properties.push('invalid value for "base_draft_updated_at", the character length must be smaller than or equal to 40.')
135
- end
136
-
137
- invalid_properties
138
- end
139
-
140
- # Check to see if the all the properties in the model are valid
141
- # @return true if the model is valid
142
- def valid?
143
- warn '[DEPRECATED] the `valid?` method is obsolete'
144
- return false if @seats.nil?
145
- return false if @seats.length > 50000
146
- return false if !@shapes.nil? && @shapes.length > 5000
147
- return false if !@background.nil? && @background.to_s.length > 2000000
148
- return false if !@reference.nil? && @reference.to_s.length > 2000000
149
- return false if !@base_draft_updated_at.nil? && @base_draft_updated_at.to_s.length > 40
150
- true
151
- end
152
-
153
- # Custom attribute writer method with validation
154
- # @param [Object] seats Value to be assigned
155
- def seats=(seats)
156
- if seats.nil?
157
- fail ArgumentError, 'seats cannot be nil'
158
- end
159
-
160
- if seats.length > 50000
161
- fail ArgumentError, 'invalid value for "seats", number of items must be less than or equal to 50000.'
162
- end
163
-
164
- @seats = seats
165
- end
166
-
167
- # Custom attribute writer method with validation
168
- # @param [Object] shapes Value to be assigned
169
- def shapes=(shapes)
170
- if shapes.nil?
171
- fail ArgumentError, 'shapes cannot be nil'
172
- end
173
-
174
- if shapes.length > 5000
175
- fail ArgumentError, 'invalid value for "shapes", number of items must be less than or equal to 5000.'
176
- end
177
-
178
- @shapes = shapes
179
- end
180
-
181
- # Custom attribute writer method with validation
182
- # @param [Object] background Value to be assigned
183
- def background=(background)
184
- if !background.nil? && background.to_s.length > 2000000
185
- fail ArgumentError, 'invalid value for "background", the character length must be smaller than or equal to 2000000.'
186
- end
187
-
188
- @background = background
189
- end
190
-
191
- # Custom attribute writer method with validation
192
- # @param [Object] reference Value to be assigned
193
- def reference=(reference)
194
- if !reference.nil? && reference.to_s.length > 2000000
195
- fail ArgumentError, 'invalid value for "reference", the character length must be smaller than or equal to 2000000.'
196
- end
197
-
198
- @reference = reference
199
- end
200
-
201
- # Custom attribute writer method with validation
202
- # @param [Object] base_draft_updated_at Value to be assigned
203
- def base_draft_updated_at=(base_draft_updated_at)
204
- if !base_draft_updated_at.nil? && base_draft_updated_at.to_s.length > 40
205
- fail ArgumentError, 'invalid value for "base_draft_updated_at", the character length must be smaller than or equal to 40.'
206
- end
207
-
208
- @base_draft_updated_at = base_draft_updated_at
209
- end
210
-
211
- # Checks equality by comparing each attribute.
212
- # @param [Object] Object to be compared
213
- def ==(o)
214
- return true if self.equal?(o)
215
- self.class == o.class &&
216
- seats == o.seats &&
217
- shapes == o.shapes &&
218
- background == o.background &&
219
- reference == o.reference &&
220
- base_draft_updated_at == o.base_draft_updated_at
221
- end
222
-
223
- # @see the `==` method
224
- # @param [Object] Object to be compared
225
- def eql?(o)
226
- self == o
227
- end
228
-
229
- # Calculates hash code according to all attributes.
230
- # @return [Integer] Hash code
231
- def hash
232
- [seats, shapes, background, reference, base_draft_updated_at].hash
233
- end
234
-
235
- # Builds the object from hash
236
- # @param [Hash] attributes Model attributes in the form of hash
237
- # @return [Object] Returns the model itself
238
- def self.build_from_hash(attributes)
239
- return nil unless attributes.is_a?(Hash)
240
- attributes = attributes.transform_keys(&:to_sym)
241
- transformed_hash = {}
242
- openapi_types.each_pair do |key, type|
243
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
244
- transformed_hash["#{key}"] = nil
245
- elsif type =~ /\AArray<(.*)>/i
246
- # check to ensure the input is an array given that the attribute
247
- # is documented as an array but the input is not
248
- if attributes[attribute_map[key]].is_a?(Array)
249
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
250
- end
251
- elsif !attributes[attribute_map[key]].nil?
252
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
253
- end
254
- end
255
- new(transformed_hash)
256
- end
257
-
258
- # Deserializes the data based on type
259
- # @param string type Data type
260
- # @param string value Value to be deserialized
261
- # @return [Object] Deserialized data
262
- def self._deserialize(type, value)
263
- case type.to_sym
264
- when :Time
265
- Time.parse(value)
266
- when :Date
267
- Date.parse(value)
268
- when :String
269
- value.to_s
270
- when :Integer
271
- value.to_i
272
- when :Float
273
- value.to_f
274
- when :Boolean
275
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
276
- true
277
- else
278
- false
279
- end
280
- when :Object
281
- # generic object (usually a Hash), return directly
282
- value
283
- when /\AArray<(?<inner_type>.+)>\z/
284
- inner_type = Regexp.last_match[:inner_type]
285
- value.map { |v| _deserialize(inner_type, v) }
286
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
287
- k_type = Regexp.last_match[:k_type]
288
- v_type = Regexp.last_match[:v_type]
289
- {}.tap do |hash|
290
- value.each do |k, v|
291
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
292
- end
293
- end
294
- else # model
295
- # models (e.g. Pet) or oneOf
296
- klass = SeatsChart.const_get(type)
297
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
298
- end
299
- end
300
-
301
- # Returns the string representation of the object
302
- # @return [String] String presentation of the object
303
- def to_s
304
- to_hash.to_s
305
- end
306
-
307
- # to_body is an alias to to_hash (backward compatibility)
308
- # @return [Hash] Returns the object in the form of hash
309
- def to_body
310
- to_hash
311
- end
312
-
313
- # Returns the object in the form of hash
314
- # @return [Hash] Returns the object in the form of hash
315
- def to_hash
316
- hash = {}
317
- self.class.attribute_map.each_pair do |attr, param|
318
- value = self.send(attr)
319
- if value.nil?
320
- is_nullable = self.class.openapi_nullable.include?(attr)
321
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
322
- end
323
-
324
- hash[param] = _to_hash(value)
325
- end
326
- hash
327
- end
328
-
329
- # Outputs non-array value in the form of hash
330
- # For object, use to_hash. Otherwise, just return the value
331
- # @param [Object] value Any valid value
332
- # @return [Hash] Returns the value in the form of hash
333
- def _to_hash(value)
334
- if value.is_a?(Array)
335
- value.compact.map { |v| _to_hash(v) }
336
- elsif value.is_a?(Hash)
337
- {}.tap do |hash|
338
- value.each { |k, v| hash[k] = _to_hash(v) }
339
- end
340
- elsif value.respond_to? :to_hash
341
- value.to_hash
342
- else
343
- value
344
- end
345
- end
346
-
347
- end
348
-
349
- end