Class: Apps::Adapters::Gmail::Markup::PostalAddress

Inherits:
Base
  • Object
show all
Defined in:
lib/apps/adapters/gmail/markup/postal_address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_json, #type

Constructor Details

This class inherits a constructor from Apps::Adapters::Gmail::Markup::Base

Instance Attribute Details

#countryObject

Returns the value of attribute country.



9
10
11
# File 'lib/apps/adapters/gmail/markup/postal_address.rb', line 9

def country
  @country
end

#localityObject

Returns the value of attribute locality.



9
10
11
# File 'lib/apps/adapters/gmail/markup/postal_address.rb', line 9

def locality
  @locality
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/apps/adapters/gmail/markup/postal_address.rb', line 9

def name
  @name
end

#po_boxObject

Returns the value of attribute po_box.



9
10
11
# File 'lib/apps/adapters/gmail/markup/postal_address.rb', line 9

def po_box
  @po_box
end

#postal_codeObject

Returns the value of attribute postal_code.



9
10
11
# File 'lib/apps/adapters/gmail/markup/postal_address.rb', line 9

def postal_code
  @postal_code
end

#regionObject

Returns the value of attribute region.



9
10
11
# File 'lib/apps/adapters/gmail/markup/postal_address.rb', line 9

def region
  @region
end

#streetObject

Returns the value of attribute street.



9
10
11
# File 'lib/apps/adapters/gmail/markup/postal_address.rb', line 9

def street
  @street
end

Instance Method Details

#as_jsonObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/apps/adapters/gmail/markup/postal_address.rb', line 11

def as_json
  prune super.merge(
    "name" => name,
    "streetAddress" => street,       # street address
    "addressLocality" => locality,   # city
    "addressRegion" => region,       # state (abbr)
    "postOfficeBoxNumber" => po_box,
    "postalCode" => postal_code,     # zip code
    "addressCountry" => country
  )
end