Class: Nfe::Generated::ProductInvoiceRtcV1::IBSCBSTaxResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeIBSCBSTaxResource

Returns a new instance of IBSCBSTaxResource.

Parameters:



26
# File 'sig/nfe/generated/product_invoice_rtc_v1/ibscbstax_resource.rbs', line 26

def initialize: (?basis: Float?, ?calculation_mode: String?, ?cbs: CBSTaxResource, ?class_code: String?, ?credit_reversal: CreditReversalResource, ?credit_transfer: CreditTransferTaxResource, ?donation_indicator: String?, ?government_purchase: GovernmentPurchaseTaxResource, ?ibs_total_amount: Float?, ?monophase: MonophaseIBSCBSTaxResource, ?municipal: IBSMunicipalTaxResource, ?operational_presumed_credit: OperationalPresumedCreditResource, ?regular_taxation: RegularTaxationResource, ?situation_code: String?, ?state: IBSStateTaxResource, ?zfm_presumed_credit: ZfmPresumedCreditResource) -> void

Instance Attribute Details

#basisObject (readonly)

Returns the value of attribute basis

Returns:

  • (Object)

    the current value of basis



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

def basis
  @basis
end

#calculation_modeObject (readonly)

Returns the value of attribute calculation_mode

Returns:

  • (Object)

    the current value of calculation_mode



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

def calculation_mode
  @calculation_mode
end

#cbsObject (readonly)

Returns the value of attribute cbs

Returns:

  • (Object)

    the current value of cbs



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

def cbs
  @cbs
end

#class_codeObject (readonly)

Returns the value of attribute class_code

Returns:

  • (Object)

    the current value of class_code



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

def class_code
  @class_code
end

#credit_reversalObject (readonly)

Returns the value of attribute credit_reversal

Returns:

  • (Object)

    the current value of credit_reversal



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

def credit_reversal
  @credit_reversal
end

#credit_transferObject (readonly)

Returns the value of attribute credit_transfer

Returns:

  • (Object)

    the current value of credit_transfer



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

def credit_transfer
  @credit_transfer
end

#donation_indicatorObject (readonly)

Returns the value of attribute donation_indicator

Returns:

  • (Object)

    the current value of donation_indicator



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

def donation_indicator
  @donation_indicator
end

#government_purchaseObject (readonly)

Returns the value of attribute government_purchase

Returns:

  • (Object)

    the current value of government_purchase



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

def government_purchase
  @government_purchase
end

#ibs_total_amountObject (readonly)

Returns the value of attribute ibs_total_amount

Returns:

  • (Object)

    the current value of ibs_total_amount



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

def ibs_total_amount
  @ibs_total_amount
end

#monophaseObject (readonly)

Returns the value of attribute monophase

Returns:

  • (Object)

    the current value of monophase



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

def monophase
  @monophase
end

#municipalObject (readonly)

Returns the value of attribute municipal

Returns:

  • (Object)

    the current value of municipal



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

def municipal
  @municipal
end

#operational_presumed_creditObject (readonly)

Returns the value of attribute operational_presumed_credit

Returns:

  • (Object)

    the current value of operational_presumed_credit



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

def operational_presumed_credit
  @operational_presumed_credit
end

#regular_taxationObject (readonly)

Returns the value of attribute regular_taxation

Returns:

  • (Object)

    the current value of regular_taxation



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

def regular_taxation
  @regular_taxation
end

#situation_codeObject (readonly)

Returns the value of attribute situation_code

Returns:

  • (Object)

    the current value of situation_code



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

def situation_code
  @situation_code
end

#stateObject (readonly)

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



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

def state
  @state
end

#zfm_presumed_creditObject (readonly)

Returns the value of attribute zfm_presumed_credit

Returns:

  • (Object)

    the current value of zfm_presumed_credit



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

def zfm_presumed_credit
  @zfm_presumed_credit
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
29
30
31
# File 'lib/nfe/generated/product_invoice_rtc_v1/ibscbstax_resource.rb', line 10

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

  new(
    basis: payload["basis"],
    calculation_mode: payload["calculationMode"],
    cbs: CBSTaxResource.from_api(payload["cbs"]),
    class_code: payload["classCode"],
    credit_reversal: CreditReversalResource.from_api(payload["creditReversal"]),
    credit_transfer: CreditTransferTaxResource.from_api(payload["creditTransfer"]),
    donation_indicator: payload["donationIndicator"],
    government_purchase: GovernmentPurchaseTaxResource.from_api(payload["governmentPurchase"]),
    ibs_total_amount: payload["ibsTotalAmount"],
    monophase: MonophaseIBSCBSTaxResource.from_api(payload["monophase"]),
    municipal: IBSMunicipalTaxResource.from_api(payload["municipal"]),
    operational_presumed_credit: OperationalPresumedCreditResource.from_api(payload["operationalPresumedCredit"]),
    regular_taxation: RegularTaxationResource.from_api(payload["regularTaxation"]),
    situation_code: payload["situationCode"],
    state: IBSStateTaxResource.from_api(payload["state"]),
    zfm_presumed_credit: ZfmPresumedCreditResource.from_api(payload["zfmPresumedCredit"]),
  )
end

.newinstance

Parameters:

Returns:

  • (instance)


25
# File 'sig/nfe/generated/product_invoice_rtc_v1/ibscbstax_resource.rbs', line 25

def self.new: (?basis: Float?, ?calculation_mode: String?, ?cbs: CBSTaxResource, ?class_code: String?, ?credit_reversal: CreditReversalResource, ?credit_transfer: CreditTransferTaxResource, ?donation_indicator: String?, ?government_purchase: GovernmentPurchaseTaxResource, ?ibs_total_amount: Float?, ?monophase: MonophaseIBSCBSTaxResource, ?municipal: IBSMunicipalTaxResource, ?operational_presumed_credit: OperationalPresumedCreditResource, ?regular_taxation: RegularTaxationResource, ?situation_code: String?, ?state: IBSStateTaxResource, ?zfm_presumed_credit: ZfmPresumedCreditResource) -> instance