RequestOptions
in package
Class RequestOptions.
Table of Contents
- $fields : FilteredRequest|null
- $pagination : PaginatedRequest|null
- __construct() : mixed
- RequestOptions constructor.
- build() : array<string|int, int|string>
- Return an array representing the field-filtered request.
- getFields() : FilteredRequest|null
- Retrieve a FilteredRequest object, defining field filtering conditions for the API response.
- getPagination() : PaginatedRequest|null
- Retrieve a PaginatedRequest object, defining paginated conditions for the API response.
- setFields() : self
- Assign a PaginatedRequest object, defining field filtering conditions for the API response.
- setPagination() : self
- Assign a PaginatedRequest object, defining paginated conditions for the API response.
Properties
$fields
private
FilteredRequest|null
$fields
= null
$pagination
private
PaginatedRequest|null
$pagination
= null
Methods
__construct()
RequestOptions constructor.
public
__construct([FilteredRequest|null $fields = null ][, PaginatedRequest|null $pagination = null ]) : mixed
Parameters
- $fields : FilteredRequest|null = null
-
an instance of FilteredRequest, for managing field-filtered requests
- $pagination : PaginatedRequest|null = null
-
an instance of PaginatedRequest, for managing paginated requests
Return values
mixed —build()
Return an array representing the field-filtered request.
public
build() : array<string|int, int|string>
Return values
array<string|int, int|string> —getFields()
Retrieve a FilteredRequest object, defining field filtering conditions for the API response.
public
getFields() : FilteredRequest|null
Return values
FilteredRequest|null —getPagination()
Retrieve a PaginatedRequest object, defining paginated conditions for the API response.
public
getPagination() : PaginatedRequest|null
Return values
PaginatedRequest|null —setFields()
Assign a PaginatedRequest object, defining field filtering conditions for the API response.
public
setFields(FilteredRequest|null $fields) : self
Parameters
- $fields : FilteredRequest|null
-
request fields be included or excluded from the API response using a FilteredRequest object
Return values
self —setPagination()
Assign a PaginatedRequest object, defining paginated conditions for the API response.
public
setPagination(PaginatedRequest|null $pagination) : self
Parameters
- $pagination : PaginatedRequest|null
-
request paged results using a PaginatedRequest object