Class: Cb::Models::Company::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/models/implementations/company.rb

Overview

CbAddress # CbCompany has a collection of these

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Address

Returns a new instance of Address.



121
122
123
124
125
126
127
128
129
130
131
# File 'lib/cb/models/implementations/company.rb', line 121

def initialize(args = {})
  begin
    @street                    = args['Street'] || ''
    @city                      = args['City'] || ''
    @state                     = args['State'] || ''
    @country                   = args['Country'] || ''
    @zip                       = args['ZIPCode'] || ''
  rescue
    # failed to load address
  end
end

Instance Attribute Details

#cityObject

Returns the value of attribute city.



119
120
121
# File 'lib/cb/models/implementations/company.rb', line 119

def city
  @city
end

#countryObject

Returns the value of attribute country.



119
120
121
# File 'lib/cb/models/implementations/company.rb', line 119

def country
  @country
end

#stateObject

Returns the value of attribute state.



119
120
121
# File 'lib/cb/models/implementations/company.rb', line 119

def state
  @state
end

#streetObject

Returns the value of attribute street.



119
120
121
# File 'lib/cb/models/implementations/company.rb', line 119

def street
  @street
end

#zipObject

Returns the value of attribute zip.



119
120
121
# File 'lib/cb/models/implementations/company.rb', line 119

def zip
  @zip
end