Class: Nfe::Generated::CalculoImpostosV1::Pis

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePis

Returns a new instance of Pis.

Parameters:

  • cst: (String, nil)
  • p_pis: (String, nil)
  • q_bcprod: (String, nil)
  • v_aliq_prod: (String, nil)
  • v_bc: (String, nil)
  • v_pis: (String, nil)


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

def initialize: (?cst: String?, ?p_pis: String?, ?q_bcprod: String?, ?v_aliq_prod: String?, ?v_bc: String?, ?v_pis: String?) -> void

Instance Attribute Details

#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/pis.rb', line 9

def cst
  @cst
end

#p_pisObject (readonly)

Returns the value of attribute p_pis

Returns:

  • (Object)

    the current value of p_pis



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

def p_pis
  @p_pis
end

#q_bcprodObject (readonly)

Returns the value of attribute q_bcprod

Returns:

  • (Object)

    the current value of q_bcprod



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

def q_bcprod
  @q_bcprod
end

#v_aliq_prodObject (readonly)

Returns the value of attribute v_aliq_prod

Returns:

  • (Object)

    the current value of v_aliq_prod



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

def v_aliq_prod
  @v_aliq_prod
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/pis.rb', line 9

def v_bc
  @v_bc
end

#v_pisObject (readonly)

Returns the value of attribute v_pis

Returns:

  • (Object)

    the current value of v_pis



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

def v_pis
  @v_pis
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
# File 'lib/nfe/generated/calculo_impostos_v1/pis.rb', line 10

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

  new(
    cst: payload["cst"],
    p_pis: payload["pPIS"],
    q_bcprod: payload["qBCProd"],
    v_aliq_prod: payload["vAliqProd"],
    v_bc: payload["vBC"],
    v_pis: payload["vPIS"],
  )
end

.newinstance

Parameters:

  • cst: (String, nil)
  • p_pis: (String, nil)
  • q_bcprod: (String, nil)
  • v_aliq_prod: (String, nil)
  • v_bc: (String, nil)
  • v_pis: (String, nil)

Returns:

  • (instance)


15
# File 'sig/nfe/generated/calculo_impostos_v1/pis.rbs', line 15

def self.new: (?cst: String?, ?p_pis: String?, ?q_bcprod: String?, ?v_aliq_prod: String?, ?v_bc: String?, ?v_pis: String?) -> instance