Skip to content

Commit e71df30

Browse files
committed
Merge branch 'master' into port-orders-api
2 parents 790c7f2 + 22048ea commit e71df30

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

lib/phaxio/client.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ def conn
4444
conn.request :multipart
4545
conn.request :url_encoded
4646
conn.adapter :net_http
47-
48-
if Phaxio.api_key && Phaxio.api_secret
49-
conn.basic_auth Phaxio.api_key, Phaxio.api_secret
50-
end
5147
end
5248
end
5349

@@ -153,8 +149,8 @@ def api_params params
153149
end
154150

155151
def api_headers params
156-
api_key = params[:api_key] || Phaxio.api_key
157-
api_secret = params[:api_secret] || Phaxio.api_secret
152+
api_key = params.delete(:api_key) || Phaxio.api_key
153+
api_secret = params.delete(:api_secret) || Phaxio.api_secret
158154
return unless api_key && api_secret
159155
auth = Base64.strict_encode64("#{api_key}:#{api_secret}")
160156
{'Authorization' => "Basic #{auth}"}

0 commit comments

Comments
 (0)