using Bit.Core.Billing.Models;
using Bit.Core.Billing.Models.Sales;
using Bit.Core.Entities;
namespace Bit.Core.Billing.Services;
public interface IPremiumUserBillingService
{
Task Credit(User user, decimal amount);
///
/// Establishes the Stripe entities necessary for a Bitwarden using the provided .
///
/// The method first checks to see if the
/// provided already has a Stripe using the .
/// If it doesn't, the method creates one using the 's . The method then creates a Stripe
/// for the created or existing customer while appending the provided 's .
///
///
/// The data required to establish the Stripe entities responsible for billing the premium user.
///
///
/// var sale = PremiumUserSale.From(
/// user,
/// paymentMethodType,
/// paymentMethodToken,
/// taxInfo,
/// storage);
/// await premiumUserBillingService.Finalize(sale);
///
///
Task Finalize(PremiumUserSale sale);
Task UpdatePaymentMethod(
User user,
TokenizedPaymentSource tokenizedPaymentSource,
TaxInformation taxInformation);
}