Package com.stripe.model.v2
Class StripeCollection<T extends StripeObjectInterface>
java.lang.Object
com.stripe.model.StripeObject
com.stripe.model.v2.StripeCollection<T>
- All Implemented Interfaces:
StripeActiveObject
,StripeObjectInterface
public class StripeCollection<T extends StripeObjectInterface>
extends StripeObject
implements 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 TypeMethodDescriptionConstructs an iterable that can be used to iterate across all objects across all pages.autoPagingIterable
(RequestOptions options) Constructs an iterable that can be used to iterate across all objects across all pages.protected boolean
boolean
getData()
int
hashCode()
void
setPageTypeToken
(Type pageTypeToken) void
setRequestOptions
(RequestOptions requestOptions) void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, 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
-
Constructor Details
-
StripeCollection
public StripeCollection()
-
-
Method Details
-
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.This utilizes the options from the initial list request.
-
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:
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.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
setPageTypeToken
-
getData
-
getNextPageUrl
-
getPreviousPageUrl
-
getRequestOptions
-
setRequestOptions
-