mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
Retrieve all Stripe invoices (#3431)
This commit is contained in:
27
src/Core/Models/Stripe/StripeInvoiceListOptions.cs
Normal file
27
src/Core/Models/Stripe/StripeInvoiceListOptions.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Stripe;
|
||||
|
||||
namespace Bit.Core.Models.BitStripe;
|
||||
|
||||
/// <summary>
|
||||
/// A model derived from the Stripe <see cref="InvoiceListOptions"/> class that includes a flag used to
|
||||
/// retrieve all invoices from the Stripe API rather than a limited set.
|
||||
/// </summary>
|
||||
public class StripeInvoiceListOptions : InvoiceListOptions
|
||||
{
|
||||
public bool SelectAll { get; set; }
|
||||
|
||||
public InvoiceListOptions ToInvoiceListOptions()
|
||||
{
|
||||
var options = (InvoiceListOptions)this;
|
||||
|
||||
if (!SelectAll)
|
||||
{
|
||||
return options;
|
||||
}
|
||||
|
||||
options.EndingBefore = null;
|
||||
options.StartingAfter = null;
|
||||
|
||||
return options;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user