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