Class StripeCollection<T extends HasId>

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

public class StripeCollection<T extends HasId> extends StripeObject implements StripeCollectionInterface<T>, StripeActiveObject
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());
 }