Class: PetfinderV2::Serializers::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/petfinder_V2/serializers/address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Address



6
7
8
9
10
11
12
13
14
# File 'lib/petfinder_V2/serializers/address.rb', line 6

def initialize(data)
  @data = data
  @address1 = data['address1']
  @address2 = data['address2']
  @city = data['city']
  @state = data['state']
  @postcode = data['postcode']
  @country = data['country']
end

Instance Attribute Details

#address1Object (readonly)

Returns the value of attribute address1.



4
5
6
# File 'lib/petfinder_V2/serializers/address.rb', line 4

def address1
  @address1
end

#address2Object (readonly)

Returns the value of attribute address2.



4
5
6
# File 'lib/petfinder_V2/serializers/address.rb', line 4

def address2
  @address2
end

#cityObject (readonly)

Returns the value of attribute city.



4
5
6
# File 'lib/petfinder_V2/serializers/address.rb', line 4

def city
  @city
end

#countryObject (readonly)

Returns the value of attribute country.



4
5
6
# File 'lib/petfinder_V2/serializers/address.rb', line 4

def country
  @country
end

#postcodeObject (readonly)

Returns the value of attribute postcode.



4
5
6
# File 'lib/petfinder_V2/serializers/address.rb', line 4

def postcode
  @postcode
end

#stateObject (readonly)

Returns the value of attribute state.



4
5
6
# File 'lib/petfinder_V2/serializers/address.rb', line 4

def state
  @state
end