Class: Chiketto::Address

Inherits:
Resource show all
Defined in:
lib/chiketto/address.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#id

Instance Method Summary collapse

Methods inherited from Resource

build_query_string, endpoint, get, #initialize, open_post, paginated, post, should_paginate, token

Methods included from AttrDSL

included

Constructor Details

This class inherits a constructor from Chiketto::Resource

Instance Attribute Details

#address_1Object

Returns the value of attribute address_1.



3
4
5
# File 'lib/chiketto/address.rb', line 3

def address_1
  @address_1
end

#address_2Object

Returns the value of attribute address_2.



3
4
5
# File 'lib/chiketto/address.rb', line 3

def address_2
  @address_2
end

#cityObject

Returns the value of attribute city.



3
4
5
# File 'lib/chiketto/address.rb', line 3

def city
  @city
end

#countryObject

Returns the value of attribute country.



3
4
5
# File 'lib/chiketto/address.rb', line 3

def country
  @country
end

#country_nameObject

Returns the value of attribute country_name.



3
4
5
# File 'lib/chiketto/address.rb', line 3

def country_name
  @country_name
end

#latitudeObject

Returns the value of attribute latitude.



3
4
5
# File 'lib/chiketto/address.rb', line 3

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude.



3
4
5
# File 'lib/chiketto/address.rb', line 3

def longitude
  @longitude
end

#postal_codeObject

Returns the value of attribute postal_code.



3
4
5
# File 'lib/chiketto/address.rb', line 3

def postal_code
  @postal_code
end

#regionObject

Returns the value of attribute region.



3
4
5
# File 'lib/chiketto/address.rb', line 3

def region
  @region
end

Instance Method Details

#to_sObject



13
14
15
16
# File 'lib/chiketto/address.rb', line 13

def to_s
  [@address_1, @address_2, @city, @region, @postal_code, @country].
    reject { |p| p.nil? }.join(', ')
end