Class StripeCollection<T extends HasId>

java.lang.Object
com.stripe.model.StripeObject
com.stripe.model.StripeCollection<T>
All Implemented Interfaces:
StripeCollectionInterface<T>, StripeObjectInterface
Direct Known Subclasses:
AccountCollection, AccountCollection, AccountOwnerCollection, ApplePayDomainCollection, ApplicationFeeCollection, AuthorizationCollection, BalanceTransactionCollection, CapabilityCollection, CardCollection, CardholderCollection, ChargeCollection, ConfigurationCollection, ConfigurationCollection, CountrySpecCollection, CouponCollection, CreditNoteCollection, CreditNoteLineItemCollection, CreditReversalCollection, CustomerBalanceTransactionCollection, CustomerCollection, DebitReversalCollection, DisputeCollection, DisputeCollection, EarlyFraudWarningCollection, EventCollection, ExchangeRateCollection, ExternalAccountCollection, FeeRefundCollection, FileCollection, FileLinkCollection, FinancialAccountCollection, InboundTransferCollection, InvoiceCollection, InvoiceItemCollection, InvoiceLineItemCollection, LineItemCollection, LocationCollection, OutboundPaymentCollection, OutboundTransferCollection, PaymentIntentCollection, PaymentLinkCollection, PaymentMethodCollection, PaymentSourceCollection, PayoutCollection, PersonCollection, PlanCollection, PriceCollection, ProductCollection, PromotionCodeCollection, QuoteCollection, ReaderCollection, ReceivedCreditCollection, ReceivedDebitCollection, RefundCollection, ReportRunCollection, ReportTypeCollection, ReviewCollection, ScheduledQueryRunCollection, SecretCollection, SessionCollection, SetupAttemptCollection, SetupIntentCollection, ShippingRateCollection, SkuCollection, SourceTransactionCollection, SubscriptionCollection, SubscriptionItemCollection, SubscriptionScheduleCollection, TaxCodeCollection, TaxIdCollection, TaxRateCollection, TestClockCollection, TopupCollection, TransactionCollection, TransactionCollection, TransactionEntryCollection, TransferCollection, TransferReversalCollection, UsageRecordSummaryCollection, ValueListCollection, ValueListItemCollection, VerificationReportCollection, VerificationSessionCollection, WebhookEndpointCollection

public abstract class StripeCollection<T extends HasId> extends StripeObject implements StripeCollectionInterface<T>
Provides a representation of a single page worth of data from the Stripe API.

The following code will have the effect of iterating through a single page worth of invoice data retrieve from the API:


 foreach (Invoice invoice : Invoice.list(...).getData()) {
   System.out.println("Current invoice = " + invoice.toString());
 }
 

The class also provides a helper for iterating over collections that may be longer than a single page:


 foreach (Invoice invoice : Invoice.list(...).autoPagingIterable()) {
   System.out.println("Current invoice = " + invoice.toString());
 }