Skip to content

Commit

Permalink
Update the creation of cards to match new style
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnonthenet authored Mar 10, 2017
1 parent 36f99c9 commit b3ad4f0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/stripe/card.ex
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,8 @@ defmodule Stripe.Card do
@spec create(source, String.t, String.t, Keyword.t) :: {:ok, t} | {:error, Stripe.api_error_struct}
def create(owner_type, owner_id, token, opts \\ []) do
endpoint = endpoint_for_owner(owner_type, owner_id)

to_create_body(owner_type, token)
|> Util.map_keys_to_atoms()
|> Stripe.request(:post, endpoint, %{}, opts)
|> Stripe.Request.handle_result(__MODULE__)
changes = to_create_body(owner_type, token)
Stripe.Request.create(endpoint, changes, @schema, opts)
end

@spec to_create_body(source, String.t) :: map
Expand Down

0 comments on commit b3ad4f0

Please sign in to comment.