Class: Facturae::Tax
- Inherits:
-
Object
- Object
- Facturae::Tax
- Includes:
- Validatable
- Defined in:
- lib/facturae/models/tax.rb
Overview
Represents a tax.
Constant Summary collapse
- TAX_IVA =
"01"- TAX_IPSI =
"02"- TAX_IGIC =
"03"- TAX_IRPF =
"04"- TAX_OTHER =
"05"- TAX_ITPAJD =
"06"- TAX_IE =
"07"- TAX_RA =
"08"- TAX_IGTECM =
"09"- TAX_IECDPCAC =
"10"- TAX_IIIMAB =
"11"- TAX_ICIO =
"12"- TAX_IMVDN =
"13"- TAX_IMSN =
"14"- TAX_IMGSN =
"15"- TAX_IMPN =
"16"- TAX_REIVA =
"17"- TAX_REIGIC =
"18"- TAX_REIPSI =
"19"- TAX_IPS =
"20"- TAX_RLEA =
"21"- TAX_IVPEE =
"22"- TAX_IPCNG =
"23"- TAX_IACNG =
"24"- TAX_IDEC =
"25"- TAX_ILTCAC =
"26"- TAX_IGFEI =
"27"- TAX_IRNR =
"28"- TAX_ISS =
"29"- TAXES_TYPES =
[TAX_IVA, TAX_IPSI, TAX_IGIC, TAX_IGIC, TAX_IRPF, TAX_OTHER, TAX_ITPAJD, TAX_IE, TAX_RA, TAX_IGTECM, TAX_IECDPCAC, TAX_IIIMAB, TAX_ICIO, TAX_IMVDN, TAX_IMSN, TAX_IMGSN, TAX_IMPN, TAX_REIVA, TAX_REIGIC, TAX_REIPSI, TAX_IPS, TAX_RLEA, TAX_IVPEE, TAX_IPCNG, TAX_IACNG, TAX_IDEC, TAX_ILTCAC, TAX_IGFEI, TAX_IRNR, TAX_ISS].freeze
Instance Attribute Summary collapse
-
#tax_amount ⇒ Object
Returns the value of attribute tax_amount.
-
#tax_rate ⇒ Float
The tax rate.
-
#tax_type_code ⇒ String
The tax type code.
-
#taxable_base ⇒ Float
The taxable base.
Instance Method Summary collapse
-
#initialize(tax_rate:, taxable_base:, tax_amount:, tax_type_code:) ⇒ Tax
constructor
A new instance of Tax.
Methods included from Validatable
Constructor Details
#initialize(tax_rate:, taxable_base:, tax_amount:, tax_type_code:) ⇒ Tax
Returns a new instance of Tax.
52 53 54 55 56 57 |
# File 'lib/facturae/models/tax.rb', line 52 def initialize(tax_rate:, taxable_base:, tax_amount:, tax_type_code:) @tax_rate = tax_rate @taxable_base = taxable_base @tax_amount = tax_amount @tax_type_code = tax_type_code end |
Instance Attribute Details
#tax_amount ⇒ Object
Returns the value of attribute tax_amount.
47 48 49 |
# File 'lib/facturae/models/tax.rb', line 47 def tax_amount @tax_amount end |
#tax_rate ⇒ Float
The tax rate.
8 9 10 |
# File 'lib/facturae/models/tax.rb', line 8 def tax_rate @tax_rate end |
#tax_type_code ⇒ String
The tax type code.
8 9 10 |
# File 'lib/facturae/models/tax.rb', line 8 def tax_type_code @tax_type_code end |
#taxable_base ⇒ Float
The taxable base.
8 9 10 |
# File 'lib/facturae/models/tax.rb', line 8 def taxable_base @taxable_base end |