Class: Usps::Imis::Config
- Inherits:
-
Object
- Object
- Usps::Imis::Config
- Defined in:
- lib/usps/imis/config.rb
Constant Summary collapse
- IMIS_ROOT_URL_PROD =
'https://portal.americasboatingclub.org'
- IMIS_ROOT_URL_DEV =
'https://abcdev.imiscloud.com'
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#imis_id_query_name ⇒ Object
Returns the value of attribute imis_id_query_name.
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #hostname ⇒ Object
-
#initialize {|_self| ... } ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize {|_self| ... } ⇒ Config
Returns a new instance of Config.
11 12 13 |
# File 'lib/usps/imis/config.rb', line 11 def initialize yield self if block_given? end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
9 10 11 |
# File 'lib/usps/imis/config.rb', line 9 def environment @environment end |
#imis_id_query_name ⇒ Object
Returns the value of attribute imis_id_query_name.
9 10 11 |
# File 'lib/usps/imis/config.rb', line 9 def imis_id_query_name @imis_id_query_name end |
#password ⇒ Object
Returns the value of attribute password.
9 10 11 |
# File 'lib/usps/imis/config.rb', line 9 def password @password end |
#username ⇒ Object
Returns the value of attribute username.
9 10 11 |
# File 'lib/usps/imis/config.rb', line 9 def username @username end |
Instance Method Details
#hostname ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/usps/imis/config.rb', line 15 def hostname case environment.to_sym when :production IMIS_ROOT_URL_PROD when :development IMIS_ROOT_URL_DEV else raise Error::Api, "Unexpected API environment: #{environment}" end end |