collab: Remove unneeded caching of Stripe price IDs by meter ID (#34915)

This PR removes the caching of Stripe price IDs by meter ID on the
`StripeBilling` object, as we weren't actually reading them anywhere.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-07-22 13:42:07 -04:00 committed by GitHub
parent d81a8178e9
commit 9e280d0905
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,6 @@ pub struct StripeBilling {
#[derive(Default)]
struct StripeBillingState {
price_ids_by_meter_id: HashMap<String, StripePriceId>,
prices_by_lookup_key: HashMap<String, StripePrice>,
}
@ -63,13 +62,7 @@ impl StripeBilling {
for price in prices {
if let Some(lookup_key) = price.lookup_key.clone() {
state.prices_by_lookup_key.insert(lookup_key, price.clone());
}
if let Some(recurring) = price.recurring {
if let Some(meter) = recurring.meter {
state.price_ids_by_meter_id.insert(meter, price.id);
}
state.prices_by_lookup_key.insert(lookup_key, price);
}
}