Class: Nfe::Generated::ProductInvoiceRtcV1::IPITaxResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeIPITaxResource

Returns a new instance of IPITaxResource.

Parameters:

  • amount: (Float, nil)
  • base: (Float, nil)
  • classification: (String, nil)
  • classification_code: (String, nil)
  • cst: (String, nil)
  • producer_cnpj: (String, nil)
  • rate: (Float, nil)
  • stamp_code: (String, nil)
  • stamp_quantity: (Float, nil)
  • unit_amount: (Float, nil)
  • unit_quantity: (Float, nil)


21
# File 'sig/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rbs', line 21

def initialize: (?amount: Float?, ?base: Float?, ?classification: String?, ?classification_code: String?, ?cst: String?, ?producer_cnpj: String?, ?rate: Float?, ?stamp_code: String?, ?stamp_quantity: Float?, ?unit_amount: Float?, ?unit_quantity: Float?) -> void

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount

Returns:

  • (Object)

    the current value of amount



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 9

def amount
  @amount
end

#baseObject (readonly)

Returns the value of attribute base

Returns:

  • (Object)

    the current value of base



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 9

def base
  @base
end

#classificationObject (readonly)

Returns the value of attribute classification

Returns:

  • (Object)

    the current value of classification



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 9

def classification
  @classification
end

#classification_codeObject (readonly)

Returns the value of attribute classification_code

Returns:

  • (Object)

    the current value of classification_code



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 9

def classification_code
  @classification_code
end

#cstObject (readonly)

Returns the value of attribute cst

Returns:

  • (Object)

    the current value of cst



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 9

def cst
  @cst
end

#producer_cnpjObject (readonly)

Returns the value of attribute producer_cnpj

Returns:

  • (Object)

    the current value of producer_cnpj



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 9

def producer_cnpj
  @producer_cnpj
end

#rateObject (readonly)

Returns the value of attribute rate

Returns:

  • (Object)

    the current value of rate



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 9

def rate
  @rate
end

#stamp_codeObject (readonly)

Returns the value of attribute stamp_code

Returns:

  • (Object)

    the current value of stamp_code



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 9

def stamp_code
  @stamp_code
end

#stamp_quantityObject (readonly)

Returns the value of attribute stamp_quantity

Returns:

  • (Object)

    the current value of stamp_quantity



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 9

def stamp_quantity
  @stamp_quantity
end

#unit_amountObject (readonly)

Returns the value of attribute unit_amount

Returns:

  • (Object)

    the current value of unit_amount



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 9

def unit_amount
  @unit_amount
end

#unit_quantityObject (readonly)

Returns the value of attribute unit_quantity

Returns:

  • (Object)

    the current value of unit_quantity



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 9

def unit_quantity
  @unit_quantity
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
# File 'lib/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rb', line 10

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

  new(
    amount: payload["amount"],
    base: payload["base"],
    classification: payload["classification"],
    classification_code: payload["classificationCode"],
    cst: payload["cst"],
    producer_cnpj: payload["producerCNPJ"],
    rate: payload["rate"],
    stamp_code: payload["stampCode"],
    stamp_quantity: payload["stampQuantity"],
    unit_amount: payload["unitAmount"],
    unit_quantity: payload["unitQuantity"],
  )
end

.newinstance

Parameters:

  • amount: (Float, nil)
  • base: (Float, nil)
  • classification: (String, nil)
  • classification_code: (String, nil)
  • cst: (String, nil)
  • producer_cnpj: (String, nil)
  • rate: (Float, nil)
  • stamp_code: (String, nil)
  • stamp_quantity: (Float, nil)
  • unit_amount: (Float, nil)
  • unit_quantity: (Float, nil)

Returns:

  • (instance)


20
# File 'sig/nfe/generated/product_invoice_rtc_v1/ipitax_resource.rbs', line 20

def self.new: (?amount: Float?, ?base: Float?, ?classification: String?, ?classification_code: String?, ?cst: String?, ?producer_cnpj: String?, ?rate: Float?, ?stamp_code: String?, ?stamp_quantity: Float?, ?unit_amount: Float?, ?unit_quantity: Float?) -> instance