seatschart 0.1.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 (168) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +552 -0
  4. data/lib/seatschart/api/api_keys_api.rb +364 -0
  5. data/lib/seatschart/api/assets_api.rb +95 -0
  6. data/lib/seatschart/api/audit_api.rb +88 -0
  7. data/lib/seatschart/api/auth_api.rb +1187 -0
  8. data/lib/seatschart/api/billing_api.rb +355 -0
  9. data/lib/seatschart/api/charts_api.rb +4195 -0
  10. data/lib/seatschart/api/default_api.rb +763 -0
  11. data/lib/seatschart/api/embed_api.rb +407 -0
  12. data/lib/seatschart/api/embed_origins_api.rb +281 -0
  13. data/lib/seatschart/api/event_log_api.rb +148 -0
  14. data/lib/seatschart/api/events_api.rb +6608 -0
  15. data/lib/seatschart/api/health_api.rb +77 -0
  16. data/lib/seatschart/api/map_designer_api.rb +135 -0
  17. data/lib/seatschart/api/object_status_api.rb +805 -0
  18. data/lib/seatschart/api/orders_api.rb +166 -0
  19. data/lib/seatschart/api/public_api.rb +455 -0
  20. data/lib/seatschart/api/quotes_api.rb +103 -0
  21. data/lib/seatschart/api/seasons_api.rb +5543 -0
  22. data/lib/seatschart/api/seats_api.rb +1103 -0
  23. data/lib/seatschart/api/sse_api.rb +83 -0
  24. data/lib/seatschart/api/team_api.rb +428 -0
  25. data/lib/seatschart/api/usage_api.rb +540 -0
  26. data/lib/seatschart/api/webhooks_api.rb +771 -0
  27. data/lib/seatschart/api/workspace_api.rb +1244 -0
  28. data/lib/seatschart/api_client.rb +394 -0
  29. data/lib/seatschart/api_error.rb +58 -0
  30. data/lib/seatschart/configuration.rb +316 -0
  31. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id200_response.rb +283 -0
  32. data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response.rb +247 -0
  33. data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner.rb +473 -0
  34. data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner_published_by.rb +280 -0
  35. data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response.rb +247 -0
  36. data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response_items_inner.rb +444 -0
  37. data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response.rb +267 -0
  38. data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response_views_value.rb +273 -0
  39. data/lib/seatschart/models/get_api_events_by_event_id_seat_views404_response.rb +237 -0
  40. data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +388 -0
  41. data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes.rb +237 -0
  42. data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes_sales.rb +256 -0
  43. data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +286 -0
  44. data/lib/seatschart/models/get_api_workspace_integration200_response.rb +287 -0
  45. data/lib/seatschart/models/get_api_workspace_settings200_response.rb +329 -0
  46. data/lib/seatschart/models/get_api_workspace_settings200_response_bounds.rb +237 -0
  47. data/lib/seatschart/models/get_api_workspace_settings200_response_bounds_hold_period_minutes.rb +237 -0
  48. data/lib/seatschart/models/get_api_workspace_settings200_response_effective.rb +269 -0
  49. data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +241 -0
  50. data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +339 -0
  51. data/lib/seatschart/models/get_api_workspaces200_response.rb +223 -0
  52. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +423 -0
  53. data/lib/seatschart/models/patch_api_charts_by_chart_id_categories_by_category_id_request.rb +304 -0
  54. data/lib/seatschart/models/patch_api_charts_by_chart_id_request.rb +288 -0
  55. data/lib/seatschart/models/patch_api_events_by_event_id_inventory_channels_by_channel_key_id_request.rb +272 -0
  56. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +448 -0
  57. data/lib/seatschart/models/patch_api_events_by_event_id_request_categories_inner.rb +343 -0
  58. data/lib/seatschart/models/patch_api_events_by_event_id_request_table_booking_config.rb +266 -0
  59. data/lib/seatschart/models/patch_api_keys_by_id_request.rb +292 -0
  60. data/lib/seatschart/models/patch_api_seasons_by_season_id_events_by_event_id_request.rb +221 -0
  61. data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +276 -0
  62. data/lib/seatschart/models/patch_api_team_members_by_user_id_request.rb +255 -0
  63. data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +291 -0
  64. data/lib/seatschart/models/patch_api_workspace_chart_validation_request.rb +224 -0
  65. data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +543 -0
  66. data/lib/seatschart/models/patch_api_workspace_integration_request.rb +257 -0
  67. data/lib/seatschart/models/patch_api_workspace_request.rb +249 -0
  68. data/lib/seatschart/models/patch_api_workspace_settings_request.rb +307 -0
  69. data/lib/seatschart/models/post_api_auth2fa_disable_request.rb +281 -0
  70. data/lib/seatschart/models/post_api_auth2fa_enable_request.rb +250 -0
  71. data/lib/seatschart/models/post_api_auth2fa_enroll_confirm_request.rb +295 -0
  72. data/lib/seatschart/models/post_api_auth2fa_enroll_start_request.rb +250 -0
  73. data/lib/seatschart/models/post_api_auth2fa_verify_request.rb +326 -0
  74. data/lib/seatschart/models/post_api_auth_accept_invite_request.rb +293 -0
  75. data/lib/seatschart/models/post_api_auth_login_request.rb +293 -0
  76. data/lib/seatschart/models/post_api_auth_logout_request.rb +242 -0
  77. data/lib/seatschart/models/post_api_auth_refresh_request.rb +292 -0
  78. data/lib/seatschart/models/post_api_auth_signup_request.rb +321 -0
  79. data/lib/seatschart/models/post_api_auth_switch_workspace_request.rb +249 -0
  80. data/lib/seatschart/models/post_api_billing_checkout_session_request.rb +249 -0
  81. data/lib/seatschart/models/post_api_billing_confirm_checkout_request.rb +249 -0
  82. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response.rb +221 -0
  83. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response_chart.rb +249 -0
  84. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +287 -0
  85. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +348 -0
  86. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner.rb +555 -0
  87. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner_accessibility.rb +356 -0
  88. data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request.rb +361 -0
  89. data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request_ticket_types_inner.rb +448 -0
  90. data/lib/seatschart/models/post_api_charts_by_chart_id_duplicate_request.rb +233 -0
  91. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response.rb +289 -0
  92. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +402 -0
  93. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +244 -0
  94. data/lib/seatschart/models/post_api_charts_by_chart_id_preview_link_request.rb +243 -0
  95. data/lib/seatschart/models/post_api_charts_by_chart_id_versions_by_version_actions_copy_request.rb +242 -0
  96. data/lib/seatschart/models/post_api_charts_request.rb +372 -0
  97. data/lib/seatschart/models/post_api_charts_request_categories_inner.rb +346 -0
  98. data/lib/seatschart/models/post_api_embed_origins_request.rb +249 -0
  99. data/lib/seatschart/models/post_api_embed_tokens_request.rb +394 -0
  100. data/lib/seatschart/models/post_api_events_actions_change_object_status_request.rb +251 -0
  101. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner.rb +737 -0
  102. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner.rb +104 -0
  103. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner_any_of.rb +335 -0
  104. data/lib/seatschart/models/post_api_events_bulk_request.rb +332 -0
  105. data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +398 -0
  106. data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request.rb +824 -0
  107. data/lib/seatschart/models/post_api_events_by_event_id_actions_override_season_status_request.rb +272 -0
  108. data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request.rb +260 -0
  109. data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request_objects_inner.rb +263 -0
  110. data/lib/seatschart/models/post_api_events_by_event_id_actions_use_season_status_request.rb +252 -0
  111. data/lib/seatschart/models/post_api_events_by_event_id_duplicate_request.rb +261 -0
  112. data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_assign_request.rb +321 -0
  113. data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_request.rb +323 -0
  114. data/lib/seatschart/models/post_api_events_by_event_id_inventory_for_sale_apply_request.rb +333 -0
  115. data/lib/seatschart/models/post_api_events_by_event_id_objects_actions_retrieve_request.rb +252 -0
  116. data/lib/seatschart/models/post_api_events_request.rb +502 -0
  117. data/lib/seatschart/models/post_api_events_request_category_overrides_value.rb +276 -0
  118. data/lib/seatschart/models/post_api_events_request_channels_inner.rb +360 -0
  119. data/lib/seatschart/models/post_api_events_request_for_sale_config.rb +295 -0
  120. data/lib/seatschart/models/post_api_events_request_table_booking_config.rb +267 -0
  121. data/lib/seatschart/models/post_api_extract_seats_request.rb +279 -0
  122. data/lib/seatschart/models/post_api_ga_confirm409_response.rb +271 -0
  123. data/lib/seatschart/models/post_api_ga_confirm_request.rb +687 -0
  124. data/lib/seatschart/models/post_api_ga_release_request.rb +385 -0
  125. data/lib/seatschart/models/post_api_ga_reserve_request.rb +527 -0
  126. data/lib/seatschart/models/post_api_hold_tokens_by_token_request.rb +249 -0
  127. data/lib/seatschart/models/post_api_hold_tokens_request.rb +391 -0
  128. data/lib/seatschart/models/post_api_keys_request.rb +299 -0
  129. data/lib/seatschart/models/post_api_orders_by_order_id_cancel_request.rb +249 -0
  130. data/lib/seatschart/models/post_api_quotes_request.rb +351 -0
  131. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_add_events_request.rb +261 -0
  132. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request.rb +322 -0
  133. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request_events_inner.rb +289 -0
  134. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_remove_events_request.rb +251 -0
  135. data/lib/seatschart/models/post_api_seasons_by_season_id_events_request.rb +267 -0
  136. data/lib/seatschart/models/post_api_seasons_by_season_id_inventory_sync_request.rb +235 -0
  137. data/lib/seatschart/models/post_api_seasons_by_season_id_partial_seasons_request.rb +279 -0
  138. data/lib/seatschart/models/post_api_seasons_request.rb +395 -0
  139. data/lib/seatschart/models/post_api_seats_best_available_request.rb +809 -0
  140. data/lib/seatschart/models/post_api_seats_confirm409_response.rb +271 -0
  141. data/lib/seatschart/models/post_api_seats_confirm_request.rb +711 -0
  142. data/lib/seatschart/models/post_api_seats_holds_renew_request.rb +249 -0
  143. data/lib/seatschart/models/post_api_seats_release_request.rb +387 -0
  144. data/lib/seatschart/models/post_api_seats_reserve_request.rb +561 -0
  145. data/lib/seatschart/models/post_api_team_invitations_request.rb +299 -0
  146. data/lib/seatschart/models/post_api_ticket_buyers_request.rb +252 -0
  147. data/lib/seatschart/models/post_api_viewer_tokens_request.rb +292 -0
  148. data/lib/seatschart/models/post_api_webhooks_request.rb +298 -0
  149. data/lib/seatschart/models/post_api_workspaces_request.rb +269 -0
  150. data/lib/seatschart/models/put_api_charts_by_chart_id_tags_request.rb +243 -0
  151. data/lib/seatschart/models/put_api_charts_by_chart_id_versions_by_version_thumbnail_request.rb +261 -0
  152. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request.rb +242 -0
  153. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request_channels_inner.rb +405 -0
  154. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request.rb +242 -0
  155. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request_assignments_inner.rb +320 -0
  156. data/lib/seatschart/models/put_api_events_by_event_id_inventory_for_sale_request.rb +333 -0
  157. data/lib/seatschart/models/put_api_events_by_event_id_pricing_request.rb +297 -0
  158. data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner.rb +295 -0
  159. data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner_ticket_types_inner.rb +425 -0
  160. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request.rb +320 -0
  161. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_buyer_limit.rb +259 -0
  162. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner.rb +374 -0
  163. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner_lots_inner.rb +364 -0
  164. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_quotas_inner.rb +418 -0
  165. data/lib/seatschart/retry.rb +118 -0
  166. data/lib/seatschart/version.rb +15 -0
  167. data/lib/seatschart.rb +198 -0
  168. metadata +254 -0
@@ -0,0 +1,809 @@
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 PostApiSeatsBestAvailableRequest
18
+ attr_accessor :event_id
19
+
20
+ attr_accessor :quantity
21
+
22
+ attr_accessor :category
23
+
24
+ attr_accessor :categories
25
+
26
+ attr_accessor :ticket_types
27
+
28
+ attr_accessor :section_id
29
+
30
+ # Layout section ids or names; the candidate pool is the union of their seats (XOR with sectionId).
31
+ attr_accessor :sections
32
+
33
+ # API keys only: channel secret keys or channel ids whose seats may be picked (public seats always can).
34
+ attr_accessor :channel_keys
35
+
36
+ # API keys only: pick from every channel.
37
+ attr_accessor :ignore_channels
38
+
39
+ # Requires hold: partner order reference stored on the held seats (extraData.orderId) and echoed back.
40
+ attr_accessor :order_id
41
+
42
+ # Layout zone id or name.
43
+ attr_accessor :zone
44
+
45
+ attr_accessor :channel
46
+
47
+ attr_accessor :prefer_adjacent
48
+
49
+ attr_accessor :try_to_prevent_orphan_seats
50
+
51
+ attr_accessor :accessible_seats
52
+
53
+ attr_accessor :hold
54
+
55
+ attr_accessor :hold_token
56
+
57
+ attr_accessor :extra_data
58
+
59
+ attr_accessor :user_id
60
+
61
+ # `booked`: book the best window directly (API keys with the bookings scope / dashboard); `reservedByToken`: same as hold: true.
62
+ attr_accessor :status
63
+
64
+ # Keep the seats' stored extraData; extraData / orderId are merged on top.
65
+ attr_accessor :keep_extra_data
66
+
67
+ class EnumAttributeValidator
68
+ attr_reader :datatype
69
+ attr_reader :allowable_values
70
+
71
+ def initialize(datatype, allowable_values)
72
+ @allowable_values = allowable_values.map do |value|
73
+ case datatype.to_s
74
+ when /Integer/i
75
+ value.to_i
76
+ when /Float/i
77
+ value.to_f
78
+ else
79
+ value
80
+ end
81
+ end
82
+ end
83
+
84
+ def valid?(value)
85
+ !value || allowable_values.include?(value)
86
+ end
87
+ end
88
+
89
+ # Attribute mapping from ruby-style variable name to JSON key.
90
+ def self.attribute_map
91
+ {
92
+ :'event_id' => :'eventId',
93
+ :'quantity' => :'quantity',
94
+ :'category' => :'category',
95
+ :'categories' => :'categories',
96
+ :'ticket_types' => :'ticketTypes',
97
+ :'section_id' => :'sectionId',
98
+ :'sections' => :'sections',
99
+ :'channel_keys' => :'channelKeys',
100
+ :'ignore_channels' => :'ignoreChannels',
101
+ :'order_id' => :'orderId',
102
+ :'zone' => :'zone',
103
+ :'channel' => :'channel',
104
+ :'prefer_adjacent' => :'preferAdjacent',
105
+ :'try_to_prevent_orphan_seats' => :'tryToPreventOrphanSeats',
106
+ :'accessible_seats' => :'accessibleSeats',
107
+ :'hold' => :'hold',
108
+ :'hold_token' => :'holdToken',
109
+ :'extra_data' => :'extraData',
110
+ :'user_id' => :'userId',
111
+ :'status' => :'status',
112
+ :'keep_extra_data' => :'keepExtraData'
113
+ }
114
+ end
115
+
116
+ # Returns all the JSON keys this model knows about
117
+ def self.acceptable_attributes
118
+ attribute_map.values
119
+ end
120
+
121
+ # Attribute type mapping.
122
+ def self.openapi_types
123
+ {
124
+ :'event_id' => :'String',
125
+ :'quantity' => :'Integer',
126
+ :'category' => :'String',
127
+ :'categories' => :'Array<String>',
128
+ :'ticket_types' => :'Hash<String, Integer>',
129
+ :'section_id' => :'String',
130
+ :'sections' => :'Array<String>',
131
+ :'channel_keys' => :'Array<String>',
132
+ :'ignore_channels' => :'Boolean',
133
+ :'order_id' => :'String',
134
+ :'zone' => :'String',
135
+ :'channel' => :'String',
136
+ :'prefer_adjacent' => :'Boolean',
137
+ :'try_to_prevent_orphan_seats' => :'Boolean',
138
+ :'accessible_seats' => :'Integer',
139
+ :'hold' => :'Boolean',
140
+ :'hold_token' => :'String',
141
+ :'extra_data' => :'Hash<String, Object>',
142
+ :'user_id' => :'String',
143
+ :'status' => :'String',
144
+ :'keep_extra_data' => :'Boolean'
145
+ }
146
+ end
147
+
148
+ # List of attributes with nullable: true
149
+ def self.openapi_nullable
150
+ Set.new([
151
+ :'category',
152
+ :'section_id',
153
+ :'zone',
154
+ ])
155
+ end
156
+
157
+ # Initializes the object
158
+ # @param [Hash] attributes Model attributes in the form of hash
159
+ def initialize(attributes = {})
160
+ if (!attributes.is_a?(Hash))
161
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiSeatsBestAvailableRequest` initialize method"
162
+ end
163
+
164
+ # check to see if the attribute exists and convert string to symbol for hash key
165
+ attributes = attributes.each_with_object({}) { |(k, v), h|
166
+ if (!self.class.attribute_map.key?(k.to_sym))
167
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiSeatsBestAvailableRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
168
+ end
169
+ h[k.to_sym] = v
170
+ }
171
+
172
+ if attributes.key?(:'event_id')
173
+ self.event_id = attributes[:'event_id']
174
+ else
175
+ self.event_id = nil
176
+ end
177
+
178
+ if attributes.key?(:'quantity')
179
+ self.quantity = attributes[:'quantity']
180
+ end
181
+
182
+ if attributes.key?(:'category')
183
+ self.category = attributes[:'category']
184
+ end
185
+
186
+ if attributes.key?(:'categories')
187
+ if (value = attributes[:'categories']).is_a?(Array)
188
+ self.categories = value
189
+ end
190
+ end
191
+
192
+ if attributes.key?(:'ticket_types')
193
+ if (value = attributes[:'ticket_types']).is_a?(Hash)
194
+ self.ticket_types = value
195
+ end
196
+ end
197
+
198
+ if attributes.key?(:'section_id')
199
+ self.section_id = attributes[:'section_id']
200
+ end
201
+
202
+ if attributes.key?(:'sections')
203
+ if (value = attributes[:'sections']).is_a?(Array)
204
+ self.sections = value
205
+ end
206
+ end
207
+
208
+ if attributes.key?(:'channel_keys')
209
+ if (value = attributes[:'channel_keys']).is_a?(Array)
210
+ self.channel_keys = value
211
+ end
212
+ end
213
+
214
+ if attributes.key?(:'ignore_channels')
215
+ self.ignore_channels = attributes[:'ignore_channels']
216
+ end
217
+
218
+ if attributes.key?(:'order_id')
219
+ self.order_id = attributes[:'order_id']
220
+ end
221
+
222
+ if attributes.key?(:'zone')
223
+ self.zone = attributes[:'zone']
224
+ end
225
+
226
+ if attributes.key?(:'channel')
227
+ self.channel = attributes[:'channel']
228
+ end
229
+
230
+ if attributes.key?(:'prefer_adjacent')
231
+ self.prefer_adjacent = attributes[:'prefer_adjacent']
232
+ end
233
+
234
+ if attributes.key?(:'try_to_prevent_orphan_seats')
235
+ self.try_to_prevent_orphan_seats = attributes[:'try_to_prevent_orphan_seats']
236
+ end
237
+
238
+ if attributes.key?(:'accessible_seats')
239
+ self.accessible_seats = attributes[:'accessible_seats']
240
+ end
241
+
242
+ if attributes.key?(:'hold')
243
+ self.hold = attributes[:'hold']
244
+ end
245
+
246
+ if attributes.key?(:'hold_token')
247
+ self.hold_token = attributes[:'hold_token']
248
+ end
249
+
250
+ if attributes.key?(:'extra_data')
251
+ if (value = attributes[:'extra_data']).is_a?(Hash)
252
+ self.extra_data = value
253
+ end
254
+ end
255
+
256
+ if attributes.key?(:'user_id')
257
+ self.user_id = attributes[:'user_id']
258
+ end
259
+
260
+ if attributes.key?(:'status')
261
+ self.status = attributes[:'status']
262
+ end
263
+
264
+ if attributes.key?(:'keep_extra_data')
265
+ self.keep_extra_data = attributes[:'keep_extra_data']
266
+ end
267
+ end
268
+
269
+ # Show invalid properties with the reasons. Usually used together with valid?
270
+ # @return Array for valid properties with the reasons
271
+ def list_invalid_properties
272
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
273
+ invalid_properties = Array.new
274
+ if @event_id.nil?
275
+ invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
276
+ end
277
+
278
+ if @event_id.to_s.length > 36
279
+ invalid_properties.push('invalid value for "event_id", the character length must be smaller than or equal to 36.')
280
+ end
281
+
282
+ if @event_id.to_s.length < 36
283
+ invalid_properties.push('invalid value for "event_id", the character length must be great than or equal to 36.')
284
+ end
285
+
286
+ if !@quantity.nil? && @quantity > 64
287
+ invalid_properties.push('invalid value for "quantity", must be smaller than or equal to 64.')
288
+ end
289
+
290
+ if !@quantity.nil? && @quantity < 1
291
+ invalid_properties.push('invalid value for "quantity", must be greater than or equal to 1.')
292
+ end
293
+
294
+ if !@category.nil? && @category.to_s.length > 128
295
+ invalid_properties.push('invalid value for "category", the character length must be smaller than or equal to 128.')
296
+ end
297
+
298
+ if !@category.nil? && @category.to_s.length < 1
299
+ invalid_properties.push('invalid value for "category", the character length must be great than or equal to 1.')
300
+ end
301
+
302
+ if !@categories.nil? && @categories.length > 10
303
+ invalid_properties.push('invalid value for "categories", number of items must be less than or equal to 10.')
304
+ end
305
+
306
+ if !@categories.nil? && @categories.length < 1
307
+ invalid_properties.push('invalid value for "categories", number of items must be greater than or equal to 1.')
308
+ end
309
+
310
+ if !@section_id.nil? && @section_id.to_s.length > 128
311
+ invalid_properties.push('invalid value for "section_id", the character length must be smaller than or equal to 128.')
312
+ end
313
+
314
+ if !@section_id.nil? && @section_id.to_s.length < 1
315
+ invalid_properties.push('invalid value for "section_id", the character length must be great than or equal to 1.')
316
+ end
317
+
318
+ if !@sections.nil? && @sections.length > 20
319
+ invalid_properties.push('invalid value for "sections", number of items must be less than or equal to 20.')
320
+ end
321
+
322
+ if !@sections.nil? && @sections.length < 1
323
+ invalid_properties.push('invalid value for "sections", number of items must be greater than or equal to 1.')
324
+ end
325
+
326
+ if !@channel_keys.nil? && @channel_keys.length > 64
327
+ invalid_properties.push('invalid value for "channel_keys", number of items must be less than or equal to 64.')
328
+ end
329
+
330
+ if !@order_id.nil? && @order_id.to_s.length > 255
331
+ invalid_properties.push('invalid value for "order_id", the character length must be smaller than or equal to 255.')
332
+ end
333
+
334
+ if !@order_id.nil? && @order_id.to_s.length < 1
335
+ invalid_properties.push('invalid value for "order_id", the character length must be great than or equal to 1.')
336
+ end
337
+
338
+ if !@zone.nil? && @zone.to_s.length > 128
339
+ invalid_properties.push('invalid value for "zone", the character length must be smaller than or equal to 128.')
340
+ end
341
+
342
+ if !@zone.nil? && @zone.to_s.length < 1
343
+ invalid_properties.push('invalid value for "zone", the character length must be great than or equal to 1.')
344
+ end
345
+
346
+ if !@channel.nil? && @channel.to_s.length > 32
347
+ invalid_properties.push('invalid value for "channel", the character length must be smaller than or equal to 32.')
348
+ end
349
+
350
+ if !@channel.nil? && @channel.to_s.length < 1
351
+ invalid_properties.push('invalid value for "channel", the character length must be great than or equal to 1.')
352
+ end
353
+
354
+ if !@accessible_seats.nil? && @accessible_seats > 64
355
+ invalid_properties.push('invalid value for "accessible_seats", must be smaller than or equal to 64.')
356
+ end
357
+
358
+ if !@accessible_seats.nil? && @accessible_seats < 0
359
+ invalid_properties.push('invalid value for "accessible_seats", must be greater than or equal to 0.')
360
+ end
361
+
362
+ if !@hold_token.nil? && @hold_token.to_s.length > 36
363
+ invalid_properties.push('invalid value for "hold_token", the character length must be smaller than or equal to 36.')
364
+ end
365
+
366
+ if !@hold_token.nil? && @hold_token.to_s.length < 36
367
+ invalid_properties.push('invalid value for "hold_token", the character length must be great than or equal to 36.')
368
+ end
369
+
370
+ if !@user_id.nil? && @user_id.to_s.length > 256
371
+ invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 256.')
372
+ end
373
+
374
+ if !@user_id.nil? && @user_id.to_s.length < 1
375
+ invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.')
376
+ end
377
+
378
+ pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
379
+ if !@user_id.nil? && @user_id !~ pattern
380
+ invalid_properties.push("invalid value for \"user_id\", must conform to the pattern #{pattern}.")
381
+ end
382
+
383
+ invalid_properties
384
+ end
385
+
386
+ # Check to see if the all the properties in the model are valid
387
+ # @return true if the model is valid
388
+ def valid?
389
+ warn '[DEPRECATED] the `valid?` method is obsolete'
390
+ return false if @event_id.nil?
391
+ return false if @event_id.to_s.length > 36
392
+ return false if @event_id.to_s.length < 36
393
+ return false if !@quantity.nil? && @quantity > 64
394
+ return false if !@quantity.nil? && @quantity < 1
395
+ return false if !@category.nil? && @category.to_s.length > 128
396
+ return false if !@category.nil? && @category.to_s.length < 1
397
+ return false if !@categories.nil? && @categories.length > 10
398
+ return false if !@categories.nil? && @categories.length < 1
399
+ return false if !@section_id.nil? && @section_id.to_s.length > 128
400
+ return false if !@section_id.nil? && @section_id.to_s.length < 1
401
+ return false if !@sections.nil? && @sections.length > 20
402
+ return false if !@sections.nil? && @sections.length < 1
403
+ return false if !@channel_keys.nil? && @channel_keys.length > 64
404
+ return false if !@order_id.nil? && @order_id.to_s.length > 255
405
+ return false if !@order_id.nil? && @order_id.to_s.length < 1
406
+ return false if !@zone.nil? && @zone.to_s.length > 128
407
+ return false if !@zone.nil? && @zone.to_s.length < 1
408
+ return false if !@channel.nil? && @channel.to_s.length > 32
409
+ return false if !@channel.nil? && @channel.to_s.length < 1
410
+ return false if !@accessible_seats.nil? && @accessible_seats > 64
411
+ return false if !@accessible_seats.nil? && @accessible_seats < 0
412
+ return false if !@hold_token.nil? && @hold_token.to_s.length > 36
413
+ return false if !@hold_token.nil? && @hold_token.to_s.length < 36
414
+ return false if !@user_id.nil? && @user_id.to_s.length > 256
415
+ return false if !@user_id.nil? && @user_id.to_s.length < 1
416
+ return false if !@user_id.nil? && @user_id !~ Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
417
+ status_validator = EnumAttributeValidator.new('String', ["booked", "reservedByToken"])
418
+ return false unless status_validator.valid?(@status)
419
+ true
420
+ end
421
+
422
+ # Custom attribute writer method with validation
423
+ # @param [Object] event_id Value to be assigned
424
+ def event_id=(event_id)
425
+ if event_id.nil?
426
+ fail ArgumentError, 'event_id cannot be nil'
427
+ end
428
+
429
+ if event_id.to_s.length > 36
430
+ fail ArgumentError, 'invalid value for "event_id", the character length must be smaller than or equal to 36.'
431
+ end
432
+
433
+ if event_id.to_s.length < 36
434
+ fail ArgumentError, 'invalid value for "event_id", the character length must be great than or equal to 36.'
435
+ end
436
+
437
+ @event_id = event_id
438
+ end
439
+
440
+ # Custom attribute writer method with validation
441
+ # @param [Object] quantity Value to be assigned
442
+ def quantity=(quantity)
443
+ if quantity.nil?
444
+ fail ArgumentError, 'quantity cannot be nil'
445
+ end
446
+
447
+ if quantity > 64
448
+ fail ArgumentError, 'invalid value for "quantity", must be smaller than or equal to 64.'
449
+ end
450
+
451
+ if quantity < 1
452
+ fail ArgumentError, 'invalid value for "quantity", must be greater than or equal to 1.'
453
+ end
454
+
455
+ @quantity = quantity
456
+ end
457
+
458
+ # Custom attribute writer method with validation
459
+ # @param [Object] category Value to be assigned
460
+ def category=(category)
461
+ if !category.nil? && category.to_s.length > 128
462
+ fail ArgumentError, 'invalid value for "category", the character length must be smaller than or equal to 128.'
463
+ end
464
+
465
+ if !category.nil? && category.to_s.length < 1
466
+ fail ArgumentError, 'invalid value for "category", the character length must be great than or equal to 1.'
467
+ end
468
+
469
+ @category = category
470
+ end
471
+
472
+ # Custom attribute writer method with validation
473
+ # @param [Object] categories Value to be assigned
474
+ def categories=(categories)
475
+ if categories.nil?
476
+ fail ArgumentError, 'categories cannot be nil'
477
+ end
478
+
479
+ if categories.length > 10
480
+ fail ArgumentError, 'invalid value for "categories", number of items must be less than or equal to 10.'
481
+ end
482
+
483
+ if categories.length < 1
484
+ fail ArgumentError, 'invalid value for "categories", number of items must be greater than or equal to 1.'
485
+ end
486
+
487
+ @categories = categories
488
+ end
489
+
490
+ # Custom attribute writer method with validation
491
+ # @param [Object] section_id Value to be assigned
492
+ def section_id=(section_id)
493
+ if !section_id.nil? && section_id.to_s.length > 128
494
+ fail ArgumentError, 'invalid value for "section_id", the character length must be smaller than or equal to 128.'
495
+ end
496
+
497
+ if !section_id.nil? && section_id.to_s.length < 1
498
+ fail ArgumentError, 'invalid value for "section_id", the character length must be great than or equal to 1.'
499
+ end
500
+
501
+ @section_id = section_id
502
+ end
503
+
504
+ # Custom attribute writer method with validation
505
+ # @param [Object] sections Value to be assigned
506
+ def sections=(sections)
507
+ if sections.nil?
508
+ fail ArgumentError, 'sections cannot be nil'
509
+ end
510
+
511
+ if sections.length > 20
512
+ fail ArgumentError, 'invalid value for "sections", number of items must be less than or equal to 20.'
513
+ end
514
+
515
+ if sections.length < 1
516
+ fail ArgumentError, 'invalid value for "sections", number of items must be greater than or equal to 1.'
517
+ end
518
+
519
+ @sections = sections
520
+ end
521
+
522
+ # Custom attribute writer method with validation
523
+ # @param [Object] channel_keys Value to be assigned
524
+ def channel_keys=(channel_keys)
525
+ if channel_keys.nil?
526
+ fail ArgumentError, 'channel_keys cannot be nil'
527
+ end
528
+
529
+ if channel_keys.length > 64
530
+ fail ArgumentError, 'invalid value for "channel_keys", number of items must be less than or equal to 64.'
531
+ end
532
+
533
+ @channel_keys = channel_keys
534
+ end
535
+
536
+ # Custom attribute writer method with validation
537
+ # @param [Object] order_id Value to be assigned
538
+ def order_id=(order_id)
539
+ if order_id.nil?
540
+ fail ArgumentError, 'order_id cannot be nil'
541
+ end
542
+
543
+ if order_id.to_s.length > 255
544
+ fail ArgumentError, 'invalid value for "order_id", the character length must be smaller than or equal to 255.'
545
+ end
546
+
547
+ if order_id.to_s.length < 1
548
+ fail ArgumentError, 'invalid value for "order_id", the character length must be great than or equal to 1.'
549
+ end
550
+
551
+ @order_id = order_id
552
+ end
553
+
554
+ # Custom attribute writer method with validation
555
+ # @param [Object] zone Value to be assigned
556
+ def zone=(zone)
557
+ if !zone.nil? && zone.to_s.length > 128
558
+ fail ArgumentError, 'invalid value for "zone", the character length must be smaller than or equal to 128.'
559
+ end
560
+
561
+ if !zone.nil? && zone.to_s.length < 1
562
+ fail ArgumentError, 'invalid value for "zone", the character length must be great than or equal to 1.'
563
+ end
564
+
565
+ @zone = zone
566
+ end
567
+
568
+ # Custom attribute writer method with validation
569
+ # @param [Object] channel Value to be assigned
570
+ def channel=(channel)
571
+ if channel.nil?
572
+ fail ArgumentError, 'channel cannot be nil'
573
+ end
574
+
575
+ if channel.to_s.length > 32
576
+ fail ArgumentError, 'invalid value for "channel", the character length must be smaller than or equal to 32.'
577
+ end
578
+
579
+ if channel.to_s.length < 1
580
+ fail ArgumentError, 'invalid value for "channel", the character length must be great than or equal to 1.'
581
+ end
582
+
583
+ @channel = channel
584
+ end
585
+
586
+ # Custom attribute writer method with validation
587
+ # @param [Object] accessible_seats Value to be assigned
588
+ def accessible_seats=(accessible_seats)
589
+ if accessible_seats.nil?
590
+ fail ArgumentError, 'accessible_seats cannot be nil'
591
+ end
592
+
593
+ if accessible_seats > 64
594
+ fail ArgumentError, 'invalid value for "accessible_seats", must be smaller than or equal to 64.'
595
+ end
596
+
597
+ if accessible_seats < 0
598
+ fail ArgumentError, 'invalid value for "accessible_seats", must be greater than or equal to 0.'
599
+ end
600
+
601
+ @accessible_seats = accessible_seats
602
+ end
603
+
604
+ # Custom attribute writer method with validation
605
+ # @param [Object] hold_token Value to be assigned
606
+ def hold_token=(hold_token)
607
+ if hold_token.nil?
608
+ fail ArgumentError, 'hold_token cannot be nil'
609
+ end
610
+
611
+ if hold_token.to_s.length > 36
612
+ fail ArgumentError, 'invalid value for "hold_token", the character length must be smaller than or equal to 36.'
613
+ end
614
+
615
+ if hold_token.to_s.length < 36
616
+ fail ArgumentError, 'invalid value for "hold_token", the character length must be great than or equal to 36.'
617
+ end
618
+
619
+ @hold_token = hold_token
620
+ end
621
+
622
+ # Custom attribute writer method with validation
623
+ # @param [Object] user_id Value to be assigned
624
+ def user_id=(user_id)
625
+ if user_id.nil?
626
+ fail ArgumentError, 'user_id cannot be nil'
627
+ end
628
+
629
+ if user_id.to_s.length > 256
630
+ fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 256.'
631
+ end
632
+
633
+ if user_id.to_s.length < 1
634
+ fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.'
635
+ end
636
+
637
+ pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
638
+ if user_id !~ pattern
639
+ fail ArgumentError, "invalid value for \"user_id\", must conform to the pattern #{pattern}."
640
+ end
641
+
642
+ @user_id = user_id
643
+ end
644
+
645
+ # Custom attribute writer method checking allowed values (enum).
646
+ # @param [Object] status Object to be assigned
647
+ def status=(status)
648
+ validator = EnumAttributeValidator.new('String', ["booked", "reservedByToken"])
649
+ unless validator.valid?(status)
650
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
651
+ end
652
+ @status = status
653
+ end
654
+
655
+ # Checks equality by comparing each attribute.
656
+ # @param [Object] Object to be compared
657
+ def ==(o)
658
+ return true if self.equal?(o)
659
+ self.class == o.class &&
660
+ event_id == o.event_id &&
661
+ quantity == o.quantity &&
662
+ category == o.category &&
663
+ categories == o.categories &&
664
+ ticket_types == o.ticket_types &&
665
+ section_id == o.section_id &&
666
+ sections == o.sections &&
667
+ channel_keys == o.channel_keys &&
668
+ ignore_channels == o.ignore_channels &&
669
+ order_id == o.order_id &&
670
+ zone == o.zone &&
671
+ channel == o.channel &&
672
+ prefer_adjacent == o.prefer_adjacent &&
673
+ try_to_prevent_orphan_seats == o.try_to_prevent_orphan_seats &&
674
+ accessible_seats == o.accessible_seats &&
675
+ hold == o.hold &&
676
+ hold_token == o.hold_token &&
677
+ extra_data == o.extra_data &&
678
+ user_id == o.user_id &&
679
+ status == o.status &&
680
+ keep_extra_data == o.keep_extra_data
681
+ end
682
+
683
+ # @see the `==` method
684
+ # @param [Object] Object to be compared
685
+ def eql?(o)
686
+ self == o
687
+ end
688
+
689
+ # Calculates hash code according to all attributes.
690
+ # @return [Integer] Hash code
691
+ def hash
692
+ [event_id, quantity, category, categories, ticket_types, section_id, sections, channel_keys, ignore_channels, order_id, zone, channel, prefer_adjacent, try_to_prevent_orphan_seats, accessible_seats, hold, hold_token, extra_data, user_id, status, keep_extra_data].hash
693
+ end
694
+
695
+ # Builds the object from hash
696
+ # @param [Hash] attributes Model attributes in the form of hash
697
+ # @return [Object] Returns the model itself
698
+ def self.build_from_hash(attributes)
699
+ return nil unless attributes.is_a?(Hash)
700
+ attributes = attributes.transform_keys(&:to_sym)
701
+ transformed_hash = {}
702
+ openapi_types.each_pair do |key, type|
703
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
704
+ transformed_hash["#{key}"] = nil
705
+ elsif type =~ /\AArray<(.*)>/i
706
+ # check to ensure the input is an array given that the attribute
707
+ # is documented as an array but the input is not
708
+ if attributes[attribute_map[key]].is_a?(Array)
709
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
710
+ end
711
+ elsif !attributes[attribute_map[key]].nil?
712
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
713
+ end
714
+ end
715
+ new(transformed_hash)
716
+ end
717
+
718
+ # Deserializes the data based on type
719
+ # @param string type Data type
720
+ # @param string value Value to be deserialized
721
+ # @return [Object] Deserialized data
722
+ def self._deserialize(type, value)
723
+ case type.to_sym
724
+ when :Time
725
+ Time.parse(value)
726
+ when :Date
727
+ Date.parse(value)
728
+ when :String
729
+ value.to_s
730
+ when :Integer
731
+ value.to_i
732
+ when :Float
733
+ value.to_f
734
+ when :Boolean
735
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
736
+ true
737
+ else
738
+ false
739
+ end
740
+ when :Object
741
+ # generic object (usually a Hash), return directly
742
+ value
743
+ when /\AArray<(?<inner_type>.+)>\z/
744
+ inner_type = Regexp.last_match[:inner_type]
745
+ value.map { |v| _deserialize(inner_type, v) }
746
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
747
+ k_type = Regexp.last_match[:k_type]
748
+ v_type = Regexp.last_match[:v_type]
749
+ {}.tap do |hash|
750
+ value.each do |k, v|
751
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
752
+ end
753
+ end
754
+ else # model
755
+ # models (e.g. Pet) or oneOf
756
+ klass = SeatsChart.const_get(type)
757
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
758
+ end
759
+ end
760
+
761
+ # Returns the string representation of the object
762
+ # @return [String] String presentation of the object
763
+ def to_s
764
+ to_hash.to_s
765
+ end
766
+
767
+ # to_body is an alias to to_hash (backward compatibility)
768
+ # @return [Hash] Returns the object in the form of hash
769
+ def to_body
770
+ to_hash
771
+ end
772
+
773
+ # Returns the object in the form of hash
774
+ # @return [Hash] Returns the object in the form of hash
775
+ def to_hash
776
+ hash = {}
777
+ self.class.attribute_map.each_pair do |attr, param|
778
+ value = self.send(attr)
779
+ if value.nil?
780
+ is_nullable = self.class.openapi_nullable.include?(attr)
781
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
782
+ end
783
+
784
+ hash[param] = _to_hash(value)
785
+ end
786
+ hash
787
+ end
788
+
789
+ # Outputs non-array value in the form of hash
790
+ # For object, use to_hash. Otherwise, just return the value
791
+ # @param [Object] value Any valid value
792
+ # @return [Hash] Returns the value in the form of hash
793
+ def _to_hash(value)
794
+ if value.is_a?(Array)
795
+ value.compact.map { |v| _to_hash(v) }
796
+ elsif value.is_a?(Hash)
797
+ {}.tap do |hash|
798
+ value.each { |k, v| hash[k] = _to_hash(v) }
799
+ end
800
+ elsif value.respond_to? :to_hash
801
+ value.to_hash
802
+ else
803
+ value
804
+ end
805
+ end
806
+
807
+ end
808
+
809
+ end