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
18namespace Google\Service\Books\Resource;
19
20use Google\Service\Books\BooksEmpty;
21use 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 */
31class 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   */
48  public function accept($optParams = [])
49  {
50    $params = [];
51    $params = array_merge($params, $optParams);
52    return $this->call('accept', [$params], BooksEmpty::class);
53  }
54  /**
55   * Marks the promo offer as dismissed. (promooffer.dismiss)
56   *
57   * @param array $optParams Optional parameters.
58   *
59   * @opt_param string androidId device android_id
60   * @opt_param string device device device
61   * @opt_param string manufacturer device manufacturer
62   * @opt_param string model device model
63   * @opt_param string offerId Offer to dimiss
64   * @opt_param string product device product
65   * @opt_param string serial device serial
66   * @return BooksEmpty
67   */
68  public function dismiss($optParams = [])
69  {
70    $params = [];
71    $params = array_merge($params, $optParams);
72    return $this->call('dismiss', [$params], BooksEmpty::class);
73  }
74  /**
75   * Returns a list of promo offers available to the user (promooffer.get)
76   *
77   * @param array $optParams Optional parameters.
78   *
79   * @opt_param string androidId device android_id
80   * @opt_param string device device device
81   * @opt_param string manufacturer device manufacturer
82   * @opt_param string model device model
83   * @opt_param string product device product
84   * @opt_param string serial device serial
85   * @return Offers
86   */
87  public function get($optParams = [])
88  {
89    $params = [];
90    $params = array_merge($params, $optParams);
91    return $this->call('get', [$params], Offers::class);
92  }
93}
94
95// Adding a class alias for backwards compatibility with the previous class name.
96class_alias(Promooffer::class, 'Google_Service_Books_Resource_Promooffer');
97