Class: Nfe::Generated::CalculoImpostosV1::Ipi

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeIpi

Returns a new instance of Ipi.

Parameters:

  • c_enq: (String, nil)
  • cst: (String, nil)
  • p_ipi: (String, nil)
  • q_unid: (String, nil)
  • v_bc: (String, nil)
  • v_ipi: (String, nil)
  • v_unid: (String, nil)


17
# File 'sig/nfe/generated/calculo_impostos_v1/ipi.rbs', line 17

def initialize: (?c_enq: String?, ?cst: String?, ?p_ipi: String?, ?q_unid: String?, ?v_bc: String?, ?v_ipi: String?, ?v_unid: String?) -> void

Instance Attribute Details

#c_enqObject (readonly)

Returns the value of attribute c_enq

Returns:

  • (Object)

    the current value of c_enq



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

def c_enq
  @c_enq
end

#cstObject (readonly)

Returns the value of attribute cst

Returns:

  • (Object)

    the current value of cst



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

def cst
  @cst
end

#p_ipiObject (readonly)

Returns the value of attribute p_ipi

Returns:

  • (Object)

    the current value of p_ipi



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

def p_ipi
  @p_ipi
end

#q_unidObject (readonly)

Returns the value of attribute q_unid

Returns:

  • (Object)

    the current value of q_unid



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

def q_unid
  @q_unid
end

#v_bcObject (readonly)

Returns the value of attribute v_bc

Returns:

  • (Object)

    the current value of v_bc



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

def v_bc
  @v_bc
end

#v_ipiObject (readonly)

Returns the value of attribute v_ipi

Returns:

  • (Object)

    the current value of v_ipi



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

def v_ipi
  @v_ipi
end

#v_unidObject (readonly)

Returns the value of attribute v_unid

Returns:

  • (Object)

    the current value of v_unid



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

def v_unid
  @v_unid
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
18
19
20
21
22
# File 'lib/nfe/generated/calculo_impostos_v1/ipi.rb', line 10

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

  new(
    c_enq: payload["cEnq"],
    cst: payload["cst"],
    p_ipi: payload["pIPI"],
    q_unid: payload["qUnid"],
    v_bc: payload["vBC"],
    v_ipi: payload["vIPI"],
    v_unid: payload["vUnid"],
  )
end

.newinstance

Parameters:

  • c_enq: (String, nil)
  • cst: (String, nil)
  • p_ipi: (String, nil)
  • q_unid: (String, nil)
  • v_bc: (String, nil)
  • v_ipi: (String, nil)
  • v_unid: (String, nil)

Returns:

  • (instance)


16
# File 'sig/nfe/generated/calculo_impostos_v1/ipi.rbs', line 16

def self.new: (?c_enq: String?, ?cst: String?, ?p_ipi: String?, ?q_unid: String?, ?v_bc: String?, ?v_ipi: String?, ?v_unid: String?) -> instance