Module: AddressValidate::Configuration
- Included in:
- AddressValidate
- Defined in:
- lib/address_validate/configuration.rb
Constant Summary collapse
- API_URLS =
{ test: 'http://production.shippingapis.com/ShippingAPITest.dll', production: 'http://production.shippingapis.com/ShippingAPI.dll' }
Instance Attribute Summary collapse
-
#apartment_number ⇒ Object
Returns the value of attribute apartment_number.
-
#city ⇒ Object
Returns the value of attribute city.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#firm_name ⇒ Object
Returns the value of attribute firm_name.
-
#password ⇒ Object
Returns the value of attribute password.
-
#state ⇒ Object
Returns the value of attribute state.
-
#street_address ⇒ Object
Returns the value of attribute street_address.
-
#username ⇒ Object
Returns the value of attribute username.
-
#zip_4 ⇒ Object
Returns the value of attribute zip_4.
-
#zip_5 ⇒ Object
Returns the value of attribute zip_5.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#apartment_number ⇒ Object
Returns the value of attribute apartment_number.
8 9 10 |
# File 'lib/address_validate/configuration.rb', line 8 def apartment_number @apartment_number end |
#city ⇒ Object
Returns the value of attribute city.
8 9 10 |
# File 'lib/address_validate/configuration.rb', line 8 def city @city end |
#environment ⇒ Object
Returns the value of attribute environment.
8 9 10 |
# File 'lib/address_validate/configuration.rb', line 8 def environment @environment end |
#firm_name ⇒ Object
Returns the value of attribute firm_name.
8 9 10 |
# File 'lib/address_validate/configuration.rb', line 8 def firm_name @firm_name end |
#password ⇒ Object
Returns the value of attribute password.
8 9 10 |
# File 'lib/address_validate/configuration.rb', line 8 def password @password end |
#state ⇒ Object
Returns the value of attribute state.
8 9 10 |
# File 'lib/address_validate/configuration.rb', line 8 def state @state end |
#street_address ⇒ Object
Returns the value of attribute street_address.
8 9 10 |
# File 'lib/address_validate/configuration.rb', line 8 def street_address @street_address end |
#username ⇒ Object
Returns the value of attribute username.
8 9 10 |
# File 'lib/address_validate/configuration.rb', line 8 def username @username end |
#zip_4 ⇒ Object
Returns the value of attribute zip_4.
8 9 10 |
# File 'lib/address_validate/configuration.rb', line 8 def zip_4 @zip_4 end |
#zip_5 ⇒ Object
Returns the value of attribute zip_5.
8 9 10 |
# File 'lib/address_validate/configuration.rb', line 8 def zip_5 @zip_5 end |
Class Method Details
.extended(base) ⇒ Object
16 17 18 |
# File 'lib/address_validate/configuration.rb', line 16 def self.extended(base) base.set_default_configuration end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
12 13 14 |
# File 'lib/address_validate/configuration.rb', line 12 def configure yield self end |
#set_default_configuration ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/address_validate/configuration.rb', line 24 def set_default_configuration self.environment = :production self.firm_name = :firm_name self.street_address = :street_address self.apartment_number = :apartment_number self.city = :city self.state = :state self.zip_5 = :zip_5 self.zip_4 = :zip_4 end |
#verify_url ⇒ Object
20 21 22 |
# File 'lib/address_validate/configuration.rb', line 20 def verify_url API_URLS[environment] end |