Class: Postio::Models::AddressSearchResult

Inherits:
Data
  • Object
show all
Defined in:
lib/postio/models.rb

Overview

AddressSearchResult — a single typeahead hit.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#suggestionObject (readonly)

Returns the value of attribute suggestion

Returns:

  • (Object)

    the current value of suggestion



34
35
36
# File 'lib/postio/models.rb', line 34

def suggestion
  @suggestion
end

#udprnObject (readonly)

Returns the value of attribute udprn

Returns:

  • (Object)

    the current value of udprn



34
35
36
# File 'lib/postio/models.rb', line 34

def udprn
  @udprn
end

Class Method Details

.from_hash(h) ⇒ Object



35
36
37
# File 'lib/postio/models.rb', line 35

def self.from_hash(h)
  new(udprn: h["udprn"].to_i, suggestion: h["suggestion"].to_s)
end