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