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\ShoppingContent\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\ShoppingContent\AccountTax as AccountTaxModel;
|
---|
21 | use Google\Service\ShoppingContent\AccounttaxCustomBatchRequest;
|
---|
22 | use Google\Service\ShoppingContent\AccounttaxCustomBatchResponse;
|
---|
23 | use Google\Service\ShoppingContent\AccounttaxListResponse;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "accounttax" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $contentService = new Google\Service\ShoppingContent(...);
|
---|
30 | * $accounttax = $contentService->accounttax;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class Accounttax extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * Retrieves and updates tax settings of multiple accounts in a single request.
|
---|
37 | * (accounttax.custombatch)
|
---|
38 | *
|
---|
39 | * @param AccounttaxCustomBatchRequest $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | * @return AccounttaxCustomBatchResponse
|
---|
42 | * @throws \Google\Service\Exception
|
---|
43 | */
|
---|
44 | public function custombatch(AccounttaxCustomBatchRequest $postBody, $optParams = [])
|
---|
45 | {
|
---|
46 | $params = ['postBody' => $postBody];
|
---|
47 | $params = array_merge($params, $optParams);
|
---|
48 | return $this->call('custombatch', [$params], AccounttaxCustomBatchResponse::class);
|
---|
49 | }
|
---|
50 | /**
|
---|
51 | * Retrieves the tax settings of the account. (accounttax.get)
|
---|
52 | *
|
---|
53 | * @param string $merchantId The ID of the managing account. If this parameter
|
---|
54 | * is not the same as accountId, then this account must be a multi-client
|
---|
55 | * account and `accountId` must be the ID of a sub-account of this account.
|
---|
56 | * @param string $accountId The ID of the account for which to get/update
|
---|
57 | * account tax settings.
|
---|
58 | * @param array $optParams Optional parameters.
|
---|
59 | * @return AccountTaxModel
|
---|
60 | * @throws \Google\Service\Exception
|
---|
61 | */
|
---|
62 | public function get($merchantId, $accountId, $optParams = [])
|
---|
63 | {
|
---|
64 | $params = ['merchantId' => $merchantId, 'accountId' => $accountId];
|
---|
65 | $params = array_merge($params, $optParams);
|
---|
66 | return $this->call('get', [$params], AccountTaxModel::class);
|
---|
67 | }
|
---|
68 | /**
|
---|
69 | * Lists the tax settings of the sub-accounts in your Merchant Center account.
|
---|
70 | * (accounttax.listAccounttax)
|
---|
71 | *
|
---|
72 | * @param string $merchantId The ID of the managing account. This must be a
|
---|
73 | * multi-client account.
|
---|
74 | * @param array $optParams Optional parameters.
|
---|
75 | *
|
---|
76 | * @opt_param string maxResults The maximum number of tax settings to return in
|
---|
77 | * the response, used for paging.
|
---|
78 | * @opt_param string pageToken The token returned by the previous request.
|
---|
79 | * @return AccounttaxListResponse
|
---|
80 | * @throws \Google\Service\Exception
|
---|
81 | */
|
---|
82 | public function listAccounttax($merchantId, $optParams = [])
|
---|
83 | {
|
---|
84 | $params = ['merchantId' => $merchantId];
|
---|
85 | $params = array_merge($params, $optParams);
|
---|
86 | return $this->call('list', [$params], AccounttaxListResponse::class);
|
---|
87 | }
|
---|
88 | /**
|
---|
89 | * Updates the tax settings of the account. Any fields that are not provided are
|
---|
90 | * deleted from the resource. (accounttax.update)
|
---|
91 | *
|
---|
92 | * @param string $merchantId The ID of the managing account. If this parameter
|
---|
93 | * is not the same as accountId, then this account must be a multi-client
|
---|
94 | * account and `accountId` must be the ID of a sub-account of this account.
|
---|
95 | * @param string $accountId The ID of the account for which to get/update
|
---|
96 | * account tax settings.
|
---|
97 | * @param AccountTaxModel $postBody
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | * @return AccountTaxModel
|
---|
100 | * @throws \Google\Service\Exception
|
---|
101 | */
|
---|
102 | public function update($merchantId, $accountId, AccountTaxModel $postBody, $optParams = [])
|
---|
103 | {
|
---|
104 | $params = ['merchantId' => $merchantId, 'accountId' => $accountId, 'postBody' => $postBody];
|
---|
105 | $params = array_merge($params, $optParams);
|
---|
106 | return $this->call('update', [$params], AccountTaxModel::class);
|
---|
107 | }
|
---|
108 | }
|
---|
109 |
|
---|
110 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
111 | class_alias(Accounttax::class, 'Google_Service_ShoppingContent_Resource_Accounttax');
|
---|