Skip to content

Instantly share code, notes, and snippets.

@wsmoak
Created August 23, 2015 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wsmoak/e113839f2113efc38d71 to your computer and use it in GitHub Desktop.
Save wsmoak/e113839f2113efc38d71 to your computer and use it in GitHub Desktop.
HTTPoison response
response = ChargifyV2.get!("/calls/" <> call_id)
errors = response.body[:call]["response"]["result"]["errors"]
IO.inspect errors
[%{"attribute" => "customer.first_name",
"message" => "First name: cannot be blank."},
%{"attribute" => "customer.last_name",
"message" => "Last name: cannot be blank."},
%{"attribute" => "customer.email",
"message" => "Email address: cannot be blank."},
%{"attribute" => "payment_profile",
"message" => "Payment profile: cannot be blank."}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment