using Bit.Core.AdminConsole.Entities;
using Bit.Core.Billing.Models;
using Bit.Core.Billing.Models.Sales;
namespace Bit.Core.Billing.Services;
#nullable enable
public interface IOrganizationBillingService
{
///
/// 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 using the provided .
///
///
/// The data required to establish the Stripe entities responsible for billing the organization.
///
///
/// var sale = OrganizationSale.From(organization, organizationSignup);
/// await organizationBillingService.Finalize(sale);
///
///
Task Finalize(OrganizationSale sale);
///
/// Retrieve metadata about the organization represented bsy the provided .
///
/// The ID of the organization to retrieve metadata for.
/// An record.
Task GetMetadata(Guid organizationId);
///
/// Updates the provided 's payment source and tax information.
/// If the does not have a Stripe , this method will create one using the provided
/// and .
///
/// The to update the payment source and tax information for.
/// The tokenized payment source (ex. Credit Card) to attach to the .
/// The 's updated tax information.
Task UpdatePaymentMethod(
Organization organization,
TokenizedPaymentSource tokenizedPaymentSource,
TaxInformation taxInformation);
}