Class: Fiscalizer::Invoice
- Inherits:
-
Object
- Object
- Fiscalizer::Invoice
- Defined in:
- lib/fiscalizer/data_objects/invoice.rb
Instance Attribute Summary collapse
-
#consistance_mark ⇒ Object
readonly
Returns the value of attribute consistance_mark.
-
#fees ⇒ Object
readonly
Returns the value of attribute fees.
-
#generated_xml ⇒ Object
Returns the value of attribute generated_xml.
-
#in_vat_system ⇒ Object
readonly
Returns the value of attribute in_vat_system.
-
#issued_machine ⇒ Object
readonly
Returns the value of attribute issued_machine.
-
#issued_number ⇒ Object
readonly
Returns the value of attribute issued_number.
-
#issued_office ⇒ Object
readonly
Returns the value of attribute issued_office.
-
#operator_pin ⇒ Object
readonly
Returns the value of attribute operator_pin.
-
#paragon_label ⇒ Object
readonly
Returns the value of attribute paragon_label.
-
#payment_method ⇒ Object
readonly
Returns the value of attribute payment_method.
-
#pin ⇒ Object
readonly
Returns the value of attribute pin.
-
#security_code ⇒ Object
Returns the value of attribute security_code.
-
#specific_purpose ⇒ Object
readonly
Returns the value of attribute specific_purpose.
-
#subsequent_delivery ⇒ Object
readonly
Returns the value of attribute subsequent_delivery.
-
#summed_total ⇒ Object
readonly
Returns the value of attribute summed_total.
-
#tax_other ⇒ Object
readonly
Returns the value of attribute tax_other.
-
#tax_spending ⇒ Object
readonly
Returns the value of attribute tax_spending.
-
#tax_vat ⇒ Object
readonly
Returns the value of attribute tax_vat.
-
#time_issued ⇒ Object
readonly
Returns the value of attribute time_issued.
-
#time_sent ⇒ Object
readonly
Returns the value of attribute time_sent.
-
#uuid ⇒ Object
readonly
Returns the value of attribute uuid.
-
#value_non_taxable ⇒ Object
readonly
Returns the value of attribute value_non_taxable.
-
#value_tax_liberation ⇒ Object
readonly
Returns the value of attribute value_tax_liberation.
-
#value_tax_margin ⇒ Object
readonly
Returns the value of attribute value_tax_margin.
Instance Method Summary collapse
-
#initialize(uuid:, time_sent:, pin:, in_vat_system:, time_issued:, consistance_mark:, issued_number:, issued_office:, issued_machine:, summed_total:, payment_method:, operator_pin:, subsequent_delivery:, tax_vat: [], tax_spending: [], tax_other: [], value_tax_liberation: nil, value_tax_margin: nil, value_non_taxable: nil, fees: [], paragon_label: nil, specific_purpose: nil) ⇒ Invoice
constructor
rubocop:disable Metrics/ParameterLists, Metrics/AbcSize, Metrics/MethodLength.
- #summed_total_str ⇒ Object
- #time_issued_str(separator = 'T') ⇒ Object
- #time_sent_str(separator = 'T') ⇒ Object
- #value_non_taxable_str ⇒ Object
- #value_tax_liberation_str ⇒ Object
- #value_tax_margin_str ⇒ Object
Constructor Details
#initialize(uuid:, time_sent:, pin:, in_vat_system:, time_issued:, consistance_mark:, issued_number:, issued_office:, issued_machine:, summed_total:, payment_method:, operator_pin:, subsequent_delivery:, tax_vat: [], tax_spending: [], tax_other: [], value_tax_liberation: nil, value_tax_margin: nil, value_non_taxable: nil, fees: [], paragon_label: nil, specific_purpose: nil) ⇒ Invoice
rubocop:disable Metrics/ParameterLists, Metrics/AbcSize, Metrics/MethodLength
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 4 def initialize(uuid:, time_sent:, pin:, in_vat_system:, time_issued:, consistance_mark:, issued_number:, issued_office:, issued_machine:, summed_total:, payment_method:, operator_pin:, subsequent_delivery:, tax_vat: [], tax_spending: [], tax_other: [], value_tax_liberation: nil, value_tax_margin: nil, value_non_taxable: nil, fees: [], paragon_label: nil, specific_purpose: nil) @uuid = uuid @time_sent = time_sent @pin = pin @in_vat_system = in_vat_system @time_issued = time_issued @consistance_mark = consistance_mark @issued_number = issued_number @issued_office = issued_office @issued_machine = issued_machine @tax_vat = tax_vat @tax_spending = tax_spending @tax_other = tax_other @value_tax_liberation = value_tax_liberation @value_tax_margin = value_tax_margin @value_non_taxable = value_non_taxable @fees = fees @summed_total = summed_total @payment_method = payment_method @operator_pin = operator_pin @subsequent_delivery = subsequent_delivery @paragon_label = paragon_label @specific_purpose = specific_purpose end |
Instance Attribute Details
#consistance_mark ⇒ Object (readonly)
Returns the value of attribute consistance_mark.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def consistance_mark @consistance_mark end |
#fees ⇒ Object (readonly)
Returns the value of attribute fees.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def fees @fees end |
#generated_xml ⇒ Object
Returns the value of attribute generated_xml.
44 45 46 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 44 def generated_xml @generated_xml end |
#in_vat_system ⇒ Object (readonly)
Returns the value of attribute in_vat_system.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def in_vat_system @in_vat_system end |
#issued_machine ⇒ Object (readonly)
Returns the value of attribute issued_machine.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def issued_machine @issued_machine end |
#issued_number ⇒ Object (readonly)
Returns the value of attribute issued_number.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def issued_number @issued_number end |
#issued_office ⇒ Object (readonly)
Returns the value of attribute issued_office.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def issued_office @issued_office end |
#operator_pin ⇒ Object (readonly)
Returns the value of attribute operator_pin.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def operator_pin @operator_pin end |
#paragon_label ⇒ Object (readonly)
Returns the value of attribute paragon_label.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def paragon_label @paragon_label end |
#payment_method ⇒ Object (readonly)
Returns the value of attribute payment_method.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def payment_method @payment_method end |
#pin ⇒ Object (readonly)
Returns the value of attribute pin.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def pin @pin end |
#security_code ⇒ Object
Returns the value of attribute security_code.
44 45 46 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 44 def security_code @security_code end |
#specific_purpose ⇒ Object (readonly)
Returns the value of attribute specific_purpose.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def specific_purpose @specific_purpose end |
#subsequent_delivery ⇒ Object (readonly)
Returns the value of attribute subsequent_delivery.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def subsequent_delivery @subsequent_delivery end |
#summed_total ⇒ Object (readonly)
Returns the value of attribute summed_total.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def summed_total @summed_total end |
#tax_other ⇒ Object (readonly)
Returns the value of attribute tax_other.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def tax_other @tax_other end |
#tax_spending ⇒ Object (readonly)
Returns the value of attribute tax_spending.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def tax_spending @tax_spending end |
#tax_vat ⇒ Object (readonly)
Returns the value of attribute tax_vat.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def tax_vat @tax_vat end |
#time_issued ⇒ Object (readonly)
Returns the value of attribute time_issued.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def time_issued @time_issued end |
#time_sent ⇒ Object (readonly)
Returns the value of attribute time_sent.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def time_sent @time_sent end |
#uuid ⇒ Object (readonly)
Returns the value of attribute uuid.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def uuid @uuid end |
#value_non_taxable ⇒ Object (readonly)
Returns the value of attribute value_non_taxable.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def value_non_taxable @value_non_taxable end |
#value_tax_liberation ⇒ Object (readonly)
Returns the value of attribute value_tax_liberation.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def value_tax_liberation @value_tax_liberation end |
#value_tax_margin ⇒ Object (readonly)
Returns the value of attribute value_tax_margin.
35 36 37 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 35 def value_tax_margin @value_tax_margin end |
Instance Method Details
#summed_total_str ⇒ Object
54 55 56 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 54 def summed_total_str format_decimal(summed_total) end |
#time_issued_str(separator = 'T') ⇒ Object
46 47 48 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 46 def time_issued_str(separator = 'T') time_issued.strftime("%d.%m.%Y#{separator}%H:%M:%S") end |
#time_sent_str(separator = 'T') ⇒ Object
50 51 52 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 50 def time_sent_str(separator = 'T') time_sent.strftime("%d.%m.%Y#{separator}%H:%M:%S") end |
#value_non_taxable_str ⇒ Object
68 69 70 71 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 68 def value_non_taxable_str return if value_non_taxable.nil? format_decimal(value_non_taxable.round(2)) end |
#value_tax_liberation_str ⇒ Object
58 59 60 61 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 58 def value_tax_liberation_str return if value_tax_liberation.nil? format_decimal(value_tax_liberation.round(2)) end |
#value_tax_margin_str ⇒ Object
63 64 65 66 |
# File 'lib/fiscalizer/data_objects/invoice.rb', line 63 def value_tax_margin_str return if value_tax_margin.nil? format_decimal(value_tax_margin.round(2)) end |