Class: Nfe::Generated::NfProdutoV2::AdditionalInformationResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAdditionalInformationResource

Returns a new instance of AdditionalInformationResource.

Parameters:



19
# File 'sig/nfe/generated/nf_produto_v2/additional_information_resource.rbs', line 19

def initialize: (?contract: String?, ?effort: String?, ?fisco: String?, ?order: String?, ?referenced_process: Array[ReferencedProcessResource]?, ?tax_documents_reference: Array[TaxDocumentsReferenceResource]?, ?taxpayer: String?, ?taxpayer_comments: Array[TaxpayerCommentsResource]?, ?xml_authorized: Array[Integer]?) -> void

Instance Attribute Details

#contractObject (readonly)

Returns the value of attribute contract

Returns:

  • (Object)

    the current value of contract



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/additional_information_resource.rb', line 9

def contract
  @contract
end

#effortObject (readonly)

Returns the value of attribute effort

Returns:

  • (Object)

    the current value of effort



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/additional_information_resource.rb', line 9

def effort
  @effort
end

#fiscoObject (readonly)

Returns the value of attribute fisco

Returns:

  • (Object)

    the current value of fisco



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/additional_information_resource.rb', line 9

def fisco
  @fisco
end

#orderObject (readonly)

Returns the value of attribute order

Returns:

  • (Object)

    the current value of order



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/additional_information_resource.rb', line 9

def order
  @order
end

#referenced_processObject (readonly)

Returns the value of attribute referenced_process

Returns:

  • (Object)

    the current value of referenced_process



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/additional_information_resource.rb', line 9

def referenced_process
  @referenced_process
end

#tax_documents_referenceObject (readonly)

Returns the value of attribute tax_documents_reference

Returns:

  • (Object)

    the current value of tax_documents_reference



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/additional_information_resource.rb', line 9

def tax_documents_reference
  @tax_documents_reference
end

#taxpayerObject (readonly)

Returns the value of attribute taxpayer

Returns:

  • (Object)

    the current value of taxpayer



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/additional_information_resource.rb', line 9

def taxpayer
  @taxpayer
end

#taxpayer_commentsObject (readonly)

Returns the value of attribute taxpayer_comments

Returns:

  • (Object)

    the current value of taxpayer_comments



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/additional_information_resource.rb', line 9

def taxpayer_comments
  @taxpayer_comments
end

#xml_authorizedObject (readonly)

Returns the value of attribute xml_authorized

Returns:

  • (Object)

    the current value of xml_authorized



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/additional_information_resource.rb', line 9

def xml_authorized
  @xml_authorized
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
# File 'lib/nfe/generated/nf_produto_v2/additional_information_resource.rb', line 10

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

  new(
    contract: payload["contract"],
    effort: payload["effort"],
    fisco: payload["fisco"],
    order: payload["order"],
    referenced_process: (payload["referencedProcess"] || []).map { |e| ReferencedProcessResource.from_api(e) },
    tax_documents_reference: (payload["taxDocumentsReference"] || []).map { |e| TaxDocumentsReferenceResource.from_api(e) },
    taxpayer: payload["taxpayer"],
    taxpayer_comments: (payload["taxpayerComments"] || []).map { |e| TaxpayerCommentsResource.from_api(e) },
    xml_authorized: payload["xmlAuthorized"],
  )
end

.newinstance

Parameters:

Returns:

  • (instance)


18
# File 'sig/nfe/generated/nf_produto_v2/additional_information_resource.rbs', line 18

def self.new: (?contract: String?, ?effort: String?, ?fisco: String?, ?order: String?, ?referenced_process: Array[ReferencedProcessResource]?, ?tax_documents_reference: Array[TaxDocumentsReferenceResource]?, ?taxpayer: String?, ?taxpayer_comments: Array[TaxpayerCommentsResource]?, ?xml_authorized: Array[Integer]?) -> instance