get method
Returns a list of promo offers available to the user
Request parameters:
androidId - device android_id
device - device device
manufacturer - device manufacturer
model - device model
product - device product
serial - device serial
$fields - Selector specifying which fields to include in a partial
response.
Completes with a Offers.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<Offers> get({
core.String? androidId,
core.String? device,
core.String? manufacturer,
core.String? model,
core.String? product,
core.String? serial,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'androidId': ?androidId == null ? null : [androidId],
'device': ?device == null ? null : [device],
'manufacturer': ?manufacturer == null ? null : [manufacturer],
'model': ?model == null ? null : [model],
'product': ?product == null ? null : [product],
'serial': ?serial == null ? null : [serial],
'fields': ?$fields == null ? null : [$fields],
};
const url_ = 'books/v1/promooffer/get';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Offers.fromJson(response_ as core.Map<core.String, core.dynamic>);
}