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
@@ -17,13 +17,21 @@ module SeatsChart
17
17
  class PatchApiSeasonsBySeasonIdRequest
18
18
  attr_accessor :name
19
19
 
20
+ # Set or rename the key; `null` or `\"\"` clears it. 409 `season_key_taken`. Partner key: unique per workspace, 1–100 URL-safe characters (letters, digits, `_ . ~ -`, starting with a letter or digit), never UUID-shaped. Every season route accepts the key in place of the id (path, body and query `seasonId`), like event and chart keys.
21
+ attr_accessor :key
22
+
20
23
  attr_accessor :source_event_id
21
24
 
25
+ # 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. Changing it never moves existing bookings; it decides where later season bookings go.
26
+ attr_accessor :bookings_propagated
27
+
22
28
  # Attribute mapping from ruby-style variable name to JSON key.
23
29
  def self.attribute_map
24
30
  {
25
31
  :'name' => :'name',
26
- :'source_event_id' => :'sourceEventId'
32
+ :'key' => :'key',
33
+ :'source_event_id' => :'sourceEventId',
34
+ :'bookings_propagated' => :'bookingsPropagated'
27
35
  }
28
36
  end
29
37
 
@@ -36,14 +44,17 @@ module SeatsChart
36
44
  def self.openapi_types
37
45
  {
38
46
  :'name' => :'String',
39
- :'source_event_id' => :'String'
47
+ :'key' => :'String',
48
+ :'source_event_id' => :'String',
49
+ :'bookings_propagated' => :'Boolean'
40
50
  }
41
51
  end
42
52
 
43
53
  # List of attributes with nullable: true
44
54
  def self.openapi_nullable
45
55
  Set.new([
46
- :'source_event_id'
56
+ :'key',
57
+ :'source_event_id',
47
58
  ])
48
59
  end
49
60
 
@@ -66,9 +77,17 @@ module SeatsChart
66
77
  self.name = attributes[:'name']
67
78
  end
68
79
 
80
+ if attributes.key?(:'key')
81
+ self.key = attributes[:'key']
82
+ end
83
+
69
84
  if attributes.key?(:'source_event_id')
70
85
  self.source_event_id = attributes[:'source_event_id']
71
86
  end
87
+
88
+ if attributes.key?(:'bookings_propagated')
89
+ self.bookings_propagated = attributes[:'bookings_propagated']
90
+ end
72
91
  end
73
92
 
74
93
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -84,6 +103,10 @@ module SeatsChart
84
103
  invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
85
104
  end
86
105
 
106
+ if !@key.nil? && @key.to_s.length > 100
107
+ invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 100.')
108
+ end
109
+
87
110
  if !@source_event_id.nil? && @source_event_id.to_s.length > 36
88
111
  invalid_properties.push('invalid value for "source_event_id", the character length must be smaller than or equal to 36.')
89
112
  end
@@ -101,6 +124,7 @@ module SeatsChart
101
124
  warn '[DEPRECATED] the `valid?` method is obsolete'
102
125
  return false if !@name.nil? && @name.to_s.length > 512
103
126
  return false if !@name.nil? && @name.to_s.length < 1
127
+ return false if !@key.nil? && @key.to_s.length > 100
104
128
  return false if !@source_event_id.nil? && @source_event_id.to_s.length > 36
105
129
  return false if !@source_event_id.nil? && @source_event_id.to_s.length < 36
106
130
  true
@@ -124,6 +148,16 @@ module SeatsChart
124
148
  @name = name
125
149
  end
126
150
 
151
+ # Custom attribute writer method with validation
152
+ # @param [Object] key Value to be assigned
153
+ def key=(key)
154
+ if !key.nil? && key.to_s.length > 100
155
+ fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 100.'
156
+ end
157
+
158
+ @key = key
159
+ end
160
+
127
161
  # Custom attribute writer method with validation
128
162
  # @param [Object] source_event_id Value to be assigned
129
163
  def source_event_id=(source_event_id)
@@ -144,7 +178,9 @@ module SeatsChart
144
178
  return true if self.equal?(o)
145
179
  self.class == o.class &&
146
180
  name == o.name &&
147
- source_event_id == o.source_event_id
181
+ key == o.key &&
182
+ source_event_id == o.source_event_id &&
183
+ bookings_propagated == o.bookings_propagated
148
184
  end
149
185
 
150
186
  # @see the `==` method
@@ -156,7 +192,7 @@ module SeatsChart
156
192
  # Calculates hash code according to all attributes.
157
193
  # @return [Integer] Hash code
158
194
  def hash
159
- [name, source_event_id].hash
195
+ [name, key, source_event_id, bookings_propagated].hash
160
196
  end
161
197
 
162
198
  # Builds the object from hash
@@ -19,7 +19,7 @@ module SeatsChart
19
19
 
20
20
  attr_accessor :is_active
21
21
 
22
- # Subscribed event types: `[\"*\"]` (default) for every type, or a list of `reservations.confirmed`, `holds.created`, `holds.released`, `ga.confirmed`, `ga.released`, `objects.updated`, `season.objects.updated`, `hold.expired`, `event.created`, `event.updated`, `event.deleted`, `chart.published`, `lots.switched`, `chart.created`, `event.for_sale_changed`, `event.channels_updated`, `event.categories_updated`, `event.table_booking_changed`.
22
+ # Subscribed event types: `[\"*\"]` (default) for every type, or a list of `reservations.confirmed`, `holds.created`, `holds.released`, `ga.confirmed`, `ga.released`, `objects.updated`, `season.objects.updated`, `hold.expired`, `event.created`, `event.updated`, `event.deleted`, `chart.published`, `lots.switched`, `chart.created`, `event.for_sale_changed`, `event.channels_updated`, `event.categories_updated`, `event.table_booking_changed`, `event.listings_updated`. Seats.io-named aliases (`event.for.sale.config.updated`, `event.channels.updated`, `event.categories.updated`, `event.table.booking.config.updated`) are opt-in: listed explicitly, the endpoint also receives the aliased event under that name (same payload, `type` = the alias); `[\"*\"]` never includes them.
23
23
  attr_accessor :event_types
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -46,6 +46,8 @@ module SeatsChart
46
46
 
47
47
  attr_accessor :orphan_gap
48
48
 
49
+ attr_accessor :images_size
50
+
49
51
  class EnumAttributeValidator
50
52
  attr_reader :datatype
51
53
  attr_reader :allowable_values
@@ -85,7 +87,8 @@ module SeatsChart
85
87
  :'multiple_object_types' => :'multiple_object_types',
86
88
  :'missing_focal_point' => :'missing_focal_point',
87
89
  :'zone_missing_focal_point' => :'zone_missing_focal_point',
88
- :'orphan_gap' => :'orphan_gap'
90
+ :'orphan_gap' => :'orphan_gap',
91
+ :'images_size' => :'images_size'
89
92
  }
90
93
  end
91
94
 
@@ -111,7 +114,8 @@ module SeatsChart
111
114
  :'multiple_object_types' => :'String',
112
115
  :'missing_focal_point' => :'String',
113
116
  :'zone_missing_focal_point' => :'String',
114
- :'orphan_gap' => :'String'
117
+ :'orphan_gap' => :'String',
118
+ :'images_size' => :'String'
115
119
  }
116
120
  end
117
121
 
@@ -195,6 +199,10 @@ module SeatsChart
195
199
  if attributes.key?(:'orphan_gap')
196
200
  self.orphan_gap = attributes[:'orphan_gap']
197
201
  end
202
+
203
+ if attributes.key?(:'images_size')
204
+ self.images_size = attributes[:'images_size']
205
+ end
198
206
  end
199
207
 
200
208
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -239,6 +247,8 @@ module SeatsChart
239
247
  return false unless zone_missing_focal_point_validator.valid?(@zone_missing_focal_point)
240
248
  orphan_gap_validator = EnumAttributeValidator.new('String', ["off", "warning", "error"])
241
249
  return false unless orphan_gap_validator.valid?(@orphan_gap)
250
+ images_size_validator = EnumAttributeValidator.new('String', ["off", "warning", "error"])
251
+ return false unless images_size_validator.valid?(@images_size)
242
252
  true
243
253
  end
244
254
 
@@ -392,6 +402,16 @@ module SeatsChart
392
402
  @orphan_gap = orphan_gap
393
403
  end
394
404
 
405
+ # Custom attribute writer method checking allowed values (enum).
406
+ # @param [Object] images_size Object to be assigned
407
+ def images_size=(images_size)
408
+ validator = EnumAttributeValidator.new('String', ["off", "warning", "error"])
409
+ unless validator.valid?(images_size)
410
+ fail ArgumentError, "invalid value for \"images_size\", must be one of #{validator.allowable_values}."
411
+ end
412
+ @images_size = images_size
413
+ end
414
+
395
415
  # Checks equality by comparing each attribute.
396
416
  # @param [Object] Object to be compared
397
417
  def ==(o)
@@ -411,7 +431,8 @@ module SeatsChart
411
431
  multiple_object_types == o.multiple_object_types &&
412
432
  missing_focal_point == o.missing_focal_point &&
413
433
  zone_missing_focal_point == o.zone_missing_focal_point &&
414
- orphan_gap == o.orphan_gap
434
+ orphan_gap == o.orphan_gap &&
435
+ images_size == o.images_size
415
436
  end
416
437
 
417
438
  # @see the `==` method
@@ -423,7 +444,7 @@ module SeatsChart
423
444
  # Calculates hash code according to all attributes.
424
445
  # @return [Integer] Hash code
425
446
  def hash
426
- [no_objects, empty_label, duplicate_label, uncategorized, overlap, table_too_small, ga_invalid_capacity, ga_table_capacity, empty_floor, empty_section, outside_section, multiple_object_types, missing_focal_point, zone_missing_focal_point, orphan_gap].hash
447
+ [no_objects, empty_label, duplicate_label, uncategorized, overlap, table_too_small, ga_invalid_capacity, ga_table_capacity, empty_floor, empty_section, outside_section, multiple_object_types, missing_focal_point, zone_missing_focal_point, orphan_gap, images_size].hash
427
448
  end
428
449
 
429
450
  # Builds the object from hash
@@ -0,0 +1,224 @@
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 PatchApiWorkspaceDefaultsRequest
18
+ attr_accessor :renderer
19
+
20
+ # `false`: publish designer changes directly (no draft step).
21
+ attr_accessor :draft_chart_drawings_enabled
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'renderer' => :'renderer',
27
+ :'draft_chart_drawings_enabled' => :'draftChartDrawingsEnabled'
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
+ :'renderer' => :'PatchApiWorkspaceDefaultsRequestRenderer',
40
+ :'draft_chart_drawings_enabled' => :'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::PatchApiWorkspaceDefaultsRequest` 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::PatchApiWorkspaceDefaultsRequest`. 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?(:'renderer')
66
+ self.renderer = attributes[:'renderer']
67
+ end
68
+
69
+ if attributes.key?(:'draft_chart_drawings_enabled')
70
+ self.draft_chart_drawings_enabled = attributes[:'draft_chart_drawings_enabled']
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
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ warn '[DEPRECATED] the `valid?` method is obsolete'
86
+ true
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ renderer == o.renderer &&
95
+ draft_chart_drawings_enabled == o.draft_chart_drawings_enabled
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Integer] Hash code
106
+ def hash
107
+ [renderer, draft_chart_drawings_enabled].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def self.build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ attributes = attributes.transform_keys(&:to_sym)
116
+ transformed_hash = {}
117
+ openapi_types.each_pair do |key, type|
118
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
119
+ transformed_hash["#{key}"] = nil
120
+ elsif type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[attribute_map[key]].is_a?(Array)
124
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
125
+ end
126
+ elsif !attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
128
+ end
129
+ end
130
+ new(transformed_hash)
131
+ end
132
+
133
+ # Deserializes the data based on type
134
+ # @param string type Data type
135
+ # @param string value Value to be deserialized
136
+ # @return [Object] Deserialized data
137
+ def self._deserialize(type, value)
138
+ case type.to_sym
139
+ when :Time
140
+ Time.parse(value)
141
+ when :Date
142
+ Date.parse(value)
143
+ when :String
144
+ value.to_s
145
+ when :Integer
146
+ value.to_i
147
+ when :Float
148
+ value.to_f
149
+ when :Boolean
150
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
151
+ true
152
+ else
153
+ false
154
+ end
155
+ when :Object
156
+ # generic object (usually a Hash), return directly
157
+ value
158
+ when /\AArray<(?<inner_type>.+)>\z/
159
+ inner_type = Regexp.last_match[:inner_type]
160
+ value.map { |v| _deserialize(inner_type, v) }
161
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
162
+ k_type = Regexp.last_match[:k_type]
163
+ v_type = Regexp.last_match[:v_type]
164
+ {}.tap do |hash|
165
+ value.each do |k, v|
166
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
167
+ end
168
+ end
169
+ else # model
170
+ # models (e.g. Pet) or oneOf
171
+ klass = SeatsChart.const_get(type)
172
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ if value.nil?
195
+ is_nullable = self.class.openapi_nullable.include?(attr)
196
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
197
+ end
198
+
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+
222
+ end
223
+
224
+ end
@@ -0,0 +1,249 @@
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 PatchApiWorkspaceDefaultsRequestRenderer
18
+ # `null` = use the built-in default (true).
19
+ attr_accessor :multi_select_enabled
20
+
21
+ # `null` = use the built-in default (true).
22
+ attr_accessor :show_full_screen_button
23
+
24
+ # `null` = use the built-in default (true).
25
+ attr_accessor :companion_seat_validation_enabled
26
+
27
+ # `null` = use the built-in default (true).
28
+ attr_accessor :hold_on_select_for_gas
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'multi_select_enabled' => :'multiSelectEnabled',
34
+ :'show_full_screen_button' => :'showFullScreenButton',
35
+ :'companion_seat_validation_enabled' => :'companionSeatValidationEnabled',
36
+ :'hold_on_select_for_gas' => :'holdOnSelectForGAs'
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
+ :'multi_select_enabled' => :'Boolean',
49
+ :'show_full_screen_button' => :'Boolean',
50
+ :'companion_seat_validation_enabled' => :'Boolean',
51
+ :'hold_on_select_for_gas' => :'Boolean'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ :'multi_select_enabled',
59
+ :'show_full_screen_button',
60
+ :'companion_seat_validation_enabled',
61
+ :'hold_on_select_for_gas'
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::PatchApiWorkspaceDefaultsRequestRenderer` 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::PatchApiWorkspaceDefaultsRequestRenderer`. 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?(:'multi_select_enabled')
81
+ self.multi_select_enabled = attributes[:'multi_select_enabled']
82
+ end
83
+
84
+ if attributes.key?(:'show_full_screen_button')
85
+ self.show_full_screen_button = attributes[:'show_full_screen_button']
86
+ end
87
+
88
+ if attributes.key?(:'companion_seat_validation_enabled')
89
+ self.companion_seat_validation_enabled = attributes[:'companion_seat_validation_enabled']
90
+ end
91
+
92
+ if attributes.key?(:'hold_on_select_for_gas')
93
+ self.hold_on_select_for_gas = attributes[:'hold_on_select_for_gas']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ multi_select_enabled == o.multi_select_enabled &&
118
+ show_full_screen_button == o.show_full_screen_button &&
119
+ companion_seat_validation_enabled == o.companion_seat_validation_enabled &&
120
+ hold_on_select_for_gas == o.hold_on_select_for_gas
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [multi_select_enabled, show_full_screen_button, companion_seat_validation_enabled, hold_on_select_for_gas].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
+ end
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
+ end
154
+ end
155
+ new(transformed_hash)
156
+ end
157
+
158
+ # Deserializes the data based on type
159
+ # @param string type Data type
160
+ # @param string value Value to be deserialized
161
+ # @return [Object] Deserialized data
162
+ def self._deserialize(type, value)
163
+ case type.to_sym
164
+ when :Time
165
+ Time.parse(value)
166
+ when :Date
167
+ Date.parse(value)
168
+ when :String
169
+ value.to_s
170
+ when :Integer
171
+ value.to_i
172
+ when :Float
173
+ value.to_f
174
+ when :Boolean
175
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
176
+ true
177
+ else
178
+ false
179
+ end
180
+ when :Object
181
+ # generic object (usually a Hash), return directly
182
+ value
183
+ when /\AArray<(?<inner_type>.+)>\z/
184
+ inner_type = Regexp.last_match[:inner_type]
185
+ value.map { |v| _deserialize(inner_type, v) }
186
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
187
+ k_type = Regexp.last_match[:k_type]
188
+ v_type = Regexp.last_match[:v_type]
189
+ {}.tap do |hash|
190
+ value.each do |k, v|
191
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
192
+ end
193
+ end
194
+ else # model
195
+ # models (e.g. Pet) or oneOf
196
+ klass = SeatsChart.const_get(type)
197
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
198
+ end
199
+ end
200
+
201
+ # Returns the string representation of the object
202
+ # @return [String] String presentation of the object
203
+ def to_s
204
+ to_hash.to_s
205
+ end
206
+
207
+ # to_body is an alias to to_hash (backward compatibility)
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_body
210
+ to_hash
211
+ end
212
+
213
+ # Returns the object in the form of hash
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_hash
216
+ hash = {}
217
+ self.class.attribute_map.each_pair do |attr, param|
218
+ value = self.send(attr)
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ # Outputs non-array value in the form of hash
230
+ # For object, use to_hash. Otherwise, just return the value
231
+ # @param [Object] value Any valid value
232
+ # @return [Hash] Returns the value in the form of hash
233
+ def _to_hash(value)
234
+ if value.is_a?(Array)
235
+ value.compact.map { |v| _to_hash(v) }
236
+ elsif value.is_a?(Hash)
237
+ {}.tap do |hash|
238
+ value.each { |k, v| hash[k] = _to_hash(v) }
239
+ end
240
+ elsif value.respond_to? :to_hash
241
+ value.to_hash
242
+ else
243
+ value
244
+ end
245
+ end
246
+
247
+ end
248
+
249
+ end