[e3d4e0a] | 1 | <?php
|
---|
| 2 | /*
|
---|
| 3 | * Copyright 2014 Google Inc.
|
---|
| 4 | *
|
---|
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
| 6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
| 7 | * the License at
|
---|
| 8 | *
|
---|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
| 10 | *
|
---|
| 11 | * Unless required by applicable law or agreed to in writing, software
|
---|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
| 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
| 14 | * License for the specific language governing permissions and limitations under
|
---|
| 15 | * the License.
|
---|
| 16 | */
|
---|
| 17 |
|
---|
| 18 | namespace Google\Service\Books\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Books\BooksEmpty;
|
---|
| 21 | use Google\Service\Books\Offers;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "promooffer" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $booksService = new Google\Service\Books(...);
|
---|
| 28 | * $promooffer = $booksService->promooffer;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class Promooffer extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Accepts the promo offer. (promooffer.accept)
|
---|
| 35 | *
|
---|
| 36 | * @param array $optParams Optional parameters.
|
---|
| 37 | *
|
---|
| 38 | * @opt_param string androidId device android_id
|
---|
| 39 | * @opt_param string device device device
|
---|
| 40 | * @opt_param string manufacturer device manufacturer
|
---|
| 41 | * @opt_param string model device model
|
---|
| 42 | * @opt_param string offerId
|
---|
| 43 | * @opt_param string product device product
|
---|
| 44 | * @opt_param string serial device serial
|
---|
| 45 | * @opt_param string volumeId Volume id to exercise the offer
|
---|
| 46 | * @return BooksEmpty
|
---|
| 47 | * @throws \Google\Service\Exception
|
---|
| 48 | */
|
---|
| 49 | public function accept($optParams = [])
|
---|
| 50 | {
|
---|
| 51 | $params = [];
|
---|
| 52 | $params = array_merge($params, $optParams);
|
---|
| 53 | return $this->call('accept', [$params], BooksEmpty::class);
|
---|
| 54 | }
|
---|
| 55 | /**
|
---|
| 56 | * Marks the promo offer as dismissed. (promooffer.dismiss)
|
---|
| 57 | *
|
---|
| 58 | * @param array $optParams Optional parameters.
|
---|
| 59 | *
|
---|
| 60 | * @opt_param string androidId device android_id
|
---|
| 61 | * @opt_param string device device device
|
---|
| 62 | * @opt_param string manufacturer device manufacturer
|
---|
| 63 | * @opt_param string model device model
|
---|
| 64 | * @opt_param string offerId Offer to dimiss
|
---|
| 65 | * @opt_param string product device product
|
---|
| 66 | * @opt_param string serial device serial
|
---|
| 67 | * @return BooksEmpty
|
---|
| 68 | * @throws \Google\Service\Exception
|
---|
| 69 | */
|
---|
| 70 | public function dismiss($optParams = [])
|
---|
| 71 | {
|
---|
| 72 | $params = [];
|
---|
| 73 | $params = array_merge($params, $optParams);
|
---|
| 74 | return $this->call('dismiss', [$params], BooksEmpty::class);
|
---|
| 75 | }
|
---|
| 76 | /**
|
---|
| 77 | * Returns a list of promo offers available to the user (promooffer.get)
|
---|
| 78 | *
|
---|
| 79 | * @param array $optParams Optional parameters.
|
---|
| 80 | *
|
---|
| 81 | * @opt_param string androidId device android_id
|
---|
| 82 | * @opt_param string device device device
|
---|
| 83 | * @opt_param string manufacturer device manufacturer
|
---|
| 84 | * @opt_param string model device model
|
---|
| 85 | * @opt_param string product device product
|
---|
| 86 | * @opt_param string serial device serial
|
---|
| 87 | * @return Offers
|
---|
| 88 | * @throws \Google\Service\Exception
|
---|
| 89 | */
|
---|
| 90 | public function get($optParams = [])
|
---|
| 91 | {
|
---|
| 92 | $params = [];
|
---|
| 93 | $params = array_merge($params, $optParams);
|
---|
| 94 | return $this->call('get', [$params], Offers::class);
|
---|
| 95 | }
|
---|
| 96 | }
|
---|
| 97 |
|
---|
| 98 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 99 | class_alias(Promooffer::class, 'Google_Service_Books_Resource_Promooffer');
|
---|