using Bit.Core.AdminConsole.Entities; using Bit.Core.AdminConsole.Entities.Provider; using Bit.Core.AdminConsole.Enums.Provider; using Bit.Core.Billing.Models; using Bit.Core.Enums; using Bit.Core.Models.Business; namespace Bit.Core.Billing.Services; public interface IProviderBillingService { /// /// Assigns a specified number of to a client on behalf of /// its . Seat adjustments for the client organization may autoscale the provider's Stripe /// depending on the provider's seat minimum for the client 's /// . /// /// The that manages the client . /// The client whose you want to update. /// The number of seats to assign to the client organization. Task AssignSeatsToClientOrganization( Provider provider, Organization organization, int seats); /// /// Create a Stripe for the specified utilizing the provided . /// /// The to create a Stripe customer for. /// The to use for calculating the customer's automatic tax. /// Task CreateCustomer( Provider provider, TaxInfo taxInfo); /// /// Create a Stripe for the provided client utilizing /// the address and tax information of its . /// /// The MSP that owns the client organization. /// The client organization to create a Stripe for. Task CreateCustomerForClientOrganization( Provider provider, Organization organization); /// /// Retrieves the number of seats an MSP has assigned to its client organizations with a specified . /// /// The ID of the MSP to retrieve the assigned seat total for. /// The type of plan to retrieve the assigned seat total for. /// An representing the number of seats the provider has assigned to its client organizations with the specified . /// Thrown when the provider represented by the is . /// Thrown when the provider represented by the has . Task GetAssignedSeatTotalForPlanOrThrow( Guid providerId, PlanType planType); /// /// Retrieves a provider's billing subscription data. /// /// The ID of the provider to retrieve subscription data for. /// A object containing the provider's Stripe and their s. /// This method opts for returning rather than throwing exceptions, making it ideal for surfacing data from API endpoints. Task GetSubscriptionDTO( Guid providerId); /// /// Scales the 's seats for the specified using the provided . /// This operation may autoscale the provider's Stripe depending on the 's seat minimum for the /// specified . /// /// The to scale seats for. /// The to scale seats for. /// The change in the number of seats you'd like to apply to the . Task ScaleSeats( Provider provider, PlanType planType, int seatAdjustment); /// /// Starts a Stripe for the given given it has an existing Stripe . /// subscriptions will always be started with a for both the /// and plan, and the quantity for each item will be equal the provider's seat minimum for each respective plan. /// /// The provider to create the for. Task StartSubscription( Provider provider); /// /// Retrieves a provider's billing payment information. /// /// The ID of the provider to retrieve payment information for. /// A object containing the provider's Stripe and their s. /// This method opts for returning rather than throwing exceptions, making it ideal for surfacing data from API endpoints. Task GetPaymentInformationAsync(Guid providerId); }