mirror of
https://github.com/bitwarden/server
synced 2026-01-03 00:53:37 +00:00
[PM-19566] Update MSPs to "charge_automatically" with Admin-based opt-out (#5650)
* Update provider to charge automatically with Admin Portal-based opt-out * Design feedback * Run dotnet format
This commit is contained in:
@@ -27,4 +27,8 @@ public static class CustomerExtensions
|
||||
{
|
||||
return customer != null ? customer.Balance / 100M : default;
|
||||
}
|
||||
|
||||
public static bool ApprovedToPayByInvoice(this Customer customer)
|
||||
=> customer.Metadata.TryGetValue(StripeConstants.MetadataKeys.InvoiceApproved, out var value) &&
|
||||
int.TryParse(value, out var invoiceApproved) && invoiceApproved == 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user