Class: KoronaCloudClient::ScoConfiguration
- Inherits:
-
Object
- Object
- KoronaCloudClient::ScoConfiguration
- Defined in:
- lib/korona-cloud-client/models/sco_configuration.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#active ⇒ Object
indicates whether the object is active for use or not.
-
#ad_position ⇒ Object
Returns the value of attribute ad_position.
-
#ad_size ⇒ Object
Returns the value of attribute ad_size.
-
#ad_url ⇒ Object
Returns the value of attribute ad_url.
-
#advanced_settings ⇒ Object
Returns the value of attribute advanced_settings.
-
#button_layout ⇒ Object
Returns the value of attribute button_layout.
-
#coupon_query ⇒ Object
Returns the value of attribute coupon_query.
-
#custom_css_file ⇒ Object
Returns the value of attribute custom_css_file.
-
#custom_ui_basic_auth_password ⇒ Object
Returns the value of attribute custom_ui_basic_auth_password.
-
#custom_ui_basic_auth_user ⇒ Object
Returns the value of attribute custom_ui_basic_auth_user.
-
#custom_ui_url ⇒ Object
Returns the value of attribute custom_ui_url.
-
#digital_receipt ⇒ Object
Returns the value of attribute digital_receipt.
-
#digital_receipt_visibility_timeout ⇒ Object
Returns the value of attribute digital_receipt_visibility_timeout.
-
#hint_visibility_timeout ⇒ Object
Returns the value of attribute hint_visibility_timeout.
-
#id ⇒ Object
global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
-
#inactivity_receipt_cancelation_timeout ⇒ Object
Returns the value of attribute inactivity_receipt_cancelation_timeout.
-
#inactivity_request_timeout ⇒ Object
Returns the value of attribute inactivity_request_timeout.
-
#language_settings ⇒ Object
Returns the value of attribute language_settings.
-
#logo_image ⇒ Object
Returns the value of attribute logo_image.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
number of the object, like it is set in backoffice.
-
#revision ⇒ Object
the revision number of the object.
-
#thank_you_page_visibility_timeout ⇒ Object
Returns the value of attribute thank_you_page_visibility_timeout.
-
#user_interface ⇒ Object
Returns the value of attribute user_interface.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ScoConfiguration
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ScoConfiguration
Initializes the object
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 165 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `KoronaCloudClient::ScoConfiguration` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `KoronaCloudClient::ScoConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'active') self.active = attributes[:'active'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'revision') self.revision = attributes[:'revision'] end if attributes.key?(:'number') self.number = attributes[:'number'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'thank_you_page_visibility_timeout') self.thank_you_page_visibility_timeout = attributes[:'thank_you_page_visibility_timeout'] end if attributes.key?(:'digital_receipt_visibility_timeout') self.digital_receipt_visibility_timeout = attributes[:'digital_receipt_visibility_timeout'] end if attributes.key?(:'inactivity_receipt_cancelation_timeout') self.inactivity_receipt_cancelation_timeout = attributes[:'inactivity_receipt_cancelation_timeout'] end if attributes.key?(:'inactivity_request_timeout') self.inactivity_request_timeout = attributes[:'inactivity_request_timeout'] end if attributes.key?(:'hint_visibility_timeout') self.hint_visibility_timeout = attributes[:'hint_visibility_timeout'] end if attributes.key?(:'coupon_query') self.coupon_query = attributes[:'coupon_query'] end if attributes.key?(:'digital_receipt') self.digital_receipt = attributes[:'digital_receipt'] end if attributes.key?(:'ad_position') self.ad_position = attributes[:'ad_position'] end if attributes.key?(:'ad_size') self.ad_size = attributes[:'ad_size'] end if attributes.key?(:'ad_url') self.ad_url = attributes[:'ad_url'] end if attributes.key?(:'user_interface') self.user_interface = attributes[:'user_interface'] end if attributes.key?(:'custom_ui_url') self.custom_ui_url = attributes[:'custom_ui_url'] end if attributes.key?(:'custom_ui_basic_auth_user') self.custom_ui_basic_auth_user = attributes[:'custom_ui_basic_auth_user'] end if attributes.key?(:'custom_ui_basic_auth_password') self.custom_ui_basic_auth_password = attributes[:'custom_ui_basic_auth_password'] end if attributes.key?(:'custom_css_file') self.custom_css_file = attributes[:'custom_css_file'] end if attributes.key?(:'logo_image') self.logo_image = attributes[:'logo_image'] end if attributes.key?(:'button_layout') self. = attributes[:'button_layout'] end if attributes.key?(:'advanced_settings') if (value = attributes[:'advanced_settings']).is_a?(Hash) self.advanced_settings = value end end if attributes.key?(:'language_settings') if (value = attributes[:'language_settings']).is_a?(Array) self.language_settings = value end end end |
Instance Attribute Details
#active ⇒ Object
indicates whether the object is active for use or not
19 20 21 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 19 def active @active end |
#ad_position ⇒ Object
Returns the value of attribute ad_position.
46 47 48 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 46 def ad_position @ad_position end |
#ad_size ⇒ Object
Returns the value of attribute ad_size.
48 49 50 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 48 def ad_size @ad_size end |
#ad_url ⇒ Object
Returns the value of attribute ad_url.
50 51 52 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 50 def ad_url @ad_url end |
#advanced_settings ⇒ Object
Returns the value of attribute advanced_settings.
66 67 68 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 66 def advanced_settings @advanced_settings end |
#button_layout ⇒ Object
Returns the value of attribute button_layout.
64 65 66 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 64 def @button_layout end |
#coupon_query ⇒ Object
Returns the value of attribute coupon_query.
42 43 44 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 42 def coupon_query @coupon_query end |
#custom_css_file ⇒ Object
Returns the value of attribute custom_css_file.
60 61 62 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 60 def custom_css_file @custom_css_file end |
#custom_ui_basic_auth_password ⇒ Object
Returns the value of attribute custom_ui_basic_auth_password.
58 59 60 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 58 def custom_ui_basic_auth_password @custom_ui_basic_auth_password end |
#custom_ui_basic_auth_user ⇒ Object
Returns the value of attribute custom_ui_basic_auth_user.
56 57 58 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 56 def custom_ui_basic_auth_user @custom_ui_basic_auth_user end |
#custom_ui_url ⇒ Object
Returns the value of attribute custom_ui_url.
54 55 56 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 54 def custom_ui_url @custom_ui_url end |
#digital_receipt ⇒ Object
Returns the value of attribute digital_receipt.
44 45 46 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 44 def digital_receipt @digital_receipt end |
#digital_receipt_visibility_timeout ⇒ Object
Returns the value of attribute digital_receipt_visibility_timeout.
34 35 36 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 34 def digital_receipt_visibility_timeout @digital_receipt_visibility_timeout end |
#hint_visibility_timeout ⇒ Object
Returns the value of attribute hint_visibility_timeout.
40 41 42 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 40 def hint_visibility_timeout @hint_visibility_timeout end |
#id ⇒ Object
global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
22 23 24 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 22 def id @id end |
#inactivity_receipt_cancelation_timeout ⇒ Object
Returns the value of attribute inactivity_receipt_cancelation_timeout.
36 37 38 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 36 def inactivity_receipt_cancelation_timeout @inactivity_receipt_cancelation_timeout end |
#inactivity_request_timeout ⇒ Object
Returns the value of attribute inactivity_request_timeout.
38 39 40 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 38 def inactivity_request_timeout @inactivity_request_timeout end |
#language_settings ⇒ Object
Returns the value of attribute language_settings.
68 69 70 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 68 def language_settings @language_settings end |
#logo_image ⇒ Object
Returns the value of attribute logo_image.
62 63 64 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 62 def logo_image @logo_image end |
#name ⇒ Object
Returns the value of attribute name.
30 31 32 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 30 def name @name end |
#number ⇒ Object
number of the object, like it is set in backoffice
28 29 30 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 28 def number @number end |
#revision ⇒ Object
the revision number of the object. revision numbers are unique per object-type. there is is no object of the same type with identical revision numbers.
25 26 27 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 25 def revision @revision end |
#thank_you_page_visibility_timeout ⇒ Object
Returns the value of attribute thank_you_page_visibility_timeout.
32 33 34 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 32 def thank_you_page_visibility_timeout @thank_you_page_visibility_timeout end |
#user_interface ⇒ Object
Returns the value of attribute user_interface.
52 53 54 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 52 def user_interface @user_interface end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 396 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = KoronaCloudClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
123 124 125 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 123 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 93 def self.attribute_map { :'active' => :'active', :'id' => :'id', :'revision' => :'revision', :'number' => :'number', :'name' => :'name', :'thank_you_page_visibility_timeout' => :'thankYouPageVisibilityTimeout', :'digital_receipt_visibility_timeout' => :'digitalReceiptVisibilityTimeout', :'inactivity_receipt_cancelation_timeout' => :'inactivityReceiptCancelationTimeout', :'inactivity_request_timeout' => :'inactivityRequestTimeout', :'hint_visibility_timeout' => :'hintVisibilityTimeout', :'coupon_query' => :'couponQuery', :'digital_receipt' => :'digitalReceipt', :'ad_position' => :'adPosition', :'ad_size' => :'adSize', :'ad_url' => :'adUrl', :'user_interface' => :'userInterface', :'custom_ui_url' => :'customUiUrl', :'custom_ui_basic_auth_user' => :'customUiBasicAuthUser', :'custom_ui_basic_auth_password' => :'customUiBasicAuthPassword', :'custom_css_file' => :'customCssFile', :'logo_image' => :'logoImage', :'button_layout' => :'buttonLayout', :'advanced_settings' => :'advancedSettings', :'language_settings' => :'languageSettings' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 372 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
158 159 160 161 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 158 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 128 def self.openapi_types { :'active' => :'Boolean', :'id' => :'String', :'revision' => :'Integer', :'number' => :'String', :'name' => :'String', :'thank_you_page_visibility_timeout' => :'Integer', :'digital_receipt_visibility_timeout' => :'Integer', :'inactivity_receipt_cancelation_timeout' => :'Integer', :'inactivity_request_timeout' => :'Integer', :'hint_visibility_timeout' => :'Integer', :'coupon_query' => :'Boolean', :'digital_receipt' => :'Boolean', :'ad_position' => :'String', :'ad_size' => :'Integer', :'ad_url' => :'String', :'user_interface' => :'String', :'custom_ui_url' => :'String', :'custom_ui_basic_auth_user' => :'String', :'custom_ui_basic_auth_password' => :'String', :'custom_css_file' => :'File', :'logo_image' => :'ModelReference', :'button_layout' => :'ModelReference', :'advanced_settings' => :'Hash<String, String>', :'language_settings' => :'Array<ScoLanguageSetting>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 328 def ==(o) return true if self.equal?(o) self.class == o.class && active == o.active && id == o.id && revision == o.revision && number == o.number && name == o.name && thank_you_page_visibility_timeout == o.thank_you_page_visibility_timeout && digital_receipt_visibility_timeout == o.digital_receipt_visibility_timeout && inactivity_receipt_cancelation_timeout == o.inactivity_receipt_cancelation_timeout && inactivity_request_timeout == o.inactivity_request_timeout && hint_visibility_timeout == o.hint_visibility_timeout && coupon_query == o.coupon_query && digital_receipt == o.digital_receipt && ad_position == o.ad_position && ad_size == o.ad_size && ad_url == o.ad_url && user_interface == o.user_interface && custom_ui_url == o.custom_ui_url && custom_ui_basic_auth_user == o.custom_ui_basic_auth_user && custom_ui_basic_auth_password == o.custom_ui_basic_auth_password && custom_css_file == o.custom_css_file && logo_image == o.logo_image && == o. && advanced_settings == o.advanced_settings && language_settings == o.language_settings end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
467 468 469 470 471 472 473 474 475 476 477 478 479 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 467 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#eql?(o) ⇒ Boolean
359 360 361 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 359 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
365 366 367 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 365 def hash [active, id, revision, number, name, thank_you_page_visibility_timeout, digital_receipt_visibility_timeout, inactivity_receipt_cancelation_timeout, inactivity_request_timeout, hint_visibility_timeout, coupon_query, digital_receipt, ad_position, ad_size, ad_url, user_interface, custom_ui_url, custom_ui_basic_auth_user, custom_ui_basic_auth_password, custom_css_file, logo_image, , advanced_settings, language_settings].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
281 282 283 284 285 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 281 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
443 444 445 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 443 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
449 450 451 452 453 454 455 456 457 458 459 460 461 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 449 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
437 438 439 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 437 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
289 290 291 292 293 294 295 296 |
# File 'lib/korona-cloud-client/models/sco_configuration.rb', line 289 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' ad_position_validator = EnumAttributeValidator.new('String', ["TOP", "BOTTOM", "LEFT", "RIGHT"]) return false unless ad_position_validator.valid?(@ad_position) user_interface_validator = EnumAttributeValidator.new('String', ["RETAIL", "TICKET", "FOOD", "KORONA_EVENT", "CUSTOM"]) return false unless user_interface_validator.valid?(@user_interface) true end |