seatschart 0.1.1 → 0.2.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 +31 -3
- data/lib/seatschart/api/charts_api.rb +9 -9
- data/lib/seatschart/api/embed_api.rb +13 -2
- data/lib/seatschart/api/event_log_api.rb +2 -2
- data/lib/seatschart/api/events_api.rb +186 -20
- data/lib/seatschart/api/listings_api.rb +884 -0
- data/lib/seatschart/api/object_status_api.rb +2 -2
- data/lib/seatschart/api/seasons_api.rb +113 -8
- data/lib/seatschart/api/seats_api.rb +3 -22
- data/lib/seatschart/api/usage_api.rb +4 -4
- data/lib/seatschart/api/webhooks_api.rb +2 -2
- data/lib/seatschart/api/workspace_api.rb +4 -4
- data/lib/seatschart/models/api_error.rb +307 -0
- data/lib/seatschart/models/api_error_params_value.rb +105 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +17 -1
- data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency.rb +318 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency_api_keys_inner.rb +297 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +21 -4
- data/lib/seatschart/models/get_api_workspace_settings200_response_effective.rb +20 -4
- data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +13 -4
- data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +32 -4
- data/lib/seatschart/models/patch_api_events_by_event_id_listings_by_listing_id_request.rb +379 -0
- data/lib/seatschart/models/patch_api_listing_types_by_key_request.rb +376 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_partial_seasons_by_partial_season_id_request.rb +268 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +27 -1
- data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +1 -1
- data/lib/seatschart/models/patch_api_workspace_settings_request.rb +12 -1
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner_accessibility.rb +6 -6
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner.rb +0 -11
- data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request.rb +13 -26
- data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request_listing.rb +392 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_mark_everything_as_not_for_sale_request.rb +215 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_by_listing_id_actions_mark_sold_request.rb +243 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_request.rb +435 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner.rb +104 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner_any_of.rb +325 -0
- data/lib/seatschart/models/post_api_ga_confirm_request.rb +0 -44
- data/lib/seatschart/models/post_api_ga_release_request.rb +0 -11
- data/lib/seatschart/models/post_api_ga_reserve_request.rb +0 -33
- data/lib/seatschart/models/post_api_hold_tokens_request.rb +0 -22
- data/lib/seatschart/models/post_api_listing_types_request.rb +439 -0
- data/lib/seatschart/models/post_api_quotes_request.rb +0 -22
- data/lib/seatschart/models/post_api_seasons_by_season_id_partial_seasons_request.rb +27 -1
- data/lib/seatschart/models/post_api_seasons_request.rb +27 -1
- data/lib/seatschart/models/post_api_seats_best_available_request.rb +0 -11
- data/lib/seatschart/models/post_api_seats_confirm_request.rb +0 -44
- data/lib/seatschart/models/post_api_seats_release_request.rb +0 -11
- data/lib/seatschart/models/post_api_seats_reserve_request.rb +0 -22
- data/lib/seatschart/models/post_api_viewer_tokens_request.rb +0 -11
- data/lib/seatschart/models/post_api_webhooks_request.rb +1 -1
- data/lib/seatschart/models/put_api_charts_by_chart_id_map_draft_request.rb +348 -0
- data/lib/seatschart/version.rb +1 -1
- data/lib/seatschart.rb +16 -0
- metadata +17 -1
|
@@ -23,13 +23,16 @@ module SeatsChart
|
|
|
23
23
|
|
|
24
24
|
attr_accessor :ga_places_to_channels
|
|
25
25
|
|
|
26
|
+
attr_accessor :new_events_not_for_sale
|
|
27
|
+
|
|
26
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
29
|
def self.attribute_map
|
|
28
30
|
{
|
|
29
31
|
:'hold_period_minutes' => :'holdPeriodMinutes',
|
|
30
32
|
:'max_seats_per_hold_token' => :'maxSeatsPerHoldToken',
|
|
31
33
|
:'ticket_buyer_validation' => :'ticketBuyerValidation',
|
|
32
|
-
:'ga_places_to_channels' => :'gaPlacesToChannels'
|
|
34
|
+
:'ga_places_to_channels' => :'gaPlacesToChannels',
|
|
35
|
+
:'new_events_not_for_sale' => :'newEventsNotForSale'
|
|
33
36
|
}
|
|
34
37
|
end
|
|
35
38
|
|
|
@@ -44,7 +47,8 @@ module SeatsChart
|
|
|
44
47
|
:'hold_period_minutes' => :'Integer',
|
|
45
48
|
:'max_seats_per_hold_token' => :'Integer',
|
|
46
49
|
:'ticket_buyer_validation' => :'Boolean',
|
|
47
|
-
:'ga_places_to_channels' => :'Boolean'
|
|
50
|
+
:'ga_places_to_channels' => :'Boolean',
|
|
51
|
+
:'new_events_not_for_sale' => :'Boolean'
|
|
48
52
|
}
|
|
49
53
|
end
|
|
50
54
|
|
|
@@ -92,6 +96,12 @@ module SeatsChart
|
|
|
92
96
|
else
|
|
93
97
|
self.ga_places_to_channels = nil
|
|
94
98
|
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'new_events_not_for_sale')
|
|
101
|
+
self.new_events_not_for_sale = attributes[:'new_events_not_for_sale']
|
|
102
|
+
else
|
|
103
|
+
self.new_events_not_for_sale = nil
|
|
104
|
+
end
|
|
95
105
|
end
|
|
96
106
|
|
|
97
107
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -115,6 +125,10 @@ module SeatsChart
|
|
|
115
125
|
invalid_properties.push('invalid value for "ga_places_to_channels", ga_places_to_channels cannot be nil.')
|
|
116
126
|
end
|
|
117
127
|
|
|
128
|
+
if @new_events_not_for_sale.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "new_events_not_for_sale", new_events_not_for_sale cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
118
132
|
invalid_properties
|
|
119
133
|
end
|
|
120
134
|
|
|
@@ -126,6 +140,7 @@ module SeatsChart
|
|
|
126
140
|
return false if @max_seats_per_hold_token.nil?
|
|
127
141
|
return false if @ticket_buyer_validation.nil?
|
|
128
142
|
return false if @ga_places_to_channels.nil?
|
|
143
|
+
return false if @new_events_not_for_sale.nil?
|
|
129
144
|
true
|
|
130
145
|
end
|
|
131
146
|
|
|
@@ -137,7 +152,8 @@ module SeatsChart
|
|
|
137
152
|
hold_period_minutes == o.hold_period_minutes &&
|
|
138
153
|
max_seats_per_hold_token == o.max_seats_per_hold_token &&
|
|
139
154
|
ticket_buyer_validation == o.ticket_buyer_validation &&
|
|
140
|
-
ga_places_to_channels == o.ga_places_to_channels
|
|
155
|
+
ga_places_to_channels == o.ga_places_to_channels &&
|
|
156
|
+
new_events_not_for_sale == o.new_events_not_for_sale
|
|
141
157
|
end
|
|
142
158
|
|
|
143
159
|
# @see the `==` method
|
|
@@ -149,7 +165,7 @@ module SeatsChart
|
|
|
149
165
|
# Calculates hash code according to all attributes.
|
|
150
166
|
# @return [Integer] Hash code
|
|
151
167
|
def hash
|
|
152
|
-
[hold_period_minutes, max_seats_per_hold_token, ticket_buyer_validation, ga_places_to_channels].hash
|
|
168
|
+
[hold_period_minutes, max_seats_per_hold_token, ticket_buyer_validation, ga_places_to_channels, new_events_not_for_sale].hash
|
|
153
169
|
end
|
|
154
170
|
|
|
155
171
|
# Builds the object from hash
|
|
@@ -23,13 +23,16 @@ module SeatsChart
|
|
|
23
23
|
|
|
24
24
|
attr_accessor :ga_places_to_channels
|
|
25
25
|
|
|
26
|
+
attr_accessor :new_events_not_for_sale
|
|
27
|
+
|
|
26
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
29
|
def self.attribute_map
|
|
28
30
|
{
|
|
29
31
|
:'hold_period_minutes' => :'holdPeriodMinutes',
|
|
30
32
|
:'max_seats_per_hold_token' => :'maxSeatsPerHoldToken',
|
|
31
33
|
:'ticket_buyer_validation' => :'ticketBuyerValidation',
|
|
32
|
-
:'ga_places_to_channels' => :'gaPlacesToChannels'
|
|
34
|
+
:'ga_places_to_channels' => :'gaPlacesToChannels',
|
|
35
|
+
:'new_events_not_for_sale' => :'newEventsNotForSale'
|
|
33
36
|
}
|
|
34
37
|
end
|
|
35
38
|
|
|
@@ -44,7 +47,8 @@ module SeatsChart
|
|
|
44
47
|
:'hold_period_minutes' => :'Integer',
|
|
45
48
|
:'max_seats_per_hold_token' => :'Integer',
|
|
46
49
|
:'ticket_buyer_validation' => :'Boolean',
|
|
47
|
-
:'ga_places_to_channels' => :'Boolean'
|
|
50
|
+
:'ga_places_to_channels' => :'Boolean',
|
|
51
|
+
:'new_events_not_for_sale' => :'Boolean'
|
|
48
52
|
}
|
|
49
53
|
end
|
|
50
54
|
|
|
@@ -84,6 +88,10 @@ module SeatsChart
|
|
|
84
88
|
if attributes.key?(:'ga_places_to_channels')
|
|
85
89
|
self.ga_places_to_channels = attributes[:'ga_places_to_channels']
|
|
86
90
|
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'new_events_not_for_sale')
|
|
93
|
+
self.new_events_not_for_sale = attributes[:'new_events_not_for_sale']
|
|
94
|
+
end
|
|
87
95
|
end
|
|
88
96
|
|
|
89
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -109,7 +117,8 @@ module SeatsChart
|
|
|
109
117
|
hold_period_minutes == o.hold_period_minutes &&
|
|
110
118
|
max_seats_per_hold_token == o.max_seats_per_hold_token &&
|
|
111
119
|
ticket_buyer_validation == o.ticket_buyer_validation &&
|
|
112
|
-
ga_places_to_channels == o.ga_places_to_channels
|
|
120
|
+
ga_places_to_channels == o.ga_places_to_channels &&
|
|
121
|
+
new_events_not_for_sale == o.new_events_not_for_sale
|
|
113
122
|
end
|
|
114
123
|
|
|
115
124
|
# @see the `==` method
|
|
@@ -121,7 +130,7 @@ module SeatsChart
|
|
|
121
130
|
# Calculates hash code according to all attributes.
|
|
122
131
|
# @return [Integer] Hash code
|
|
123
132
|
def hash
|
|
124
|
-
[hold_period_minutes, max_seats_per_hold_token, ticket_buyer_validation, ga_places_to_channels].hash
|
|
133
|
+
[hold_period_minutes, max_seats_per_hold_token, ticket_buyer_validation, ga_places_to_channels, new_events_not_for_sale].hash
|
|
125
134
|
end
|
|
126
135
|
|
|
127
136
|
# Builds the object from hash
|
|
@@ -23,6 +23,8 @@ module SeatsChart
|
|
|
23
23
|
|
|
24
24
|
attr_accessor :ga_places_to_channels
|
|
25
25
|
|
|
26
|
+
attr_accessor :new_events_not_for_sale
|
|
27
|
+
|
|
26
28
|
class EnumAttributeValidator
|
|
27
29
|
attr_reader :datatype
|
|
28
30
|
attr_reader :allowable_values
|
|
@@ -51,7 +53,8 @@ module SeatsChart
|
|
|
51
53
|
:'hold_period_minutes' => :'holdPeriodMinutes',
|
|
52
54
|
:'max_seats_per_hold_token' => :'maxSeatsPerHoldToken',
|
|
53
55
|
:'ticket_buyer_validation' => :'ticketBuyerValidation',
|
|
54
|
-
:'ga_places_to_channels' => :'gaPlacesToChannels'
|
|
56
|
+
:'ga_places_to_channels' => :'gaPlacesToChannels',
|
|
57
|
+
:'new_events_not_for_sale' => :'newEventsNotForSale'
|
|
55
58
|
}
|
|
56
59
|
end
|
|
57
60
|
|
|
@@ -66,7 +69,8 @@ module SeatsChart
|
|
|
66
69
|
:'hold_period_minutes' => :'String',
|
|
67
70
|
:'max_seats_per_hold_token' => :'String',
|
|
68
71
|
:'ticket_buyer_validation' => :'String',
|
|
69
|
-
:'ga_places_to_channels' => :'String'
|
|
72
|
+
:'ga_places_to_channels' => :'String',
|
|
73
|
+
:'new_events_not_for_sale' => :'String'
|
|
70
74
|
}
|
|
71
75
|
end
|
|
72
76
|
|
|
@@ -114,6 +118,12 @@ module SeatsChart
|
|
|
114
118
|
else
|
|
115
119
|
self.ga_places_to_channels = nil
|
|
116
120
|
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'new_events_not_for_sale')
|
|
123
|
+
self.new_events_not_for_sale = attributes[:'new_events_not_for_sale']
|
|
124
|
+
else
|
|
125
|
+
self.new_events_not_for_sale = nil
|
|
126
|
+
end
|
|
117
127
|
end
|
|
118
128
|
|
|
119
129
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -137,6 +147,10 @@ module SeatsChart
|
|
|
137
147
|
invalid_properties.push('invalid value for "ga_places_to_channels", ga_places_to_channels cannot be nil.')
|
|
138
148
|
end
|
|
139
149
|
|
|
150
|
+
if @new_events_not_for_sale.nil?
|
|
151
|
+
invalid_properties.push('invalid value for "new_events_not_for_sale", new_events_not_for_sale cannot be nil.')
|
|
152
|
+
end
|
|
153
|
+
|
|
140
154
|
invalid_properties
|
|
141
155
|
end
|
|
142
156
|
|
|
@@ -156,6 +170,9 @@ module SeatsChart
|
|
|
156
170
|
return false if @ga_places_to_channels.nil?
|
|
157
171
|
ga_places_to_channels_validator = EnumAttributeValidator.new('String', ["default", "override"])
|
|
158
172
|
return false unless ga_places_to_channels_validator.valid?(@ga_places_to_channels)
|
|
173
|
+
return false if @new_events_not_for_sale.nil?
|
|
174
|
+
new_events_not_for_sale_validator = EnumAttributeValidator.new('String', ["default", "override"])
|
|
175
|
+
return false unless new_events_not_for_sale_validator.valid?(@new_events_not_for_sale)
|
|
159
176
|
true
|
|
160
177
|
end
|
|
161
178
|
|
|
@@ -199,6 +216,16 @@ module SeatsChart
|
|
|
199
216
|
@ga_places_to_channels = ga_places_to_channels
|
|
200
217
|
end
|
|
201
218
|
|
|
219
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
220
|
+
# @param [Object] new_events_not_for_sale Object to be assigned
|
|
221
|
+
def new_events_not_for_sale=(new_events_not_for_sale)
|
|
222
|
+
validator = EnumAttributeValidator.new('String', ["default", "override"])
|
|
223
|
+
unless validator.valid?(new_events_not_for_sale)
|
|
224
|
+
fail ArgumentError, "invalid value for \"new_events_not_for_sale\", must be one of #{validator.allowable_values}."
|
|
225
|
+
end
|
|
226
|
+
@new_events_not_for_sale = new_events_not_for_sale
|
|
227
|
+
end
|
|
228
|
+
|
|
202
229
|
# Checks equality by comparing each attribute.
|
|
203
230
|
# @param [Object] Object to be compared
|
|
204
231
|
def ==(o)
|
|
@@ -207,7 +234,8 @@ module SeatsChart
|
|
|
207
234
|
hold_period_minutes == o.hold_period_minutes &&
|
|
208
235
|
max_seats_per_hold_token == o.max_seats_per_hold_token &&
|
|
209
236
|
ticket_buyer_validation == o.ticket_buyer_validation &&
|
|
210
|
-
ga_places_to_channels == o.ga_places_to_channels
|
|
237
|
+
ga_places_to_channels == o.ga_places_to_channels &&
|
|
238
|
+
new_events_not_for_sale == o.new_events_not_for_sale
|
|
211
239
|
end
|
|
212
240
|
|
|
213
241
|
# @see the `==` method
|
|
@@ -219,7 +247,7 @@ module SeatsChart
|
|
|
219
247
|
# Calculates hash code according to all attributes.
|
|
220
248
|
# @return [Integer] Hash code
|
|
221
249
|
def hash
|
|
222
|
-
[hold_period_minutes, max_seats_per_hold_token, ticket_buyer_validation, ga_places_to_channels].hash
|
|
250
|
+
[hold_period_minutes, max_seats_per_hold_token, ticket_buyer_validation, ga_places_to_channels, new_events_not_for_sale].hash
|
|
223
251
|
end
|
|
224
252
|
|
|
225
253
|
# Builds the object from hash
|
|
@@ -0,0 +1,379 @@
|
|
|
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 PatchApiEventsByEventIdListingsByListingIdRequest
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
attr_accessor :objects
|
|
21
|
+
|
|
22
|
+
attr_accessor :sell_as_whole
|
|
23
|
+
|
|
24
|
+
attr_accessor :price_cents
|
|
25
|
+
|
|
26
|
+
attr_accessor :total_price_cents
|
|
27
|
+
|
|
28
|
+
# Partner data (≤ 4 KiB JSON), returned as is.
|
|
29
|
+
attr_accessor :partner_metadata
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'type' => :'type',
|
|
35
|
+
:'objects' => :'objects',
|
|
36
|
+
:'sell_as_whole' => :'sellAsWhole',
|
|
37
|
+
:'price_cents' => :'priceCents',
|
|
38
|
+
:'total_price_cents' => :'totalPriceCents',
|
|
39
|
+
:'partner_metadata' => :'partnerMetadata'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
|
44
|
+
def self.acceptable_attributes
|
|
45
|
+
attribute_map.values
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute type mapping.
|
|
49
|
+
def self.openapi_types
|
|
50
|
+
{
|
|
51
|
+
:'type' => :'String',
|
|
52
|
+
:'objects' => :'Array<PostApiEventsByEventIdListingsRequestObjectsInner>',
|
|
53
|
+
:'sell_as_whole' => :'Boolean',
|
|
54
|
+
:'price_cents' => :'Integer',
|
|
55
|
+
:'total_price_cents' => :'Integer',
|
|
56
|
+
:'partner_metadata' => :'Hash<String, Object>'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
:'type',
|
|
64
|
+
:'price_cents',
|
|
65
|
+
:'total_price_cents',
|
|
66
|
+
:'partner_metadata'
|
|
67
|
+
])
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
72
|
+
def initialize(attributes = {})
|
|
73
|
+
if (!attributes.is_a?(Hash))
|
|
74
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PatchApiEventsByEventIdListingsByListingIdRequest` initialize method"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
78
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
79
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
80
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PatchApiEventsByEventIdListingsByListingIdRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
81
|
+
end
|
|
82
|
+
h[k.to_sym] = v
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'type')
|
|
86
|
+
self.type = attributes[:'type']
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'objects')
|
|
90
|
+
if (value = attributes[:'objects']).is_a?(Array)
|
|
91
|
+
self.objects = value
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'sell_as_whole')
|
|
96
|
+
self.sell_as_whole = attributes[:'sell_as_whole']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'price_cents')
|
|
100
|
+
self.price_cents = attributes[:'price_cents']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'total_price_cents')
|
|
104
|
+
self.total_price_cents = attributes[:'total_price_cents']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'partner_metadata')
|
|
108
|
+
if (value = attributes[:'partner_metadata']).is_a?(Hash)
|
|
109
|
+
self.partner_metadata = value
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
115
|
+
# @return Array for valid properties with the reasons
|
|
116
|
+
def list_invalid_properties
|
|
117
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
118
|
+
invalid_properties = Array.new
|
|
119
|
+
if !@type.nil? && @type.to_s.length > 64
|
|
120
|
+
invalid_properties.push('invalid value for "type", the character length must be smaller than or equal to 64.')
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if !@type.nil? && @type.to_s.length < 1
|
|
124
|
+
invalid_properties.push('invalid value for "type", the character length must be great than or equal to 1.')
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
pattern = Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
|
|
128
|
+
if !@type.nil? && @type !~ pattern
|
|
129
|
+
invalid_properties.push("invalid value for \"type\", must conform to the pattern #{pattern}.")
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if !@objects.nil? && @objects.length > 50
|
|
133
|
+
invalid_properties.push('invalid value for "objects", number of items must be less than or equal to 50.')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if !@objects.nil? && @objects.length < 1
|
|
137
|
+
invalid_properties.push('invalid value for "objects", number of items must be greater than or equal to 1.')
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if !@price_cents.nil? && @price_cents > 99999999
|
|
141
|
+
invalid_properties.push('invalid value for "price_cents", must be smaller than or equal to 99999999.')
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if !@price_cents.nil? && @price_cents < 0
|
|
145
|
+
invalid_properties.push('invalid value for "price_cents", must be greater than or equal to 0.')
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if !@total_price_cents.nil? && @total_price_cents > 99999999
|
|
149
|
+
invalid_properties.push('invalid value for "total_price_cents", must be smaller than or equal to 99999999.')
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if !@total_price_cents.nil? && @total_price_cents < 0
|
|
153
|
+
invalid_properties.push('invalid value for "total_price_cents", must be greater than or equal to 0.')
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
invalid_properties
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Check to see if the all the properties in the model are valid
|
|
160
|
+
# @return true if the model is valid
|
|
161
|
+
def valid?
|
|
162
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
163
|
+
return false if !@type.nil? && @type.to_s.length > 64
|
|
164
|
+
return false if !@type.nil? && @type.to_s.length < 1
|
|
165
|
+
return false if !@type.nil? && @type !~ Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
|
|
166
|
+
return false if !@objects.nil? && @objects.length > 50
|
|
167
|
+
return false if !@objects.nil? && @objects.length < 1
|
|
168
|
+
return false if !@price_cents.nil? && @price_cents > 99999999
|
|
169
|
+
return false if !@price_cents.nil? && @price_cents < 0
|
|
170
|
+
return false if !@total_price_cents.nil? && @total_price_cents > 99999999
|
|
171
|
+
return false if !@total_price_cents.nil? && @total_price_cents < 0
|
|
172
|
+
true
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Custom attribute writer method with validation
|
|
176
|
+
# @param [Object] type Value to be assigned
|
|
177
|
+
def type=(type)
|
|
178
|
+
if !type.nil? && type.to_s.length > 64
|
|
179
|
+
fail ArgumentError, 'invalid value for "type", the character length must be smaller than or equal to 64.'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if !type.nil? && type.to_s.length < 1
|
|
183
|
+
fail ArgumentError, 'invalid value for "type", the character length must be great than or equal to 1.'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
pattern = Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.~:-]{0,63}$/)
|
|
187
|
+
if !type.nil? && type !~ pattern
|
|
188
|
+
fail ArgumentError, "invalid value for \"type\", must conform to the pattern #{pattern}."
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
@type = type
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Custom attribute writer method with validation
|
|
195
|
+
# @param [Object] objects Value to be assigned
|
|
196
|
+
def objects=(objects)
|
|
197
|
+
if objects.nil?
|
|
198
|
+
fail ArgumentError, 'objects cannot be nil'
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if objects.length > 50
|
|
202
|
+
fail ArgumentError, 'invalid value for "objects", number of items must be less than or equal to 50.'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if objects.length < 1
|
|
206
|
+
fail ArgumentError, 'invalid value for "objects", number of items must be greater than or equal to 1.'
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
@objects = objects
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Custom attribute writer method with validation
|
|
213
|
+
# @param [Object] price_cents Value to be assigned
|
|
214
|
+
def price_cents=(price_cents)
|
|
215
|
+
if !price_cents.nil? && price_cents > 99999999
|
|
216
|
+
fail ArgumentError, 'invalid value for "price_cents", must be smaller than or equal to 99999999.'
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if !price_cents.nil? && price_cents < 0
|
|
220
|
+
fail ArgumentError, 'invalid value for "price_cents", must be greater than or equal to 0.'
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
@price_cents = price_cents
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Custom attribute writer method with validation
|
|
227
|
+
# @param [Object] total_price_cents Value to be assigned
|
|
228
|
+
def total_price_cents=(total_price_cents)
|
|
229
|
+
if !total_price_cents.nil? && total_price_cents > 99999999
|
|
230
|
+
fail ArgumentError, 'invalid value for "total_price_cents", must be smaller than or equal to 99999999.'
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if !total_price_cents.nil? && total_price_cents < 0
|
|
234
|
+
fail ArgumentError, 'invalid value for "total_price_cents", must be greater than or equal to 0.'
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
@total_price_cents = total_price_cents
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Checks equality by comparing each attribute.
|
|
241
|
+
# @param [Object] Object to be compared
|
|
242
|
+
def ==(o)
|
|
243
|
+
return true if self.equal?(o)
|
|
244
|
+
self.class == o.class &&
|
|
245
|
+
type == o.type &&
|
|
246
|
+
objects == o.objects &&
|
|
247
|
+
sell_as_whole == o.sell_as_whole &&
|
|
248
|
+
price_cents == o.price_cents &&
|
|
249
|
+
total_price_cents == o.total_price_cents &&
|
|
250
|
+
partner_metadata == o.partner_metadata
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# @see the `==` method
|
|
254
|
+
# @param [Object] Object to be compared
|
|
255
|
+
def eql?(o)
|
|
256
|
+
self == o
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Calculates hash code according to all attributes.
|
|
260
|
+
# @return [Integer] Hash code
|
|
261
|
+
def hash
|
|
262
|
+
[type, objects, sell_as_whole, price_cents, total_price_cents, partner_metadata].hash
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Builds the object from hash
|
|
266
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
267
|
+
# @return [Object] Returns the model itself
|
|
268
|
+
def self.build_from_hash(attributes)
|
|
269
|
+
return nil unless attributes.is_a?(Hash)
|
|
270
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
271
|
+
transformed_hash = {}
|
|
272
|
+
openapi_types.each_pair do |key, type|
|
|
273
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
274
|
+
transformed_hash["#{key}"] = nil
|
|
275
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
276
|
+
# check to ensure the input is an array given that the attribute
|
|
277
|
+
# is documented as an array but the input is not
|
|
278
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
279
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
280
|
+
end
|
|
281
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
282
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
new(transformed_hash)
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Deserializes the data based on type
|
|
289
|
+
# @param string type Data type
|
|
290
|
+
# @param string value Value to be deserialized
|
|
291
|
+
# @return [Object] Deserialized data
|
|
292
|
+
def self._deserialize(type, value)
|
|
293
|
+
case type.to_sym
|
|
294
|
+
when :Time
|
|
295
|
+
Time.parse(value)
|
|
296
|
+
when :Date
|
|
297
|
+
Date.parse(value)
|
|
298
|
+
when :String
|
|
299
|
+
value.to_s
|
|
300
|
+
when :Integer
|
|
301
|
+
value.to_i
|
|
302
|
+
when :Float
|
|
303
|
+
value.to_f
|
|
304
|
+
when :Boolean
|
|
305
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
306
|
+
true
|
|
307
|
+
else
|
|
308
|
+
false
|
|
309
|
+
end
|
|
310
|
+
when :Object
|
|
311
|
+
# generic object (usually a Hash), return directly
|
|
312
|
+
value
|
|
313
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
314
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
315
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
316
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
317
|
+
k_type = Regexp.last_match[:k_type]
|
|
318
|
+
v_type = Regexp.last_match[:v_type]
|
|
319
|
+
{}.tap do |hash|
|
|
320
|
+
value.each do |k, v|
|
|
321
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
322
|
+
end
|
|
323
|
+
end
|
|
324
|
+
else # model
|
|
325
|
+
# models (e.g. Pet) or oneOf
|
|
326
|
+
klass = SeatsChart.const_get(type)
|
|
327
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# Returns the string representation of the object
|
|
332
|
+
# @return [String] String presentation of the object
|
|
333
|
+
def to_s
|
|
334
|
+
to_hash.to_s
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
338
|
+
# @return [Hash] Returns the object in the form of hash
|
|
339
|
+
def to_body
|
|
340
|
+
to_hash
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Returns the object in the form of hash
|
|
344
|
+
# @return [Hash] Returns the object in the form of hash
|
|
345
|
+
def to_hash
|
|
346
|
+
hash = {}
|
|
347
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
348
|
+
value = self.send(attr)
|
|
349
|
+
if value.nil?
|
|
350
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
351
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
hash[param] = _to_hash(value)
|
|
355
|
+
end
|
|
356
|
+
hash
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
# Outputs non-array value in the form of hash
|
|
360
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
361
|
+
# @param [Object] value Any valid value
|
|
362
|
+
# @return [Hash] Returns the value in the form of hash
|
|
363
|
+
def _to_hash(value)
|
|
364
|
+
if value.is_a?(Array)
|
|
365
|
+
value.compact.map { |v| _to_hash(v) }
|
|
366
|
+
elsif value.is_a?(Hash)
|
|
367
|
+
{}.tap do |hash|
|
|
368
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
369
|
+
end
|
|
370
|
+
elsif value.respond_to? :to_hash
|
|
371
|
+
value.to_hash
|
|
372
|
+
else
|
|
373
|
+
value
|
|
374
|
+
end
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
end
|