recurly v0.2.2 Recurly.ValidationError

Module represents a validation error that you may encounter on a create or update. See the documentation on validation errors for more details.

The ValidationError is a struct that constains the status_code and an array of field errors called errors that map 1x1 with the xml tags.

Examples

case Recurly.Account.create(account_code: "myaccountcode") do
  {:ok, account} -> account
  {:error, error} -> error
end

# %Recurly.ValidationError{errors: [%{field: "account.account_code", lang: "",
#          symbol: :taken, text: "has already been taken"}], status_code: 422}