code_corps v0.0.1 CodeCorps.StripeService.Validators.ProjectSubscribable View Source
Ensures a CodeCorps.Project is able to receive subscriptions.
Link to this section Summary
Functions
Determines if the provided CodeCorps.Project is able to
get a subscription by a CodeCorps.User
Link to this section Functions
Determines if the provided CodeCorps.Project is able to
get a subscription by a CodeCorps.User
For a project to be able to receive subscriptions, it needs to have proper associations set up.
These are:
StripeConnectPlanOrganizationwith aStripeConnectAccount
If the project has these relationships set up, it returns {:ok, project}
In any other case, it returns {:error, :project_not_ready}