Class: KoronaCloudClient::Pos
- Inherits:
-
Object
- Object
- KoronaCloudClient::Pos
- Defined in:
- lib/korona-cloud-client/models/pos.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#active ⇒ Object
indicates whether the object is active for use or not.
-
#container_mode ⇒ Object
Returns the value of attribute container_mode.
-
#contra_account ⇒ Object
Returns the value of attribute contra_account.
-
#coupled ⇒ Object
Returns the value of attribute coupled.
-
#coupled_client_system_information ⇒ Object
Returns the value of attribute coupled_client_system_information.
-
#coupling_id ⇒ Object
write only.
-
#customer_display_configuration ⇒ Object
Returns the value of attribute customer_display_configuration.
-
#default_customer_group ⇒ Object
Returns the value of attribute default_customer_group.
-
#default_payment_method ⇒ Object
Returns the value of attribute default_payment_method.
-
#device_configuration_variable_values ⇒ Object
Returns the value of attribute device_configuration_variable_values.
-
#device_information ⇒ Object
Returns the value of attribute device_information.
-
#entry_gate ⇒ Object
Returns the value of attribute entry_gate.
-
#external ⇒ Object
Returns the value of attribute external.
-
#fiscal_service_type ⇒ Object
Returns the value of attribute fiscal_service_type.
-
#fiscal_unit ⇒ Object
Returns the value of attribute fiscal_unit.
-
#fiscal_unit_pre_configuration ⇒ Object
Returns the value of attribute fiscal_unit_pre_configuration.
-
#id ⇒ Object
global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
-
#language ⇒ Object
Returns the value of attribute language.
-
#last_receipt_number ⇒ Object
last receipt number - only shown if external=true and coupled=false; usable for client-side receipt counter.
-
#last_z_count ⇒ Object
last zcount property - only shown if external=true and coupled=false; usable for client-side zcount.
-
#layout_configuration ⇒ Object
Returns the value of attribute layout_configuration.
-
#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.
-
#organizational_unit ⇒ Object
Returns the value of attribute organizational_unit.
-
#pos_profile ⇒ Object
Returns the value of attribute pos_profile.
-
#print_footer_lines ⇒ Object
Returns the value of attribute print_footer_lines.
-
#print_header_lines ⇒ Object
Returns the value of attribute print_header_lines.
-
#receipt_info_texts ⇒ Object
Returns the value of attribute receipt_info_texts.
-
#receipt_number_prefix ⇒ Object
Returns the value of attribute receipt_number_prefix.
-
#revenue_account ⇒ Object
Returns the value of attribute revenue_account.
-
#revision ⇒ Object
the revision number of the object.
-
#table_overview ⇒ Object
Returns the value of attribute table_overview.
-
#tip_account ⇒ Object
Returns the value of attribute tip_account.
-
#type ⇒ Object
Returns the value of attribute type.
-
#use_alternative_sector ⇒ Object
Returns the value of attribute use_alternative_sector.
-
#warehouse ⇒ Object
Returns the value of attribute warehouse.
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 = {}) ⇒ Pos
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 = {}) ⇒ Pos
Initializes the object
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 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 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 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
# File 'lib/korona-cloud-client/models/pos.rb', line 216 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `KoronaCloudClient::Pos` 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::Pos`. 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?(:'container_mode') self.container_mode = attributes[:'container_mode'] end if attributes.key?(:'contra_account') self.contra_account = attributes[:'contra_account'] end if attributes.key?(:'coupled') self.coupled = attributes[:'coupled'] end if attributes.key?(:'coupled_client_system_information') if (value = attributes[:'coupled_client_system_information']).is_a?(Hash) self.coupled_client_system_information = value end end if attributes.key?(:'coupling_id') self.coupling_id = attributes[:'coupling_id'] end if attributes.key?(:'customer_display_configuration') self.customer_display_configuration = attributes[:'customer_display_configuration'] end if attributes.key?(:'default_customer_group') self.default_customer_group = attributes[:'default_customer_group'] end if attributes.key?(:'default_payment_method') self.default_payment_method = attributes[:'default_payment_method'] end if attributes.key?(:'device_information') self.device_information = attributes[:'device_information'] end if attributes.key?(:'entry_gate') self.entry_gate = attributes[:'entry_gate'] end if attributes.key?(:'external') self.external = attributes[:'external'] end if attributes.key?(:'fiscal_service_type') self.fiscal_service_type = attributes[:'fiscal_service_type'] end if attributes.key?(:'fiscal_unit') self.fiscal_unit = attributes[:'fiscal_unit'] end if attributes.key?(:'fiscal_unit_pre_configuration') self.fiscal_unit_pre_configuration = attributes[:'fiscal_unit_pre_configuration'] end if attributes.key?(:'language') self.language = attributes[:'language'] end if attributes.key?(:'last_receipt_number') self.last_receipt_number = attributes[:'last_receipt_number'] end if attributes.key?(:'last_z_count') self.last_z_count = attributes[:'last_z_count'] end if attributes.key?(:'layout_configuration') self.layout_configuration = attributes[:'layout_configuration'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'organizational_unit') self.organizational_unit = attributes[:'organizational_unit'] end if attributes.key?(:'pos_profile') self.pos_profile = attributes[:'pos_profile'] end if attributes.key?(:'print_footer_lines') if (value = attributes[:'print_footer_lines']).is_a?(Hash) self. = value end end if attributes.key?(:'print_header_lines') if (value = attributes[:'print_header_lines']).is_a?(Hash) self.print_header_lines = value end end if attributes.key?(:'receipt_info_texts') if (value = attributes[:'receipt_info_texts']).is_a?(Array) self.receipt_info_texts = value end end if attributes.key?(:'receipt_number_prefix') self.receipt_number_prefix = attributes[:'receipt_number_prefix'] end if attributes.key?(:'revenue_account') self.revenue_account = attributes[:'revenue_account'] end if attributes.key?(:'table_overview') self.table_overview = attributes[:'table_overview'] end if attributes.key?(:'tip_account') self.tip_account = attributes[:'tip_account'] end if attributes.key?(:'use_alternative_sector') self.use_alternative_sector = attributes[:'use_alternative_sector'] end if attributes.key?(:'warehouse') self.warehouse = attributes[:'warehouse'] end if attributes.key?(:'device_configuration_variable_values') if (value = attributes[:'device_configuration_variable_values']).is_a?(Array) self.device_configuration_variable_values = value end end if attributes.key?(:'type') self.type = attributes[:'type'] 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/pos.rb', line 19 def active @active end |
#container_mode ⇒ Object
Returns the value of attribute container_mode.
30 31 32 |
# File 'lib/korona-cloud-client/models/pos.rb', line 30 def container_mode @container_mode end |
#contra_account ⇒ Object
Returns the value of attribute contra_account.
32 33 34 |
# File 'lib/korona-cloud-client/models/pos.rb', line 32 def contra_account @contra_account end |
#coupled ⇒ Object
Returns the value of attribute coupled.
34 35 36 |
# File 'lib/korona-cloud-client/models/pos.rb', line 34 def coupled @coupled end |
#coupled_client_system_information ⇒ Object
Returns the value of attribute coupled_client_system_information.
36 37 38 |
# File 'lib/korona-cloud-client/models/pos.rb', line 36 def coupled_client_system_information @coupled_client_system_information end |
#coupling_id ⇒ Object
write only
39 40 41 |
# File 'lib/korona-cloud-client/models/pos.rb', line 39 def coupling_id @coupling_id end |
#customer_display_configuration ⇒ Object
Returns the value of attribute customer_display_configuration.
41 42 43 |
# File 'lib/korona-cloud-client/models/pos.rb', line 41 def customer_display_configuration @customer_display_configuration end |
#default_customer_group ⇒ Object
Returns the value of attribute default_customer_group.
43 44 45 |
# File 'lib/korona-cloud-client/models/pos.rb', line 43 def default_customer_group @default_customer_group end |
#default_payment_method ⇒ Object
Returns the value of attribute default_payment_method.
45 46 47 |
# File 'lib/korona-cloud-client/models/pos.rb', line 45 def default_payment_method @default_payment_method end |
#device_configuration_variable_values ⇒ Object
Returns the value of attribute device_configuration_variable_values.
93 94 95 |
# File 'lib/korona-cloud-client/models/pos.rb', line 93 def device_configuration_variable_values @device_configuration_variable_values end |
#device_information ⇒ Object
Returns the value of attribute device_information.
47 48 49 |
# File 'lib/korona-cloud-client/models/pos.rb', line 47 def device_information @device_information end |
#entry_gate ⇒ Object
Returns the value of attribute entry_gate.
49 50 51 |
# File 'lib/korona-cloud-client/models/pos.rb', line 49 def entry_gate @entry_gate end |
#external ⇒ Object
Returns the value of attribute external.
51 52 53 |
# File 'lib/korona-cloud-client/models/pos.rb', line 51 def external @external end |
#fiscal_service_type ⇒ Object
Returns the value of attribute fiscal_service_type.
53 54 55 |
# File 'lib/korona-cloud-client/models/pos.rb', line 53 def fiscal_service_type @fiscal_service_type end |
#fiscal_unit ⇒ Object
Returns the value of attribute fiscal_unit.
55 56 57 |
# File 'lib/korona-cloud-client/models/pos.rb', line 55 def fiscal_unit @fiscal_unit end |
#fiscal_unit_pre_configuration ⇒ Object
Returns the value of attribute fiscal_unit_pre_configuration.
57 58 59 |
# File 'lib/korona-cloud-client/models/pos.rb', line 57 def fiscal_unit_pre_configuration @fiscal_unit_pre_configuration end |
#id ⇒ Object
global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
22 23 24 |
# File 'lib/korona-cloud-client/models/pos.rb', line 22 def id @id end |
#language ⇒ Object
Returns the value of attribute language.
59 60 61 |
# File 'lib/korona-cloud-client/models/pos.rb', line 59 def language @language end |
#last_receipt_number ⇒ Object
last receipt number - only shown if external=true and coupled=false; usable for client-side receipt counter.
62 63 64 |
# File 'lib/korona-cloud-client/models/pos.rb', line 62 def last_receipt_number @last_receipt_number end |
#last_z_count ⇒ Object
last zcount property - only shown if external=true and coupled=false; usable for client-side zcount.
65 66 67 |
# File 'lib/korona-cloud-client/models/pos.rb', line 65 def last_z_count @last_z_count end |
#layout_configuration ⇒ Object
Returns the value of attribute layout_configuration.
67 68 69 |
# File 'lib/korona-cloud-client/models/pos.rb', line 67 def layout_configuration @layout_configuration end |
#name ⇒ Object
Returns the value of attribute name.
69 70 71 |
# File 'lib/korona-cloud-client/models/pos.rb', line 69 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/pos.rb', line 28 def number @number end |
#organizational_unit ⇒ Object
Returns the value of attribute organizational_unit.
71 72 73 |
# File 'lib/korona-cloud-client/models/pos.rb', line 71 def organizational_unit @organizational_unit end |
#pos_profile ⇒ Object
Returns the value of attribute pos_profile.
73 74 75 |
# File 'lib/korona-cloud-client/models/pos.rb', line 73 def pos_profile @pos_profile end |
#print_footer_lines ⇒ Object
Returns the value of attribute print_footer_lines.
75 76 77 |
# File 'lib/korona-cloud-client/models/pos.rb', line 75 def @print_footer_lines end |
#print_header_lines ⇒ Object
Returns the value of attribute print_header_lines.
77 78 79 |
# File 'lib/korona-cloud-client/models/pos.rb', line 77 def print_header_lines @print_header_lines end |
#receipt_info_texts ⇒ Object
Returns the value of attribute receipt_info_texts.
79 80 81 |
# File 'lib/korona-cloud-client/models/pos.rb', line 79 def receipt_info_texts @receipt_info_texts end |
#receipt_number_prefix ⇒ Object
Returns the value of attribute receipt_number_prefix.
81 82 83 |
# File 'lib/korona-cloud-client/models/pos.rb', line 81 def receipt_number_prefix @receipt_number_prefix end |
#revenue_account ⇒ Object
Returns the value of attribute revenue_account.
83 84 85 |
# File 'lib/korona-cloud-client/models/pos.rb', line 83 def revenue_account @revenue_account 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/pos.rb', line 25 def revision @revision end |
#table_overview ⇒ Object
Returns the value of attribute table_overview.
85 86 87 |
# File 'lib/korona-cloud-client/models/pos.rb', line 85 def table_overview @table_overview end |
#tip_account ⇒ Object
Returns the value of attribute tip_account.
87 88 89 |
# File 'lib/korona-cloud-client/models/pos.rb', line 87 def tip_account @tip_account end |
#type ⇒ Object
Returns the value of attribute type.
95 96 97 |
# File 'lib/korona-cloud-client/models/pos.rb', line 95 def type @type end |
#use_alternative_sector ⇒ Object
Returns the value of attribute use_alternative_sector.
89 90 91 |
# File 'lib/korona-cloud-client/models/pos.rb', line 89 def use_alternative_sector @use_alternative_sector end |
#warehouse ⇒ Object
Returns the value of attribute warehouse.
91 92 93 |
# File 'lib/korona-cloud-client/models/pos.rb', line 91 def warehouse @warehouse end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
162 163 164 |
# File 'lib/korona-cloud-client/models/pos.rb', line 162 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
120 121 122 123 124 125 126 127 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 156 157 158 159 |
# File 'lib/korona-cloud-client/models/pos.rb', line 120 def self.attribute_map { :'active' => :'active', :'id' => :'id', :'revision' => :'revision', :'number' => :'number', :'container_mode' => :'containerMode', :'contra_account' => :'contraAccount', :'coupled' => :'coupled', :'coupled_client_system_information' => :'coupledClientSystemInformation', :'coupling_id' => :'couplingId', :'customer_display_configuration' => :'customerDisplayConfiguration', :'default_customer_group' => :'defaultCustomerGroup', :'default_payment_method' => :'defaultPaymentMethod', :'device_information' => :'deviceInformation', :'entry_gate' => :'entryGate', :'external' => :'external', :'fiscal_service_type' => :'fiscalServiceType', :'fiscal_unit' => :'fiscalUnit', :'fiscal_unit_pre_configuration' => :'fiscalUnitPreConfiguration', :'language' => :'language', :'last_receipt_number' => :'lastReceiptNumber', :'last_z_count' => :'lastZCount', :'layout_configuration' => :'layoutConfiguration', :'name' => :'name', :'organizational_unit' => :'organizationalUnit', :'pos_profile' => :'posProfile', :'print_footer_lines' => :'printFooterLines', :'print_header_lines' => :'printHeaderLines', :'receipt_info_texts' => :'receiptInfoTexts', :'receipt_number_prefix' => :'receiptNumberPrefix', :'revenue_account' => :'revenueAccount', :'table_overview' => :'tableOverview', :'tip_account' => :'tipAccount', :'use_alternative_sector' => :'useAlternativeSector', :'warehouse' => :'warehouse', :'device_configuration_variable_values' => :'deviceConfigurationVariableValues', :'type' => :'type' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
485 486 487 |
# File 'lib/korona-cloud-client/models/pos.rb', line 485 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
209 210 211 212 |
# File 'lib/korona-cloud-client/models/pos.rb', line 209 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/korona-cloud-client/models/pos.rb', line 167 def self.openapi_types { :'active' => :'Boolean', :'id' => :'String', :'revision' => :'Integer', :'number' => :'String', :'container_mode' => :'Boolean', :'contra_account' => :'ModelReference', :'coupled' => :'Boolean', :'coupled_client_system_information' => :'Hash<String, String>', :'coupling_id' => :'String', :'customer_display_configuration' => :'ModelReference', :'default_customer_group' => :'ModelReference', :'default_payment_method' => :'ModelReference', :'device_information' => :'DeviceInformation', :'entry_gate' => :'ModelReference', :'external' => :'Boolean', :'fiscal_service_type' => :'String', :'fiscal_unit' => :'ModelReference', :'fiscal_unit_pre_configuration' => :'FiscalUnitPreConfiguration', :'language' => :'ModelReference', :'last_receipt_number' => :'String', :'last_z_count' => :'Integer', :'layout_configuration' => :'ModelReference', :'name' => :'String', :'organizational_unit' => :'ModelReference', :'pos_profile' => :'ModelReference', :'print_footer_lines' => :'Hash<String, String>', :'print_header_lines' => :'Hash<String, String>', :'receipt_info_texts' => :'Array<ModelReference>', :'receipt_number_prefix' => :'String', :'revenue_account' => :'ModelReference', :'table_overview' => :'ModelReference', :'tip_account' => :'ModelReference', :'use_alternative_sector' => :'Boolean', :'warehouse' => :'ModelReference', :'device_configuration_variable_values' => :'Array<DeviceConfigurationVariableValue>', :'type' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/korona-cloud-client/models/pos.rb', line 429 def ==(o) return true if self.equal?(o) self.class == o.class && active == o.active && id == o.id && revision == o.revision && number == o.number && container_mode == o.container_mode && contra_account == o.contra_account && coupled == o.coupled && coupled_client_system_information == o.coupled_client_system_information && coupling_id == o.coupling_id && customer_display_configuration == o.customer_display_configuration && default_customer_group == o.default_customer_group && default_payment_method == o.default_payment_method && device_information == o.device_information && entry_gate == o.entry_gate && external == o.external && fiscal_service_type == o.fiscal_service_type && fiscal_unit == o.fiscal_unit && fiscal_unit_pre_configuration == o.fiscal_unit_pre_configuration && language == o.language && last_receipt_number == o.last_receipt_number && last_z_count == o.last_z_count && layout_configuration == o.layout_configuration && name == o.name && organizational_unit == o.organizational_unit && pos_profile == o.pos_profile && == o. && print_header_lines == o.print_header_lines && receipt_info_texts == o.receipt_info_texts && receipt_number_prefix == o.receipt_number_prefix && revenue_account == o.revenue_account && table_overview == o.table_overview && tip_account == o.tip_account && use_alternative_sector == o.use_alternative_sector && warehouse == o.warehouse && device_configuration_variable_values == o.device_configuration_variable_values && type == o.type end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 |
# File 'lib/korona-cloud-client/models/pos.rb', line 516 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
587 588 589 590 591 592 593 594 595 596 597 598 599 |
# File 'lib/korona-cloud-client/models/pos.rb', line 587 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
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 |
# File 'lib/korona-cloud-client/models/pos.rb', line 492 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
472 473 474 |
# File 'lib/korona-cloud-client/models/pos.rb', line 472 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
478 479 480 |
# File 'lib/korona-cloud-client/models/pos.rb', line 478 def hash [active, id, revision, number, container_mode, contra_account, coupled, coupled_client_system_information, coupling_id, customer_display_configuration, default_customer_group, default_payment_method, device_information, entry_gate, external, fiscal_service_type, fiscal_unit, fiscal_unit_pre_configuration, language, last_receipt_number, last_z_count, layout_configuration, name, organizational_unit, pos_profile, , print_header_lines, receipt_info_texts, receipt_number_prefix, revenue_account, table_overview, tip_account, use_alternative_sector, warehouse, device_configuration_variable_values, type].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
386 387 388 389 |
# File 'lib/korona-cloud-client/models/pos.rb', line 386 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
563 564 565 |
# File 'lib/korona-cloud-client/models/pos.rb', line 563 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
569 570 571 572 573 574 575 576 577 578 579 580 581 |
# File 'lib/korona-cloud-client/models/pos.rb', line 569 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
557 558 559 |
# File 'lib/korona-cloud-client/models/pos.rb', line 557 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
393 394 395 396 397 398 399 |
# File 'lib/korona-cloud-client/models/pos.rb', line 393 def valid? fiscal_service_type_validator = EnumAttributeValidator.new('String', ["DE_TSE_FISKALY", "DE_TSE_SWISSBIT", "EFSTA", "NONE"]) return false unless fiscal_service_type_validator.valid?(@fiscal_service_type) type_validator = EnumAttributeValidator.new('String', ["STANDARD", "EXTERNAL", "TEMPORARY", "INVOICING"]) return false unless type_validator.valid?(@type) true end |