Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update create card spec #382

Merged
merged 4 commits into from
Jun 11, 2018
Merged

Update create card spec #382

merged 4 commits into from
Jun 11, 2018

Conversation

jpiepkow
Copy link
Contributor

@jpiepkow jpiepkow commented Jun 9, 2018

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.

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.
@coveralls
Copy link

coveralls commented Jun 9, 2018

Coverage Status

Coverage remained the same at 83.403% when pulling 1bf33b3 on jpiepkow:master into 76e5182 on code-corps:master.

Copy link
Collaborator

@snewcomer snewcomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Just one ask and we can merge!

@@ -100,6 +100,7 @@ defmodule Stripe.Card do
"""
@spec create(params, Keyword.t()) :: {:ok, t} | {:error, Stripe.Error.t()}
when params: %{
:customer => Stripe.id() | Stripe.Customer.t(),
optional(:metadata) => Stripe.Types.metadata(),
optional(:source) => Stripe.id() | Stripe.Source.t(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect! Would you mind making source required as well (oversight on my part :) )?

https://stripe.com/docs/api#create_card

reordered params so it looks better.
@jpiepkow
Copy link
Contributor Author

Change made!

@begedin begedin merged commit 565ba3c into beam-community:master Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants