Package com.stripe.model
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());
}
-
Field Summary
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
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 boolean
boolean
getData()
Get request options that were used to fetch the collection.Get request parameters that were used to fetch the collection.getUrl()
int
hashCode()
void
void
setHasMore
(Boolean hasMore) void
void
setPageTypeToken
(Type pageTypeToken) void
setRequestOptions
(RequestOptions requestOptions) Set request options that were used to fetch the collection.void
setRequestParams
(Map<String, Object> requestParams) Set request parameters that were used to fetch the collection.void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
Methods 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)
-
setResponseGetter
Description copied from interface:StripeActiveObject
Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getResponseGetter
-
getObject
-
getPageTypeToken
-
setObject
-
setData
-
setHasMore
-
setUrl
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getData
- Specified by:
getData
in interfaceStripeCollectionInterface<T extends HasId>
-
getHasMore
- Specified by:
getHasMore
in interfaceStripeCollectionInterface<T extends HasId>
-
getUrl
- Specified by:
getUrl
in interfaceStripeCollectionInterface<T extends HasId>
-
getRequestOptions
Description copied from interface:StripeCollectionInterface
Get request options that were used to fetch the collection. This is useful for purposes of pagination.- Specified by:
getRequestOptions
in interfaceStripeCollectionInterface<T extends HasId>
-
setRequestOptions
Description copied from interface:StripeCollectionInterface
Set request options that were used to fetch the collection. This is required for purposes of pagination.- Specified by:
setRequestOptions
in interfaceStripeCollectionInterface<T extends HasId>
-
getRequestParams
Description copied from interface:StripeCollectionInterface
Get request parameters that were used to fetch the collection. This is useful for purposes of pagination.- Specified by:
getRequestParams
in interfaceStripeCollectionInterface<T extends HasId>
-
setRequestParams
Description copied from interface:StripeCollectionInterface
Set request parameters that were used to fetch the collection. This is required for purposes of pagination.- Specified by:
setRequestParams
in interfaceStripeCollectionInterface<T extends HasId>
-
setPageTypeToken
- Specified by:
setPageTypeToken
in interfaceStripeCollectionInterface<T extends HasId>
-