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,AccountInferredBalanceCollection,AccountNoticeCollection,AccountOwnerCollection,ActiveEntitlementCollection,AlertCollection,ApplePayDomainCollection,ApplicationFeeCollection,AuthorizationCollection,BalanceTransactionCollection,BlocklistEntryCollection,CalculationLineItemCollection,CapabilityCollection,CardCollection,CardholderCollection,ChargeCollection,ConfigurationCollection,ConfigurationCollection,CountrySpecCollection,CouponCollection,CreditBalanceTransactionCollection,CreditGrantCollection,CreditNoteCollection,CreditNoteLineItemCollection,CreditReversalCollection,CreditUnderwritingRecordCollection,CustomerBalanceTransactionCollection,CustomerCashBalanceTransactionCollection,CustomerCollection,DebitReversalCollection,DisputeCollection,DisputeCollection,DisputeSettlementDetailCollection,EarlyFraudWarningCollection,EventCollection,ExchangeRateCollection,ExternalAccountCollection,FeatureCollection,FeeRefundCollection,FileCollection,FileLinkCollection,FinancialAccountCollection,FinancingOfferCollection,FinancingTransactionCollection,FormCollection,FraudLiabilityDebitCollection,FxQuoteCollection,InboundTransferCollection,InstitutionCollection,InvoiceCollection,InvoiceItemCollection,InvoiceLineItemCollection,InvoicePaymentCollection,InvoiceRenderingTemplateCollection,LineItemCollection,LocationCollection,MandateCollection,MarginCollection,MeterCollection,MeterEventSummaryCollection,MeterUsageRowCollection,OrderCollection,OrderCollection,OutboundPaymentCollection,OutboundTransferCollection,PaymentAttemptRecordCollection,PaymentIntentAmountDetailsLineItemCollection,PaymentIntentCollection,PaymentLinkCollection,PaymentMethodCollection,PaymentMethodConfigurationCollection,PaymentMethodDomainCollection,PaymentSourceCollection,PayoutCollection,PersonalizationDesignCollection,PersonCollection,PhysicalBundleCollection,PlanCollection,PriceCollection,ProductCollection,ProductCollection,ProductFeatureCollection,PromotionCodeCollection,QuoteCollection,QuoteLineCollection,QuotePreviewInvoiceCollection,QuotePreviewSubscriptionScheduleCollection,ReaderCollection,ReceivedCreditCollection,ReceivedDebitCollection,RedactionJobCollection,RedactionJobValidationErrorCollection,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,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
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) voidvoidsetPageTypeToken(Type pageTypeToken) voidsetRequestOptions(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.voidsetResponseGetter(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.voidMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, 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.StripeActiveObject
trySetResponseGetterMethods 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:StripeActiveObjectMethod is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
getResponseGetter
-
getObject
-
getPageTypeToken
-
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>
-
setPageTypeToken
- Specified by:
setPageTypeTokenin interfaceStripeCollectionInterface<T extends HasId>
-