code_corps v0.0.1 CodeCorps.StripeService.Validators.UserCanSubscribe View Source
Ensures a CodeCorps.User is able to subscribe to a CodeCorps.Project.
Link to this section Summary
Functions
Determines if the provided CodeCorps.User is able to
subscribe to a CodeCorps.Project
Link to this section Functions
Determines if the provided CodeCorps.User is able to
subscribe to a CodeCorps.Project
For a user to be able to create subscriptions, they need to have their associated records properly set up
These are:
StripePlatformCardStripePlatformCustomer
If the user has these relationships set up, it returns {:ok, user}
In any other case, it returns {:error, :user_not_ready}