Class: Nfe::Generated::ServiceInvoiceRtcV1::AddressDefinition

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAddressDefinition

Returns a new instance of AddressDefinition.

Parameters:

  • additional_information: (String)
  • city: (Hash[String, untyped])
  • country: (String)
  • district: (String)
  • number: (String)
  • postal_code: (String)
  • state: (String)
  • street: (String)


18
# File 'sig/nfe/generated/service_invoice_rtc_v1/address_definition.rbs', line 18

def initialize: (?additional_information: String, ?city: Hash[String, untyped], ?country: String, ?district: String, ?number: String, ?postal_code: String, ?state: String, ?street: String) -> void

Instance Attribute Details

#additional_informationObject (readonly)

Returns the value of attribute additional_information

Returns:

  • (Object)

    the current value of additional_information



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/address_definition.rb', line 9

def additional_information
  @additional_information
end

#cityObject (readonly)

Returns the value of attribute city

Returns:

  • (Object)

    the current value of city



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/address_definition.rb', line 9

def city
  @city
end

#countryObject (readonly)

Returns the value of attribute country

Returns:

  • (Object)

    the current value of country



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/address_definition.rb', line 9

def country
  @country
end

#districtObject (readonly)

Returns the value of attribute district

Returns:

  • (Object)

    the current value of district



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/address_definition.rb', line 9

def district
  @district
end

#numberObject (readonly)

Returns the value of attribute number

Returns:

  • (Object)

    the current value of number



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/address_definition.rb', line 9

def number
  @number
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code

Returns:

  • (Object)

    the current value of postal_code



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/address_definition.rb', line 9

def postal_code
  @postal_code
end

#stateObject (readonly)

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/address_definition.rb', line 9

def state
  @state
end

#streetObject (readonly)

Returns the value of attribute street

Returns:

  • (Object)

    the current value of street



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/address_definition.rb', line 9

def street
  @street
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
# File 'lib/nfe/generated/service_invoice_rtc_v1/address_definition.rb', line 10

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

  new(
    additional_information: payload["additionalInformation"],
    city: payload["city"],
    country: payload["country"],
    district: payload["district"],
    number: payload["number"],
    postal_code: payload["postalCode"],
    state: payload["state"],
    street: payload["street"],
  )
end

.newinstance

Parameters:

  • additional_information: (String)
  • city: (Hash[String, untyped])
  • country: (String)
  • district: (String)
  • number: (String)
  • postal_code: (String)
  • state: (String)
  • street: (String)

Returns:

  • (instance)


17
# File 'sig/nfe/generated/service_invoice_rtc_v1/address_definition.rbs', line 17

def self.new: (?additional_information: String, ?city: Hash[String, untyped], ?country: String, ?district: String, ?number: String, ?postal_code: String, ?state: String, ?street: String) -> instance