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,105 @@
|
|
|
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
|
+
# JSON object `{\"x\",\"y\",\"width\",\"height\"}` in source-image pixels limiting the scan to that rectangle (leaves out a legend, title or stage text). Works with `auto` and `examples`; example points must lie inside it. Returned seats stay in whole-image coordinates.
|
|
18
|
+
module PostApiExtractSeatsRequestRegion
|
|
19
|
+
class << self
|
|
20
|
+
# List of class defined in anyOf (OpenAPI v3)
|
|
21
|
+
def openapi_any_of
|
|
22
|
+
[
|
|
23
|
+
:'PostApiExtractSeatsRequestRegionAnyOf',
|
|
24
|
+
:'String'
|
|
25
|
+
]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Builds the object
|
|
29
|
+
# @param [Mixed] Data to be matched against the list of anyOf items
|
|
30
|
+
# @return [Object] Returns the model or the data itself
|
|
31
|
+
def build(data)
|
|
32
|
+
# Go through the list of anyOf items and attempt to identify the appropriate one.
|
|
33
|
+
# Note:
|
|
34
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
35
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
36
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
37
|
+
# - TODO: logging when debugging is set.
|
|
38
|
+
openapi_any_of.each do |klass|
|
|
39
|
+
begin
|
|
40
|
+
next if klass == :AnyType # "nullable: true"
|
|
41
|
+
typed_data = find_and_cast_into_type(klass, data)
|
|
42
|
+
return typed_data if typed_data
|
|
43
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
openapi_any_of.include?(:AnyType) ? data : nil
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
private
|
|
51
|
+
|
|
52
|
+
SchemaMismatchError = Class.new(StandardError)
|
|
53
|
+
|
|
54
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
55
|
+
def find_and_cast_into_type(klass, data)
|
|
56
|
+
return if data.nil?
|
|
57
|
+
|
|
58
|
+
case klass.to_s
|
|
59
|
+
when 'Boolean'
|
|
60
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
61
|
+
when 'Float'
|
|
62
|
+
return data if data.instance_of?(Float)
|
|
63
|
+
when 'Integer'
|
|
64
|
+
return data if data.instance_of?(Integer)
|
|
65
|
+
when 'Time'
|
|
66
|
+
return Time.parse(data)
|
|
67
|
+
when 'Date'
|
|
68
|
+
return Date.parse(data)
|
|
69
|
+
when 'String'
|
|
70
|
+
return data if data.instance_of?(String)
|
|
71
|
+
when 'Object' # "type: object"
|
|
72
|
+
return data if data.instance_of?(Hash)
|
|
73
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
74
|
+
if data.instance_of?(Array)
|
|
75
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
76
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
77
|
+
end
|
|
78
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
79
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
80
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
81
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
82
|
+
end
|
|
83
|
+
else # model
|
|
84
|
+
const = SeatsChart.const_get(klass)
|
|
85
|
+
if const
|
|
86
|
+
if const.respond_to?(:openapi_any_of) # nested anyOf model
|
|
87
|
+
model = const.build(data)
|
|
88
|
+
return model if model
|
|
89
|
+
else
|
|
90
|
+
# raise if data contains keys that are not known to the model
|
|
91
|
+
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
92
|
+
model = const.build_from_hash(data)
|
|
93
|
+
return model if model
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
raise # if no match by now, raise
|
|
99
|
+
rescue
|
|
100
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
end
|
|
@@ -14,26 +14,22 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SeatsChart
|
|
17
|
-
class
|
|
18
|
-
attr_accessor :
|
|
17
|
+
class PostApiExtractSeatsRequestRegionAnyOf
|
|
18
|
+
attr_accessor :x
|
|
19
19
|
|
|
20
|
-
attr_accessor :
|
|
20
|
+
attr_accessor :y
|
|
21
21
|
|
|
22
|
-
attr_accessor :
|
|
22
|
+
attr_accessor :width
|
|
23
23
|
|
|
24
|
-
attr_accessor :
|
|
25
|
-
|
|
26
|
-
# Draft version this save is based on (`draftUpdatedAt` from the last load or save; null for a never-saved draft). When given and the stored draft changed meanwhile, the save is refused with 409 `draft_conflict` (designer autosave). Omit it for last-writer-wins.
|
|
27
|
-
attr_accessor :base_draft_updated_at
|
|
24
|
+
attr_accessor :height
|
|
28
25
|
|
|
29
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
27
|
def self.attribute_map
|
|
31
28
|
{
|
|
32
|
-
:'
|
|
33
|
-
:'
|
|
34
|
-
:'
|
|
35
|
-
:'
|
|
36
|
-
:'base_draft_updated_at' => :'baseDraftUpdatedAt'
|
|
29
|
+
:'x' => :'x',
|
|
30
|
+
:'y' => :'y',
|
|
31
|
+
:'width' => :'width',
|
|
32
|
+
:'height' => :'height'
|
|
37
33
|
}
|
|
38
34
|
end
|
|
39
35
|
|
|
@@ -45,20 +41,16 @@ module SeatsChart
|
|
|
45
41
|
# Attribute type mapping.
|
|
46
42
|
def self.openapi_types
|
|
47
43
|
{
|
|
48
|
-
:'
|
|
49
|
-
:'
|
|
50
|
-
:'
|
|
51
|
-
:'
|
|
52
|
-
:'base_draft_updated_at' => :'String'
|
|
44
|
+
:'x' => :'Float',
|
|
45
|
+
:'y' => :'Float',
|
|
46
|
+
:'width' => :'Float',
|
|
47
|
+
:'height' => :'Float'
|
|
53
48
|
}
|
|
54
49
|
end
|
|
55
50
|
|
|
56
51
|
# List of attributes with nullable: true
|
|
57
52
|
def self.openapi_nullable
|
|
58
53
|
Set.new([
|
|
59
|
-
:'background',
|
|
60
|
-
:'reference',
|
|
61
|
-
:'base_draft_updated_at'
|
|
62
54
|
])
|
|
63
55
|
end
|
|
64
56
|
|
|
@@ -66,41 +58,39 @@ module SeatsChart
|
|
|
66
58
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
59
|
def initialize(attributes = {})
|
|
68
60
|
if (!attributes.is_a?(Hash))
|
|
69
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiExtractSeatsRequestRegionAnyOf` initialize method"
|
|
70
62
|
end
|
|
71
63
|
|
|
72
64
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
66
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
75
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiExtractSeatsRequestRegionAnyOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
76
68
|
end
|
|
77
69
|
h[k.to_sym] = v
|
|
78
70
|
}
|
|
79
71
|
|
|
80
|
-
if attributes.key?(:'
|
|
81
|
-
|
|
82
|
-
self.seats = value
|
|
83
|
-
end
|
|
72
|
+
if attributes.key?(:'x')
|
|
73
|
+
self.x = attributes[:'x']
|
|
84
74
|
else
|
|
85
|
-
self.
|
|
75
|
+
self.x = nil
|
|
86
76
|
end
|
|
87
77
|
|
|
88
|
-
if attributes.key?(:'
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
if attributes.key?(:'background')
|
|
95
|
-
self.background = attributes[:'background']
|
|
78
|
+
if attributes.key?(:'y')
|
|
79
|
+
self.y = attributes[:'y']
|
|
80
|
+
else
|
|
81
|
+
self.y = nil
|
|
96
82
|
end
|
|
97
83
|
|
|
98
|
-
if attributes.key?(:'
|
|
99
|
-
self.
|
|
84
|
+
if attributes.key?(:'width')
|
|
85
|
+
self.width = attributes[:'width']
|
|
86
|
+
else
|
|
87
|
+
self.width = nil
|
|
100
88
|
end
|
|
101
89
|
|
|
102
|
-
if attributes.key?(:'
|
|
103
|
-
self.
|
|
90
|
+
if attributes.key?(:'height')
|
|
91
|
+
self.height = attributes[:'height']
|
|
92
|
+
else
|
|
93
|
+
self.height = nil
|
|
104
94
|
end
|
|
105
95
|
end
|
|
106
96
|
|
|
@@ -109,28 +99,44 @@ module SeatsChart
|
|
|
109
99
|
def list_invalid_properties
|
|
110
100
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
101
|
invalid_properties = Array.new
|
|
112
|
-
if @
|
|
113
|
-
invalid_properties.push('invalid value for "
|
|
102
|
+
if @x.nil?
|
|
103
|
+
invalid_properties.push('invalid value for "x", x cannot be nil.')
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if @x > 16384
|
|
107
|
+
invalid_properties.push('invalid value for "x", must be smaller than or equal to 16384.')
|
|
114
108
|
end
|
|
115
109
|
|
|
116
|
-
if @
|
|
117
|
-
invalid_properties.push('invalid value for "
|
|
110
|
+
if @x < 0
|
|
111
|
+
invalid_properties.push('invalid value for "x", must be greater than or equal to 0.')
|
|
118
112
|
end
|
|
119
113
|
|
|
120
|
-
if
|
|
121
|
-
invalid_properties.push('invalid value for "
|
|
114
|
+
if @y.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "y", y cannot be nil.')
|
|
122
116
|
end
|
|
123
117
|
|
|
124
|
-
if
|
|
125
|
-
invalid_properties.push('invalid value for "
|
|
118
|
+
if @y > 16384
|
|
119
|
+
invalid_properties.push('invalid value for "y", must be smaller than or equal to 16384.')
|
|
126
120
|
end
|
|
127
121
|
|
|
128
|
-
if
|
|
129
|
-
invalid_properties.push('invalid value for "
|
|
122
|
+
if @y < 0
|
|
123
|
+
invalid_properties.push('invalid value for "y", must be greater than or equal to 0.')
|
|
130
124
|
end
|
|
131
125
|
|
|
132
|
-
if
|
|
133
|
-
invalid_properties.push('invalid value for "
|
|
126
|
+
if @width.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "width", width cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @width > 16384
|
|
131
|
+
invalid_properties.push('invalid value for "width", must be smaller than or equal to 16384.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @height.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "height", height cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if @height > 16384
|
|
139
|
+
invalid_properties.push('invalid value for "height", must be smaller than or equal to 16384.')
|
|
134
140
|
end
|
|
135
141
|
|
|
136
142
|
invalid_properties
|
|
@@ -140,71 +146,81 @@ module SeatsChart
|
|
|
140
146
|
# @return true if the model is valid
|
|
141
147
|
def valid?
|
|
142
148
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
143
|
-
return false if @
|
|
144
|
-
return false if @
|
|
145
|
-
return false if
|
|
146
|
-
return false if
|
|
147
|
-
return false if
|
|
148
|
-
return false if
|
|
149
|
+
return false if @x.nil?
|
|
150
|
+
return false if @x > 16384
|
|
151
|
+
return false if @x < 0
|
|
152
|
+
return false if @y.nil?
|
|
153
|
+
return false if @y > 16384
|
|
154
|
+
return false if @y < 0
|
|
155
|
+
return false if @width.nil?
|
|
156
|
+
return false if @width > 16384
|
|
157
|
+
return false if @height.nil?
|
|
158
|
+
return false if @height > 16384
|
|
149
159
|
true
|
|
150
160
|
end
|
|
151
161
|
|
|
152
162
|
# Custom attribute writer method with validation
|
|
153
|
-
# @param [Object]
|
|
154
|
-
def
|
|
155
|
-
if
|
|
156
|
-
fail ArgumentError, '
|
|
163
|
+
# @param [Object] x Value to be assigned
|
|
164
|
+
def x=(x)
|
|
165
|
+
if x.nil?
|
|
166
|
+
fail ArgumentError, 'x cannot be nil'
|
|
157
167
|
end
|
|
158
168
|
|
|
159
|
-
if
|
|
160
|
-
fail ArgumentError, 'invalid value for "
|
|
169
|
+
if x > 16384
|
|
170
|
+
fail ArgumentError, 'invalid value for "x", must be smaller than or equal to 16384.'
|
|
161
171
|
end
|
|
162
172
|
|
|
163
|
-
|
|
173
|
+
if x < 0
|
|
174
|
+
fail ArgumentError, 'invalid value for "x", must be greater than or equal to 0.'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
@x = x
|
|
164
178
|
end
|
|
165
179
|
|
|
166
180
|
# Custom attribute writer method with validation
|
|
167
|
-
# @param [Object]
|
|
168
|
-
def
|
|
169
|
-
if
|
|
170
|
-
fail ArgumentError, '
|
|
181
|
+
# @param [Object] y Value to be assigned
|
|
182
|
+
def y=(y)
|
|
183
|
+
if y.nil?
|
|
184
|
+
fail ArgumentError, 'y cannot be nil'
|
|
171
185
|
end
|
|
172
186
|
|
|
173
|
-
if
|
|
174
|
-
fail ArgumentError, 'invalid value for "
|
|
187
|
+
if y > 16384
|
|
188
|
+
fail ArgumentError, 'invalid value for "y", must be smaller than or equal to 16384.'
|
|
175
189
|
end
|
|
176
190
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
# Custom attribute writer method with validation
|
|
181
|
-
# @param [Object] background Value to be assigned
|
|
182
|
-
def background=(background)
|
|
183
|
-
if !background.nil? && background.to_s.length > 2000000
|
|
184
|
-
fail ArgumentError, 'invalid value for "background", the character length must be smaller than or equal to 2000000.'
|
|
191
|
+
if y < 0
|
|
192
|
+
fail ArgumentError, 'invalid value for "y", must be greater than or equal to 0.'
|
|
185
193
|
end
|
|
186
194
|
|
|
187
|
-
@
|
|
195
|
+
@y = y
|
|
188
196
|
end
|
|
189
197
|
|
|
190
198
|
# Custom attribute writer method with validation
|
|
191
|
-
# @param [Object]
|
|
192
|
-
def
|
|
193
|
-
if
|
|
194
|
-
fail ArgumentError, '
|
|
199
|
+
# @param [Object] width Value to be assigned
|
|
200
|
+
def width=(width)
|
|
201
|
+
if width.nil?
|
|
202
|
+
fail ArgumentError, 'width cannot be nil'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if width > 16384
|
|
206
|
+
fail ArgumentError, 'invalid value for "width", must be smaller than or equal to 16384.'
|
|
195
207
|
end
|
|
196
208
|
|
|
197
|
-
@
|
|
209
|
+
@width = width
|
|
198
210
|
end
|
|
199
211
|
|
|
200
212
|
# Custom attribute writer method with validation
|
|
201
|
-
# @param [Object]
|
|
202
|
-
def
|
|
203
|
-
if
|
|
204
|
-
fail ArgumentError, '
|
|
213
|
+
# @param [Object] height Value to be assigned
|
|
214
|
+
def height=(height)
|
|
215
|
+
if height.nil?
|
|
216
|
+
fail ArgumentError, 'height cannot be nil'
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if height > 16384
|
|
220
|
+
fail ArgumentError, 'invalid value for "height", must be smaller than or equal to 16384.'
|
|
205
221
|
end
|
|
206
222
|
|
|
207
|
-
@
|
|
223
|
+
@height = height
|
|
208
224
|
end
|
|
209
225
|
|
|
210
226
|
# Checks equality by comparing each attribute.
|
|
@@ -212,11 +228,10 @@ module SeatsChart
|
|
|
212
228
|
def ==(o)
|
|
213
229
|
return true if self.equal?(o)
|
|
214
230
|
self.class == o.class &&
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
base_draft_updated_at == o.base_draft_updated_at
|
|
231
|
+
x == o.x &&
|
|
232
|
+
y == o.y &&
|
|
233
|
+
width == o.width &&
|
|
234
|
+
height == o.height
|
|
220
235
|
end
|
|
221
236
|
|
|
222
237
|
# @see the `==` method
|
|
@@ -228,7 +243,7 @@ module SeatsChart
|
|
|
228
243
|
# Calculates hash code according to all attributes.
|
|
229
244
|
# @return [Integer] Hash code
|
|
230
245
|
def hash
|
|
231
|
-
[
|
|
246
|
+
[x, y, width, height].hash
|
|
232
247
|
end
|
|
233
248
|
|
|
234
249
|
# Builds the object from hash
|
|
@@ -0,0 +1,245 @@
|
|
|
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 PostApiSandboxes201Response
|
|
18
|
+
attr_accessor :sandbox
|
|
19
|
+
|
|
20
|
+
attr_accessor :admin_key
|
|
21
|
+
|
|
22
|
+
attr_accessor :copied
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'sandbox' => :'sandbox',
|
|
28
|
+
:'admin_key' => :'adminKey',
|
|
29
|
+
:'copied' => :'copied'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'sandbox' => :'GetApiSandboxes200ResponseItemsInner',
|
|
42
|
+
:'admin_key' => :'PostApiSandboxes201ResponseAdminKey',
|
|
43
|
+
:'copied' => :'PostApiSandboxes201ResponseCopied'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# List of attributes with nullable: true
|
|
48
|
+
def self.openapi_nullable
|
|
49
|
+
Set.new([
|
|
50
|
+
:'admin_key',
|
|
51
|
+
:'copied'
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiSandboxes201Response` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiSandboxes201Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'sandbox')
|
|
71
|
+
self.sandbox = attributes[:'sandbox']
|
|
72
|
+
else
|
|
73
|
+
self.sandbox = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'admin_key')
|
|
77
|
+
self.admin_key = attributes[:'admin_key']
|
|
78
|
+
else
|
|
79
|
+
self.admin_key = nil
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'copied')
|
|
83
|
+
self.copied = attributes[:'copied']
|
|
84
|
+
else
|
|
85
|
+
self.copied = nil
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
90
|
+
# @return Array for valid properties with the reasons
|
|
91
|
+
def list_invalid_properties
|
|
92
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
93
|
+
invalid_properties = Array.new
|
|
94
|
+
if @sandbox.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "sandbox", sandbox cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @sandbox.nil?
|
|
106
|
+
true
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Checks equality by comparing each attribute.
|
|
110
|
+
# @param [Object] Object to be compared
|
|
111
|
+
def ==(o)
|
|
112
|
+
return true if self.equal?(o)
|
|
113
|
+
self.class == o.class &&
|
|
114
|
+
sandbox == o.sandbox &&
|
|
115
|
+
admin_key == o.admin_key &&
|
|
116
|
+
copied == o.copied
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# @see the `==` method
|
|
120
|
+
# @param [Object] Object to be compared
|
|
121
|
+
def eql?(o)
|
|
122
|
+
self == o
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Calculates hash code according to all attributes.
|
|
126
|
+
# @return [Integer] Hash code
|
|
127
|
+
def hash
|
|
128
|
+
[sandbox, admin_key, copied].hash
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Builds the object from hash
|
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
133
|
+
# @return [Object] Returns the model itself
|
|
134
|
+
def self.build_from_hash(attributes)
|
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
|
136
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
137
|
+
transformed_hash = {}
|
|
138
|
+
openapi_types.each_pair do |key, type|
|
|
139
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = nil
|
|
141
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
142
|
+
# check to ensure the input is an array given that the attribute
|
|
143
|
+
# is documented as an array but the input is not
|
|
144
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
145
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
146
|
+
end
|
|
147
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
148
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
new(transformed_hash)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Deserializes the data based on type
|
|
155
|
+
# @param string type Data type
|
|
156
|
+
# @param string value Value to be deserialized
|
|
157
|
+
# @return [Object] Deserialized data
|
|
158
|
+
def self._deserialize(type, value)
|
|
159
|
+
case type.to_sym
|
|
160
|
+
when :Time
|
|
161
|
+
Time.parse(value)
|
|
162
|
+
when :Date
|
|
163
|
+
Date.parse(value)
|
|
164
|
+
when :String
|
|
165
|
+
value.to_s
|
|
166
|
+
when :Integer
|
|
167
|
+
value.to_i
|
|
168
|
+
when :Float
|
|
169
|
+
value.to_f
|
|
170
|
+
when :Boolean
|
|
171
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
172
|
+
true
|
|
173
|
+
else
|
|
174
|
+
false
|
|
175
|
+
end
|
|
176
|
+
when :Object
|
|
177
|
+
# generic object (usually a Hash), return directly
|
|
178
|
+
value
|
|
179
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
180
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
181
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
182
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
183
|
+
k_type = Regexp.last_match[:k_type]
|
|
184
|
+
v_type = Regexp.last_match[:v_type]
|
|
185
|
+
{}.tap do |hash|
|
|
186
|
+
value.each do |k, v|
|
|
187
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
else # model
|
|
191
|
+
# models (e.g. Pet) or oneOf
|
|
192
|
+
klass = SeatsChart.const_get(type)
|
|
193
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Returns the string representation of the object
|
|
198
|
+
# @return [String] String presentation of the object
|
|
199
|
+
def to_s
|
|
200
|
+
to_hash.to_s
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
|
205
|
+
def to_body
|
|
206
|
+
to_hash
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Returns the object in the form of hash
|
|
210
|
+
# @return [Hash] Returns the object in the form of hash
|
|
211
|
+
def to_hash
|
|
212
|
+
hash = {}
|
|
213
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
214
|
+
value = self.send(attr)
|
|
215
|
+
if value.nil?
|
|
216
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
217
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
hash[param] = _to_hash(value)
|
|
221
|
+
end
|
|
222
|
+
hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Outputs non-array value in the form of hash
|
|
226
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
227
|
+
# @param [Object] value Any valid value
|
|
228
|
+
# @return [Hash] Returns the value in the form of hash
|
|
229
|
+
def _to_hash(value)
|
|
230
|
+
if value.is_a?(Array)
|
|
231
|
+
value.compact.map { |v| _to_hash(v) }
|
|
232
|
+
elsif value.is_a?(Hash)
|
|
233
|
+
{}.tap do |hash|
|
|
234
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
235
|
+
end
|
|
236
|
+
elsif value.respond_to? :to_hash
|
|
237
|
+
value.to_hash
|
|
238
|
+
else
|
|
239
|
+
value
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
end
|