accept method
Accepts the promo offer.
Request parameters:
androidId
- device android_id
device
- device device
manufacturer
- device manufacturer
model
- device model
offerId
- null
product
- device product
serial
- device serial
volumeId
- Volume id to exercise the offer
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Empty.
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<Empty> accept({
core.String? androidId,
core.String? device,
core.String? manufacturer,
core.String? model,
core.String? offerId,
core.String? product,
core.String? serial,
core.String? volumeId,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (androidId != null) 'androidId': [androidId],
if (device != null) 'device': [device],
if (manufacturer != null) 'manufacturer': [manufacturer],
if (model != null) 'model': [model],
if (offerId != null) 'offerId': [offerId],
if (product != null) 'product': [product],
if (serial != null) 'serial': [serial],
if (volumeId != null) 'volumeId': [volumeId],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'books/v1/promooffer/accept';
final response_ = await _requester.request(
url_,
'POST',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}