seatschart 0.2.0 → 0.4.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.
- checksums.yaml +4 -4
- data/README.md +199 -19
- data/lib/seatschart/api/audit_api.rb +2 -2
- data/lib/seatschart/api/auth_api.rb +81 -4
- data/lib/seatschart/api/billing_api.rb +4 -0
- data/lib/seatschart/api/charts_api.rb +810 -77
- data/lib/seatschart/api/embed_api.rb +5 -5
- data/lib/seatschart/api/embed_origins_api.rb +63 -2
- data/lib/seatschart/api/event_log_api.rb +2 -2
- data/lib/seatschart/api/events_api.rb +1491 -175
- data/lib/seatschart/api/health_api.rb +244 -0
- data/lib/seatschart/api/map_designer_api.rb +11 -9
- data/lib/seatschart/api/public_api.rb +356 -6
- data/lib/seatschart/api/sandboxes_api.rb +672 -0
- data/lib/seatschart/api/seasons_api.rb +344 -36
- data/lib/seatschart/api/seats_api.rb +10 -10
- data/lib/seatschart/api/usage_api.rb +18 -15
- data/lib/seatschart/api/webhooks_api.rb +2 -2
- data/lib/seatschart/api/workspace_api.rb +1815 -363
- data/lib/seatschart/models/api_error.rb +4 -4
- data/lib/seatschart/models/delete_api_sandboxes_by_sandbox_id200_response.rb +255 -0
- data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +237 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +62 -4
- data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +21 -4
- data/lib/seatschart/models/get_api_sandboxes200_response.rb +239 -0
- data/lib/seatschart/models/get_api_sandboxes200_response_items_inner.rb +431 -0
- data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_rate_limits.rb +270 -0
- data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_usage.rb +287 -0
- data/lib/seatschart/models/get_api_status200_response.rb +387 -0
- data/lib/seatschart/models/get_api_status200_response_components_inner.rb +330 -0
- data/lib/seatschart/models/get_api_status200_response_components_inner_days_inner.rb +301 -0
- data/lib/seatschart/models/get_api_status200_response_incidents_inner.rb +374 -0
- data/lib/seatschart/models/get_api_status200_response_maintenance_inner.rb +350 -0
- data/lib/seatschart/models/get_api_status503_response.rb +271 -0
- data/lib/seatschart/models/get_api_workspace_buyer_extra_data200_response.rb +241 -0
- data/lib/seatschart/models/get_api_workspace_defaults200_response.rb +254 -0
- data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer.rb +246 -0
- data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer_built_in.rb +270 -0
- data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +80 -5
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response.rb +239 -0
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response_api_keys_inner.rb +321 -0
- data/lib/seatschart/models/get_api_workspaces_created_by_api_parameter.rb +103 -0
- data/lib/seatschart/models/get_api_workspaces_overview_created_by_api_parameter.rb +103 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +12 -2
- data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +15 -5
- data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +25 -4
- data/lib/seatschart/models/patch_api_workspace_defaults_request.rb +224 -0
- data/lib/seatschart/models/patch_api_workspace_defaults_request_renderer.rb +249 -0
- data/lib/seatschart/models/patch_api_workspace_settings_request.rb +6 -6
- data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +221 -0
- data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id_request.rb +292 -0
- data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_request.rb +288 -0
- data/lib/seatschart/models/post_api_auth_new_workspace_request.rb +294 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +39 -1
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +1 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +64 -6
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +1 -1
- data/lib/seatschart/models/post_api_embed_tokens_request.rb +18 -15
- data/lib/seatschart/models/post_api_embed_tokens_request_safe_mode_options.rb +226 -0
- data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request.rb +251 -0
- data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request_events_inner.rb +322 -0
- data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +42 -1
- data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request.rb +277 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request_for_sale_inner.rb +319 -0
- data/lib/seatschart/models/post_api_events_by_event_id_map_publish_request.rb +215 -0
- data/lib/seatschart/models/post_api_events_request.rb +42 -1
- data/lib/seatschart/models/{patch_api_events_by_event_id_request_categories_inner.rb → post_api_events_request_categories_inner.rb} +3 -3
- data/lib/seatschart/models/post_api_extract_seats200_response.rb +459 -0
- data/lib/seatschart/models/post_api_extract_seats200_response_seats_inner.rb +323 -0
- data/lib/seatschart/models/post_api_extract_seats200_response_suggested_inner.rb +320 -0
- data/lib/seatschart/models/post_api_extract_seats_request.rb +124 -4
- data/lib/seatschart/models/post_api_extract_seats_request_examples.rb +105 -0
- data/lib/seatschart/models/post_api_extract_seats_request_examples_any_of_inner.rb +293 -0
- data/lib/seatschart/models/post_api_extract_seats_request_negatives.rb +105 -0
- data/lib/seatschart/models/post_api_extract_seats_request_region.rb +105 -0
- data/lib/seatschart/models/{put_api_charts_by_chart_id_map_draft_request.rb → post_api_extract_seats_request_region_any_of.rb} +111 -96
- data/lib/seatschart/models/post_api_sandboxes201_response.rb +245 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_admin_key.rb +286 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied.rb +313 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied_charts_inner.rb +281 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_inner.rb +281 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_with_own_map_inner.rb +265 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied_key_conflicts_inner.rb +287 -0
- data/lib/seatschart/models/post_api_sandboxes201_response_copied_seasons_inner.rb +312 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production200_response.rb +313 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production_request.rb +255 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_join200_response.rb +271 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +268 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset_request.rb +225 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response.rb +253 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response_api_key.rb +286 -0
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key_request.rb +252 -0
- data/lib/seatschart/models/post_api_sandboxes_request.rb +319 -0
- data/lib/seatschart/models/post_api_seasons_request.rb +14 -4
- data/lib/seatschart/models/post_api_seats_confirm_request.rb +5 -5
- data/lib/seatschart/models/post_api_seats_release_request.rb +5 -5
- data/lib/seatschart/models/post_api_seats_reserve_request.rb +5 -5
- data/lib/seatschart/models/post_api_workspaces200_response.rb +468 -0
- data/lib/seatschart/models/post_api_workspaces200_response_api_key.rb +332 -0
- data/lib/seatschart/models/post_api_workspaces200_response_template.rb +260 -0
- data/lib/seatschart/models/post_api_workspaces200_response_template_webhooks_inner.rb +284 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete200_response.rb +319 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete_request.rb +281 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations_request.rb +300 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response.rb +237 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response_api_key.rb +338 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys_request.rb +299 -0
- data/lib/seatschart/models/post_api_workspaces_request.rb +101 -5
- data/lib/seatschart/models/post_api_workspaces_request_issue_key.rb +294 -0
- data/lib/seatschart/models/put_api_workspace_buyer_extra_data_request.rb +260 -0
- data/lib/seatschart/models/put_internal_status_notices_request.rb +242 -0
- data/lib/seatschart/models/put_internal_status_notices_request_notices_inner.rb +445 -0
- data/lib/seatschart/retry.rb +106 -7
- data/lib/seatschart/version.rb +1 -1
- data/lib/seatschart.rb +73 -3
- metadata +75 -5
- data/lib/seatschart/api/default_api.rb +0 -763
|
@@ -0,0 +1,249 @@
|
|
|
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 PatchApiWorkspaceDefaultsRequestRenderer
|
|
18
|
+
# `null` = use the built-in default (true).
|
|
19
|
+
attr_accessor :multi_select_enabled
|
|
20
|
+
|
|
21
|
+
# `null` = use the built-in default (true).
|
|
22
|
+
attr_accessor :show_full_screen_button
|
|
23
|
+
|
|
24
|
+
# `null` = use the built-in default (true).
|
|
25
|
+
attr_accessor :companion_seat_validation_enabled
|
|
26
|
+
|
|
27
|
+
# `null` = use the built-in default (true).
|
|
28
|
+
attr_accessor :hold_on_select_for_gas
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'multi_select_enabled' => :'multiSelectEnabled',
|
|
34
|
+
:'show_full_screen_button' => :'showFullScreenButton',
|
|
35
|
+
:'companion_seat_validation_enabled' => :'companionSeatValidationEnabled',
|
|
36
|
+
:'hold_on_select_for_gas' => :'holdOnSelectForGAs'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'multi_select_enabled' => :'Boolean',
|
|
49
|
+
:'show_full_screen_button' => :'Boolean',
|
|
50
|
+
:'companion_seat_validation_enabled' => :'Boolean',
|
|
51
|
+
:'hold_on_select_for_gas' => :'Boolean'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
:'multi_select_enabled',
|
|
59
|
+
:'show_full_screen_button',
|
|
60
|
+
:'companion_seat_validation_enabled',
|
|
61
|
+
:'hold_on_select_for_gas'
|
|
62
|
+
])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
if (!attributes.is_a?(Hash))
|
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PatchApiWorkspaceDefaultsRequestRenderer` initialize method"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PatchApiWorkspaceDefaultsRequestRenderer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
76
|
+
end
|
|
77
|
+
h[k.to_sym] = v
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'multi_select_enabled')
|
|
81
|
+
self.multi_select_enabled = attributes[:'multi_select_enabled']
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'show_full_screen_button')
|
|
85
|
+
self.show_full_screen_button = attributes[:'show_full_screen_button']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'companion_seat_validation_enabled')
|
|
89
|
+
self.companion_seat_validation_enabled = attributes[:'companion_seat_validation_enabled']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'hold_on_select_for_gas')
|
|
93
|
+
self.hold_on_select_for_gas = attributes[:'hold_on_select_for_gas']
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
98
|
+
# @return Array for valid properties with the reasons
|
|
99
|
+
def list_invalid_properties
|
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
101
|
+
invalid_properties = Array.new
|
|
102
|
+
invalid_properties
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Check to see if the all the properties in the model are valid
|
|
106
|
+
# @return true if the model is valid
|
|
107
|
+
def valid?
|
|
108
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
109
|
+
true
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Checks equality by comparing each attribute.
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def ==(o)
|
|
115
|
+
return true if self.equal?(o)
|
|
116
|
+
self.class == o.class &&
|
|
117
|
+
multi_select_enabled == o.multi_select_enabled &&
|
|
118
|
+
show_full_screen_button == o.show_full_screen_button &&
|
|
119
|
+
companion_seat_validation_enabled == o.companion_seat_validation_enabled &&
|
|
120
|
+
hold_on_select_for_gas == o.hold_on_select_for_gas
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @see the `==` method
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def eql?(o)
|
|
126
|
+
self == o
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Calculates hash code according to all attributes.
|
|
130
|
+
# @return [Integer] Hash code
|
|
131
|
+
def hash
|
|
132
|
+
[multi_select_enabled, show_full_screen_button, companion_seat_validation_enabled, hold_on_select_for_gas].hash
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Builds the object from hash
|
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
137
|
+
# @return [Object] Returns the model itself
|
|
138
|
+
def self.build_from_hash(attributes)
|
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
|
140
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
141
|
+
transformed_hash = {}
|
|
142
|
+
openapi_types.each_pair do |key, type|
|
|
143
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = nil
|
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
146
|
+
# check to ensure the input is an array given that the attribute
|
|
147
|
+
# is documented as an array but the input is not
|
|
148
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
149
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
150
|
+
end
|
|
151
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
new(transformed_hash)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Deserializes the data based on type
|
|
159
|
+
# @param string type Data type
|
|
160
|
+
# @param string value Value to be deserialized
|
|
161
|
+
# @return [Object] Deserialized data
|
|
162
|
+
def self._deserialize(type, value)
|
|
163
|
+
case type.to_sym
|
|
164
|
+
when :Time
|
|
165
|
+
Time.parse(value)
|
|
166
|
+
when :Date
|
|
167
|
+
Date.parse(value)
|
|
168
|
+
when :String
|
|
169
|
+
value.to_s
|
|
170
|
+
when :Integer
|
|
171
|
+
value.to_i
|
|
172
|
+
when :Float
|
|
173
|
+
value.to_f
|
|
174
|
+
when :Boolean
|
|
175
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
176
|
+
true
|
|
177
|
+
else
|
|
178
|
+
false
|
|
179
|
+
end
|
|
180
|
+
when :Object
|
|
181
|
+
# generic object (usually a Hash), return directly
|
|
182
|
+
value
|
|
183
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
184
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
185
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
186
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
187
|
+
k_type = Regexp.last_match[:k_type]
|
|
188
|
+
v_type = Regexp.last_match[:v_type]
|
|
189
|
+
{}.tap do |hash|
|
|
190
|
+
value.each do |k, v|
|
|
191
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
else # model
|
|
195
|
+
# models (e.g. Pet) or oneOf
|
|
196
|
+
klass = SeatsChart.const_get(type)
|
|
197
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Returns the string representation of the object
|
|
202
|
+
# @return [String] String presentation of the object
|
|
203
|
+
def to_s
|
|
204
|
+
to_hash.to_s
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
|
209
|
+
def to_body
|
|
210
|
+
to_hash
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Returns the object in the form of hash
|
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
|
215
|
+
def to_hash
|
|
216
|
+
hash = {}
|
|
217
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
218
|
+
value = self.send(attr)
|
|
219
|
+
if value.nil?
|
|
220
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
221
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
hash[param] = _to_hash(value)
|
|
225
|
+
end
|
|
226
|
+
hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Outputs non-array value in the form of hash
|
|
230
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
231
|
+
# @param [Object] value Any valid value
|
|
232
|
+
# @return [Hash] Returns the value in the form of hash
|
|
233
|
+
def _to_hash(value)
|
|
234
|
+
if value.is_a?(Array)
|
|
235
|
+
value.compact.map { |v| _to_hash(v) }
|
|
236
|
+
elsif value.is_a?(Hash)
|
|
237
|
+
{}.tap do |hash|
|
|
238
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
239
|
+
end
|
|
240
|
+
elsif value.respond_to? :to_hash
|
|
241
|
+
value.to_hash
|
|
242
|
+
else
|
|
243
|
+
value
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
end
|
|
@@ -18,7 +18,7 @@ module SeatsChart
|
|
|
18
18
|
# Minutes (1–120); `null` = use the default.
|
|
19
19
|
attr_accessor :hold_period_minutes
|
|
20
20
|
|
|
21
|
-
# Seats per hold token (1–64); `null` = use the default.
|
|
21
|
+
# Seats per hold token (1–1000; above 64 = large group holds); `null` = use the default (64).
|
|
22
22
|
attr_accessor :max_seats_per_hold_token
|
|
23
23
|
|
|
24
24
|
# `null` = use the default (off).
|
|
@@ -126,8 +126,8 @@ module SeatsChart
|
|
|
126
126
|
invalid_properties.push('invalid value for "hold_period_minutes", must be greater than or equal to 1.')
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
-
if !@max_seats_per_hold_token.nil? && @max_seats_per_hold_token >
|
|
130
|
-
invalid_properties.push('invalid value for "max_seats_per_hold_token", must be smaller than or equal to
|
|
129
|
+
if !@max_seats_per_hold_token.nil? && @max_seats_per_hold_token > 1000
|
|
130
|
+
invalid_properties.push('invalid value for "max_seats_per_hold_token", must be smaller than or equal to 1000.')
|
|
131
131
|
end
|
|
132
132
|
|
|
133
133
|
if !@max_seats_per_hold_token.nil? && @max_seats_per_hold_token < 1
|
|
@@ -143,7 +143,7 @@ module SeatsChart
|
|
|
143
143
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
144
144
|
return false if !@hold_period_minutes.nil? && @hold_period_minutes > 120
|
|
145
145
|
return false if !@hold_period_minutes.nil? && @hold_period_minutes < 1
|
|
146
|
-
return false if !@max_seats_per_hold_token.nil? && @max_seats_per_hold_token >
|
|
146
|
+
return false if !@max_seats_per_hold_token.nil? && @max_seats_per_hold_token > 1000
|
|
147
147
|
return false if !@max_seats_per_hold_token.nil? && @max_seats_per_hold_token < 1
|
|
148
148
|
true
|
|
149
149
|
end
|
|
@@ -165,8 +165,8 @@ module SeatsChart
|
|
|
165
165
|
# Custom attribute writer method with validation
|
|
166
166
|
# @param [Object] max_seats_per_hold_token Value to be assigned
|
|
167
167
|
def max_seats_per_hold_token=(max_seats_per_hold_token)
|
|
168
|
-
if !max_seats_per_hold_token.nil? && max_seats_per_hold_token >
|
|
169
|
-
fail ArgumentError, 'invalid value for "max_seats_per_hold_token", must be smaller than or equal to
|
|
168
|
+
if !max_seats_per_hold_token.nil? && max_seats_per_hold_token > 1000
|
|
169
|
+
fail ArgumentError, 'invalid value for "max_seats_per_hold_token", must be smaller than or equal to 1000.'
|
|
170
170
|
end
|
|
171
171
|
|
|
172
172
|
if !max_seats_per_hold_token.nil? && max_seats_per_hold_token < 1
|
|
@@ -0,0 +1,221 @@
|
|
|
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 PatchApiWorkspacesByWorkspaceIdKeysByKeyId200Response
|
|
18
|
+
attr_accessor :api_key
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'api_key' => :'apiKey'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns all the JSON keys this model knows about
|
|
28
|
+
def self.acceptable_attributes
|
|
29
|
+
attribute_map.values
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Attribute type mapping.
|
|
33
|
+
def self.openapi_types
|
|
34
|
+
{
|
|
35
|
+
:'api_key' => :'GetApiWorkspacesByWorkspaceIdKeys200ResponseApiKeysInner'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# List of attributes with nullable: true
|
|
40
|
+
def self.openapi_nullable
|
|
41
|
+
Set.new([
|
|
42
|
+
])
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Initializes the object
|
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
47
|
+
def initialize(attributes = {})
|
|
48
|
+
if (!attributes.is_a?(Hash))
|
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PatchApiWorkspacesByWorkspaceIdKeysByKeyId200Response` initialize method"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PatchApiWorkspacesByWorkspaceIdKeysByKeyId200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
56
|
+
end
|
|
57
|
+
h[k.to_sym] = v
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if attributes.key?(:'api_key')
|
|
61
|
+
self.api_key = attributes[:'api_key']
|
|
62
|
+
else
|
|
63
|
+
self.api_key = nil
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
68
|
+
# @return Array for valid properties with the reasons
|
|
69
|
+
def list_invalid_properties
|
|
70
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
71
|
+
invalid_properties = Array.new
|
|
72
|
+
if @api_key.nil?
|
|
73
|
+
invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
invalid_properties
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Check to see if the all the properties in the model are valid
|
|
80
|
+
# @return true if the model is valid
|
|
81
|
+
def valid?
|
|
82
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
|
+
return false if @api_key.nil?
|
|
84
|
+
true
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Checks equality by comparing each attribute.
|
|
88
|
+
# @param [Object] Object to be compared
|
|
89
|
+
def ==(o)
|
|
90
|
+
return true if self.equal?(o)
|
|
91
|
+
self.class == o.class &&
|
|
92
|
+
api_key == o.api_key
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# @see the `==` method
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def eql?(o)
|
|
98
|
+
self == o
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Calculates hash code according to all attributes.
|
|
102
|
+
# @return [Integer] Hash code
|
|
103
|
+
def hash
|
|
104
|
+
[api_key].hash
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Builds the object from hash
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
# @return [Object] Returns the model itself
|
|
110
|
+
def self.build_from_hash(attributes)
|
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
|
112
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
113
|
+
transformed_hash = {}
|
|
114
|
+
openapi_types.each_pair do |key, type|
|
|
115
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
116
|
+
transformed_hash["#{key}"] = nil
|
|
117
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
118
|
+
# check to ensure the input is an array given that the attribute
|
|
119
|
+
# is documented as an array but the input is not
|
|
120
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
121
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
122
|
+
end
|
|
123
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
new(transformed_hash)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Deserializes the data based on type
|
|
131
|
+
# @param string type Data type
|
|
132
|
+
# @param string value Value to be deserialized
|
|
133
|
+
# @return [Object] Deserialized data
|
|
134
|
+
def self._deserialize(type, value)
|
|
135
|
+
case type.to_sym
|
|
136
|
+
when :Time
|
|
137
|
+
Time.parse(value)
|
|
138
|
+
when :Date
|
|
139
|
+
Date.parse(value)
|
|
140
|
+
when :String
|
|
141
|
+
value.to_s
|
|
142
|
+
when :Integer
|
|
143
|
+
value.to_i
|
|
144
|
+
when :Float
|
|
145
|
+
value.to_f
|
|
146
|
+
when :Boolean
|
|
147
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
148
|
+
true
|
|
149
|
+
else
|
|
150
|
+
false
|
|
151
|
+
end
|
|
152
|
+
when :Object
|
|
153
|
+
# generic object (usually a Hash), return directly
|
|
154
|
+
value
|
|
155
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
156
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
157
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
158
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
159
|
+
k_type = Regexp.last_match[:k_type]
|
|
160
|
+
v_type = Regexp.last_match[:v_type]
|
|
161
|
+
{}.tap do |hash|
|
|
162
|
+
value.each do |k, v|
|
|
163
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
else # model
|
|
167
|
+
# models (e.g. Pet) or oneOf
|
|
168
|
+
klass = SeatsChart.const_get(type)
|
|
169
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns the string representation of the object
|
|
174
|
+
# @return [String] String presentation of the object
|
|
175
|
+
def to_s
|
|
176
|
+
to_hash.to_s
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
|
181
|
+
def to_body
|
|
182
|
+
to_hash
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Returns the object in the form of hash
|
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
|
187
|
+
def to_hash
|
|
188
|
+
hash = {}
|
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
190
|
+
value = self.send(attr)
|
|
191
|
+
if value.nil?
|
|
192
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
193
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
hash[param] = _to_hash(value)
|
|
197
|
+
end
|
|
198
|
+
hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Outputs non-array value in the form of hash
|
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
203
|
+
# @param [Object] value Any valid value
|
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
|
205
|
+
def _to_hash(value)
|
|
206
|
+
if value.is_a?(Array)
|
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
|
208
|
+
elsif value.is_a?(Hash)
|
|
209
|
+
{}.tap do |hash|
|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
211
|
+
end
|
|
212
|
+
elsif value.respond_to? :to_hash
|
|
213
|
+
value.to_hash
|
|
214
|
+
else
|
|
215
|
+
value
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|