class Square::OAuth2::Client
Public Class Methods
new(*options)
click to toggle source
Calls superclass method
# File lib/square/oauth2/client.rb, line 4 def initialize(*options) attributes = options.extract_options! attributes[:identifier] ||= options.first attributes[:secret] ||= options.second attributes[:host] ||= 'squareup.com' super attributes end
Public Instance Methods
renew!()
click to toggle source
# File lib/square/oauth2/client.rb, line 12 def renew! # TODO end
Private Instance Methods
handle_success_response(response)
click to toggle source
# File lib/square/oauth2/client.rb, line 18 def handle_success_response(response) token_hash = JSON.parse(response.body).with_indifferent_access AccessToken.new token_hash end