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\Cloudchannel\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Cloudchannel\GoogleCloudChannelV1ListOffersResponse;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * The "offers" collection of methods.
|
---|
24 | * Typical usage is:
|
---|
25 | * <code>
|
---|
26 | * $cloudchannelService = new Google\Service\Cloudchannel(...);
|
---|
27 | * $offers = $cloudchannelService->accounts_offers;
|
---|
28 | * </code>
|
---|
29 | */
|
---|
30 | class AccountsOffers extends \Google\Service\Resource
|
---|
31 | {
|
---|
32 | /**
|
---|
33 | * Lists the Offers the reseller can sell. Possible error codes: *
|
---|
34 | * INVALID_ARGUMENT: Required request parameters are missing or invalid.
|
---|
35 | * (offers.listAccountsOffers)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. The resource name of the reseller account
|
---|
38 | * from which to list Offers. Parent uses the format: accounts/{account_id}.
|
---|
39 | * @param array $optParams Optional parameters.
|
---|
40 | *
|
---|
41 | * @opt_param string filter Optional. The expression to filter results by name
|
---|
42 | * (name of the Offer), sku.name (name of the SKU), or sku.product.name (name of
|
---|
43 | * the Product). Example 1: sku.product.name=products/p1 AND
|
---|
44 | * sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1
|
---|
45 | * @opt_param string languageCode Optional. The BCP-47 language code. For
|
---|
46 | * example, "en-US". The response will localize in the corresponding language
|
---|
47 | * code, if specified. The default value is "en-US".
|
---|
48 | * @opt_param int pageSize Optional. Requested page size. Server might return
|
---|
49 | * fewer results than requested. If unspecified, returns at most 500 Offers. The
|
---|
50 | * maximum value is 1000; the server will coerce values above 1000.
|
---|
51 | * @opt_param string pageToken Optional. A token for a page of results other
|
---|
52 | * than the first page.
|
---|
53 | * @opt_param bool showFutureOffers Optional. A boolean flag that determines if
|
---|
54 | * a response returns future offers 30 days from now. If the show_future_offers
|
---|
55 | * is true, the response will only contain offers that are scheduled to be
|
---|
56 | * available 30 days from now.
|
---|
57 | * @return GoogleCloudChannelV1ListOffersResponse
|
---|
58 | * @throws \Google\Service\Exception
|
---|
59 | */
|
---|
60 | public function listAccountsOffers($parent, $optParams = [])
|
---|
61 | {
|
---|
62 | $params = ['parent' => $parent];
|
---|
63 | $params = array_merge($params, $optParams);
|
---|
64 | return $this->call('list', [$params], GoogleCloudChannelV1ListOffersResponse::class);
|
---|
65 | }
|
---|
66 | }
|
---|
67 |
|
---|
68 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
69 | class_alias(AccountsOffers::class, 'Google_Service_Cloudchannel_Resource_AccountsOffers');
|
---|