Ghost
Ghost copied to clipboard
Extracted `createStripeCustomerSubscription` method from `linkSubscription`
no issue
The MemberRepository in the members-api has a really long and complex linkSubscription method, which updates a member's internal subscription state in response to Stripe webhooks, member imports, etc. This change is a first step toward making this method more testable, by breaking it up into smaller methods and beginning to separate the concerns of 'calculating what should change' and 'actually changing it'.