Class: Nfe::Generated::ProductInvoiceRtcV1::Total

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTotal

Returns a new instance of Total.

Parameters:



16
# File 'sig/nfe/generated/product_invoice_rtc_v1/total.rbs', line 16

def initialize: (?ibs_cbs_totals: IBSCBSTotalsResource, ?icms: ICMSTotal, ?is_totals: ISTotalsResource, ?issqn: ISSQNTotal, ?total_invoice_amount: Float?, ?withheld_taxes: TotalsWithholdings) -> void

Instance Attribute Details

#ibs_cbs_totalsObject (readonly)

Returns the value of attribute ibs_cbs_totals

Returns:

  • (Object)

    the current value of ibs_cbs_totals



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

def ibs_cbs_totals
  @ibs_cbs_totals
end

#icmsObject (readonly)

Returns the value of attribute icms

Returns:

  • (Object)

    the current value of icms



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

def icms
  @icms
end

#is_totalsObject (readonly)

Returns the value of attribute is_totals

Returns:

  • (Object)

    the current value of is_totals



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

def is_totals
  @is_totals
end

#issqnObject (readonly)

Returns the value of attribute issqn

Returns:

  • (Object)

    the current value of issqn



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

def issqn
  @issqn
end

#total_invoice_amountObject (readonly)

Returns the value of attribute total_invoice_amount

Returns:

  • (Object)

    the current value of total_invoice_amount



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

def total_invoice_amount
  @total_invoice_amount
end

#withheld_taxesObject (readonly)

Returns the value of attribute withheld_taxes

Returns:

  • (Object)

    the current value of withheld_taxes



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

def withheld_taxes
  @withheld_taxes
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/product_invoice_rtc_v1/total.rb', line 10

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

  new(
    ibs_cbs_totals: IBSCBSTotalsResource.from_api(payload["ibsCbsTotals"]),
    icms: ICMSTotal.from_api(payload["icms"]),
    is_totals: ISTotalsResource.from_api(payload["isTotals"]),
    issqn: ISSQNTotal.from_api(payload["issqn"]),
    total_invoice_amount: payload["totalInvoiceAmount"],
    withheld_taxes: TotalsWithholdings.from_api(payload["withheldTaxes"]),
  )
end

.newinstance

Parameters:

Returns:

  • (instance)


15
# File 'sig/nfe/generated/product_invoice_rtc_v1/total.rbs', line 15

def self.new: (?ibs_cbs_totals: IBSCBSTotalsResource, ?icms: ICMSTotal, ?is_totals: ISTotalsResource, ?issqn: ISSQNTotal, ?total_invoice_amount: Float?, ?withheld_taxes: TotalsWithholdings) -> instance