Class: FastSpring::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/fastspring-saasy/address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Address

Returns a new instance of Address.



6
7
8
9
10
11
12
13
14
# File 'lib/fastspring-saasy/address.rb', line 6

def initialize(options)
  @address_line_1 = options.fetch('addressLine1')
  @address_line_2 = options.fetch('addressLine2')
  @city = options.fetch('city')
  @region = options.fetch('region')
  @region_custom = options.fetch('regionCustom')
  @postal_code = options.fetch('postalCode')
  @country = options.fetch('country')
end

Instance Attribute Details

#address_line_1Object (readonly)

Returns the value of attribute address_line_1.



3
4
5
# File 'lib/fastspring-saasy/address.rb', line 3

def address_line_1
  @address_line_1
end

#address_line_2Object (readonly)

Returns the value of attribute address_line_2.



3
4
5
# File 'lib/fastspring-saasy/address.rb', line 3

def address_line_2
  @address_line_2
end

#cityObject (readonly)

Returns the value of attribute city.



3
4
5
# File 'lib/fastspring-saasy/address.rb', line 3

def city
  @city
end

#countryObject (readonly)

Returns the value of attribute country.



3
4
5
# File 'lib/fastspring-saasy/address.rb', line 3

def country
  @country
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code.



3
4
5
# File 'lib/fastspring-saasy/address.rb', line 3

def postal_code
  @postal_code
end

#regionObject (readonly)

Returns the value of attribute region.



3
4
5
# File 'lib/fastspring-saasy/address.rb', line 3

def region
  @region
end

#region_customObject (readonly)

Returns the value of attribute region_custom.



3
4
5
# File 'lib/fastspring-saasy/address.rb', line 3

def region_custom
  @region_custom
end