Module: Wepay::Configuration

Included in:
Wepay
Defined in:
lib/wepay/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



3
4
5
# File 'lib/wepay/configuration.rb', line 3

def access_token
  @access_token
end

#account_idObject

Returns the value of attribute account_id.



3
4
5
# File 'lib/wepay/configuration.rb', line 3

def 
  @account_id
end

#client_idObject

Returns the value of attribute client_id.



3
4
5
# File 'lib/wepay/configuration.rb', line 3

def client_id
  @client_id
end

#client_secretObject

Returns the value of attribute client_secret.



3
4
5
# File 'lib/wepay/configuration.rb', line 3

def client_secret
  @client_secret
end

#open_timeoutObject

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

#scopeObject

Returns the value of attribute scope.



3
4
5
# File 'lib/wepay/configuration.rb', line 3

def scope
  @scope
end

#timeoutObject

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_stageObject

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_endpointObject



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

Yields:

  • (_self)

Yield Parameters:



17
18
19
20
# File 'lib/wepay/configuration.rb', line 17

def configure
  yield self
  self
end

#oauth_authorization_endpointObject



26
27
28
# File 'lib/wepay/configuration.rb', line 26

def oauth_authorization_endpoint
  using_stage ? "https://stage.wepay.com/v2/oauth2/authorize" : "https://www.wepay.com/v2/oauth2/authorize"
end

#oauth_token_endpointObject



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