Module: Payoneer::Configuration
- Included in:
- Payoneer
- Defined in:
- lib/payoneer/configuration.rb
Constant Summary collapse
- ENV_URLS =
{ sandbox: { api: 'https://api.sandbox.payoneer.com/v4', auth: 'https://login.sandbox.payoneer.com/api/v2/oauth2' }, production: { api: 'https://api.payoneer.com/v4', auth: 'https://login.payoneer.com/api/v2/oauth2' } }.freeze
- @@environment =
:sandbox
- @@callback_url =
nil
- @@program_id =
nil
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.api_url ⇒ Object
25 26 27 |
# File 'lib/payoneer/configuration.rb', line 25 def self.api_url ENV_URLS[environment][:api] end |
.auth_url ⇒ Object
29 30 31 |
# File 'lib/payoneer/configuration.rb', line 29 def self.auth_url ENV_URLS[environment][:auth] end |
.authorize_url ⇒ Object
18 19 20 21 22 23 |
# File 'lib/payoneer/configuration.rb', line 18 def self. "#{auth_url}/authorize?"\ "redirect_uri=#{callback_url}&"\ 'scope=read%20write%20openid%20personal-details&'\ 'response_type=code' end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
3 4 5 |
# File 'lib/payoneer/configuration.rb', line 3 def configure yield self end |