Class: Easytobookr::Config
- Inherits:
-
Object
- Object
- Easytobookr::Config
- Defined in:
- lib/easytobookr/config.rb
Constant Summary collapse
- DEFAULTS =
{ :test => { :endpoint => 'http://testnl.etbxml.com/webservice/server_v21.php', :username => 'affiliate', :password => 'affiliate', :campaignid => '1' }, :production => { :endpoint => 'https://www.etbxml.com/webservice/server_v21.php' } }.freeze
Instance Attribute Summary collapse
-
#campaignid ⇒ Object
Returns the value of attribute campaignid.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#env ⇒ Object
Returns the value of attribute env.
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #uri ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
20 21 22 |
# File 'lib/easytobookr/config.rb', line 20 def initialize self.env = :test end |
Instance Attribute Details
#campaignid ⇒ Object
Returns the value of attribute campaignid.
6 7 8 |
# File 'lib/easytobookr/config.rb', line 6 def campaignid @campaignid end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
6 7 8 |
# File 'lib/easytobookr/config.rb', line 6 def endpoint @endpoint end |
#env ⇒ Object
Returns the value of attribute env.
5 6 7 |
# File 'lib/easytobookr/config.rb', line 5 def env @env end |
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'lib/easytobookr/config.rb', line 6 def password @password end |
#username ⇒ Object
Returns the value of attribute username.
6 7 8 |
# File 'lib/easytobookr/config.rb', line 6 def username @username end |
Instance Method Details
#uri ⇒ Object
36 37 38 |
# File 'lib/easytobookr/config.rb', line 36 def uri URI.parse(endpoint) end |