Class: Wepay::Client::Token

Inherits:
Wepay::Client show all
Defined in:
lib/wepay/client/token.rb

Overview

Client for getting access token from Wepay’s oauth endpoint.

Constant Summary

Constants inherited from Wepay::Client

DEFAULTS

Instance Method Summary collapse

Methods inherited from Wepay::Client

#get, #initialize, #post

Constructor Details

This class inherits a constructor from Wepay::Client

Instance Method Details

#get_access_token(code, redirect_uri) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/wepay/client/token.rb', line 6

def get_access_token(code, redirect_uri)
  params = {
    client_id:      client_id,
    client_secret:  client_secret,
    code:           code,
    redirect_uri:   redirect_uri
  }

  get '', params
end