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