Skip to content

Commit

Permalink
Merge pull request #150 from tlvenn/fix-specs
Browse files Browse the repository at this point in the history
Fix specs to use api_error_struct instead of struct
  • Loading branch information
joshsmith authored Nov 28, 2016
2 parents b531058 + 1bbe3ef commit 32de1ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/stripe.ex
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ defmodule Stripe do
@doc """
A low level utility function to make an OAuth request to the Stripe API
"""
@spec oauth_request(method, String.t, map) :: {:ok, map} | {:error, struct}
@spec oauth_request(method, String.t, map) :: {:ok, map} | {:error, api_error_struct}
def oauth_request(method, endpoint, body) do
base_url = "https://connect.stripe.com/oauth/"
req_url = base_url <> endpoint
Expand All @@ -323,7 +323,7 @@ defmodule Stripe do
|> handle_response()
end

@spec handle_response(http_success | http_failure) :: {:ok, map} | {:error, struct}
@spec handle_response(http_success | http_failure) :: {:ok, map} | {:error, api_error_struct}
defp handle_response({:ok, status, _headers, body}) when status in 200..299 do
decoded_body = Poison.decode!(body)

Expand Down

0 comments on commit 32de1ca

Please sign in to comment.