Skip to content

Commit

Permalink
Update create card spec (#382)
Browse files Browse the repository at this point in the history
* updated create card spec

I was getting confused looking at the docs for create card because it does not mention how to pass customer so I think adding that to the params spec makes sense as it is that way elsewhere in the code.

* Update card.ex

* reordered

reordered params so it looks better.
  • Loading branch information
jpiepkow authored and begedin committed Jun 11, 2018
1 parent 76e5182 commit 565ba3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/stripe/payment_methods/card.ex
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ defmodule Stripe.Card do
"""
@spec create(params, Keyword.t()) :: {:ok, t} | {:error, Stripe.Error.t()}
when params: %{
:customer => Stripe.id() | Stripe.Customer.t(),
:source => Stripe.id() | Stripe.Source.t(),
optional(:metadata) => Stripe.Types.metadata(),
optional(:source) => Stripe.id() | Stripe.Source.t(),
}
def create(%{customer: _, source: _} = params, opts \\ []) do
new_request(opts)
Expand Down

0 comments on commit 565ba3c

Please sign in to comment.