Class: PayU::Configuration
- Inherits:
-
Object
- Object
- PayU::Configuration
- Defined in:
- lib/payu.rb
Constant Summary collapse
- PRODUCTION_ENV_NAME =
"production"
- SANDBOX_HOST_URI =
"https://secure.snd.payu.com/"
- PRODUCTION_HOST_URI =
"https://secure.payu.com/"
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
-
#notify_url ⇒ Object
Returns the value of attribute notify_url.
-
#oauth_client_id ⇒ Object
Returns the value of attribute oauth_client_id.
-
#oauth_client_secret ⇒ Object
Returns the value of attribute oauth_client_secret.
-
#pos_id ⇒ Object
Returns the value of attribute pos_id.
-
#second_key ⇒ Object
Returns the value of attribute second_key.
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #production? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
25 26 27 |
# File 'lib/payu.rb', line 25 def initialize @env = PRODUCTION_ENV_NAME end |
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env.
23 24 25 |
# File 'lib/payu.rb', line 23 def env @env end |
#notify_url ⇒ Object
Returns the value of attribute notify_url.
23 24 25 |
# File 'lib/payu.rb', line 23 def notify_url @notify_url end |
#oauth_client_id ⇒ Object
Returns the value of attribute oauth_client_id.
23 24 25 |
# File 'lib/payu.rb', line 23 def oauth_client_id @oauth_client_id end |
#oauth_client_secret ⇒ Object
Returns the value of attribute oauth_client_secret.
23 24 25 |
# File 'lib/payu.rb', line 23 def oauth_client_secret @oauth_client_secret end |
#pos_id ⇒ Object
Returns the value of attribute pos_id.
23 24 25 |
# File 'lib/payu.rb', line 23 def pos_id @pos_id end |
#second_key ⇒ Object
Returns the value of attribute second_key.
23 24 25 |
# File 'lib/payu.rb', line 23 def second_key @second_key end |
Instance Method Details
#host ⇒ Object
29 30 31 |
# File 'lib/payu.rb', line 29 def host production? ? PRODUCTION_HOST_URI : SANDBOX_HOST_URI end |
#production? ⇒ Boolean
33 34 35 |
# File 'lib/payu.rb', line 33 def production? @env == PRODUCTION_ENV_NAME end |