Package com.stripe.model
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,BitcoinReceiverCollection,BitcoinTransactionCollection,CapabilityCollection,CardCollection,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,IssuerFraudRecordCollection,LineItemCollection,LocationCollection,OrderCollection,OrderReturnCollection,OutboundPaymentCollection,OutboundTransferCollection,PaymentIntentCollection,PaymentLinkCollection,PaymentMethodCollection,PaymentSourceCollection,PayoutCollection,PersonCollection,PlanCollection,PriceCollection,ProductCollection,PromotionCodeCollection,QuoteCollection,ReaderCollection,ReceivedCreditCollection,ReceivedDebitCollection,RecipientCollection,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());
}
-
Field Summary
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoPagingIterable(Map<String, Object> params) autoPagingIterable(Map<String, Object> params, RequestOptions options) Constructs an iterable that can be used to iterate across all objects across all pages.protected booleanbooleangetData()Get request options that were used to fetch the collection.Get request parameters that were used to fetch the collection.getUrl()inthashCode()voidvoidsetHasMore(Boolean hasMore) voidvoidsetRequestOptions(RequestOptions requestOptions) Set request options that were used to fetch the collection.voidsetRequestParams(Map<String, Object> requestParams) Set request parameters that were used to fetch the collection.voidMethods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeObjectInterface
getLastResponse, setLastResponse
-
Constructor Details
-
StripeCollection
public StripeCollection()
-
-
Method Details
-
autoPagingIterable
-
autoPagingIterable
-
autoPagingIterable
Constructs an iterable that can be used to iterate across all objects across all pages. As page boundaries are encountered, the next page will be fetched automatically for continued iteration.- Parameters:
params- request parameters (will override the parameters from the initial list request)options- request options (will override the options from the initial list request)
-
getObject
-
setObject
-
setData
-
setHasMore
-
setUrl
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getData
- Specified by:
getDatain interfaceStripeCollectionInterface<T extends HasId>
-
getHasMore
- Specified by:
getHasMorein interfaceStripeCollectionInterface<T extends HasId>
-
getUrl
- Specified by:
getUrlin interfaceStripeCollectionInterface<T extends HasId>
-
getRequestOptions
Description copied from interface:StripeCollectionInterfaceGet request options that were used to fetch the collection. This is useful for purposes of pagination.- Specified by:
getRequestOptionsin interfaceStripeCollectionInterface<T extends HasId>
-
setRequestOptions
Description copied from interface:StripeCollectionInterfaceSet request options that were used to fetch the collection. This is required for purposes of pagination.- Specified by:
setRequestOptionsin interfaceStripeCollectionInterface<T extends HasId>
-
getRequestParams
Description copied from interface:StripeCollectionInterfaceGet request parameters that were used to fetch the collection. This is useful for purposes of pagination.- Specified by:
getRequestParamsin interfaceStripeCollectionInterface<T extends HasId>
-
setRequestParams
Description copied from interface:StripeCollectionInterfaceSet request parameters that were used to fetch the collection. This is required for purposes of pagination.- Specified by:
setRequestParamsin interfaceStripeCollectionInterface<T extends HasId>
-