Class: KoronaCloudClient::Receipt
- Inherits:
-
Object
- Object
- KoronaCloudClient::Receipt
- Defined in:
- lib/korona-cloud-client/models/receipt.rb
Instance Attribute Summary collapse
-
#account_transactions ⇒ Object
Returns the value of attribute account_transactions.
-
#active ⇒ Object
indicates whether the object is active for use or not.
-
#additional_info ⇒ Object
Returns the value of attribute additional_info.
-
#booking_time ⇒ Object
yyyy-MM-dd’T’HH:mm:ssXXX.
-
#cancelled ⇒ Object
Returns the value of attribute cancelled.
-
#cashier ⇒ Object
Returns the value of attribute cashier.
-
#cashier_verification_results ⇒ Object
Returns the value of attribute cashier_verification_results.
-
#coupon_positions ⇒ Object
Returns the value of attribute coupon_positions.
-
#creation_time ⇒ Object
yyyy-MM-dd’T’HH:mm:ssXXX.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#customer_group ⇒ Object
Returns the value of attribute customer_group.
-
#deposit_amount ⇒ Object
Returns the value of attribute deposit_amount.
-
#digital_receipt_info ⇒ Object
Returns the value of attribute digital_receipt_info.
-
#external_references ⇒ Object
Returns the value of attribute external_references.
-
#fiscal_transactions ⇒ Object
Returns the value of attribute fiscal_transactions.
-
#geo_location ⇒ Object
Returns the value of attribute geo_location.
-
#guest_count ⇒ Object
Returns the value of attribute guest_count.
-
#id ⇒ Object
global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
-
#info_texts ⇒ Object
Returns the value of attribute info_texts.
-
#items ⇒ Object
Returns the value of attribute items.
-
#max_revisions ⇒ Object
Returns the value of attribute max_revisions.
-
#number ⇒ Object
number of the object, like it is set in backoffice.
-
#order_number ⇒ Object
Returns the value of attribute order_number.
-
#organizational_unit ⇒ Object
Returns the value of attribute organizational_unit.
-
#payments ⇒ Object
Returns the value of attribute payments.
-
#point_of_sale ⇒ Object
Returns the value of attribute point_of_sale.
-
#price_group ⇒ Object
Returns the value of attribute price_group.
-
#promotion_applications ⇒ Object
Returns the value of attribute promotion_applications.
-
#revenue ⇒ Object
Returns the value of attribute revenue.
-
#reversal ⇒ Object
Returns the value of attribute reversal.
-
#reversal_reason ⇒ Object
Returns the value of attribute reversal_reason.
-
#reversed_receipt ⇒ Object
Returns the value of attribute reversed_receipt.
-
#revision ⇒ Object
the revision number of the object.
-
#signature ⇒ Object
Returns the value of attribute signature.
-
#total ⇒ Object
Returns the value of attribute total.
-
#void_fiscal_transactions ⇒ Object
Returns the value of attribute void_fiscal_transactions.
-
#voided ⇒ Object
Returns the value of attribute voided.
-
#voided_items ⇒ Object
Returns the value of attribute voided_items.
-
#voucher_transaction_references ⇒ Object
Returns the value of attribute voucher_transaction_references.
-
#voucher_transactions ⇒ Object
Returns the value of attribute voucher_transactions.
-
#warehouse ⇒ Object
Returns the value of attribute warehouse.
-
#zcounter ⇒ Object
Returns the value of attribute zcounter.
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_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.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 = {}) ⇒ Receipt
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 = {}) ⇒ Receipt
Initializes the object
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 383 384 385 386 387 388 389 390 391 392 393 394 395 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 434 435 436 437 438 439 440 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 228 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `KoronaCloudClient::Receipt` 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::Receipt`. 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?(:'account_transactions') if (value = attributes[:'account_transactions']).is_a?(Array) self.account_transactions = value end end if attributes.key?(:'additional_info') if (value = attributes[:'additional_info']).is_a?(Array) self.additional_info = value end end if attributes.key?(:'booking_time') self.booking_time = attributes[:'booking_time'] end if attributes.key?(:'cancelled') self.cancelled = attributes[:'cancelled'] end if attributes.key?(:'cashier') self.cashier = attributes[:'cashier'] end if attributes.key?(:'creation_time') self.creation_time = attributes[:'creation_time'] end if attributes.key?(:'currency') self.currency = attributes[:'currency'] end if attributes.key?(:'reversed_receipt') self.reversed_receipt = attributes[:'reversed_receipt'] end if attributes.key?(:'customer') self.customer = attributes[:'customer'] end if attributes.key?(:'customer_group') self.customer_group = attributes[:'customer_group'] end if attributes.key?(:'deposit_amount') self.deposit_amount = attributes[:'deposit_amount'] end if attributes.key?(:'external_references') if (value = attributes[:'external_references']).is_a?(Hash) self.external_references = value end end if attributes.key?(:'reversal') self.reversal = attributes[:'reversal'] end if attributes.key?(:'fiscal_transactions') if (value = attributes[:'fiscal_transactions']).is_a?(Array) self.fiscal_transactions = value end end if attributes.key?(:'geo_location') self.geo_location = attributes[:'geo_location'] end if attributes.key?(:'guest_count') self.guest_count = attributes[:'guest_count'] end if attributes.key?(:'info_texts') if (value = attributes[:'info_texts']).is_a?(Array) self.info_texts = value end end if attributes.key?(:'items') if (value = attributes[:'items']).is_a?(Array) self.items = value end end if attributes.key?(:'max_revisions') self.max_revisions = attributes[:'max_revisions'] end if attributes.key?(:'order_number') self.order_number = attributes[:'order_number'] end if attributes.key?(:'organizational_unit') self.organizational_unit = attributes[:'organizational_unit'] end if attributes.key?(:'payments') if (value = attributes[:'payments']).is_a?(Array) self.payments = value end end if attributes.key?(:'cashier_verification_results') if (value = attributes[:'cashier_verification_results']).is_a?(Array) self.cashier_verification_results = value end end if attributes.key?(:'point_of_sale') self.point_of_sale = attributes[:'point_of_sale'] end if attributes.key?(:'price_group') self.price_group = attributes[:'price_group'] end if attributes.key?(:'revenue') self.revenue = attributes[:'revenue'] end if attributes.key?(:'signature') self.signature = attributes[:'signature'] end if attributes.key?(:'total') self.total = attributes[:'total'] end if attributes.key?(:'voided') self.voided = attributes[:'voided'] end if attributes.key?(:'voided_items') if (value = attributes[:'voided_items']).is_a?(Array) self.voided_items = value end end if attributes.key?(:'void_fiscal_transactions') if (value = attributes[:'void_fiscal_transactions']).is_a?(Array) self.void_fiscal_transactions = value end end if attributes.key?(:'voucher_transactions') if (value = attributes[:'voucher_transactions']).is_a?(Array) self.voucher_transactions = value end end if attributes.key?(:'voucher_transaction_references') if (value = attributes[:'voucher_transaction_references']).is_a?(Array) self.voucher_transaction_references = value end end if attributes.key?(:'warehouse') self.warehouse = attributes[:'warehouse'] end if attributes.key?(:'zcounter') self.zcounter = attributes[:'zcounter'] end if attributes.key?(:'promotion_applications') if (value = attributes[:'promotion_applications']).is_a?(Array) self.promotion_applications = value end end if attributes.key?(:'coupon_positions') if (value = attributes[:'coupon_positions']).is_a?(Array) self.coupon_positions = value end end if attributes.key?(:'digital_receipt_info') self.digital_receipt_info = attributes[:'digital_receipt_info'] end if attributes.key?(:'reversal_reason') self.reversal_reason = attributes[:'reversal_reason'] end end |
Instance Attribute Details
#account_transactions ⇒ Object
Returns the value of attribute account_transactions.
30 31 32 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 30 def account_transactions @account_transactions end |
#active ⇒ Object
indicates whether the object is active for use or not
19 20 21 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 19 def active @active end |
#additional_info ⇒ Object
Returns the value of attribute additional_info.
32 33 34 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 32 def additional_info @additional_info end |
#booking_time ⇒ Object
yyyy-MM-dd’T’HH:mm:ssXXX
35 36 37 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 35 def booking_time @booking_time end |
#cancelled ⇒ Object
Returns the value of attribute cancelled.
37 38 39 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 37 def cancelled @cancelled end |
#cashier ⇒ Object
Returns the value of attribute cashier.
39 40 41 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 39 def cashier @cashier end |
#cashier_verification_results ⇒ Object
Returns the value of attribute cashier_verification_results.
76 77 78 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 76 def cashier_verification_results @cashier_verification_results end |
#coupon_positions ⇒ Object
Returns the value of attribute coupon_positions.
104 105 106 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 104 def coupon_positions @coupon_positions end |
#creation_time ⇒ Object
yyyy-MM-dd’T’HH:mm:ssXXX
42 43 44 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 42 def creation_time @creation_time end |
#currency ⇒ Object
Returns the value of attribute currency.
44 45 46 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 44 def currency @currency end |
#customer ⇒ Object
Returns the value of attribute customer.
48 49 50 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 48 def customer @customer end |
#customer_group ⇒ Object
Returns the value of attribute customer_group.
50 51 52 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 50 def customer_group @customer_group end |
#deposit_amount ⇒ Object
Returns the value of attribute deposit_amount.
52 53 54 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 52 def deposit_amount @deposit_amount end |
#digital_receipt_info ⇒ Object
Returns the value of attribute digital_receipt_info.
106 107 108 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 106 def digital_receipt_info @digital_receipt_info end |
#external_references ⇒ Object
Returns the value of attribute external_references.
54 55 56 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 54 def external_references @external_references end |
#fiscal_transactions ⇒ Object
Returns the value of attribute fiscal_transactions.
58 59 60 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 58 def fiscal_transactions @fiscal_transactions end |
#geo_location ⇒ Object
Returns the value of attribute geo_location.
60 61 62 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 60 def geo_location @geo_location end |
#guest_count ⇒ Object
Returns the value of attribute guest_count.
62 63 64 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 62 def guest_count @guest_count end |
#id ⇒ Object
global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
22 23 24 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 22 def id @id end |
#info_texts ⇒ Object
Returns the value of attribute info_texts.
64 65 66 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 64 def info_texts @info_texts end |
#items ⇒ Object
Returns the value of attribute items.
66 67 68 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 66 def items @items end |
#max_revisions ⇒ Object
Returns the value of attribute max_revisions.
68 69 70 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 68 def max_revisions @max_revisions end |
#number ⇒ Object
number of the object, like it is set in backoffice
28 29 30 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 28 def number @number end |
#order_number ⇒ Object
Returns the value of attribute order_number.
70 71 72 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 70 def order_number @order_number end |
#organizational_unit ⇒ Object
Returns the value of attribute organizational_unit.
72 73 74 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 72 def organizational_unit @organizational_unit end |
#payments ⇒ Object
Returns the value of attribute payments.
74 75 76 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 74 def payments @payments end |
#point_of_sale ⇒ Object
Returns the value of attribute point_of_sale.
78 79 80 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 78 def point_of_sale @point_of_sale end |
#price_group ⇒ Object
Returns the value of attribute price_group.
80 81 82 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 80 def price_group @price_group end |
#promotion_applications ⇒ Object
Returns the value of attribute promotion_applications.
102 103 104 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 102 def promotion_applications @promotion_applications end |
#revenue ⇒ Object
Returns the value of attribute revenue.
82 83 84 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 82 def revenue @revenue end |
#reversal ⇒ Object
Returns the value of attribute reversal.
56 57 58 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 56 def reversal @reversal end |
#reversal_reason ⇒ Object
Returns the value of attribute reversal_reason.
108 109 110 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 108 def reversal_reason @reversal_reason end |
#reversed_receipt ⇒ Object
Returns the value of attribute reversed_receipt.
46 47 48 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 46 def reversed_receipt @reversed_receipt 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.rb', line 25 def revision @revision end |
#signature ⇒ Object
Returns the value of attribute signature.
84 85 86 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 84 def signature @signature end |
#total ⇒ Object
Returns the value of attribute total.
86 87 88 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 86 def total @total end |
#void_fiscal_transactions ⇒ Object
Returns the value of attribute void_fiscal_transactions.
92 93 94 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 92 def void_fiscal_transactions @void_fiscal_transactions end |
#voided ⇒ Object
Returns the value of attribute voided.
88 89 90 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 88 def voided @voided end |
#voided_items ⇒ Object
Returns the value of attribute voided_items.
90 91 92 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 90 def voided_items @voided_items end |
#voucher_transaction_references ⇒ Object
Returns the value of attribute voucher_transaction_references.
96 97 98 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 96 def voucher_transaction_references @voucher_transaction_references end |
#voucher_transactions ⇒ Object
Returns the value of attribute voucher_transactions.
94 95 96 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 94 def voucher_transactions @voucher_transactions end |
#warehouse ⇒ Object
Returns the value of attribute warehouse.
98 99 100 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 98 def warehouse @warehouse end |
#zcounter ⇒ Object
Returns the value of attribute zcounter.
100 101 102 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 100 def zcounter @zcounter end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 576 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
160 161 162 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 160 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
111 112 113 114 115 116 117 118 119 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 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 111 def self.attribute_map { :'active' => :'active', :'id' => :'id', :'revision' => :'revision', :'number' => :'number', :'account_transactions' => :'accountTransactions', :'additional_info' => :'additionalInfo', :'booking_time' => :'bookingTime', :'cancelled' => :'cancelled', :'cashier' => :'cashier', :'creation_time' => :'creationTime', :'currency' => :'currency', :'reversed_receipt' => :'reversedReceipt', :'customer' => :'customer', :'customer_group' => :'customerGroup', :'deposit_amount' => :'depositAmount', :'external_references' => :'externalReferences', :'reversal' => :'reversal', :'fiscal_transactions' => :'fiscalTransactions', :'geo_location' => :'geoLocation', :'guest_count' => :'guestCount', :'info_texts' => :'infoTexts', :'items' => :'items', :'max_revisions' => :'maxRevisions', :'order_number' => :'orderNumber', :'organizational_unit' => :'organizationalUnit', :'payments' => :'payments', :'cashier_verification_results' => :'cashierVerificationResults', :'point_of_sale' => :'pointOfSale', :'price_group' => :'priceGroup', :'revenue' => :'revenue', :'signature' => :'signature', :'total' => :'total', :'voided' => :'voided', :'voided_items' => :'voidedItems', :'void_fiscal_transactions' => :'voidFiscalTransactions', :'voucher_transactions' => :'voucherTransactions', :'voucher_transaction_references' => :'voucherTransactionReferences', :'warehouse' => :'warehouse', :'zcounter' => :'zcounter', :'promotion_applications' => :'promotionApplications', :'coupon_positions' => :'couponPositions', :'digital_receipt_info' => :'digitalReceiptInfo', :'reversal_reason' => :'reversalReason' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 552 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_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
220 221 222 223 224 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 220 def self.openapi_all_of [ :'BaseNumberedResource' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
214 215 216 217 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 214 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 165 def self.openapi_types { :'active' => :'Boolean', :'id' => :'String', :'revision' => :'Integer', :'number' => :'String', :'account_transactions' => :'Array<AccountTransaction>', :'additional_info' => :'Array<AdditionalInfo>', :'booking_time' => :'Time', :'cancelled' => :'Boolean', :'cashier' => :'ModelReference', :'creation_time' => :'Time', :'currency' => :'ModelReference', :'reversed_receipt' => :'ModelReference', :'customer' => :'ModelReference', :'customer_group' => :'ModelReference', :'deposit_amount' => :'Float', :'external_references' => :'Hash<String, String>', :'reversal' => :'Boolean', :'fiscal_transactions' => :'Array<FiscalTransaction>', :'geo_location' => :'GeoLocation', :'guest_count' => :'Integer', :'info_texts' => :'Array<String>', :'items' => :'Array<ReceiptItem>', :'max_revisions' => :'ReceiptMaxRevisions', :'order_number' => :'String', :'organizational_unit' => :'ModelReference', :'payments' => :'Array<Payment>', :'cashier_verification_results' => :'Array<CashierVerificationResult>', :'point_of_sale' => :'ModelReference', :'price_group' => :'ModelReference', :'revenue' => :'ReceiptRevenue', :'signature' => :'Signature', :'total' => :'ReceiptTotal', :'voided' => :'Boolean', :'voided_items' => :'Array<VoidedReceiptItem>', :'void_fiscal_transactions' => :'Array<FiscalTransaction>', :'voucher_transactions' => :'Array<VoucherTransactionOld>', :'voucher_transaction_references' => :'Array<ModelReference>', :'warehouse' => :'ModelReference', :'zcounter' => :'Integer', :'promotion_applications' => :'Array<PromotionApplication>', :'coupon_positions' => :'Array<CouponPosition>', :'digital_receipt_info' => :'DigitalReceiptInfo', :'reversal_reason' => :'ReceiptReversalReason' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 489 def ==(o) return true if self.equal?(o) self.class == o.class && active == o.active && id == o.id && revision == o.revision && number == o.number && account_transactions == o.account_transactions && additional_info == o.additional_info && booking_time == o.booking_time && cancelled == o.cancelled && cashier == o.cashier && creation_time == o.creation_time && currency == o.currency && reversed_receipt == o.reversed_receipt && customer == o.customer && customer_group == o.customer_group && deposit_amount == o.deposit_amount && external_references == o.external_references && reversal == o.reversal && fiscal_transactions == o.fiscal_transactions && geo_location == o.geo_location && guest_count == o.guest_count && info_texts == o.info_texts && items == o.items && max_revisions == o.max_revisions && order_number == o.order_number && organizational_unit == o.organizational_unit && payments == o.payments && cashier_verification_results == o.cashier_verification_results && point_of_sale == o.point_of_sale && price_group == o.price_group && revenue == o.revenue && signature == o.signature && total == o.total && voided == o.voided && voided_items == o.voided_items && void_fiscal_transactions == o.void_fiscal_transactions && voucher_transactions == o.voucher_transactions && voucher_transaction_references == o.voucher_transaction_references && warehouse == o.warehouse && zcounter == o.zcounter && promotion_applications == o.promotion_applications && coupon_positions == o.coupon_positions && digital_receipt_info == o.digital_receipt_info && reversal_reason == o.reversal_reason end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
647 648 649 650 651 652 653 654 655 656 657 658 659 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 647 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
539 540 541 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 539 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
545 546 547 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 545 def hash [active, id, revision, number, account_transactions, additional_info, booking_time, cancelled, cashier, creation_time, currency, reversed_receipt, customer, customer_group, deposit_amount, external_references, reversal, fiscal_transactions, geo_location, guest_count, info_texts, items, max_revisions, order_number, organizational_unit, payments, cashier_verification_results, point_of_sale, price_group, revenue, signature, total, voided, voided_items, void_fiscal_transactions, voucher_transactions, voucher_transaction_references, warehouse, zcounter, promotion_applications, coupon_positions, digital_receipt_info, reversal_reason].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
444 445 446 447 448 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 444 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)
623 624 625 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 623 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
629 630 631 632 633 634 635 636 637 638 639 640 641 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 629 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
617 618 619 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 617 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
452 453 454 455 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 452 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |