Class: Nfe::Generated::ConsultaDfeDistribuicaoV2::NFeEventMetadataODataResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNFeEventMetadataODataResource

Returns a new instance of NFeEventMetadataODataResource.

Parameters:

  • access_key: (String)
  • company: (InboundCompanyResource)
  • created_on: (String)
  • description: (String)
  • id: (String)
  • nsu: (Integer)
  • receipt_on: (String)
  • type: (String)
  • xml_url: (String)


19
# File 'sig/nfe/generated/consulta_dfe_distribuicao_v2/nfe_event_metadata_odata_resource.rbs', line 19

def initialize: (?access_key: String, ?company: InboundCompanyResource, ?created_on: String, ?description: String, ?id: String, ?nsu: Integer, ?receipt_on: String, ?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_event_metadata_odata_resource.rb', line 9

def access_key
  @access_key
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_event_metadata_odata_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_event_metadata_odata_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_event_metadata_odata_resource.rb', line 9

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



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

def id
  @id
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_event_metadata_odata_resource.rb', line 9

def nsu
  @nsu
end

#receipt_onObject (readonly)

Returns the value of attribute receipt_on

Returns:

  • (Object)

    the current value of receipt_on



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

def receipt_on
  @receipt_on
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_event_metadata_odata_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_event_metadata_odata_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
# File 'lib/nfe/generated/consulta_dfe_distribuicao_v2/nfe_event_metadata_odata_resource.rb', line 10

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

  new(
    access_key: payload["accessKey"],
    company: InboundCompanyResource.from_api(payload["company"]),
    created_on: payload["createdOn"],
    description: payload["description"],
    id: payload["id"],
    nsu: payload["nsu"],
    receipt_on: payload["receiptOn"],
    type: payload["type"],
    xml_url: payload["xmlUrl"],
  )
end

.newinstance

Parameters:

  • access_key: (String)
  • company: (InboundCompanyResource)
  • created_on: (String)
  • description: (String)
  • id: (String)
  • nsu: (Integer)
  • receipt_on: (String)
  • type: (String)
  • xml_url: (String)

Returns:

  • (instance)


18
# File 'sig/nfe/generated/consulta_dfe_distribuicao_v2/nfe_event_metadata_odata_resource.rbs', line 18

def self.new: (?access_key: String, ?company: InboundCompanyResource, ?created_on: String, ?description: String, ?id: String, ?nsu: Integer, ?receipt_on: String, ?type: String, ?xml_url: String) -> instance