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

Changes to update optional attrs #418

Merged
merged 2 commits into from
Oct 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/stripe/connect/transfer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ defmodule Stripe.Transfer do
"""
@spec update(Stripe.id() | t, params, Stripe.options()) :: {:ok, t} | {:error, Stripe.Error.t()}
when params: %{
optional(:metadata) => Stripe.Types.metadata(),
optional(:description) => String.t(),
optional(:metadata) => Stripe.Types.metadata()
}
def update(id, params, opts \\ []) do
new_request(opts)
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/connect/transfer_reversal.ex
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ defmodule Stripe.TransferReversal do
"""
@spec update(Stripe.id() | t, Stripe.id() | t, params, Stripe.options()) :: {:ok, t} | {:error, Stripe.Error.t()}
when params: %{
optional(:metadata) => Stripe.Types.metadata(),
optional(:metadata) => Stripe.Types.metadata()
}
def update(id, reversal_id, params, opts \\ []) do
new_request(opts)
Expand Down
1 change: 1 addition & 0 deletions lib/stripe/core_resources/charge.ex
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ defmodule Stripe.Charge do
"""
@spec update(Stripe.id() | t, params, Stripe.options()) :: {:ok, t} | {:error, Stripe.Error.t()}
when params: %{
optional(:customer) => Stripe.id() | Stripe.Customer.t(),
optional(:description) => String.t(),
optional(:fraud_details) => user_fraud_report,
optional(:metadata) => Stripe.Types.metadata(),
Expand Down
3 changes: 2 additions & 1 deletion lib/stripe/relay/sku.ex
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ defmodule Stripe.Sku do
optional(:image) => String.t(),
optional(:inventory) => map,
optional(:metadata) => Stripe.Types.metadata(),
optional(:price) => map,
optional(:package_dimensions) => map,
optional(:price) => non_neg_integer,
optional(:product) => Stripe.id() | Stripe.Relay.Product.t()
}
def update(id, params, opts \\ []) do
Expand Down