From c13490d843473f4d2885d87ccfa4ce9af0ae22b5 Mon Sep 17 00:00:00 2001 From: Charles Zhang Date: Wed, 22 Apr 2015 23:41:08 -0700 Subject: [PATCH] Retrieve customer doesn't need refresh keys --- lib/synapse_client/customer.rb | 5 ++--- spec/synapse_client_customer_spec.rb | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/synapse_client/customer.rb b/lib/synapse_client/customer.rb index 896775d..8b0739d 100644 --- a/lib/synapse_client/customer.rb +++ b/lib/synapse_client/customer.rb @@ -37,13 +37,12 @@ def create update_attributes(response.data) end - def self.retrieve(access_token, refresh_token) + def self.retrieve(access_token) response = SynapseClient.request(:post, url + "show", {:access_token => access_token}) return response unless response.successful? Customer.new(response.data.user.merge({ - :access_token => access_token, - :refresh_token => refresh_token + :access_token => access_token })) end diff --git a/spec/synapse_client_customer_spec.rb b/spec/synapse_client_customer_spec.rb index 97163b7..c7de61f 100644 --- a/spec/synapse_client_customer_spec.rb +++ b/spec/synapse_client_customer_spec.rb @@ -28,7 +28,7 @@ describe "retrieving a customer" do it "should successfully return a customer object with tokens and other info." do - customer = SynapseClient::Customer.retrieve(@customer.access_token, @customer.refresh_token) + customer = SynapseClient::Customer.retrieve(@customer.access_token) expect(customer).to be_a SynapseClient::Customer @@ -39,7 +39,6 @@ expect(customer.username).to be_a String expect(customer.access_token).to be_a String - expect(customer.refresh_token).to be_a String end end