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,737 @@
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 PostApiEventsActionsChangeObjectStatusRequestStatusChangesInner
18
+ # Event UUID (exactly one of eventId / eventKey).
19
+ attr_accessor :event_id
20
+
21
+ # Event key (your event id; exactly one of eventId / eventKey).
22
+ attr_accessor :event_key
23
+
24
+ attr_accessor :objects
25
+
26
+ # `booked`, `free`, `resale`, `retired` or a custom status (required unless type is RELEASE).
27
+ attr_accessor :status
28
+
29
+ # `RELEASE` frees the objects (same as status `free`).
30
+ attr_accessor :type
31
+
32
+ # Existing booking order to act on (UUID).
33
+ attr_accessor :order_id
34
+
35
+ # Books seats held by this buyer hold token (status `booked`).
36
+ attr_accessor :hold_token
37
+
38
+ attr_accessor :keep_extra_data
39
+
40
+ attr_accessor :resale_price_cents
41
+
42
+ # Resale listing: stored on extraData.resaleListingId of every object; the renderer can select a listing as one group (resaleListings.selectAsGroup).
43
+ attr_accessor :resale_listing_id
44
+
45
+ attr_accessor :allowed_previous_statuses
46
+
47
+ attr_accessor :rejected_previous_statuses
48
+
49
+ attr_accessor :channel_keys
50
+
51
+ attr_accessor :ignore_channels
52
+
53
+ # 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=….
54
+ attr_accessor :ticket_buyer_id
55
+
56
+ class EnumAttributeValidator
57
+ attr_reader :datatype
58
+ attr_reader :allowable_values
59
+
60
+ def initialize(datatype, allowable_values)
61
+ @allowable_values = allowable_values.map do |value|
62
+ case datatype.to_s
63
+ when /Integer/i
64
+ value.to_i
65
+ when /Float/i
66
+ value.to_f
67
+ else
68
+ value
69
+ end
70
+ end
71
+ end
72
+
73
+ def valid?(value)
74
+ !value || allowable_values.include?(value)
75
+ end
76
+ end
77
+
78
+ # Attribute mapping from ruby-style variable name to JSON key.
79
+ def self.attribute_map
80
+ {
81
+ :'event_id' => :'eventId',
82
+ :'event_key' => :'eventKey',
83
+ :'objects' => :'objects',
84
+ :'status' => :'status',
85
+ :'type' => :'type',
86
+ :'order_id' => :'orderId',
87
+ :'hold_token' => :'holdToken',
88
+ :'keep_extra_data' => :'keepExtraData',
89
+ :'resale_price_cents' => :'resalePriceCents',
90
+ :'resale_listing_id' => :'resaleListingId',
91
+ :'allowed_previous_statuses' => :'allowedPreviousStatuses',
92
+ :'rejected_previous_statuses' => :'rejectedPreviousStatuses',
93
+ :'channel_keys' => :'channelKeys',
94
+ :'ignore_channels' => :'ignoreChannels',
95
+ :'ticket_buyer_id' => :'ticketBuyerId'
96
+ }
97
+ end
98
+
99
+ # Returns all the JSON keys this model knows about
100
+ def self.acceptable_attributes
101
+ attribute_map.values
102
+ end
103
+
104
+ # Attribute type mapping.
105
+ def self.openapi_types
106
+ {
107
+ :'event_id' => :'String',
108
+ :'event_key' => :'String',
109
+ :'objects' => :'Array<PostApiEventsActionsChangeObjectStatusRequestStatusChangesInnerObjectsInner>',
110
+ :'status' => :'String',
111
+ :'type' => :'String',
112
+ :'order_id' => :'String',
113
+ :'hold_token' => :'String',
114
+ :'keep_extra_data' => :'Boolean',
115
+ :'resale_price_cents' => :'Integer',
116
+ :'resale_listing_id' => :'String',
117
+ :'allowed_previous_statuses' => :'Array<String>',
118
+ :'rejected_previous_statuses' => :'Array<String>',
119
+ :'channel_keys' => :'Array<String>',
120
+ :'ignore_channels' => :'Boolean',
121
+ :'ticket_buyer_id' => :'String'
122
+ }
123
+ end
124
+
125
+ # List of attributes with nullable: true
126
+ def self.openapi_nullable
127
+ Set.new([
128
+ ])
129
+ end
130
+
131
+ # Initializes the object
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ def initialize(attributes = {})
134
+ if (!attributes.is_a?(Hash))
135
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiEventsActionsChangeObjectStatusRequestStatusChangesInner` initialize method"
136
+ end
137
+
138
+ # check to see if the attribute exists and convert string to symbol for hash key
139
+ attributes = attributes.each_with_object({}) { |(k, v), h|
140
+ if (!self.class.attribute_map.key?(k.to_sym))
141
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiEventsActionsChangeObjectStatusRequestStatusChangesInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
142
+ end
143
+ h[k.to_sym] = v
144
+ }
145
+
146
+ if attributes.key?(:'event_id')
147
+ self.event_id = attributes[:'event_id']
148
+ end
149
+
150
+ if attributes.key?(:'event_key')
151
+ self.event_key = attributes[:'event_key']
152
+ end
153
+
154
+ if attributes.key?(:'objects')
155
+ if (value = attributes[:'objects']).is_a?(Array)
156
+ self.objects = value
157
+ end
158
+ else
159
+ self.objects = nil
160
+ end
161
+
162
+ if attributes.key?(:'status')
163
+ self.status = attributes[:'status']
164
+ end
165
+
166
+ if attributes.key?(:'type')
167
+ self.type = attributes[:'type']
168
+ end
169
+
170
+ if attributes.key?(:'order_id')
171
+ self.order_id = attributes[:'order_id']
172
+ end
173
+
174
+ if attributes.key?(:'hold_token')
175
+ self.hold_token = attributes[:'hold_token']
176
+ end
177
+
178
+ if attributes.key?(:'keep_extra_data')
179
+ self.keep_extra_data = attributes[:'keep_extra_data']
180
+ end
181
+
182
+ if attributes.key?(:'resale_price_cents')
183
+ self.resale_price_cents = attributes[:'resale_price_cents']
184
+ end
185
+
186
+ if attributes.key?(:'resale_listing_id')
187
+ self.resale_listing_id = attributes[:'resale_listing_id']
188
+ end
189
+
190
+ if attributes.key?(:'allowed_previous_statuses')
191
+ if (value = attributes[:'allowed_previous_statuses']).is_a?(Array)
192
+ self.allowed_previous_statuses = value
193
+ end
194
+ end
195
+
196
+ if attributes.key?(:'rejected_previous_statuses')
197
+ if (value = attributes[:'rejected_previous_statuses']).is_a?(Array)
198
+ self.rejected_previous_statuses = value
199
+ end
200
+ end
201
+
202
+ if attributes.key?(:'channel_keys')
203
+ if (value = attributes[:'channel_keys']).is_a?(Array)
204
+ self.channel_keys = value
205
+ end
206
+ end
207
+
208
+ if attributes.key?(:'ignore_channels')
209
+ self.ignore_channels = attributes[:'ignore_channels']
210
+ end
211
+
212
+ if attributes.key?(:'ticket_buyer_id')
213
+ self.ticket_buyer_id = attributes[:'ticket_buyer_id']
214
+ end
215
+ end
216
+
217
+ # Show invalid properties with the reasons. Usually used together with valid?
218
+ # @return Array for valid properties with the reasons
219
+ def list_invalid_properties
220
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
221
+ invalid_properties = Array.new
222
+ if !@event_id.nil? && @event_id.to_s.length > 36
223
+ invalid_properties.push('invalid value for "event_id", the character length must be smaller than or equal to 36.')
224
+ end
225
+
226
+ if !@event_id.nil? && @event_id.to_s.length < 36
227
+ invalid_properties.push('invalid value for "event_id", the character length must be great than or equal to 36.')
228
+ end
229
+
230
+ if !@event_key.nil? && @event_key.to_s.length > 100
231
+ invalid_properties.push('invalid value for "event_key", the character length must be smaller than or equal to 100.')
232
+ end
233
+
234
+ if !@event_key.nil? && @event_key.to_s.length < 1
235
+ invalid_properties.push('invalid value for "event_key", the character length must be great than or equal to 1.')
236
+ end
237
+
238
+ if @objects.nil?
239
+ invalid_properties.push('invalid value for "objects", objects cannot be nil.')
240
+ end
241
+
242
+ if @objects.length > 64
243
+ invalid_properties.push('invalid value for "objects", number of items must be less than or equal to 64.')
244
+ end
245
+
246
+ if @objects.length < 1
247
+ invalid_properties.push('invalid value for "objects", number of items must be greater than or equal to 1.')
248
+ end
249
+
250
+ if !@status.nil? && @status.to_s.length > 64
251
+ invalid_properties.push('invalid value for "status", the character length must be smaller than or equal to 64.')
252
+ end
253
+
254
+ if !@status.nil? && @status.to_s.length < 1
255
+ invalid_properties.push('invalid value for "status", the character length must be great than or equal to 1.')
256
+ end
257
+
258
+ if !@order_id.nil? && @order_id.to_s.length > 255
259
+ invalid_properties.push('invalid value for "order_id", the character length must be smaller than or equal to 255.')
260
+ end
261
+
262
+ if !@hold_token.nil? && @hold_token.to_s.length > 36
263
+ invalid_properties.push('invalid value for "hold_token", the character length must be smaller than or equal to 36.')
264
+ end
265
+
266
+ if !@hold_token.nil? && @hold_token.to_s.length < 36
267
+ invalid_properties.push('invalid value for "hold_token", the character length must be great than or equal to 36.')
268
+ end
269
+
270
+ if !@resale_price_cents.nil? && @resale_price_cents > 99999999
271
+ invalid_properties.push('invalid value for "resale_price_cents", must be smaller than or equal to 99999999.')
272
+ end
273
+
274
+ if !@resale_price_cents.nil? && @resale_price_cents < 0
275
+ invalid_properties.push('invalid value for "resale_price_cents", must be greater than or equal to 0.')
276
+ end
277
+
278
+ if !@resale_listing_id.nil? && @resale_listing_id.to_s.length > 64
279
+ invalid_properties.push('invalid value for "resale_listing_id", the character length must be smaller than or equal to 64.')
280
+ end
281
+
282
+ if !@resale_listing_id.nil? && @resale_listing_id.to_s.length < 1
283
+ invalid_properties.push('invalid value for "resale_listing_id", the character length must be great than or equal to 1.')
284
+ end
285
+
286
+ pattern = Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
287
+ if !@resale_listing_id.nil? && @resale_listing_id !~ pattern
288
+ invalid_properties.push("invalid value for \"resale_listing_id\", must conform to the pattern #{pattern}.")
289
+ end
290
+
291
+ if !@allowed_previous_statuses.nil? && @allowed_previous_statuses.length > 16
292
+ invalid_properties.push('invalid value for "allowed_previous_statuses", number of items must be less than or equal to 16.')
293
+ end
294
+
295
+ if !@allowed_previous_statuses.nil? && @allowed_previous_statuses.length < 1
296
+ invalid_properties.push('invalid value for "allowed_previous_statuses", number of items must be greater than or equal to 1.')
297
+ end
298
+
299
+ if !@rejected_previous_statuses.nil? && @rejected_previous_statuses.length > 16
300
+ invalid_properties.push('invalid value for "rejected_previous_statuses", number of items must be less than or equal to 16.')
301
+ end
302
+
303
+ if !@rejected_previous_statuses.nil? && @rejected_previous_statuses.length < 1
304
+ invalid_properties.push('invalid value for "rejected_previous_statuses", number of items must be greater than or equal to 1.')
305
+ end
306
+
307
+ if !@channel_keys.nil? && @channel_keys.length > 64
308
+ invalid_properties.push('invalid value for "channel_keys", number of items must be less than or equal to 64.')
309
+ end
310
+
311
+ if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length > 256
312
+ invalid_properties.push('invalid value for "ticket_buyer_id", the character length must be smaller than or equal to 256.')
313
+ end
314
+
315
+ if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length < 1
316
+ invalid_properties.push('invalid value for "ticket_buyer_id", the character length must be great than or equal to 1.')
317
+ end
318
+
319
+ pattern = Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
320
+ if !@ticket_buyer_id.nil? && @ticket_buyer_id !~ pattern
321
+ invalid_properties.push("invalid value for \"ticket_buyer_id\", must conform to the pattern #{pattern}.")
322
+ end
323
+
324
+ invalid_properties
325
+ end
326
+
327
+ # Check to see if the all the properties in the model are valid
328
+ # @return true if the model is valid
329
+ def valid?
330
+ warn '[DEPRECATED] the `valid?` method is obsolete'
331
+ return false if !@event_id.nil? && @event_id.to_s.length > 36
332
+ return false if !@event_id.nil? && @event_id.to_s.length < 36
333
+ return false if !@event_key.nil? && @event_key.to_s.length > 100
334
+ return false if !@event_key.nil? && @event_key.to_s.length < 1
335
+ return false if @objects.nil?
336
+ return false if @objects.length > 64
337
+ return false if @objects.length < 1
338
+ return false if !@status.nil? && @status.to_s.length > 64
339
+ return false if !@status.nil? && @status.to_s.length < 1
340
+ type_validator = EnumAttributeValidator.new('String', ["CHANGE_STATUS_TO", "RELEASE"])
341
+ return false unless type_validator.valid?(@type)
342
+ return false if !@order_id.nil? && @order_id.to_s.length > 255
343
+ return false if !@hold_token.nil? && @hold_token.to_s.length > 36
344
+ return false if !@hold_token.nil? && @hold_token.to_s.length < 36
345
+ return false if !@resale_price_cents.nil? && @resale_price_cents > 99999999
346
+ return false if !@resale_price_cents.nil? && @resale_price_cents < 0
347
+ return false if !@resale_listing_id.nil? && @resale_listing_id.to_s.length > 64
348
+ return false if !@resale_listing_id.nil? && @resale_listing_id.to_s.length < 1
349
+ return false if !@resale_listing_id.nil? && @resale_listing_id !~ Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
350
+ return false if !@allowed_previous_statuses.nil? && @allowed_previous_statuses.length > 16
351
+ return false if !@allowed_previous_statuses.nil? && @allowed_previous_statuses.length < 1
352
+ return false if !@rejected_previous_statuses.nil? && @rejected_previous_statuses.length > 16
353
+ return false if !@rejected_previous_statuses.nil? && @rejected_previous_statuses.length < 1
354
+ return false if !@channel_keys.nil? && @channel_keys.length > 64
355
+ return false if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length > 256
356
+ return false if !@ticket_buyer_id.nil? && @ticket_buyer_id.to_s.length < 1
357
+ return false if !@ticket_buyer_id.nil? && @ticket_buyer_id !~ Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
358
+ true
359
+ end
360
+
361
+ # Custom attribute writer method with validation
362
+ # @param [Object] event_id Value to be assigned
363
+ def event_id=(event_id)
364
+ if event_id.nil?
365
+ fail ArgumentError, 'event_id cannot be nil'
366
+ end
367
+
368
+ if event_id.to_s.length > 36
369
+ fail ArgumentError, 'invalid value for "event_id", the character length must be smaller than or equal to 36.'
370
+ end
371
+
372
+ if event_id.to_s.length < 36
373
+ fail ArgumentError, 'invalid value for "event_id", the character length must be great than or equal to 36.'
374
+ end
375
+
376
+ @event_id = event_id
377
+ end
378
+
379
+ # Custom attribute writer method with validation
380
+ # @param [Object] event_key Value to be assigned
381
+ def event_key=(event_key)
382
+ if event_key.nil?
383
+ fail ArgumentError, 'event_key cannot be nil'
384
+ end
385
+
386
+ if event_key.to_s.length > 100
387
+ fail ArgumentError, 'invalid value for "event_key", the character length must be smaller than or equal to 100.'
388
+ end
389
+
390
+ if event_key.to_s.length < 1
391
+ fail ArgumentError, 'invalid value for "event_key", the character length must be great than or equal to 1.'
392
+ end
393
+
394
+ @event_key = event_key
395
+ end
396
+
397
+ # Custom attribute writer method with validation
398
+ # @param [Object] objects Value to be assigned
399
+ def objects=(objects)
400
+ if objects.nil?
401
+ fail ArgumentError, 'objects cannot be nil'
402
+ end
403
+
404
+ if objects.length > 64
405
+ fail ArgumentError, 'invalid value for "objects", number of items must be less than or equal to 64.'
406
+ end
407
+
408
+ if objects.length < 1
409
+ fail ArgumentError, 'invalid value for "objects", number of items must be greater than or equal to 1.'
410
+ end
411
+
412
+ @objects = objects
413
+ end
414
+
415
+ # Custom attribute writer method with validation
416
+ # @param [Object] status Value to be assigned
417
+ def status=(status)
418
+ if status.nil?
419
+ fail ArgumentError, 'status cannot be nil'
420
+ end
421
+
422
+ if status.to_s.length > 64
423
+ fail ArgumentError, 'invalid value for "status", the character length must be smaller than or equal to 64.'
424
+ end
425
+
426
+ if status.to_s.length < 1
427
+ fail ArgumentError, 'invalid value for "status", the character length must be great than or equal to 1.'
428
+ end
429
+
430
+ @status = status
431
+ end
432
+
433
+ # Custom attribute writer method checking allowed values (enum).
434
+ # @param [Object] type Object to be assigned
435
+ def type=(type)
436
+ validator = EnumAttributeValidator.new('String', ["CHANGE_STATUS_TO", "RELEASE"])
437
+ unless validator.valid?(type)
438
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
439
+ end
440
+ @type = type
441
+ end
442
+
443
+ # Custom attribute writer method with validation
444
+ # @param [Object] order_id Value to be assigned
445
+ def order_id=(order_id)
446
+ if order_id.nil?
447
+ fail ArgumentError, 'order_id cannot be nil'
448
+ end
449
+
450
+ if order_id.to_s.length > 255
451
+ fail ArgumentError, 'invalid value for "order_id", the character length must be smaller than or equal to 255.'
452
+ end
453
+
454
+ @order_id = order_id
455
+ end
456
+
457
+ # Custom attribute writer method with validation
458
+ # @param [Object] hold_token Value to be assigned
459
+ def hold_token=(hold_token)
460
+ if hold_token.nil?
461
+ fail ArgumentError, 'hold_token cannot be nil'
462
+ end
463
+
464
+ if hold_token.to_s.length > 36
465
+ fail ArgumentError, 'invalid value for "hold_token", the character length must be smaller than or equal to 36.'
466
+ end
467
+
468
+ if hold_token.to_s.length < 36
469
+ fail ArgumentError, 'invalid value for "hold_token", the character length must be great than or equal to 36.'
470
+ end
471
+
472
+ @hold_token = hold_token
473
+ end
474
+
475
+ # Custom attribute writer method with validation
476
+ # @param [Object] resale_price_cents Value to be assigned
477
+ def resale_price_cents=(resale_price_cents)
478
+ if resale_price_cents.nil?
479
+ fail ArgumentError, 'resale_price_cents cannot be nil'
480
+ end
481
+
482
+ if resale_price_cents > 99999999
483
+ fail ArgumentError, 'invalid value for "resale_price_cents", must be smaller than or equal to 99999999.'
484
+ end
485
+
486
+ if resale_price_cents < 0
487
+ fail ArgumentError, 'invalid value for "resale_price_cents", must be greater than or equal to 0.'
488
+ end
489
+
490
+ @resale_price_cents = resale_price_cents
491
+ end
492
+
493
+ # Custom attribute writer method with validation
494
+ # @param [Object] resale_listing_id Value to be assigned
495
+ def resale_listing_id=(resale_listing_id)
496
+ if resale_listing_id.nil?
497
+ fail ArgumentError, 'resale_listing_id cannot be nil'
498
+ end
499
+
500
+ if resale_listing_id.to_s.length > 64
501
+ fail ArgumentError, 'invalid value for "resale_listing_id", the character length must be smaller than or equal to 64.'
502
+ end
503
+
504
+ if resale_listing_id.to_s.length < 1
505
+ fail ArgumentError, 'invalid value for "resale_listing_id", the character length must be great than or equal to 1.'
506
+ end
507
+
508
+ pattern = Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
509
+ if resale_listing_id !~ pattern
510
+ fail ArgumentError, "invalid value for \"resale_listing_id\", must conform to the pattern #{pattern}."
511
+ end
512
+
513
+ @resale_listing_id = resale_listing_id
514
+ end
515
+
516
+ # Custom attribute writer method with validation
517
+ # @param [Object] allowed_previous_statuses Value to be assigned
518
+ def allowed_previous_statuses=(allowed_previous_statuses)
519
+ if allowed_previous_statuses.nil?
520
+ fail ArgumentError, 'allowed_previous_statuses cannot be nil'
521
+ end
522
+
523
+ if allowed_previous_statuses.length > 16
524
+ fail ArgumentError, 'invalid value for "allowed_previous_statuses", number of items must be less than or equal to 16.'
525
+ end
526
+
527
+ if allowed_previous_statuses.length < 1
528
+ fail ArgumentError, 'invalid value for "allowed_previous_statuses", number of items must be greater than or equal to 1.'
529
+ end
530
+
531
+ @allowed_previous_statuses = allowed_previous_statuses
532
+ end
533
+
534
+ # Custom attribute writer method with validation
535
+ # @param [Object] rejected_previous_statuses Value to be assigned
536
+ def rejected_previous_statuses=(rejected_previous_statuses)
537
+ if rejected_previous_statuses.nil?
538
+ fail ArgumentError, 'rejected_previous_statuses cannot be nil'
539
+ end
540
+
541
+ if rejected_previous_statuses.length > 16
542
+ fail ArgumentError, 'invalid value for "rejected_previous_statuses", number of items must be less than or equal to 16.'
543
+ end
544
+
545
+ if rejected_previous_statuses.length < 1
546
+ fail ArgumentError, 'invalid value for "rejected_previous_statuses", number of items must be greater than or equal to 1.'
547
+ end
548
+
549
+ @rejected_previous_statuses = rejected_previous_statuses
550
+ end
551
+
552
+ # Custom attribute writer method with validation
553
+ # @param [Object] channel_keys Value to be assigned
554
+ def channel_keys=(channel_keys)
555
+ if channel_keys.nil?
556
+ fail ArgumentError, 'channel_keys cannot be nil'
557
+ end
558
+
559
+ if channel_keys.length > 64
560
+ fail ArgumentError, 'invalid value for "channel_keys", number of items must be less than or equal to 64.'
561
+ end
562
+
563
+ @channel_keys = channel_keys
564
+ end
565
+
566
+ # Custom attribute writer method with validation
567
+ # @param [Object] ticket_buyer_id Value to be assigned
568
+ def ticket_buyer_id=(ticket_buyer_id)
569
+ if ticket_buyer_id.nil?
570
+ fail ArgumentError, 'ticket_buyer_id cannot be nil'
571
+ end
572
+
573
+ if ticket_buyer_id.to_s.length > 256
574
+ fail ArgumentError, 'invalid value for "ticket_buyer_id", the character length must be smaller than or equal to 256.'
575
+ end
576
+
577
+ if ticket_buyer_id.to_s.length < 1
578
+ fail ArgumentError, 'invalid value for "ticket_buyer_id", the character length must be great than or equal to 1.'
579
+ end
580
+
581
+ pattern = Regexp.new(/^(?:[^\u0000-\u001F\u007F\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])+$/)
582
+ if ticket_buyer_id !~ pattern
583
+ fail ArgumentError, "invalid value for \"ticket_buyer_id\", must conform to the pattern #{pattern}."
584
+ end
585
+
586
+ @ticket_buyer_id = ticket_buyer_id
587
+ end
588
+
589
+ # Checks equality by comparing each attribute.
590
+ # @param [Object] Object to be compared
591
+ def ==(o)
592
+ return true if self.equal?(o)
593
+ self.class == o.class &&
594
+ event_id == o.event_id &&
595
+ event_key == o.event_key &&
596
+ objects == o.objects &&
597
+ status == o.status &&
598
+ type == o.type &&
599
+ order_id == o.order_id &&
600
+ hold_token == o.hold_token &&
601
+ keep_extra_data == o.keep_extra_data &&
602
+ resale_price_cents == o.resale_price_cents &&
603
+ resale_listing_id == o.resale_listing_id &&
604
+ allowed_previous_statuses == o.allowed_previous_statuses &&
605
+ rejected_previous_statuses == o.rejected_previous_statuses &&
606
+ channel_keys == o.channel_keys &&
607
+ ignore_channels == o.ignore_channels &&
608
+ ticket_buyer_id == o.ticket_buyer_id
609
+ end
610
+
611
+ # @see the `==` method
612
+ # @param [Object] Object to be compared
613
+ def eql?(o)
614
+ self == o
615
+ end
616
+
617
+ # Calculates hash code according to all attributes.
618
+ # @return [Integer] Hash code
619
+ def hash
620
+ [event_id, event_key, objects, status, type, order_id, hold_token, keep_extra_data, resale_price_cents, resale_listing_id, allowed_previous_statuses, rejected_previous_statuses, channel_keys, ignore_channels, ticket_buyer_id].hash
621
+ end
622
+
623
+ # Builds the object from hash
624
+ # @param [Hash] attributes Model attributes in the form of hash
625
+ # @return [Object] Returns the model itself
626
+ def self.build_from_hash(attributes)
627
+ return nil unless attributes.is_a?(Hash)
628
+ attributes = attributes.transform_keys(&:to_sym)
629
+ transformed_hash = {}
630
+ openapi_types.each_pair do |key, type|
631
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
632
+ transformed_hash["#{key}"] = nil
633
+ elsif type =~ /\AArray<(.*)>/i
634
+ # check to ensure the input is an array given that the attribute
635
+ # is documented as an array but the input is not
636
+ if attributes[attribute_map[key]].is_a?(Array)
637
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
638
+ end
639
+ elsif !attributes[attribute_map[key]].nil?
640
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
641
+ end
642
+ end
643
+ new(transformed_hash)
644
+ end
645
+
646
+ # Deserializes the data based on type
647
+ # @param string type Data type
648
+ # @param string value Value to be deserialized
649
+ # @return [Object] Deserialized data
650
+ def self._deserialize(type, value)
651
+ case type.to_sym
652
+ when :Time
653
+ Time.parse(value)
654
+ when :Date
655
+ Date.parse(value)
656
+ when :String
657
+ value.to_s
658
+ when :Integer
659
+ value.to_i
660
+ when :Float
661
+ value.to_f
662
+ when :Boolean
663
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
664
+ true
665
+ else
666
+ false
667
+ end
668
+ when :Object
669
+ # generic object (usually a Hash), return directly
670
+ value
671
+ when /\AArray<(?<inner_type>.+)>\z/
672
+ inner_type = Regexp.last_match[:inner_type]
673
+ value.map { |v| _deserialize(inner_type, v) }
674
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
675
+ k_type = Regexp.last_match[:k_type]
676
+ v_type = Regexp.last_match[:v_type]
677
+ {}.tap do |hash|
678
+ value.each do |k, v|
679
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
680
+ end
681
+ end
682
+ else # model
683
+ # models (e.g. Pet) or oneOf
684
+ klass = SeatsChart.const_get(type)
685
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
686
+ end
687
+ end
688
+
689
+ # Returns the string representation of the object
690
+ # @return [String] String presentation of the object
691
+ def to_s
692
+ to_hash.to_s
693
+ end
694
+
695
+ # to_body is an alias to to_hash (backward compatibility)
696
+ # @return [Hash] Returns the object in the form of hash
697
+ def to_body
698
+ to_hash
699
+ end
700
+
701
+ # Returns the object in the form of hash
702
+ # @return [Hash] Returns the object in the form of hash
703
+ def to_hash
704
+ hash = {}
705
+ self.class.attribute_map.each_pair do |attr, param|
706
+ value = self.send(attr)
707
+ if value.nil?
708
+ is_nullable = self.class.openapi_nullable.include?(attr)
709
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
710
+ end
711
+
712
+ hash[param] = _to_hash(value)
713
+ end
714
+ hash
715
+ end
716
+
717
+ # Outputs non-array value in the form of hash
718
+ # For object, use to_hash. Otherwise, just return the value
719
+ # @param [Object] value Any valid value
720
+ # @return [Hash] Returns the value in the form of hash
721
+ def _to_hash(value)
722
+ if value.is_a?(Array)
723
+ value.compact.map { |v| _to_hash(v) }
724
+ elsif value.is_a?(Hash)
725
+ {}.tap do |hash|
726
+ value.each { |k, v| hash[k] = _to_hash(v) }
727
+ end
728
+ elsif value.respond_to? :to_hash
729
+ value.to_hash
730
+ else
731
+ value
732
+ end
733
+ end
734
+
735
+ end
736
+
737
+ end