Created
May 28, 2019 17:30
-
-
Save talum/470d5b90aaa49406bf7519d62b23230c to your computer and use it in GitHub Desktop.
Paid Changeset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Registrar.Billing.Invoice do | |
import Ecto.Changeset | |
def mark_paid_changeset(%Invoice{} = invoice, attrs \\ %{}) do | |
invoice | |
|> cast(attrs, [ | |
:paid_at | |
]) | |
|> validate_required([ | |
:paid_at | |
]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment