Module: Wepay::Configuration
- Included in:
- Wepay
- Defined in:
- lib/wepay/configuration.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#open_timeout ⇒ Object
Time to wait for the connection to Wepay to open.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#timeout ⇒ Object
Time to wait for the first block of response from Wepay.
-
#using_stage ⇒ Object
Returns the value of attribute using_stage.
Instance Method Summary collapse
- #api_endpoint ⇒ Object
- #configure {|_self| ... } ⇒ Object
- #oauth_authorization_endpoint ⇒ Object
- #oauth_token_endpoint ⇒ Object
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
3 4 5 |
# File 'lib/wepay/configuration.rb', line 3 def access_token @access_token end |
#account_id ⇒ Object
Returns the value of attribute account_id.
3 4 5 |
# File 'lib/wepay/configuration.rb', line 3 def account_id @account_id end |
#client_id ⇒ Object
Returns the value of attribute client_id.
3 4 5 |
# File 'lib/wepay/configuration.rb', line 3 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
3 4 5 |
# File 'lib/wepay/configuration.rb', line 3 def client_secret @client_secret end |
#open_timeout ⇒ Object
Time to wait for the connection to Wepay to open. After that TimeoutError is thrown.
9 10 11 |
# File 'lib/wepay/configuration.rb', line 9 def open_timeout @open_timeout end |
#scope ⇒ Object
Returns the value of attribute scope.
3 4 5 |
# File 'lib/wepay/configuration.rb', line 3 def scope @scope end |
#timeout ⇒ Object
Time to wait for the first block of response from Wepay. After that TimeoutError is thrown.
15 16 17 |
# File 'lib/wepay/configuration.rb', line 15 def timeout @timeout end |
#using_stage ⇒ Object
Returns the value of attribute using_stage.
3 4 5 |
# File 'lib/wepay/configuration.rb', line 3 def using_stage @using_stage end |
Instance Method Details
#api_endpoint ⇒ Object
22 23 24 |
# File 'lib/wepay/configuration.rb', line 22 def api_endpoint using_stage ? "https://stage.wepayapi.com/v2/" : "https://wepayapi.com/v2/" end |
#configure {|_self| ... } ⇒ Object
17 18 19 20 |
# File 'lib/wepay/configuration.rb', line 17 def configure yield self self end |
#oauth_authorization_endpoint ⇒ Object
26 27 28 |
# File 'lib/wepay/configuration.rb', line 26 def using_stage ? "https://stage.wepay.com/v2/oauth2/authorize" : "https://www.wepay.com/v2/oauth2/authorize" end |
#oauth_token_endpoint ⇒ Object
30 31 32 |
# File 'lib/wepay/configuration.rb', line 30 def oauth_token_endpoint using_stage ? "https://stage.wepayapi.com/v2/oauth2/token" : "https://wepayapi.com/v2/oauth2/token" end |