Class: AddressValidation::Candidate
- Inherits:
-
Data
- Object
- Data
- AddressValidation::Candidate
- Defined in:
- app/services/address_validation/candidate.rb
Overview
A single normalized address returned by a provider. Field semantics match
the Address model so a candidate can be applied directly via
Address#correct_to!.
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#residential ⇒ Object
readonly
Returns the value of attribute residential.
-
#state_code ⇒ Object
readonly
Returns the value of attribute state_code.
-
#street1 ⇒ Object
readonly
Returns the value of attribute street1.
-
#street2 ⇒ Object
readonly
Returns the value of attribute street2.
-
#street3 ⇒ Object
readonly
Returns the value of attribute street3.
-
#zip ⇒ Object
readonly
Returns the value of attribute zip.
Instance Method Summary collapse
Constructor Details
#initialize(street1: nil, street2: nil, street3: nil, city: nil, state_code: nil, zip: nil, residential: nil) ⇒ void
18 19 20 |
# File 'app/services/address_validation/candidate.rb', line 18 def initialize(street1: nil, street2: nil, street3: nil, city: nil, state_code: nil, zip: nil, residential: nil) super end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city
9 10 11 |
# File 'app/services/address_validation/candidate.rb', line 9 def city @city end |
#residential ⇒ Object (readonly)
Returns the value of attribute residential
9 10 11 |
# File 'app/services/address_validation/candidate.rb', line 9 def residential @residential end |
#state_code ⇒ Object (readonly)
Returns the value of attribute state_code
9 10 11 |
# File 'app/services/address_validation/candidate.rb', line 9 def state_code @state_code end |
#street1 ⇒ Object (readonly)
Returns the value of attribute street1
9 10 11 |
# File 'app/services/address_validation/candidate.rb', line 9 def street1 @street1 end |
#street2 ⇒ Object (readonly)
Returns the value of attribute street2
9 10 11 |
# File 'app/services/address_validation/candidate.rb', line 9 def street2 @street2 end |
#street3 ⇒ Object (readonly)
Returns the value of attribute street3
9 10 11 |
# File 'app/services/address_validation/candidate.rb', line 9 def street3 @street3 end |
#zip ⇒ Object (readonly)
Returns the value of attribute zip
9 10 11 |
# File 'app/services/address_validation/candidate.rb', line 9 def zip @zip end |