1
0
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:
Alex Morask
2023-11-09 09:05:05 -05:00
committed by GitHub
parent 95680b434b
commit 8f4a1d8639
4 changed files with 62 additions and 9 deletions

View 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;
}
}