lib/gocardless/client.rb
# Exchange the authorization code for an access token
#
# @param [String] auth_code to exchange for the access_token
# @return [String] the access_token required to make API calls to resources
Exchange the authorization code for an access token
Exchange the authorization code for an access token
def fetch_access_token(auth_code, options)
      raise ArgumentError, ':redirect_uri required' unless options[:redirect_uri]
      @access_token = @oauth_client.auth_code.get_token(auth_code, options)
      scope = @access_token.params[:scope] || @access_token.params['scope']
      set_merchant_id_from_scope(scope)
      self.scoped_access_token
    end
def fetch_access_token ( auth_code , options ) raise ArgumentError , ':redirect_uri required' unless options [ :redirect_uri ] @access_token = @oauth_client . auth_code . get_token ( auth_code , options ) scope = @access_token . params [ :scope ] || @access_token . params [ 'scope' ] set_merchant_id_from_scope ( scope ) self . scoped_access_token end
Exchange the authorization code for an access token
Exchange the authorization code for an access token
# Exchange the auth code for an access token # Use the scope to figure out which merchant we're managing
the access_token required to make API calls to resources
the access_token required to make API calls to resources
String
auth_code
<not_specific>
options
<not_specific>
<not_specific>
auth_code to exchange for the access_token
auth_code to exchange for the access_token