Class: Nfe::Generated::ConsultaDfeDistribuicaoV2::NFeMetadataResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNFeMetadataResource

Returns a new instance of NFeMetadataResource.

Parameters:

  • access_key: (String)
  • buyer: (BuyerResource)
  • company: (InboundCompanyResource)
  • created_on: (String)
  • description: (String)
  • federal_tax_number_sender: (String)
  • issued_on: (String)
  • issuer: (IssuerResource)
  • name_sender: (String)
  • nfe_number: (String)
  • nfe_serial_number: (String)
  • nsu: (String)
  • nsu_parent: (String)
  • operation_type: (String)
  • parent_access_key: (String)
  • total_invoice_amount: (String)
  • transportation: (TransportationResource)
  • type: (String)
  • xml_url: (String)


29
# File 'sig/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rbs', line 29

def initialize: (?access_key: String, ?buyer: BuyerResource, ?company: InboundCompanyResource, ?created_on: String, ?description: String, ?federal_tax_number_sender: String, ?issued_on: String, ?issuer: IssuerResource, ?name_sender: String, ?nfe_number: String, ?nfe_serial_number: String, ?nsu: String, ?nsu_parent: String, ?operation_type: String, ?parent_access_key: String, ?total_invoice_amount: String, ?transportation: TransportationResource, ?type: String, ?xml_url: String) -> void

Instance Attribute Details

#access_keyObject (readonly)

Returns the value of attribute access_key

Returns:

  • (Object)

    the current value of access_key



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def access_key
  @access_key
end

#buyerObject (readonly)

Returns the value of attribute buyer

Returns:

  • (Object)

    the current value of buyer



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def buyer
  @buyer
end

#companyObject (readonly)

Returns the value of attribute company

Returns:

  • (Object)

    the current value of company



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def company
  @company
end

#created_onObject (readonly)

Returns the value of attribute created_on

Returns:

  • (Object)

    the current value of created_on



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def created_on
  @created_on
end

#descriptionObject (readonly)

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def description
  @description
end

#federal_tax_number_senderObject (readonly)

Returns the value of attribute federal_tax_number_sender

Returns:

  • (Object)

    the current value of federal_tax_number_sender



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def federal_tax_number_sender
  @federal_tax_number_sender
end

#issued_onObject (readonly)

Returns the value of attribute issued_on

Returns:

  • (Object)

    the current value of issued_on



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def issued_on
  @issued_on
end

#issuerObject (readonly)

Returns the value of attribute issuer

Returns:

  • (Object)

    the current value of issuer



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def issuer
  @issuer
end

#name_senderObject (readonly)

Returns the value of attribute name_sender

Returns:

  • (Object)

    the current value of name_sender



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def name_sender
  @name_sender
end

#nfe_numberObject (readonly)

Returns the value of attribute nfe_number

Returns:

  • (Object)

    the current value of nfe_number



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def nfe_number
  @nfe_number
end

#nfe_serial_numberObject (readonly)

Returns the value of attribute nfe_serial_number

Returns:

  • (Object)

    the current value of nfe_serial_number



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def nfe_serial_number
  @nfe_serial_number
end

#nsuObject (readonly)

Returns the value of attribute nsu

Returns:

  • (Object)

    the current value of nsu



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def nsu
  @nsu
end

#nsu_parentObject (readonly)

Returns the value of attribute nsu_parent

Returns:

  • (Object)

    the current value of nsu_parent



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def nsu_parent
  @nsu_parent
end

#operation_typeObject (readonly)

Returns the value of attribute operation_type

Returns:

  • (Object)

    the current value of operation_type



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def operation_type
  @operation_type
end

#parent_access_keyObject (readonly)

Returns the value of attribute parent_access_key

Returns:

  • (Object)

    the current value of parent_access_key



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def parent_access_key
  @parent_access_key
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/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def total_invoice_amount
  @total_invoice_amount
end

#transportationObject (readonly)

Returns the value of attribute transportation

Returns:

  • (Object)

    the current value of transportation



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def transportation
  @transportation
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def type
  @type
end

#xml_urlObject (readonly)

Returns the value of attribute xml_url

Returns:

  • (Object)

    the current value of xml_url



9
10
11
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 9

def xml_url
  @xml_url
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
32
33
34
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rb', line 10

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

  new(
    access_key: payload["accessKey"],
    buyer: BuyerResource.from_api(payload["buyer"]),
    company: InboundCompanyResource.from_api(payload["company"]),
    created_on: payload["createdOn"],
    description: payload["description"],
    federal_tax_number_sender: payload["federalTaxNumberSender"],
    issued_on: payload["issuedOn"],
    issuer: IssuerResource.from_api(payload["issuer"]),
    name_sender: payload["nameSender"],
    nfe_number: payload["nfeNumber"],
    nfe_serial_number: payload["nfeSerialNumber"],
    nsu: payload["nsu"],
    nsu_parent: payload["nsuParent"],
    operation_type: payload["operationType"],
    parent_access_key: payload["parentAccessKey"],
    total_invoice_amount: payload["totalInvoiceAmount"],
    transportation: TransportationResource.from_api(payload["transportation"]),
    type: payload["type"],
    xml_url: payload["xmlUrl"],
  )
end

.newinstance

Parameters:

  • access_key: (String)
  • buyer: (BuyerResource)
  • company: (InboundCompanyResource)
  • created_on: (String)
  • description: (String)
  • federal_tax_number_sender: (String)
  • issued_on: (String)
  • issuer: (IssuerResource)
  • name_sender: (String)
  • nfe_number: (String)
  • nfe_serial_number: (String)
  • nsu: (String)
  • nsu_parent: (String)
  • operation_type: (String)
  • parent_access_key: (String)
  • total_invoice_amount: (String)
  • transportation: (TransportationResource)
  • type: (String)
  • xml_url: (String)

Returns:

  • (instance)


28
# File 'sig/nfe/generated/consulta_dfe_distribuicao_v2/nfe_metadata_resource.rbs', line 28

def self.new: (?access_key: String, ?buyer: BuyerResource, ?company: InboundCompanyResource, ?created_on: String, ?description: String, ?federal_tax_number_sender: String, ?issued_on: String, ?issuer: IssuerResource, ?name_sender: String, ?nfe_number: String, ?nfe_serial_number: String, ?nsu: String, ?nsu_parent: String, ?operation_type: String, ?parent_access_key: String, ?total_invoice_amount: String, ?transportation: TransportationResource, ?type: String, ?xml_url: String) -> instance