collab: Fully move StripeBilling
over to using StripeClient
(#31722)
This PR moves over the last method on `StripeBilling` to use the `StripeClient` trait, allowing us to fully mock out Stripe behaviors for `StripeBilling` in tests. Release Notes: - N/A
This commit is contained in:
parent
406d975f39
commit
c7047d5f0a
7 changed files with 273 additions and 50 deletions
|
@ -1182,10 +1182,8 @@ async fn sync_subscription(
|
|||
.has_active_billing_subscription(billing_customer.user_id)
|
||||
.await?;
|
||||
if !already_has_active_billing_subscription {
|
||||
let stripe_customer_id = billing_customer
|
||||
.stripe_customer_id
|
||||
.parse::<stripe::CustomerId>()
|
||||
.context("failed to parse Stripe customer ID from database")?;
|
||||
let stripe_customer_id =
|
||||
StripeCustomerId(billing_customer.stripe_customer_id.clone().into());
|
||||
|
||||
stripe_billing
|
||||
.subscribe_to_zed_free(stripe_customer_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue