Class: DataDomeAddress
- Inherits:
-
Object
- Object
- DataDomeAddress
- Defined in:
- lib/model/address.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#line1 ⇒ Object
Returns the value of attribute line1.
-
#line2 ⇒ Object
Returns the value of attribute line2.
-
#name ⇒ Object
Returns the value of attribute name.
-
#region_code ⇒ Object
Returns the value of attribute region_code.
-
#zip_code ⇒ Object
Returns the value of attribute zip_code.
Instance Method Summary collapse
-
#initialize(name: nil, line1: nil, line2: nil, city: nil, country_code: nil, region_code: nil, zip_code: nil) ⇒ DataDomeAddress
constructor
A new instance of DataDomeAddress.
- #to_json(options = {}) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name: nil, line1: nil, line2: nil, city: nil, country_code: nil, region_code: nil, zip_code: nil) ⇒ DataDomeAddress
Returns a new instance of DataDomeAddress.
6 7 8 9 10 11 12 13 14 |
# File 'lib/model/address.rb', line 6 def initialize(name: nil, line1: nil, line2: nil, city: nil, country_code: nil, region_code: nil, zip_code: nil) @name = name @line1 = line1 @line2 = line2 @city = city @country_code = country_code @region_code = region_code @zip_code = zip_code end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
4 5 6 |
# File 'lib/model/address.rb', line 4 def city @city end |
#country_code ⇒ Object
Returns the value of attribute country_code.
4 5 6 |
# File 'lib/model/address.rb', line 4 def country_code @country_code end |
#line1 ⇒ Object
Returns the value of attribute line1.
4 5 6 |
# File 'lib/model/address.rb', line 4 def line1 @line1 end |
#line2 ⇒ Object
Returns the value of attribute line2.
4 5 6 |
# File 'lib/model/address.rb', line 4 def line2 @line2 end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/model/address.rb', line 4 def name @name end |
#region_code ⇒ Object
Returns the value of attribute region_code.
4 5 6 |
# File 'lib/model/address.rb', line 4 def region_code @region_code end |
#zip_code ⇒ Object
Returns the value of attribute zip_code.
4 5 6 |
# File 'lib/model/address.rb', line 4 def zip_code @zip_code end |
Instance Method Details
#to_json(options = {}) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/model/address.rb', line 20 def to_json( = {}) { name: name, line1: line1, line2: line2, city: city, countryCode: country_code, regionCode: region_code, zipCode: zip_code, }.to_json end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/model/address.rb', line 16 def to_s "DataDomeAddress: name=#{@name}, line1=#{@line1}, line2=#{@line2}, city=#{@city}, countryCode=#{@country_code}, regionCode=#{@region_code}, zipCode=#{@zip_code}" end |