Class: KoronaCloudClient::Receipt
- Inherits:
-
Object
- Object
- KoronaCloudClient::Receipt
- Defined in:
- lib/korona-cloud-client/models/receipt.rb
Overview
result list
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.
-
#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; will be removed when active=false.
-
#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.
-
#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
Deprecated, please use voucherTransactionReferences instead.
-
#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
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 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 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 222 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?(:'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 end |
Instance Attribute Details
#account_transactions ⇒ Object
Returns the value of attribute account_transactions.
31 32 33 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 31 def account_transactions @account_transactions end |
#active ⇒ Object
indicates whether the object is active for use or not
20 21 22 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 20 def active @active end |
#additional_info ⇒ Object
Returns the value of attribute additional_info.
33 34 35 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 33 def additional_info @additional_info end |
#booking_time ⇒ Object
yyyy-MM-dd’T’HH:mm:ssXXX
36 37 38 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 36 def booking_time @booking_time end |
#cancelled ⇒ Object
Returns the value of attribute cancelled.
38 39 40 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 38 def cancelled @cancelled end |
#cashier ⇒ Object
Returns the value of attribute cashier.
40 41 42 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 40 def cashier @cashier end |
#cashier_verification_results ⇒ Object
Returns the value of attribute cashier_verification_results.
75 76 77 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 75 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
43 44 45 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 43 def creation_time @creation_time end |
#currency ⇒ Object
Returns the value of attribute currency.
45 46 47 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 45 def currency @currency end |
#customer ⇒ Object
Returns the value of attribute customer.
49 50 51 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 49 def customer @customer end |
#customer_group ⇒ Object
Returns the value of attribute customer_group.
51 52 53 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 51 def customer_group @customer_group end |
#deposit_amount ⇒ Object
Returns the value of attribute deposit_amount.
53 54 55 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 53 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.
55 56 57 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 55 def external_references @external_references end |
#fiscal_transactions ⇒ Object
Returns the value of attribute fiscal_transactions.
59 60 61 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 59 def fiscal_transactions @fiscal_transactions end |
#geo_location ⇒ Object
Returns the value of attribute geo_location.
61 62 63 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 61 def geo_location @geo_location end |
#id ⇒ Object
global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
23 24 25 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 23 def id @id end |
#info_texts ⇒ Object
Returns the value of attribute info_texts.
63 64 65 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 63 def info_texts @info_texts end |
#items ⇒ Object
Returns the value of attribute items.
65 66 67 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 65 def items @items end |
#max_revisions ⇒ Object
Returns the value of attribute max_revisions.
67 68 69 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 67 def max_revisions @max_revisions end |
#number ⇒ Object
number of the object, like it is set in backoffice; will be removed when active=false
29 30 31 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 29 def number @number end |
#order_number ⇒ Object
Returns the value of attribute order_number.
69 70 71 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 69 def order_number @order_number end |
#organizational_unit ⇒ Object
Returns the value of attribute organizational_unit.
71 72 73 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 71 def organizational_unit @organizational_unit end |
#payments ⇒ Object
Returns the value of attribute payments.
73 74 75 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 73 def payments @payments end |
#point_of_sale ⇒ Object
Returns the value of attribute point_of_sale.
77 78 79 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 77 def point_of_sale @point_of_sale end |
#price_group ⇒ Object
Returns the value of attribute price_group.
79 80 81 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 79 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.
81 82 83 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 81 def revenue @revenue end |
#reversal ⇒ Object
Returns the value of attribute reversal.
57 58 59 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 57 def reversal @reversal end |
#reversed_receipt ⇒ Object
Returns the value of attribute reversed_receipt.
47 48 49 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 47 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.
26 27 28 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 26 def revision @revision end |
#signature ⇒ Object
Returns the value of attribute signature.
83 84 85 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 83 def signature @signature end |
#total ⇒ Object
Returns the value of attribute total.
85 86 87 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 85 def total @total end |
#void_fiscal_transactions ⇒ Object
Returns the value of attribute void_fiscal_transactions.
91 92 93 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 91 def void_fiscal_transactions @void_fiscal_transactions end |
#voided ⇒ Object
Returns the value of attribute voided.
87 88 89 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 87 def voided @voided end |
#voided_items ⇒ Object
Returns the value of attribute voided_items.
89 90 91 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 89 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
Deprecated, please use voucherTransactionReferences instead.
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
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 560 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
156 157 158 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 156 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
109 110 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 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 109 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', :'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' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 536 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)
214 215 216 217 218 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 214 def self.openapi_all_of [ :'BaseNumberedResource' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
208 209 210 211 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 208 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 161 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', :'info_texts' => :'Array<Object>', :'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' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
475 476 477 478 479 480 481 482 483 484 485 486 487 488 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 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 475 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 && 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 end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
631 632 633 634 635 636 637 638 639 640 641 642 643 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 631 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
523 524 525 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 523 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
529 530 531 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 529 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, 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].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
430 431 432 433 434 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 430 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)
607 608 609 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 607 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
613 614 615 616 617 618 619 620 621 622 623 624 625 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 613 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
601 602 603 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 601 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
438 439 440 441 |
# File 'lib/korona-cloud-client/models/receipt.rb', line 438 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |