Class: KoronaCloudClient::ReceiptLayoutConfiguration
- Inherits:
-
Object
- Object
- KoronaCloudClient::ReceiptLayoutConfiguration
- Defined in:
- lib/korona-cloud-client/models/receipt_layout_configuration.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#active ⇒ Object
indicates whether the object is active for use or not.
-
#deposit_summary ⇒ Object
Returns the value of attribute deposit_summary.
-
#footer_logo_number ⇒ Object
Returns the value of attribute footer_logo_number.
-
#header_logo_number ⇒ Object
Returns the value of attribute header_logo_number.
-
#id ⇒ Object
global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
-
#item_grouping ⇒ Object
Returns the value of attribute item_grouping.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
number of the object, like it is set in backoffice; will be removed when active=false.
-
#revision ⇒ Object
the revision number of the object.
-
#show_article_count ⇒ Object
Returns the value of attribute show_article_count.
-
#show_optional_fiscal_data ⇒ Object
Returns the value of attribute show_optional_fiscal_data.
-
#show_prices_on_delivery_notes ⇒ Object
Returns the value of attribute show_prices_on_delivery_notes.
-
#show_product_numbers ⇒ Object
Returns the value of attribute show_product_numbers.
-
#show_receipt_number_barcode ⇒ Object
Returns the value of attribute show_receipt_number_barcode.
-
#show_recommended_retail_price_threshold ⇒ Object
Returns the value of attribute show_recommended_retail_price_threshold.
-
#show_reduced_customer_information ⇒ Object
Returns the value of attribute show_reduced_customer_information.
-
#show_reduced_receipt_information ⇒ Object
Returns the value of attribute show_reduced_receipt_information.
-
#show_removed_items ⇒ Object
Returns the value of attribute show_removed_items.
-
#show_tax_name ⇒ Object
Returns the value of attribute show_tax_name.
-
#show_total_discount ⇒ Object
Returns the value of attribute show_total_discount.
Class Method Summary collapse
-
.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.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ReceiptLayoutConfiguration
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 = {}) ⇒ ReceiptLayoutConfiguration
Initializes the object
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 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 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 149 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `KoronaCloudClient::ReceiptLayoutConfiguration` 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::ReceiptLayoutConfiguration`. 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?(:'show_product_numbers') self.show_product_numbers = attributes[:'show_product_numbers'] end if attributes.key?(:'show_receipt_number_barcode') self. = attributes[:'show_receipt_number_barcode'] end if attributes.key?(:'footer_logo_number') self. = attributes[:'footer_logo_number'] end if attributes.key?(:'header_logo_number') self.header_logo_number = attributes[:'header_logo_number'] end if attributes.key?(:'show_recommended_retail_price_threshold') self.show_recommended_retail_price_threshold = attributes[:'show_recommended_retail_price_threshold'] end if attributes.key?(:'item_grouping') self.item_grouping = attributes[:'item_grouping'] end if attributes.key?(:'show_reduced_receipt_information') self.show_reduced_receipt_information = attributes[:'show_reduced_receipt_information'] end if attributes.key?(:'show_reduced_customer_information') self.show_reduced_customer_information = attributes[:'show_reduced_customer_information'] end if attributes.key?(:'show_removed_items') self.show_removed_items = attributes[:'show_removed_items'] end if attributes.key?(:'show_total_discount') self.show_total_discount = attributes[:'show_total_discount'] end if attributes.key?(:'show_prices_on_delivery_notes') self.show_prices_on_delivery_notes = attributes[:'show_prices_on_delivery_notes'] end if attributes.key?(:'show_tax_name') self.show_tax_name = attributes[:'show_tax_name'] end if attributes.key?(:'deposit_summary') self.deposit_summary = attributes[:'deposit_summary'] end if attributes.key?(:'show_optional_fiscal_data') self.show_optional_fiscal_data = attributes[:'show_optional_fiscal_data'] end if attributes.key?(:'show_article_count') self.show_article_count = attributes[:'show_article_count'] 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/receipt_layout_configuration.rb', line 19 def active @active end |
#deposit_summary ⇒ Object
Returns the value of attribute deposit_summary.
56 57 58 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 56 def deposit_summary @deposit_summary end |
#footer_logo_number ⇒ Object
Returns the value of attribute footer_logo_number.
36 37 38 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 36 def end |
#header_logo_number ⇒ Object
Returns the value of attribute header_logo_number.
38 39 40 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 38 def header_logo_number @header_logo_number end |
#id ⇒ Object
global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
22 23 24 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 22 def id @id end |
#item_grouping ⇒ Object
Returns the value of attribute item_grouping.
42 43 44 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 42 def item_grouping @item_grouping end |
#name ⇒ Object
Returns the value of attribute name.
30 31 32 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 30 def name @name end |
#number ⇒ Object
number of the object, like it is set in backoffice; will be removed when active=false
28 29 30 |
# File 'lib/korona-cloud-client/models/receipt_layout_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/receipt_layout_configuration.rb', line 25 def revision @revision end |
#show_article_count ⇒ Object
Returns the value of attribute show_article_count.
60 61 62 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 60 def show_article_count @show_article_count end |
#show_optional_fiscal_data ⇒ Object
Returns the value of attribute show_optional_fiscal_data.
58 59 60 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 58 def show_optional_fiscal_data @show_optional_fiscal_data end |
#show_prices_on_delivery_notes ⇒ Object
Returns the value of attribute show_prices_on_delivery_notes.
52 53 54 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 52 def show_prices_on_delivery_notes @show_prices_on_delivery_notes end |
#show_product_numbers ⇒ Object
Returns the value of attribute show_product_numbers.
32 33 34 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 32 def show_product_numbers @show_product_numbers end |
#show_receipt_number_barcode ⇒ Object
Returns the value of attribute show_receipt_number_barcode.
34 35 36 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 34 def end |
#show_recommended_retail_price_threshold ⇒ Object
Returns the value of attribute show_recommended_retail_price_threshold.
40 41 42 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 40 def show_recommended_retail_price_threshold @show_recommended_retail_price_threshold end |
#show_reduced_customer_information ⇒ Object
Returns the value of attribute show_reduced_customer_information.
46 47 48 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 46 def show_reduced_customer_information @show_reduced_customer_information end |
#show_reduced_receipt_information ⇒ Object
Returns the value of attribute show_reduced_receipt_information.
44 45 46 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 44 def show_reduced_receipt_information @show_reduced_receipt_information end |
#show_removed_items ⇒ Object
Returns the value of attribute show_removed_items.
48 49 50 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 48 def show_removed_items @show_removed_items end |
#show_tax_name ⇒ Object
Returns the value of attribute show_tax_name.
54 55 56 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 54 def show_tax_name @show_tax_name end |
#show_total_discount ⇒ Object
Returns the value of attribute show_total_discount.
50 51 52 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 50 def show_total_discount @show_total_discount end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
111 112 113 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 111 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 85 def self.attribute_map { :'active' => :'active', :'id' => :'id', :'revision' => :'revision', :'number' => :'number', :'name' => :'name', :'show_product_numbers' => :'showProductNumbers', :'show_receipt_number_barcode' => :'showReceiptNumberBarcode', :'footer_logo_number' => :'footerLogoNumber', :'header_logo_number' => :'headerLogoNumber', :'show_recommended_retail_price_threshold' => :'showRecommendedRetailPriceThreshold', :'item_grouping' => :'itemGrouping', :'show_reduced_receipt_information' => :'showReducedReceiptInformation', :'show_reduced_customer_information' => :'showReducedCustomerInformation', :'show_removed_items' => :'showRemovedItems', :'show_total_discount' => :'showTotalDiscount', :'show_prices_on_delivery_notes' => :'showPricesOnDeliveryNotes', :'show_tax_name' => :'showTaxName', :'deposit_summary' => :'depositSummary', :'show_optional_fiscal_data' => :'showOptionalFiscalData', :'show_article_count' => :'showArticleCount' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
310 311 312 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 310 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
142 143 144 145 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 142 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 116 def self.openapi_types { :'active' => :'Boolean', :'id' => :'String', :'revision' => :'Integer', :'number' => :'String', :'name' => :'String', :'show_product_numbers' => :'Boolean', :'show_receipt_number_barcode' => :'Boolean', :'footer_logo_number' => :'Integer', :'header_logo_number' => :'Integer', :'show_recommended_retail_price_threshold' => :'Integer', :'item_grouping' => :'String', :'show_reduced_receipt_information' => :'Boolean', :'show_reduced_customer_information' => :'Boolean', :'show_removed_items' => :'Boolean', :'show_total_discount' => :'Boolean', :'show_prices_on_delivery_notes' => :'Boolean', :'show_tax_name' => :'Boolean', :'deposit_summary' => :'Boolean', :'show_optional_fiscal_data' => :'Boolean', :'show_article_count' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 270 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 && show_product_numbers == o.show_product_numbers && == o. && == o. && header_logo_number == o.header_logo_number && show_recommended_retail_price_threshold == o.show_recommended_retail_price_threshold && item_grouping == o.item_grouping && show_reduced_receipt_information == o.show_reduced_receipt_information && show_reduced_customer_information == o.show_reduced_customer_information && show_removed_items == o.show_removed_items && show_total_discount == o.show_total_discount && show_prices_on_delivery_notes == o.show_prices_on_delivery_notes && show_tax_name == o.show_tax_name && deposit_summary == o.deposit_summary && show_optional_fiscal_data == o.show_optional_fiscal_data && show_article_count == o.show_article_count end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 341 def _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 |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 412 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 |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 317 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{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[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
297 298 299 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 297 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
303 304 305 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 303 def hash [active, id, revision, number, name, show_product_numbers, , , header_logo_number, show_recommended_retail_price_threshold, item_grouping, show_reduced_receipt_information, show_reduced_customer_information, show_removed_items, show_total_discount, show_prices_on_delivery_notes, show_tax_name, deposit_summary, show_optional_fiscal_data, show_article_count].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
245 246 247 248 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 245 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
388 389 390 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 388 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
394 395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 394 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
382 383 384 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 382 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
252 253 254 255 256 |
# File 'lib/korona-cloud-client/models/receipt_layout_configuration.rb', line 252 def valid? item_grouping_validator = EnumAttributeValidator.new('String', ["ASSORTMENT", "COMMODITY_GROUP", "NONE"]) return false unless item_grouping_validator.valid?(@item_grouping) true end |