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