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,561 @@
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 PostApiSeatsReserveRequest
18
+ attr_accessor :event_id
19
+
20
+ attr_accessor :seat_ids
21
+
22
+ attr_accessor :user_id
23
+
24
+ attr_accessor :channel
25
+
26
+ attr_accessor :season_id
27
+
28
+ attr_accessor :event_ids
29
+
30
+ attr_accessor :hold_token
31
+
32
+ # Optional opaque ticket buyer id from your system (≤ 256 printable characters). Persisted on holds, orders, reservations, GA receipts, object statuses and status history; never interpreted as an internal user id. Query with GET /events/{eventId}/objects?ticketBuyerId=….
33
+ attr_accessor :ticket_buyer_id
34
+
35
+ # Optional ticket type per seat (e.g. meia / inteira). Counted atomically against the event quotas when the hold is placed; quote and confirm may still change it within the quota.
36
+ attr_accessor :seat_ticket_types
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'event_id' => :'eventId',
42
+ :'seat_ids' => :'seatIds',
43
+ :'user_id' => :'userId',
44
+ :'channel' => :'channel',
45
+ :'season_id' => :'seasonId',
46
+ :'event_ids' => :'eventIds',
47
+ :'hold_token' => :'holdToken',
48
+ :'ticket_buyer_id' => :'ticketBuyerId',
49
+ :'seat_ticket_types' => :'seatTicketTypes'
50
+ }
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'event_id' => :'String',
62
+ :'seat_ids' => :'Array<String>',
63
+ :'user_id' => :'String',
64
+ :'channel' => :'String',
65
+ :'season_id' => :'String',
66
+ :'event_ids' => :'Array<String>',
67
+ :'hold_token' => :'String',
68
+ :'ticket_buyer_id' => :'String',
69
+ :'seat_ticket_types' => :'Hash<String, String>'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ def self.openapi_nullable
75
+ Set.new([
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiSeatsReserveRequest` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!self.class.attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiSeatsReserveRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'event_id')
95
+ self.event_id = attributes[:'event_id']
96
+ else
97
+ self.event_id = nil
98
+ end
99
+
100
+ if attributes.key?(:'seat_ids')
101
+ if (value = attributes[:'seat_ids']).is_a?(Array)
102
+ self.seat_ids = value
103
+ end
104
+ else
105
+ self.seat_ids = nil
106
+ end
107
+
108
+ if attributes.key?(:'user_id')
109
+ self.user_id = attributes[:'user_id']
110
+ else
111
+ self.user_id = nil
112
+ end
113
+
114
+ if attributes.key?(:'channel')
115
+ self.channel = attributes[:'channel']
116
+ end
117
+
118
+ if attributes.key?(:'season_id')
119
+ self.season_id = attributes[:'season_id']
120
+ end
121
+
122
+ if attributes.key?(:'event_ids')
123
+ if (value = attributes[:'event_ids']).is_a?(Array)
124
+ self.event_ids = value
125
+ end
126
+ end
127
+
128
+ if attributes.key?(:'hold_token')
129
+ self.hold_token = attributes[:'hold_token']
130
+ end
131
+
132
+ if attributes.key?(:'ticket_buyer_id')
133
+ self.ticket_buyer_id = attributes[:'ticket_buyer_id']
134
+ end
135
+
136
+ if attributes.key?(:'seat_ticket_types')
137
+ if (value = attributes[:'seat_ticket_types']).is_a?(Hash)
138
+ self.seat_ticket_types = value
139
+ end
140
+ end
141
+ end
142
+
143
+ # Show invalid properties with the reasons. Usually used together with valid?
144
+ # @return Array for valid properties with the reasons
145
+ def list_invalid_properties
146
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
147
+ invalid_properties = Array.new
148
+ if @event_id.nil?
149
+ invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
150
+ end
151
+
152
+ if @event_id.to_s.length > 36
153
+ invalid_properties.push('invalid value for "event_id", the character length must be smaller than or equal to 36.')
154
+ end
155
+
156
+ if @event_id.to_s.length < 36
157
+ invalid_properties.push('invalid value for "event_id", the character length must be great than or equal to 36.')
158
+ end
159
+
160
+ if @seat_ids.nil?
161
+ invalid_properties.push('invalid value for "seat_ids", seat_ids cannot be nil.')
162
+ end
163
+
164
+ if @seat_ids.length > 64
165
+ invalid_properties.push('invalid value for "seat_ids", number of items must be less than or equal to 64.')
166
+ end
167
+
168
+ if @seat_ids.length < 1
169
+ invalid_properties.push('invalid value for "seat_ids", number of items must be greater than or equal to 1.')
170
+ end
171
+
172
+ if @user_id.nil?
173
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
174
+ end
175
+
176
+ if @user_id.to_s.length > 256
177
+ invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 256.')
178
+ end
179
+
180
+ if @user_id.to_s.length < 1
181
+ invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.')
182
+ end
183
+
184
+ pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
185
+ if @user_id !~ pattern
186
+ invalid_properties.push("invalid value for \"user_id\", must conform to the pattern #{pattern}.")
187
+ end
188
+
189
+ if !@channel.nil? && @channel.to_s.length > 32
190
+ invalid_properties.push('invalid value for "channel", the character length must be smaller than or equal to 32.')
191
+ end
192
+
193
+ if !@channel.nil? && @channel.to_s.length < 1
194
+ invalid_properties.push('invalid value for "channel", the character length must be great than or equal to 1.')
195
+ end
196
+
197
+ if !@season_id.nil? && @season_id.to_s.length > 36
198
+ invalid_properties.push('invalid value for "season_id", the character length must be smaller than or equal to 36.')
199
+ end
200
+
201
+ if !@season_id.nil? && @season_id.to_s.length < 36
202
+ invalid_properties.push('invalid value for "season_id", the character length must be great than or equal to 36.')
203
+ end
204
+
205
+ if !@event_ids.nil? && @event_ids.length > 50
206
+ invalid_properties.push('invalid value for "event_ids", number of items must be less than or equal to 50.')
207
+ end
208
+
209
+ if !@event_ids.nil? && @event_ids.length < 1
210
+ invalid_properties.push('invalid value for "event_ids", number of items must be greater than or equal to 1.')
211
+ end
212
+
213
+ if !@hold_token.nil? && @hold_token.to_s.length > 36
214
+ invalid_properties.push('invalid value for "hold_token", the character length must be smaller than or equal to 36.')
215
+ end
216
+
217
+ if !@hold_token.nil? && @hold_token.to_s.length < 36
218
+ invalid_properties.push('invalid value for "hold_token", the character length must be great than or equal to 36.')
219
+ end
220
+
221
+ if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length > 256
222
+ invalid_properties.push('invalid value for "ticket_buyer_id", the character length must be smaller than or equal to 256.')
223
+ end
224
+
225
+ if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length < 1
226
+ invalid_properties.push('invalid value for "ticket_buyer_id", the character length must be great than or equal to 1.')
227
+ end
228
+
229
+ pattern = Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
230
+ if !@ticket_buyer_id.nil? && @ticket_buyer_id !~ pattern
231
+ invalid_properties.push("invalid value for \"ticket_buyer_id\", must conform to the pattern #{pattern}.")
232
+ end
233
+
234
+ invalid_properties
235
+ end
236
+
237
+ # Check to see if the all the properties in the model are valid
238
+ # @return true if the model is valid
239
+ def valid?
240
+ warn '[DEPRECATED] the `valid?` method is obsolete'
241
+ return false if @event_id.nil?
242
+ return false if @event_id.to_s.length > 36
243
+ return false if @event_id.to_s.length < 36
244
+ return false if @seat_ids.nil?
245
+ return false if @seat_ids.length > 64
246
+ return false if @seat_ids.length < 1
247
+ return false if @user_id.nil?
248
+ return false if @user_id.to_s.length > 256
249
+ return false if @user_id.to_s.length < 1
250
+ return false if @user_id !~ Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
251
+ return false if !@channel.nil? && @channel.to_s.length > 32
252
+ return false if !@channel.nil? && @channel.to_s.length < 1
253
+ return false if !@season_id.nil? && @season_id.to_s.length > 36
254
+ return false if !@season_id.nil? && @season_id.to_s.length < 36
255
+ return false if !@event_ids.nil? && @event_ids.length > 50
256
+ return false if !@event_ids.nil? && @event_ids.length < 1
257
+ return false if !@hold_token.nil? && @hold_token.to_s.length > 36
258
+ return false if !@hold_token.nil? && @hold_token.to_s.length < 36
259
+ return false if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length > 256
260
+ return false if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length < 1
261
+ return false if !@ticket_buyer_id.nil? && @ticket_buyer_id !~ Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
262
+ true
263
+ end
264
+
265
+ # Custom attribute writer method with validation
266
+ # @param [Object] event_id Value to be assigned
267
+ def event_id=(event_id)
268
+ if event_id.nil?
269
+ fail ArgumentError, 'event_id cannot be nil'
270
+ end
271
+
272
+ if event_id.to_s.length > 36
273
+ fail ArgumentError, 'invalid value for "event_id", the character length must be smaller than or equal to 36.'
274
+ end
275
+
276
+ if event_id.to_s.length < 36
277
+ fail ArgumentError, 'invalid value for "event_id", the character length must be great than or equal to 36.'
278
+ end
279
+
280
+ @event_id = event_id
281
+ end
282
+
283
+ # Custom attribute writer method with validation
284
+ # @param [Object] seat_ids Value to be assigned
285
+ def seat_ids=(seat_ids)
286
+ if seat_ids.nil?
287
+ fail ArgumentError, 'seat_ids cannot be nil'
288
+ end
289
+
290
+ if seat_ids.length > 64
291
+ fail ArgumentError, 'invalid value for "seat_ids", number of items must be less than or equal to 64.'
292
+ end
293
+
294
+ if seat_ids.length < 1
295
+ fail ArgumentError, 'invalid value for "seat_ids", number of items must be greater than or equal to 1.'
296
+ end
297
+
298
+ @seat_ids = seat_ids
299
+ end
300
+
301
+ # Custom attribute writer method with validation
302
+ # @param [Object] user_id Value to be assigned
303
+ def user_id=(user_id)
304
+ if user_id.nil?
305
+ fail ArgumentError, 'user_id cannot be nil'
306
+ end
307
+
308
+ if user_id.to_s.length > 256
309
+ fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 256.'
310
+ end
311
+
312
+ if user_id.to_s.length < 1
313
+ fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.'
314
+ end
315
+
316
+ pattern = Regexp.new(/^(?:[^\u0000\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
317
+ if user_id !~ pattern
318
+ fail ArgumentError, "invalid value for \"user_id\", must conform to the pattern #{pattern}."
319
+ end
320
+
321
+ @user_id = user_id
322
+ end
323
+
324
+ # Custom attribute writer method with validation
325
+ # @param [Object] channel Value to be assigned
326
+ def channel=(channel)
327
+ if channel.nil?
328
+ fail ArgumentError, 'channel cannot be nil'
329
+ end
330
+
331
+ if channel.to_s.length > 32
332
+ fail ArgumentError, 'invalid value for "channel", the character length must be smaller than or equal to 32.'
333
+ end
334
+
335
+ if channel.to_s.length < 1
336
+ fail ArgumentError, 'invalid value for "channel", the character length must be great than or equal to 1.'
337
+ end
338
+
339
+ @channel = channel
340
+ end
341
+
342
+ # Custom attribute writer method with validation
343
+ # @param [Object] season_id Value to be assigned
344
+ def season_id=(season_id)
345
+ if season_id.nil?
346
+ fail ArgumentError, 'season_id cannot be nil'
347
+ end
348
+
349
+ if season_id.to_s.length > 36
350
+ fail ArgumentError, 'invalid value for "season_id", the character length must be smaller than or equal to 36.'
351
+ end
352
+
353
+ if season_id.to_s.length < 36
354
+ fail ArgumentError, 'invalid value for "season_id", the character length must be great than or equal to 36.'
355
+ end
356
+
357
+ @season_id = season_id
358
+ end
359
+
360
+ # Custom attribute writer method with validation
361
+ # @param [Object] event_ids Value to be assigned
362
+ def event_ids=(event_ids)
363
+ if event_ids.nil?
364
+ fail ArgumentError, 'event_ids cannot be nil'
365
+ end
366
+
367
+ if event_ids.length > 50
368
+ fail ArgumentError, 'invalid value for "event_ids", number of items must be less than or equal to 50.'
369
+ end
370
+
371
+ if event_ids.length < 1
372
+ fail ArgumentError, 'invalid value for "event_ids", number of items must be greater than or equal to 1.'
373
+ end
374
+
375
+ @event_ids = event_ids
376
+ end
377
+
378
+ # Custom attribute writer method with validation
379
+ # @param [Object] hold_token Value to be assigned
380
+ def hold_token=(hold_token)
381
+ if hold_token.nil?
382
+ fail ArgumentError, 'hold_token cannot be nil'
383
+ end
384
+
385
+ if hold_token.to_s.length > 36
386
+ fail ArgumentError, 'invalid value for "hold_token", the character length must be smaller than or equal to 36.'
387
+ end
388
+
389
+ if hold_token.to_s.length < 36
390
+ fail ArgumentError, 'invalid value for "hold_token", the character length must be great than or equal to 36.'
391
+ end
392
+
393
+ @hold_token = hold_token
394
+ end
395
+
396
+ # Custom attribute writer method with validation
397
+ # @param [Object] ticket_buyer_id Value to be assigned
398
+ def ticket_buyer_id=(ticket_buyer_id)
399
+ if ticket_buyer_id.nil?
400
+ fail ArgumentError, 'ticket_buyer_id cannot be nil'
401
+ end
402
+
403
+ if ticket_buyer_id.to_s.length > 256
404
+ fail ArgumentError, 'invalid value for "ticket_buyer_id", the character length must be smaller than or equal to 256.'
405
+ end
406
+
407
+ if ticket_buyer_id.to_s.length < 1
408
+ fail ArgumentError, 'invalid value for "ticket_buyer_id", the character length must be great than or equal to 1.'
409
+ end
410
+
411
+ pattern = Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
412
+ if ticket_buyer_id !~ pattern
413
+ fail ArgumentError, "invalid value for \"ticket_buyer_id\", must conform to the pattern #{pattern}."
414
+ end
415
+
416
+ @ticket_buyer_id = ticket_buyer_id
417
+ end
418
+
419
+ # Checks equality by comparing each attribute.
420
+ # @param [Object] Object to be compared
421
+ def ==(o)
422
+ return true if self.equal?(o)
423
+ self.class == o.class &&
424
+ event_id == o.event_id &&
425
+ seat_ids == o.seat_ids &&
426
+ user_id == o.user_id &&
427
+ channel == o.channel &&
428
+ season_id == o.season_id &&
429
+ event_ids == o.event_ids &&
430
+ hold_token == o.hold_token &&
431
+ ticket_buyer_id == o.ticket_buyer_id &&
432
+ seat_ticket_types == o.seat_ticket_types
433
+ end
434
+
435
+ # @see the `==` method
436
+ # @param [Object] Object to be compared
437
+ def eql?(o)
438
+ self == o
439
+ end
440
+
441
+ # Calculates hash code according to all attributes.
442
+ # @return [Integer] Hash code
443
+ def hash
444
+ [event_id, seat_ids, user_id, channel, season_id, event_ids, hold_token, ticket_buyer_id, seat_ticket_types].hash
445
+ end
446
+
447
+ # Builds the object from hash
448
+ # @param [Hash] attributes Model attributes in the form of hash
449
+ # @return [Object] Returns the model itself
450
+ def self.build_from_hash(attributes)
451
+ return nil unless attributes.is_a?(Hash)
452
+ attributes = attributes.transform_keys(&:to_sym)
453
+ transformed_hash = {}
454
+ openapi_types.each_pair do |key, type|
455
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
456
+ transformed_hash["#{key}"] = nil
457
+ elsif type =~ /\AArray<(.*)>/i
458
+ # check to ensure the input is an array given that the attribute
459
+ # is documented as an array but the input is not
460
+ if attributes[attribute_map[key]].is_a?(Array)
461
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
462
+ end
463
+ elsif !attributes[attribute_map[key]].nil?
464
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
465
+ end
466
+ end
467
+ new(transformed_hash)
468
+ end
469
+
470
+ # Deserializes the data based on type
471
+ # @param string type Data type
472
+ # @param string value Value to be deserialized
473
+ # @return [Object] Deserialized data
474
+ def self._deserialize(type, value)
475
+ case type.to_sym
476
+ when :Time
477
+ Time.parse(value)
478
+ when :Date
479
+ Date.parse(value)
480
+ when :String
481
+ value.to_s
482
+ when :Integer
483
+ value.to_i
484
+ when :Float
485
+ value.to_f
486
+ when :Boolean
487
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
488
+ true
489
+ else
490
+ false
491
+ end
492
+ when :Object
493
+ # generic object (usually a Hash), return directly
494
+ value
495
+ when /\AArray<(?<inner_type>.+)>\z/
496
+ inner_type = Regexp.last_match[:inner_type]
497
+ value.map { |v| _deserialize(inner_type, v) }
498
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
499
+ k_type = Regexp.last_match[:k_type]
500
+ v_type = Regexp.last_match[:v_type]
501
+ {}.tap do |hash|
502
+ value.each do |k, v|
503
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
504
+ end
505
+ end
506
+ else # model
507
+ # models (e.g. Pet) or oneOf
508
+ klass = SeatsChart.const_get(type)
509
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
510
+ end
511
+ end
512
+
513
+ # Returns the string representation of the object
514
+ # @return [String] String presentation of the object
515
+ def to_s
516
+ to_hash.to_s
517
+ end
518
+
519
+ # to_body is an alias to to_hash (backward compatibility)
520
+ # @return [Hash] Returns the object in the form of hash
521
+ def to_body
522
+ to_hash
523
+ end
524
+
525
+ # Returns the object in the form of hash
526
+ # @return [Hash] Returns the object in the form of hash
527
+ def to_hash
528
+ hash = {}
529
+ self.class.attribute_map.each_pair do |attr, param|
530
+ value = self.send(attr)
531
+ if value.nil?
532
+ is_nullable = self.class.openapi_nullable.include?(attr)
533
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
534
+ end
535
+
536
+ hash[param] = _to_hash(value)
537
+ end
538
+ hash
539
+ end
540
+
541
+ # Outputs non-array value in the form of hash
542
+ # For object, use to_hash. Otherwise, just return the value
543
+ # @param [Object] value Any valid value
544
+ # @return [Hash] Returns the value in the form of hash
545
+ def _to_hash(value)
546
+ if value.is_a?(Array)
547
+ value.compact.map { |v| _to_hash(v) }
548
+ elsif value.is_a?(Hash)
549
+ {}.tap do |hash|
550
+ value.each { |k, v| hash[k] = _to_hash(v) }
551
+ end
552
+ elsif value.respond_to? :to_hash
553
+ value.to_hash
554
+ else
555
+ value
556
+ end
557
+ end
558
+
559
+ end
560
+
561
+ end