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
@@ -23,6 +23,8 @@ module SeatsChart
23
23
 
24
24
  attr_accessor :ga_places_to_channels
25
25
 
26
+ attr_accessor :new_events_not_for_sale
27
+
26
28
  class EnumAttributeValidator
27
29
  attr_reader :datatype
28
30
  attr_reader :allowable_values
@@ -51,7 +53,8 @@ module SeatsChart
51
53
  :'hold_period_minutes' => :'holdPeriodMinutes',
52
54
  :'max_seats_per_hold_token' => :'maxSeatsPerHoldToken',
53
55
  :'ticket_buyer_validation' => :'ticketBuyerValidation',
54
- :'ga_places_to_channels' => :'gaPlacesToChannels'
56
+ :'ga_places_to_channels' => :'gaPlacesToChannels',
57
+ :'new_events_not_for_sale' => :'newEventsNotForSale'
55
58
  }
56
59
  end
57
60
 
@@ -66,7 +69,8 @@ module SeatsChart
66
69
  :'hold_period_minutes' => :'String',
67
70
  :'max_seats_per_hold_token' => :'String',
68
71
  :'ticket_buyer_validation' => :'String',
69
- :'ga_places_to_channels' => :'String'
72
+ :'ga_places_to_channels' => :'String',
73
+ :'new_events_not_for_sale' => :'String'
70
74
  }
71
75
  end
72
76
 
@@ -114,6 +118,12 @@ module SeatsChart
114
118
  else
115
119
  self.ga_places_to_channels = nil
116
120
  end
121
+
122
+ if attributes.key?(:'new_events_not_for_sale')
123
+ self.new_events_not_for_sale = attributes[:'new_events_not_for_sale']
124
+ else
125
+ self.new_events_not_for_sale = nil
126
+ end
117
127
  end
118
128
 
119
129
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -137,6 +147,10 @@ module SeatsChart
137
147
  invalid_properties.push('invalid value for "ga_places_to_channels", ga_places_to_channels cannot be nil.')
138
148
  end
139
149
 
150
+ if @new_events_not_for_sale.nil?
151
+ invalid_properties.push('invalid value for "new_events_not_for_sale", new_events_not_for_sale cannot be nil.')
152
+ end
153
+
140
154
  invalid_properties
141
155
  end
142
156
 
@@ -156,6 +170,9 @@ module SeatsChart
156
170
  return false if @ga_places_to_channels.nil?
157
171
  ga_places_to_channels_validator = EnumAttributeValidator.new('String', ["default", "override"])
158
172
  return false unless ga_places_to_channels_validator.valid?(@ga_places_to_channels)
173
+ return false if @new_events_not_for_sale.nil?
174
+ new_events_not_for_sale_validator = EnumAttributeValidator.new('String', ["default", "override"])
175
+ return false unless new_events_not_for_sale_validator.valid?(@new_events_not_for_sale)
159
176
  true
160
177
  end
161
178
 
@@ -199,6 +216,16 @@ module SeatsChart
199
216
  @ga_places_to_channels = ga_places_to_channels
200
217
  end
201
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] new_events_not_for_sale Object to be assigned
221
+ def new_events_not_for_sale=(new_events_not_for_sale)
222
+ validator = EnumAttributeValidator.new('String', ["default", "override"])
223
+ unless validator.valid?(new_events_not_for_sale)
224
+ fail ArgumentError, "invalid value for \"new_events_not_for_sale\", must be one of #{validator.allowable_values}."
225
+ end
226
+ @new_events_not_for_sale = new_events_not_for_sale
227
+ end
228
+
202
229
  # Checks equality by comparing each attribute.
203
230
  # @param [Object] Object to be compared
204
231
  def ==(o)
@@ -207,7 +234,8 @@ module SeatsChart
207
234
  hold_period_minutes == o.hold_period_minutes &&
208
235
  max_seats_per_hold_token == o.max_seats_per_hold_token &&
209
236
  ticket_buyer_validation == o.ticket_buyer_validation &&
210
- ga_places_to_channels == o.ga_places_to_channels
237
+ ga_places_to_channels == o.ga_places_to_channels &&
238
+ new_events_not_for_sale == o.new_events_not_for_sale
211
239
  end
212
240
 
213
241
  # @see the `==` method
@@ -219,7 +247,7 @@ module SeatsChart
219
247
  # Calculates hash code according to all attributes.
220
248
  # @return [Integer] Hash code
221
249
  def hash
222
- [hold_period_minutes, max_seats_per_hold_token, ticket_buyer_validation, ga_places_to_channels].hash
250
+ [hold_period_minutes, max_seats_per_hold_token, ticket_buyer_validation, ga_places_to_channels, new_events_not_for_sale].hash
223
251
  end
224
252
 
225
253
  # Builds the object from hash
@@ -41,6 +41,9 @@ module SeatsChart
41
41
  # Production workspace a test workspace was created from.
42
42
  attr_accessor :parent_workspace_id
43
43
 
44
+ # `sandbox` exactly when `isTest` (see `/sandboxes`).
45
+ attr_accessor :kind
46
+
44
47
  class EnumAttributeValidator
45
48
  attr_reader :datatype
46
49
  attr_reader :allowable_values
@@ -76,7 +79,8 @@ module SeatsChart
76
79
  :'is_current' => :'isCurrent',
77
80
  :'is_default' => :'isDefault',
78
81
  :'is_test' => :'isTest',
79
- :'parent_workspace_id' => :'parentWorkspaceId'
82
+ :'parent_workspace_id' => :'parentWorkspaceId',
83
+ :'kind' => :'kind'
80
84
  }
81
85
  end
82
86
 
@@ -98,7 +102,8 @@ module SeatsChart
98
102
  :'is_current' => :'Boolean',
99
103
  :'is_default' => :'Boolean',
100
104
  :'is_test' => :'Boolean',
101
- :'parent_workspace_id' => :'String'
105
+ :'parent_workspace_id' => :'String',
106
+ :'kind' => :'String'
102
107
  }
103
108
  end
104
109
 
@@ -106,7 +111,7 @@ module SeatsChart
106
111
  def self.openapi_nullable
107
112
  Set.new([
108
113
  :'deactivated_at',
109
- :'parent_workspace_id'
114
+ :'parent_workspace_id',
110
115
  ])
111
116
  end
112
117
 
@@ -190,6 +195,12 @@ module SeatsChart
190
195
  else
191
196
  self.parent_workspace_id = nil
192
197
  end
198
+
199
+ if attributes.key?(:'kind')
200
+ self.kind = attributes[:'kind']
201
+ else
202
+ self.kind = nil
203
+ end
193
204
  end
194
205
 
195
206
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -233,6 +244,10 @@ module SeatsChart
233
244
  invalid_properties.push('invalid value for "is_test", is_test cannot be nil.')
234
245
  end
235
246
 
247
+ if @kind.nil?
248
+ invalid_properties.push('invalid value for "kind", kind cannot be nil.')
249
+ end
250
+
236
251
  invalid_properties
237
252
  end
238
253
 
@@ -253,6 +268,9 @@ module SeatsChart
253
268
  return false if @is_current.nil?
254
269
  return false if @is_default.nil?
255
270
  return false if @is_test.nil?
271
+ return false if @kind.nil?
272
+ kind_validator = EnumAttributeValidator.new('String', ["production", "sandbox"])
273
+ return false unless kind_validator.valid?(@kind)
256
274
  true
257
275
  end
258
276
 
@@ -276,6 +294,16 @@ module SeatsChart
276
294
  @status = status
277
295
  end
278
296
 
297
+ # Custom attribute writer method checking allowed values (enum).
298
+ # @param [Object] kind Object to be assigned
299
+ def kind=(kind)
300
+ validator = EnumAttributeValidator.new('String', ["production", "sandbox"])
301
+ unless validator.valid?(kind)
302
+ fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
303
+ end
304
+ @kind = kind
305
+ end
306
+
279
307
  # Checks equality by comparing each attribute.
280
308
  # @param [Object] Object to be compared
281
309
  def ==(o)
@@ -291,7 +319,8 @@ module SeatsChart
291
319
  is_current == o.is_current &&
292
320
  is_default == o.is_default &&
293
321
  is_test == o.is_test &&
294
- parent_workspace_id == o.parent_workspace_id
322
+ parent_workspace_id == o.parent_workspace_id &&
323
+ kind == o.kind
295
324
  end
296
325
 
297
326
  # @see the `==` method
@@ -303,7 +332,7 @@ module SeatsChart
303
332
  # Calculates hash code according to all attributes.
304
333
  # @return [Integer] Hash code
305
334
  def hash
306
- [workspace_id, display_name, role, plan_id, subscription_status, status, deactivated_at, is_current, is_default, is_test, parent_workspace_id].hash
335
+ [workspace_id, display_name, role, plan_id, subscription_status, status, deactivated_at, is_current, is_default, is_test, parent_workspace_id, kind].hash
307
336
  end
308
337
 
309
338
  # Builds the object from hash
@@ -0,0 +1,379 @@
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 PatchApiEventsByEventIdListingsByListingIdRequest
18
+ attr_accessor :type
19
+
20
+ attr_accessor :objects
21
+
22
+ attr_accessor :sell_as_whole
23
+
24
+ attr_accessor :price_cents
25
+
26
+ attr_accessor :total_price_cents
27
+
28
+ # Partner data (≤ 4 KiB JSON), returned as is.
29
+ attr_accessor :partner_metadata
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'type' => :'type',
35
+ :'objects' => :'objects',
36
+ :'sell_as_whole' => :'sellAsWhole',
37
+ :'price_cents' => :'priceCents',
38
+ :'total_price_cents' => :'totalPriceCents',
39
+ :'partner_metadata' => :'partnerMetadata'
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
+ :'type' => :'String',
52
+ :'objects' => :'Array<PostApiEventsByEventIdListingsRequestObjectsInner>',
53
+ :'sell_as_whole' => :'Boolean',
54
+ :'price_cents' => :'Integer',
55
+ :'total_price_cents' => :'Integer',
56
+ :'partner_metadata' => :'Hash<String, Object>'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ :'type',
64
+ :'price_cents',
65
+ :'total_price_cents',
66
+ :'partner_metadata'
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PatchApiEventsByEventIdListingsByListingIdRequest` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!self.class.attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PatchApiEventsByEventIdListingsByListingIdRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'type')
86
+ self.type = attributes[:'type']
87
+ end
88
+
89
+ if attributes.key?(:'objects')
90
+ if (value = attributes[:'objects']).is_a?(Array)
91
+ self.objects = value
92
+ end
93
+ end
94
+
95
+ if attributes.key?(:'sell_as_whole')
96
+ self.sell_as_whole = attributes[:'sell_as_whole']
97
+ end
98
+
99
+ if attributes.key?(:'price_cents')
100
+ self.price_cents = attributes[:'price_cents']
101
+ end
102
+
103
+ if attributes.key?(:'total_price_cents')
104
+ self.total_price_cents = attributes[:'total_price_cents']
105
+ end
106
+
107
+ if attributes.key?(:'partner_metadata')
108
+ if (value = attributes[:'partner_metadata']).is_a?(Hash)
109
+ self.partner_metadata = value
110
+ end
111
+ end
112
+ end
113
+
114
+ # Show invalid properties with the reasons. Usually used together with valid?
115
+ # @return Array for valid properties with the reasons
116
+ def list_invalid_properties
117
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
118
+ invalid_properties = Array.new
119
+ if !@type.nil? && @type.to_s.length > 64
120
+ invalid_properties.push('invalid value for "type", the character length must be smaller than or equal to 64.')
121
+ end
122
+
123
+ if !@type.nil? && @type.to_s.length < 1
124
+ invalid_properties.push('invalid value for "type", the character length must be great than or equal to 1.')
125
+ end
126
+
127
+ pattern = Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
128
+ if !@type.nil? && @type !~ pattern
129
+ invalid_properties.push("invalid value for \"type\", must conform to the pattern #{pattern}.")
130
+ end
131
+
132
+ if !@objects.nil? && @objects.length > 50
133
+ invalid_properties.push('invalid value for "objects", number of items must be less than or equal to 50.')
134
+ end
135
+
136
+ if !@objects.nil? && @objects.length < 1
137
+ invalid_properties.push('invalid value for "objects", number of items must be greater than or equal to 1.')
138
+ end
139
+
140
+ if !@price_cents.nil? && @price_cents > 99999999
141
+ invalid_properties.push('invalid value for "price_cents", must be smaller than or equal to 99999999.')
142
+ end
143
+
144
+ if !@price_cents.nil? && @price_cents < 0
145
+ invalid_properties.push('invalid value for "price_cents", must be greater than or equal to 0.')
146
+ end
147
+
148
+ if !@total_price_cents.nil? && @total_price_cents > 99999999
149
+ invalid_properties.push('invalid value for "total_price_cents", must be smaller than or equal to 99999999.')
150
+ end
151
+
152
+ if !@total_price_cents.nil? && @total_price_cents < 0
153
+ invalid_properties.push('invalid value for "total_price_cents", must be greater than or equal to 0.')
154
+ end
155
+
156
+ invalid_properties
157
+ end
158
+
159
+ # Check to see if the all the properties in the model are valid
160
+ # @return true if the model is valid
161
+ def valid?
162
+ warn '[DEPRECATED] the `valid?` method is obsolete'
163
+ return false if !@type.nil? && @type.to_s.length > 64
164
+ return false if !@type.nil? && @type.to_s.length < 1
165
+ return false if !@type.nil? && @type !~ Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
166
+ return false if !@objects.nil? && @objects.length > 50
167
+ return false if !@objects.nil? && @objects.length < 1
168
+ return false if !@price_cents.nil? && @price_cents > 99999999
169
+ return false if !@price_cents.nil? && @price_cents < 0
170
+ return false if !@total_price_cents.nil? && @total_price_cents > 99999999
171
+ return false if !@total_price_cents.nil? && @total_price_cents < 0
172
+ true
173
+ end
174
+
175
+ # Custom attribute writer method with validation
176
+ # @param [Object] type Value to be assigned
177
+ def type=(type)
178
+ if !type.nil? && type.to_s.length > 64
179
+ fail ArgumentError, 'invalid value for "type", the character length must be smaller than or equal to 64.'
180
+ end
181
+
182
+ if !type.nil? && type.to_s.length < 1
183
+ fail ArgumentError, 'invalid value for "type", the character length must be great than or equal to 1.'
184
+ end
185
+
186
+ pattern = Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
187
+ if !type.nil? && type !~ pattern
188
+ fail ArgumentError, "invalid value for \"type\", must conform to the pattern #{pattern}."
189
+ end
190
+
191
+ @type = type
192
+ end
193
+
194
+ # Custom attribute writer method with validation
195
+ # @param [Object] objects Value to be assigned
196
+ def objects=(objects)
197
+ if objects.nil?
198
+ fail ArgumentError, 'objects cannot be nil'
199
+ end
200
+
201
+ if objects.length > 50
202
+ fail ArgumentError, 'invalid value for "objects", number of items must be less than or equal to 50.'
203
+ end
204
+
205
+ if objects.length < 1
206
+ fail ArgumentError, 'invalid value for "objects", number of items must be greater than or equal to 1.'
207
+ end
208
+
209
+ @objects = objects
210
+ end
211
+
212
+ # Custom attribute writer method with validation
213
+ # @param [Object] price_cents Value to be assigned
214
+ def price_cents=(price_cents)
215
+ if !price_cents.nil? && price_cents > 99999999
216
+ fail ArgumentError, 'invalid value for "price_cents", must be smaller than or equal to 99999999.'
217
+ end
218
+
219
+ if !price_cents.nil? && price_cents < 0
220
+ fail ArgumentError, 'invalid value for "price_cents", must be greater than or equal to 0.'
221
+ end
222
+
223
+ @price_cents = price_cents
224
+ end
225
+
226
+ # Custom attribute writer method with validation
227
+ # @param [Object] total_price_cents Value to be assigned
228
+ def total_price_cents=(total_price_cents)
229
+ if !total_price_cents.nil? && total_price_cents > 99999999
230
+ fail ArgumentError, 'invalid value for "total_price_cents", must be smaller than or equal to 99999999.'
231
+ end
232
+
233
+ if !total_price_cents.nil? && total_price_cents < 0
234
+ fail ArgumentError, 'invalid value for "total_price_cents", must be greater than or equal to 0.'
235
+ end
236
+
237
+ @total_price_cents = total_price_cents
238
+ end
239
+
240
+ # Checks equality by comparing each attribute.
241
+ # @param [Object] Object to be compared
242
+ def ==(o)
243
+ return true if self.equal?(o)
244
+ self.class == o.class &&
245
+ type == o.type &&
246
+ objects == o.objects &&
247
+ sell_as_whole == o.sell_as_whole &&
248
+ price_cents == o.price_cents &&
249
+ total_price_cents == o.total_price_cents &&
250
+ partner_metadata == o.partner_metadata
251
+ end
252
+
253
+ # @see the `==` method
254
+ # @param [Object] Object to be compared
255
+ def eql?(o)
256
+ self == o
257
+ end
258
+
259
+ # Calculates hash code according to all attributes.
260
+ # @return [Integer] Hash code
261
+ def hash
262
+ [type, objects, sell_as_whole, price_cents, total_price_cents, partner_metadata].hash
263
+ end
264
+
265
+ # Builds the object from hash
266
+ # @param [Hash] attributes Model attributes in the form of hash
267
+ # @return [Object] Returns the model itself
268
+ def self.build_from_hash(attributes)
269
+ return nil unless attributes.is_a?(Hash)
270
+ attributes = attributes.transform_keys(&:to_sym)
271
+ transformed_hash = {}
272
+ openapi_types.each_pair do |key, type|
273
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
274
+ transformed_hash["#{key}"] = nil
275
+ elsif type =~ /\AArray<(.*)>/i
276
+ # check to ensure the input is an array given that the attribute
277
+ # is documented as an array but the input is not
278
+ if attributes[attribute_map[key]].is_a?(Array)
279
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
280
+ end
281
+ elsif !attributes[attribute_map[key]].nil?
282
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
283
+ end
284
+ end
285
+ new(transformed_hash)
286
+ end
287
+
288
+ # Deserializes the data based on type
289
+ # @param string type Data type
290
+ # @param string value Value to be deserialized
291
+ # @return [Object] Deserialized data
292
+ def self._deserialize(type, value)
293
+ case type.to_sym
294
+ when :Time
295
+ Time.parse(value)
296
+ when :Date
297
+ Date.parse(value)
298
+ when :String
299
+ value.to_s
300
+ when :Integer
301
+ value.to_i
302
+ when :Float
303
+ value.to_f
304
+ when :Boolean
305
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
306
+ true
307
+ else
308
+ false
309
+ end
310
+ when :Object
311
+ # generic object (usually a Hash), return directly
312
+ value
313
+ when /\AArray<(?<inner_type>.+)>\z/
314
+ inner_type = Regexp.last_match[:inner_type]
315
+ value.map { |v| _deserialize(inner_type, v) }
316
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
317
+ k_type = Regexp.last_match[:k_type]
318
+ v_type = Regexp.last_match[:v_type]
319
+ {}.tap do |hash|
320
+ value.each do |k, v|
321
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
322
+ end
323
+ end
324
+ else # model
325
+ # models (e.g. Pet) or oneOf
326
+ klass = SeatsChart.const_get(type)
327
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
328
+ end
329
+ end
330
+
331
+ # Returns the string representation of the object
332
+ # @return [String] String presentation of the object
333
+ def to_s
334
+ to_hash.to_s
335
+ end
336
+
337
+ # to_body is an alias to to_hash (backward compatibility)
338
+ # @return [Hash] Returns the object in the form of hash
339
+ def to_body
340
+ to_hash
341
+ end
342
+
343
+ # Returns the object in the form of hash
344
+ # @return [Hash] Returns the object in the form of hash
345
+ def to_hash
346
+ hash = {}
347
+ self.class.attribute_map.each_pair do |attr, param|
348
+ value = self.send(attr)
349
+ if value.nil?
350
+ is_nullable = self.class.openapi_nullable.include?(attr)
351
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
352
+ end
353
+
354
+ hash[param] = _to_hash(value)
355
+ end
356
+ hash
357
+ end
358
+
359
+ # Outputs non-array value in the form of hash
360
+ # For object, use to_hash. Otherwise, just return the value
361
+ # @param [Object] value Any valid value
362
+ # @return [Hash] Returns the value in the form of hash
363
+ def _to_hash(value)
364
+ if value.is_a?(Array)
365
+ value.compact.map { |v| _to_hash(v) }
366
+ elsif value.is_a?(Hash)
367
+ {}.tap do |hash|
368
+ value.each { |k, v| hash[k] = _to_hash(v) }
369
+ end
370
+ elsif value.respond_to? :to_hash
371
+ value.to_hash
372
+ else
373
+ value
374
+ end
375
+ end
376
+
377
+ end
378
+
379
+ end
@@ -41,6 +41,9 @@ module SeatsChart
41
41
  # Object label (seat label or GA area name) → category key (event category key, chart category id or name). Replaces the map; null clears.
42
42
  attr_accessor :object_categories
43
43
 
44
+ # Chart switch only: withdraw the active listings whose objects have no counterpart in the target chart, in the same transaction (409 `listing_has_holds` while any of their objects is held). Without it such a switch is refused with 409 `listing_objects_removed` (`listings`).
45
+ attr_accessor :withdraw_affected_listings
46
+
44
47
  # Attribute mapping from ruby-style variable name to JSON key.
45
48
  def self.attribute_map
46
49
  {
@@ -54,7 +57,8 @@ module SeatsChart
54
57
  :'key' => :'key',
55
58
  :'chart_id' => :'chartId',
56
59
  :'categories' => :'categories',
57
- :'object_categories' => :'objectCategories'
60
+ :'object_categories' => :'objectCategories',
61
+ :'withdraw_affected_listings' => :'withdrawAffectedListings'
58
62
  }
59
63
  end
60
64
 
@@ -75,8 +79,9 @@ module SeatsChart
75
79
  :'for_sale_per_category' => :'Hash<String, Boolean>',
76
80
  :'key' => :'String',
77
81
  :'chart_id' => :'String',
78
- :'categories' => :'Array<PatchApiEventsByEventIdRequestCategoriesInner>',
79
- :'object_categories' => :'Hash<String, String>'
82
+ :'categories' => :'Array<PostApiEventsRequestCategoriesInner>',
83
+ :'object_categories' => :'Hash<String, String>',
84
+ :'withdraw_affected_listings' => :'Boolean'
80
85
  }
81
86
  end
82
87
 
@@ -87,7 +92,7 @@ module SeatsChart
87
92
  :'category_overrides',
88
93
  :'key',
89
94
  :'categories',
90
- :'object_categories'
95
+ :'object_categories',
91
96
  ])
92
97
  end
93
98
 
@@ -157,6 +162,10 @@ module SeatsChart
157
162
  self.object_categories = value
158
163
  end
159
164
  end
165
+
166
+ if attributes.key?(:'withdraw_affected_listings')
167
+ self.withdraw_affected_listings = attributes[:'withdraw_affected_listings']
168
+ end
160
169
  end
161
170
 
162
171
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -316,7 +325,8 @@ module SeatsChart
316
325
  key == o.key &&
317
326
  chart_id == o.chart_id &&
318
327
  categories == o.categories &&
319
- object_categories == o.object_categories
328
+ object_categories == o.object_categories &&
329
+ withdraw_affected_listings == o.withdraw_affected_listings
320
330
  end
321
331
 
322
332
  # @see the `==` method
@@ -328,7 +338,7 @@ module SeatsChart
328
338
  # Calculates hash code according to all attributes.
329
339
  # @return [Integer] Hash code
330
340
  def hash
331
- [is_in_the_past, name, currency, date, table_booking_config, category_overrides, for_sale_per_category, key, chart_id, categories, object_categories].hash
341
+ [is_in_the_past, name, currency, date, table_booking_config, category_overrides, for_sale_per_category, key, chart_id, categories, object_categories, withdraw_affected_listings].hash
332
342
  end
333
343
 
334
344
  # Builds the object from hash