Class: NewStoreApi::PosnetOnlineCountersV1Dto
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::PosnetOnlineCountersV1Dto
- Defined in:
- lib/new_store_api/models/posnet_online_counters_v1_dto.rb
Overview
PosnetOnlineCountersV1Dto Model.
Instance Attribute Summary collapse
-
#cancelled_invoice_counter ⇒ Integer
Cancelled invoice counter.
-
#cancelled_receipt_counter ⇒ Integer
Cancelled receipt counter.
-
#daily_report_counter ⇒ Integer
Daily report counter.
-
#fiscal_memory_id ⇒ String
Identification number of the fiscal memory that was programmed with
progid. -
#invoice_counter ⇒ Integer
Successful invoice counter.
-
#last_printed_header_number ⇒ Integer
Last printed header number.
-
#last_receipt_number ⇒ Integer
Last receipt number.
-
#receipt_counter ⇒ Integer
Successful receipt counter.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(cancelled_invoice_counter = SKIP, cancelled_receipt_counter = SKIP, daily_report_counter = SKIP, fiscal_memory_id = SKIP, invoice_counter = SKIP, last_printed_header_number = SKIP, last_receipt_number = SKIP, receipt_counter = SKIP) ⇒ PosnetOnlineCountersV1Dto
constructor
A new instance of PosnetOnlineCountersV1Dto.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(cancelled_invoice_counter = SKIP, cancelled_receipt_counter = SKIP, daily_report_counter = SKIP, fiscal_memory_id = SKIP, invoice_counter = SKIP, last_printed_header_number = SKIP, last_receipt_number = SKIP, receipt_counter = SKIP) ⇒ PosnetOnlineCountersV1Dto
Returns a new instance of PosnetOnlineCountersV1Dto.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 78 def initialize(cancelled_invoice_counter = SKIP, cancelled_receipt_counter = SKIP, daily_report_counter = SKIP, fiscal_memory_id = SKIP, invoice_counter = SKIP, last_printed_header_number = SKIP, last_receipt_number = SKIP, receipt_counter = SKIP) unless cancelled_invoice_counter == SKIP @cancelled_invoice_counter = cancelled_invoice_counter end unless cancelled_receipt_counter == SKIP @cancelled_receipt_counter = cancelled_receipt_counter end @daily_report_counter = daily_report_counter unless daily_report_counter == SKIP @fiscal_memory_id = fiscal_memory_id unless fiscal_memory_id == SKIP @invoice_counter = invoice_counter unless invoice_counter == SKIP unless last_printed_header_number == SKIP @last_printed_header_number = last_printed_header_number end @last_receipt_number = last_receipt_number unless last_receipt_number == SKIP @receipt_counter = receipt_counter unless receipt_counter == SKIP end |
Instance Attribute Details
#cancelled_invoice_counter ⇒ Integer
Cancelled invoice counter.
14 15 16 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 14 def cancelled_invoice_counter @cancelled_invoice_counter end |
#cancelled_receipt_counter ⇒ Integer
Cancelled receipt counter.
18 19 20 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 18 def cancelled_receipt_counter @cancelled_receipt_counter end |
#daily_report_counter ⇒ Integer
Daily report counter.
22 23 24 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 22 def daily_report_counter @daily_report_counter end |
#fiscal_memory_id ⇒ String
Identification number of the fiscal memory that was programmed with
progid.
27 28 29 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 27 def fiscal_memory_id @fiscal_memory_id end |
#invoice_counter ⇒ Integer
Successful invoice counter.
31 32 33 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 31 def invoice_counter @invoice_counter end |
#last_printed_header_number ⇒ Integer
Last printed header number.
35 36 37 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 35 def last_printed_header_number @last_printed_header_number end |
#last_receipt_number ⇒ Integer
Last receipt number.
39 40 41 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 39 def last_receipt_number @last_receipt_number end |
#receipt_counter ⇒ Integer
Successful receipt counter.
43 44 45 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 43 def receipt_counter @receipt_counter end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
103 104 105 106 107 108 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 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 103 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. cancelled_invoice_counter = hash.key?('cancelled_invoice_counter') ? hash['cancelled_invoice_counter'] : SKIP cancelled_receipt_counter = hash.key?('cancelled_receipt_counter') ? hash['cancelled_receipt_counter'] : SKIP daily_report_counter = hash.key?('daily_report_counter') ? hash['daily_report_counter'] : SKIP fiscal_memory_id = hash.key?('fiscal_memory_id') ? hash['fiscal_memory_id'] : SKIP invoice_counter = hash.key?('invoice_counter') ? hash['invoice_counter'] : SKIP last_printed_header_number = hash.key?('last_printed_header_number') ? hash['last_printed_header_number'] : SKIP last_receipt_number = hash.key?('last_receipt_number') ? hash['last_receipt_number'] : SKIP receipt_counter = hash.key?('receipt_counter') ? hash['receipt_counter'] : SKIP # Create object from extracted values. PosnetOnlineCountersV1Dto.new(cancelled_invoice_counter, cancelled_receipt_counter, daily_report_counter, fiscal_memory_id, invoice_counter, last_printed_header_number, last_receipt_number, receipt_counter) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['cancelled_invoice_counter'] = 'cancelled_invoice_counter' @_hash['cancelled_receipt_counter'] = 'cancelled_receipt_counter' @_hash['daily_report_counter'] = 'daily_report_counter' @_hash['fiscal_memory_id'] = 'fiscal_memory_id' @_hash['invoice_counter'] = 'invoice_counter' @_hash['last_printed_header_number'] = 'last_printed_header_number' @_hash['last_receipt_number'] = 'last_receipt_number' @_hash['receipt_counter'] = 'receipt_counter' @_hash end |
.nullables ⇒ Object
An array for nullable fields
74 75 76 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 74 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 60 def self.optionals %w[ cancelled_invoice_counter cancelled_receipt_counter daily_report_counter fiscal_memory_id invoice_counter last_printed_header_number last_receipt_number receipt_counter ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
137 138 139 140 141 142 143 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 137 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
156 157 158 159 160 161 162 163 164 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 156 def inspect class_name = self.class.name.split('::').last "<#{class_name} cancelled_invoice_counter: #{@cancelled_invoice_counter.inspect},"\ " cancelled_receipt_counter: #{@cancelled_receipt_counter.inspect}, daily_report_counter:"\ " #{@daily_report_counter.inspect}, fiscal_memory_id: #{@fiscal_memory_id.inspect},"\ " invoice_counter: #{@invoice_counter.inspect}, last_printed_header_number:"\ " #{@last_printed_header_number.inspect}, last_receipt_number:"\ " #{@last_receipt_number.inspect}, receipt_counter: #{@receipt_counter.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
146 147 148 149 150 151 152 153 |
# File 'lib/new_store_api/models/posnet_online_counters_v1_dto.rb', line 146 def to_s class_name = self.class.name.split('::').last "<#{class_name} cancelled_invoice_counter: #{@cancelled_invoice_counter},"\ " cancelled_receipt_counter: #{@cancelled_receipt_counter}, daily_report_counter:"\ " #{@daily_report_counter}, fiscal_memory_id: #{@fiscal_memory_id}, invoice_counter:"\ " #{@invoice_counter}, last_printed_header_number: #{@last_printed_header_number},"\ " last_receipt_number: #{@last_receipt_number}, receipt_counter: #{@receipt_counter}>" end |