Class: Nfe::Generated::ServiceInvoiceRtcV1::DeductionDocument
- Inherits:
-
Data
- Object
- Data
- Nfe::Generated::ServiceInvoiceRtcV1::DeductionDocument
- Defined in:
- lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb,
sig/nfe/generated/service_invoice_rtc_v1/deduction_document.rbs
Instance Attribute Summary collapse
-
#deductible_total ⇒ Object
readonly
Returns the value of attribute deductible_total.
-
#deduction_type ⇒ Object
readonly
Returns the value of attribute deduction_type.
-
#fiscal_document_number ⇒ Object
readonly
Returns the value of attribute fiscal_document_number.
-
#issue_date ⇒ Object
readonly
Returns the value of attribute issue_date.
-
#municipal_nfse ⇒ Object
readonly
Returns the value of attribute municipal_nfse.
-
#nfe_key ⇒ Object
readonly
Returns the value of attribute nfe_key.
-
#nfse_key ⇒ Object
readonly
Returns the value of attribute nfse_key.
-
#non_fiscal_document_number ⇒ Object
readonly
Returns the value of attribute non_fiscal_document_number.
-
#other_deduction_description ⇒ Object
readonly
Returns the value of attribute other_deduction_description.
-
#supplier ⇒ Object
readonly
Returns the value of attribute supplier.
-
#used_amount ⇒ Object
readonly
Returns the value of attribute used_amount.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ DeductionDocument
constructor
A new instance of DeductionDocument.
Constructor Details
#initialize ⇒ DeductionDocument
Returns a new instance of DeductionDocument.
21 |
# File 'sig/nfe/generated/service_invoice_rtc_v1/deduction_document.rbs', line 21
def initialize: (deductible_total: Float, deduction_type: String, ?fiscal_document_number: String, issue_date: String, ?municipal_nfse: Hash[String, untyped], ?nfe_key: String, ?nfse_key: String, ?non_fiscal_document_number: String, ?other_deduction_description: String, ?supplier: PartyDefinition, used_amount: Float) -> void
|
Instance Attribute Details
#deductible_total ⇒ Object (readonly)
Returns the value of attribute deductible_total
9 10 11 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 9 def deductible_total @deductible_total end |
#deduction_type ⇒ Object (readonly)
Returns the value of attribute deduction_type
9 10 11 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 9 def deduction_type @deduction_type end |
#fiscal_document_number ⇒ Object (readonly)
Returns the value of attribute fiscal_document_number
9 10 11 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 9 def fiscal_document_number @fiscal_document_number end |
#issue_date ⇒ Object (readonly)
Returns the value of attribute issue_date
9 10 11 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 9 def issue_date @issue_date end |
#municipal_nfse ⇒ Object (readonly)
Returns the value of attribute municipal_nfse
9 10 11 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 9 def municipal_nfse @municipal_nfse end |
#nfe_key ⇒ Object (readonly)
Returns the value of attribute nfe_key
9 10 11 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 9 def nfe_key @nfe_key end |
#nfse_key ⇒ Object (readonly)
Returns the value of attribute nfse_key
9 10 11 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 9 def nfse_key @nfse_key end |
#non_fiscal_document_number ⇒ Object (readonly)
Returns the value of attribute non_fiscal_document_number
9 10 11 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 9 def non_fiscal_document_number @non_fiscal_document_number end |
#other_deduction_description ⇒ Object (readonly)
Returns the value of attribute other_deduction_description
9 10 11 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 9 def other_deduction_description @other_deduction_description end |
#supplier ⇒ Object (readonly)
Returns the value of attribute supplier
9 10 11 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 9 def supplier @supplier end |
#used_amount ⇒ Object (readonly)
Returns the value of attribute used_amount
9 10 11 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 9 def used_amount @used_amount end |
Class Method Details
.from_api(payload) ⇒ instance?
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/nfe/generated/service_invoice_rtc_v1/deduction_document.rb', line 10 def self.from_api(payload) return nil if payload.nil? new( deductible_total: payload["deductibleTotal"], deduction_type: payload["deductionType"], fiscal_document_number: payload["fiscalDocumentNumber"], issue_date: payload["issueDate"], municipal_nfse: payload["municipalNfse"], nfe_key: payload["nfeKey"], nfse_key: payload["nfseKey"], non_fiscal_document_number: payload["nonFiscalDocumentNumber"], other_deduction_description: payload["otherDeductionDescription"], supplier: PartyDefinition.from_api(payload["supplier"]), used_amount: payload["usedAmount"], ) end |
.new ⇒ instance
20 |
# File 'sig/nfe/generated/service_invoice_rtc_v1/deduction_document.rbs', line 20
def self.new: (deductible_total: Float, deduction_type: String, ?fiscal_document_number: String, issue_date: String, ?municipal_nfse: Hash[String, untyped], ?nfe_key: String, ?nfse_key: String, ?non_fiscal_document_number: String, ?other_deduction_description: String, ?supplier: PartyDefinition, used_amount: Float) -> instance
|