code-corps/code-corps-api

View on GitHub
lib/code_corps/stripe_service/events/customer_source_updated.ex

Summary

Maintainability
Test Coverage
defmodule CodeCorps.StripeService.Events.CustomerSourceUpdated do
  def handle(%{data: %{object: %Stripe.Card{id: card_id}}}) do
    CodeCorps.StripeService.StripePlatformCardService.update_from_stripe(card_id)
  end

  def handle(_data), do: {:error, :unsupported_object}
end