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>>{
'androidId': ?androidId == null ? null : [androidId],
'device': ?device == null ? null : [device],
'manufacturer': ?manufacturer == null ? null : [manufacturer],
'model': ?model == null ? null : [model],
'offerId': ?offerId == null ? null : [offerId],
'product': ?product == null ? null : [product],
'serial': ?serial == null ? null : [serial],
'volumeId': ?volumeId == null ? null : [volumeId],
'fields': ?$fields == null ? null : [$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>);
}