Class: SEFAZ::Configuration
- Inherits:
-
Object
- Object
- SEFAZ::Configuration
- Defined in:
- lib/sefaz/configuration.rb
Overview
Classe base para parametrização da biblioteca
Instance Attribute Summary collapse
-
#cfe_cMP_cod_desc ⇒ Object
Returns the value of attribute cfe_cMP_cod_desc.
-
#cfe_margin_55mm ⇒ Object
Returns the value of attribute cfe_margin_55mm.
-
#cfe_margin_80mm ⇒ Object
Returns the value of attribute cfe_margin_80mm.
-
#cfe_page_width_55mm ⇒ Object
55mm.
-
#cfe_page_width_80mm ⇒ Object
80mm.
-
#cfe_qr_code_aplicativo ⇒ Object
CF-e (Cupom Fiscal Eletrônico).
-
#currency_format ⇒ Object
Configuração da formatação de valores monetários.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/sefaz/configuration.rb', line 22 def initialize @currency_format = { delimiter: ".", separator: ",", unit: "", precision: 2, position: "before" } @cfe_qr_code_aplicativo = "De olho na nota" @cfe_cMP_cod_desc = { "01" => "Dinheiro", "02" => "Cheque", "03" => "Cartão de Crédito", "04" => "Cartão de Débito", "05" => "Crédito Loja", "10" => "Vale Alimentação", "11" => "Vale Refeição", "12" => "Vale Presente", "13" => "Vale Combustível", "15" => "Boleto Bancário", "16" => "Depósito Bancário", "17" => "Pagamento Instantâneo (PIX)", "18" => "Transferência bancária, Carteira Digital", "19" => "Programa de fidelidade, Cashback, Crédito Virtual", "90" => "Sem pagamento", "99" => "Outros" } # 50mm @cfe_page_width_55mm = 55.mm @cfe_margin_55mm = 5.mm # 80mm @cfe_page_width_80mm = 80.mm @cfe_margin_80mm = 5.mm end |
Instance Attribute Details
#cfe_cMP_cod_desc ⇒ Object
Returns the value of attribute cfe_cMP_cod_desc.
12 13 14 |
# File 'lib/sefaz/configuration.rb', line 12 def cfe_cMP_cod_desc @cfe_cMP_cod_desc end |
#cfe_margin_55mm ⇒ Object
Returns the value of attribute cfe_margin_55mm.
16 17 18 |
# File 'lib/sefaz/configuration.rb', line 16 def cfe_margin_55mm @cfe_margin_55mm end |
#cfe_margin_80mm ⇒ Object
Returns the value of attribute cfe_margin_80mm.
20 21 22 |
# File 'lib/sefaz/configuration.rb', line 20 def cfe_margin_80mm @cfe_margin_80mm end |
#cfe_page_width_55mm ⇒ Object
55mm
15 16 17 |
# File 'lib/sefaz/configuration.rb', line 15 def cfe_page_width_55mm @cfe_page_width_55mm end |
#cfe_page_width_80mm ⇒ Object
80mm
19 20 21 |
# File 'lib/sefaz/configuration.rb', line 19 def cfe_page_width_80mm @cfe_page_width_80mm end |
#cfe_qr_code_aplicativo ⇒ Object
CF-e (Cupom Fiscal Eletrônico)
11 12 13 |
# File 'lib/sefaz/configuration.rb', line 11 def cfe_qr_code_aplicativo @cfe_qr_code_aplicativo end |
#currency_format ⇒ Object
Configuração da formatação de valores monetários
8 9 10 |
# File 'lib/sefaz/configuration.rb', line 8 def currency_format @currency_format end |
Class Method Details
.default ⇒ Object
53 54 55 |
# File 'lib/sefaz/configuration.rb', line 53 def self.default @default ||= Configuration.new end |