Class: Nfe::Generated::NfConsumidorV2::TransportGroupResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTransportGroupResource

Returns a new instance of TransportGroupResource.

Parameters:

  • account_id: (String, nil)
  • address: (AddressResource)
  • email: (String, nil)
  • federal_tax_number: (Integer, nil)
  • id: (String, nil)
  • name: (String, nil)
  • state_tax_number: (String, nil)
  • transport_retention: (String, nil)
  • type: (Object)


19
# File 'sig/nfe/generated/nf_consumidor_v2/transport_group_resource.rbs', line 19

def initialize: (?account_id: String?, ?address: AddressResource, ?email: String?, ?federal_tax_number: Integer?, ?id: String?, ?name: String?, ?state_tax_number: String?, ?transport_retention: String?, ?type: untyped) -> void

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id

Returns:

  • (Object)

    the current value of account_id



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_group_resource.rb', line 9

def 
  @account_id
end

#addressObject (readonly)

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_group_resource.rb', line 9

def address
  @address
end

#emailObject (readonly)

Returns the value of attribute email

Returns:

  • (Object)

    the current value of email



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_group_resource.rb', line 9

def email
  @email
end

#federal_tax_numberObject (readonly)

Returns the value of attribute federal_tax_number

Returns:

  • (Object)

    the current value of federal_tax_number



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_group_resource.rb', line 9

def federal_tax_number
  @federal_tax_number
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_group_resource.rb', line 9

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_group_resource.rb', line 9

def name
  @name
end

#state_tax_numberObject (readonly)

Returns the value of attribute state_tax_number

Returns:

  • (Object)

    the current value of state_tax_number



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_group_resource.rb', line 9

def state_tax_number
  @state_tax_number
end

#transport_retentionObject (readonly)

Returns the value of attribute transport_retention

Returns:

  • (Object)

    the current value of transport_retention



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_group_resource.rb', line 9

def transport_retention
  @transport_retention
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_group_resource.rb', line 9

def type
  @type
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_consumidor_v2/transport_group_resource.rb', line 10

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

  new(
    account_id: payload["accountId"],
    address: AddressResource.from_api(payload["address"]),
    email: payload["email"],
    federal_tax_number: payload["federalTaxNumber"],
    id: payload["id"],
    name: payload["name"],
    state_tax_number: payload["stateTaxNumber"],
    transport_retention: payload["transportRetention"],
    type: payload["type"],
  )
end

.newinstance

Parameters:

  • account_id: (String, nil)
  • address: (AddressResource)
  • email: (String, nil)
  • federal_tax_number: (Integer, nil)
  • id: (String, nil)
  • name: (String, nil)
  • state_tax_number: (String, nil)
  • transport_retention: (String, nil)
  • type: (Object)

Returns:

  • (instance)


18
# File 'sig/nfe/generated/nf_consumidor_v2/transport_group_resource.rbs', line 18

def self.new: (?account_id: String?, ?address: AddressResource, ?email: String?, ?federal_tax_number: Integer?, ?id: String?, ?name: String?, ?state_tax_number: String?, ?transport_retention: String?, ?type: untyped) -> instance