collab: Disable usage-based billing thresholds (#30016)
This PR disables the usage-based billing thresholds. Release Notes: - N/A
This commit is contained in:
parent
007fd0586a
commit
6cb436565f
1 changed files with 1 additions and 4 deletions
|
@ -260,7 +260,7 @@ impl StripeBilling {
|
||||||
const BILLING_THRESHOLD_IN_CENTS: i64 = 20 * 100;
|
const BILLING_THRESHOLD_IN_CENTS: i64 = 20 * 100;
|
||||||
|
|
||||||
let price_per_unit = price.unit_amount.unwrap_or_default();
|
let price_per_unit = price.unit_amount.unwrap_or_default();
|
||||||
let units_for_billing_threshold = BILLING_THRESHOLD_IN_CENTS / price_per_unit;
|
let _units_for_billing_threshold = BILLING_THRESHOLD_IN_CENTS / price_per_unit;
|
||||||
|
|
||||||
stripe::Subscription::update(
|
stripe::Subscription::update(
|
||||||
&self.client,
|
&self.client,
|
||||||
|
@ -268,9 +268,6 @@ impl StripeBilling {
|
||||||
stripe::UpdateSubscription {
|
stripe::UpdateSubscription {
|
||||||
items: Some(vec![stripe::UpdateSubscriptionItems {
|
items: Some(vec![stripe::UpdateSubscriptionItems {
|
||||||
price: Some(price.id.to_string()),
|
price: Some(price.id.to_string()),
|
||||||
billing_thresholds: Some(stripe::SubscriptionItemBillingThresholds {
|
|
||||||
usage_gte: Some(units_for_billing_threshold),
|
|
||||||
}),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}]),
|
}]),
|
||||||
trial_settings: Some(stripe::UpdateSubscriptionTrialSettings {
|
trial_settings: Some(stripe::UpdateSubscriptionTrialSettings {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue