lib/api/user_address.rb in the-city-admin-0.5.2 vs lib/api/user_address.rb in the-city-admin-0.6.0
- old
+ new
@@ -1,28 +1,33 @@
module TheCity
class UserAddress < ApiObject
- tc_attr_accessor :city,
- :created_at,
- :id,
- :latitude,
- :location_type,
- :longitude,
- :privacy,
- :state,
- :street,
- :updated_at,
- :user_id,
- :zipcode
+ tc_attr_accessor :user_id,
+ :id,
+ :city,
+ :state,
+ :street,
+ :street2,
+ :zipcode,
+ :longitude,
+ :latitude,
+ :location_type,
+ :privacy,
+ :created_at,
+ :updated_at
# Constructor.
#
# @param json_data (optional) JSON data of the user address.
def initialize(json_data = nil)
@writer_object = UserAddressWriter
initialize_from_json_object(json_data) unless json_data.nil?
+ end
+
+ def home_address?
+ self.location_type.downcase == 'home'
end
end
end