lib/outreach/authorization.rb in outreach-0.0.1 vs lib/outreach/authorization.rb in outreach-0.0.2

- old
+ new

@@ -5,13 +5,13 @@ API_URL = "https://api.outreach.io/oauth/token" attr_reader :token, :refresh_token, :expires_in def initialize(attrs) - @token = attrs[:access_token] - @refresh_token = attrs[:refresh_token] - @expires_in = attrs[:expires_in] + @token = attrs['access_token'] + @refresh_token = attrs['refresh_token'] + @expires_in = attrs['expires_in'] end def self.authorization_url url = "https://api.outreach.io/oauth/authorize" params = { @@ -29,10 +29,10 @@ client_secret: Outreach.application_secret, redirect_uri: Outreach.redirect_uri, grant_type: 'authorization_code', code: authorization_code } - response = Request.new.post(API_URL, params) + response = Outreach::Request.new.post(API_URL, params) new(response) end def self.refresh(refresh_token) params = {