Class: Nfe::Generated::CalculoImpostosV1::TaxCode

Inherits:
Data
  • Object
show all
Defined in:
lib/nfe/generated/calculo_impostos_v1/tax_code.rb,
sig/nfe/generated/calculo_impostos_v1/tax_code.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTaxCode

Returns a new instance of TaxCode.

Parameters:

  • code: (String, nil)
  • description: (String, nil)


12
# File 'sig/nfe/generated/calculo_impostos_v1/tax_code.rbs', line 12

def initialize: (?code: String?, ?description: String?) -> void

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



9
10
11
# File 'lib/nfe/generated/calculo_impostos_v1/tax_code.rb', line 9

def code
  @code
end

#descriptionObject (readonly)

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



9
10
11
# File 'lib/nfe/generated/calculo_impostos_v1/tax_code.rb', line 9

def description
  @description
end

Class Method Details

.from_api(payload) ⇒ instance?

Parameters:

  • payload (Hash[String, untyped], nil)

Returns:

  • (instance, nil)


10
11
12
13
14
15
16
17
# File 'lib/nfe/generated/calculo_impostos_v1/tax_code.rb', line 10

def self.from_api(payload)
  return nil if payload.nil?

  new(
    code: payload["code"],
    description: payload["description"],
  )
end

.newinstance

Parameters:

  • code: (String, nil)
  • description: (String, nil)

Returns:

  • (instance)


11
# File 'sig/nfe/generated/calculo_impostos_v1/tax_code.rbs', line 11

def self.new: (?code: String?, ?description: String?) -> instance