Class: Nfe::Generated::CalculoImpostosV1::CalculateItemResponse

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCalculateItemResponse

Returns a new instance of CalculateItemResponse.

Parameters:

  • additional_information: (String, nil)
  • benefit: (String, nil)
  • cest: (String, nil)
  • cfop: (Integer)
  • cofins: (Cofins)
  • icms: (Icms)
  • icms_uf_dest: (IcmsUfDest)
  • id: (String, nil)
  • ii: (Ii)
  • ipi: (Ipi)
  • last_modified: (String)
  • pis: (Pis)
  • product_id: (String, nil)


23
# File 'sig/nfe/generated/calculo_impostos_v1/calculate_item_response.rbs', line 23

def initialize: (?additional_information: String?, ?benefit: String?, ?cest: String?, ?cfop: Integer, ?cofins: Cofins, ?icms: Icms, ?icms_uf_dest: IcmsUfDest, ?id: String?, ?ii: Ii, ?ipi: Ipi, ?last_modified: String, ?pis: Pis, ?product_id: String?) -> void

Instance Attribute Details

#additional_informationObject (readonly)

Returns the value of attribute additional_information

Returns:

  • (Object)

    the current value of additional_information



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

def additional_information
  @additional_information
end

#benefitObject (readonly)

Returns the value of attribute benefit

Returns:

  • (Object)

    the current value of benefit



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

def benefit
  @benefit
end

#cestObject (readonly)

Returns the value of attribute cest

Returns:

  • (Object)

    the current value of cest



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

def cest
  @cest
end

#cfopObject (readonly)

Returns the value of attribute cfop

Returns:

  • (Object)

    the current value of cfop



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

def cfop
  @cfop
end

#cofinsObject (readonly)

Returns the value of attribute cofins

Returns:

  • (Object)

    the current value of cofins



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

def cofins
  @cofins
end

#icmsObject (readonly)

Returns the value of attribute icms

Returns:

  • (Object)

    the current value of icms



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

def icms
  @icms
end

#icms_uf_destObject (readonly)

Returns the value of attribute icms_uf_dest

Returns:

  • (Object)

    the current value of icms_uf_dest



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

def icms_uf_dest
  @icms_uf_dest
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



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

def id
  @id
end

#iiObject (readonly)

Returns the value of attribute ii

Returns:

  • (Object)

    the current value of ii



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

def ii
  @ii
end

#ipiObject (readonly)

Returns the value of attribute ipi

Returns:

  • (Object)

    the current value of ipi



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

def ipi
  @ipi
end

#last_modifiedObject (readonly)

Returns the value of attribute last_modified

Returns:

  • (Object)

    the current value of last_modified



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

def last_modified
  @last_modified
end

#pisObject (readonly)

Returns the value of attribute pis

Returns:

  • (Object)

    the current value of pis



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

def pis
  @pis
end

#product_idObject (readonly)

Returns the value of attribute product_id

Returns:

  • (Object)

    the current value of product_id



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

def product_id
  @product_id
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
23
24
25
26
27
28
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_response.rb', line 10

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

  new(
    additional_information: payload["additionalInformation"],
    benefit: payload["benefit"],
    cest: payload["cest"],
    cfop: payload["cfop"],
    cofins: Cofins.from_api(payload["cofins"]),
    icms: Icms.from_api(payload["icms"]),
    icms_uf_dest: IcmsUfDest.from_api(payload["icmsUfDest"]),
    id: payload["id"],
    ii: Ii.from_api(payload["ii"]),
    ipi: Ipi.from_api(payload["ipi"]),
    last_modified: payload["lastModified"],
    pis: Pis.from_api(payload["pis"]),
    product_id: payload["productId"],
  )
end

.newinstance

Parameters:

  • additional_information: (String, nil)
  • benefit: (String, nil)
  • cest: (String, nil)
  • cfop: (Integer)
  • cofins: (Cofins)
  • icms: (Icms)
  • icms_uf_dest: (IcmsUfDest)
  • id: (String, nil)
  • ii: (Ii)
  • ipi: (Ipi)
  • last_modified: (String)
  • pis: (Pis)
  • product_id: (String, nil)

Returns:

  • (instance)


22
# File 'sig/nfe/generated/calculo_impostos_v1/calculate_item_response.rbs', line 22

def self.new: (?additional_information: String?, ?benefit: String?, ?cest: String?, ?cfop: Integer, ?cofins: Cofins, ?icms: Icms, ?icms_uf_dest: IcmsUfDest, ?id: String?, ?ii: Ii, ?ipi: Ipi, ?last_modified: String, ?pis: Pis, ?product_id: String?) -> instance