jp.gopay.sdk.builders.Paginator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gopay-java-sdk Show documentation
Show all versions of gopay-java-sdk Show documentation
Official Gyro-n Payments Java SDK
package jp.gopay.sdk.builders;
import jp.gopay.sdk.models.common.BaseId;
import jp.gopay.sdk.models.response.PaginatedList;
import jp.gopay.sdk.models.response.SimpleModel;
import jp.gopay.sdk.types.CursorDirection;
/*
PAGINATOR
*/
/**
* The paginator interface provides the methods for passing pagination parameters to requests.
* @param The model of the response.
* @param The type of request returned by methods that respond with a paginated list. Allows concatenation.
* @param The class of the cursor used for pagination, which must extend the BaseId class.
* @see PaginatedList
* @see BaseId
*/
public interface Paginator {
/**
* Sets the maximum number of responses to be returned by the API.
* @param limit is an integer value that represents the maximum number of items returned by the API
* @return a request object
*/
E setLimit(Integer limit);
/**
* Sets the direction of the cursor.
* @param cursorDirection is a member of the CursorDirection
enum
* @return a request object
* @see CursorDirection
*/
E setCursorDirection(CursorDirection cursorDirection);
/**
* Sets the cursor.
* @param cursor is the cursor used by the API to return a list of items following the other pagination parameters.
* The cursor usually equals the value of the ID of some item for which a list is being queried.
* @return a request object.
* @see BaseId
*/
E setCursor(C cursor);
}