mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 13:38:13 -05:00
Fix stub
This commit is contained in:
parent
a87502d466
commit
aed58506e7
@ -3,27 +3,33 @@ using Stripe;
|
|||||||
|
|
||||||
namespace Bit.Core.Test.Billing.Stubs;
|
namespace Bit.Core.Test.Billing.Stubs;
|
||||||
|
|
||||||
/// <param name="IsAutomaticTaxEnabled">
|
/// <param name="isAutomaticTaxEnabled">
|
||||||
/// Whether the subscription options will have automatic tax enabled or not.
|
/// Whether the subscription options will have automatic tax enabled or not.
|
||||||
/// </param>
|
/// </param>
|
||||||
public class FakeAutomaticTaxStrategy(
|
public class FakeAutomaticTaxStrategy(
|
||||||
bool IsAutomaticTaxEnabled) : IAutomaticTaxStrategy
|
bool isAutomaticTaxEnabled) : IAutomaticTaxStrategy
|
||||||
{
|
{
|
||||||
public SubscriptionUpdateOptions? GetUpdateOptions(Subscription subscription)
|
public SubscriptionUpdateOptions? GetUpdateOptions(Subscription subscription)
|
||||||
{
|
{
|
||||||
return new SubscriptionUpdateOptions
|
return new SubscriptionUpdateOptions
|
||||||
{
|
{
|
||||||
AutomaticTax = new SubscriptionAutomaticTaxOptions { Enabled = IsAutomaticTaxEnabled }
|
AutomaticTax = new SubscriptionAutomaticTaxOptions { Enabled = isAutomaticTaxEnabled }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCreateOptions(SubscriptionCreateOptions options, Customer customer)
|
public void SetCreateOptions(SubscriptionCreateOptions options, Customer customer)
|
||||||
{
|
{
|
||||||
options.AutomaticTax = new SubscriptionAutomaticTaxOptions { Enabled = IsAutomaticTaxEnabled };
|
options.AutomaticTax = new SubscriptionAutomaticTaxOptions { Enabled = isAutomaticTaxEnabled };
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetUpdateOptions(SubscriptionUpdateOptions options, Subscription subscription)
|
public void SetUpdateOptions(SubscriptionUpdateOptions options, Subscription subscription)
|
||||||
{
|
{
|
||||||
options.AutomaticTax = new SubscriptionAutomaticTaxOptions { Enabled = IsAutomaticTaxEnabled };
|
options.AutomaticTax = new SubscriptionAutomaticTaxOptions { Enabled = isAutomaticTaxEnabled };
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetInvoiceCreatePreviewOptions(InvoiceCreatePreviewOptions options)
|
||||||
|
{
|
||||||
|
options.AutomaticTax = new InvoiceAutomaticTaxOptions { Enabled = isAutomaticTaxEnabled };
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user