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\AccountStatus;
21use Google\Service\ShoppingContent\AccountstatusesCustomBatchRequest;
22use Google\Service\ShoppingContent\AccountstatusesCustomBatchResponse;
23use Google\Service\ShoppingContent\AccountstatusesListResponse;
24
25/**
26 * The "accountstatuses" collection of methods.
27 * Typical usage is:
28 *  <code>
29 *   $contentService = new Google\Service\ShoppingContent(...);
30 *   $accountstatuses = $contentService->accountstatuses;
31 *  </code>
32 */
33class Accountstatuses extends \Google\Service\Resource
34{
35  /**
36   * Retrieves multiple Merchant Center account statuses in a single request.
37   * (accountstatuses.custombatch)
38   *
39   * @param AccountstatusesCustomBatchRequest $postBody
40   * @param array $optParams Optional parameters.
41   * @return AccountstatusesCustomBatchResponse
42   */
43  public function custombatch(AccountstatusesCustomBatchRequest $postBody, $optParams = [])
44  {
45    $params = ['postBody' => $postBody];
46    $params = array_merge($params, $optParams);
47    return $this->call('custombatch', [$params], AccountstatusesCustomBatchResponse::class);
48  }
49  /**
50   * Retrieves the status of a Merchant Center account. No itemLevelIssues are
51   * returned for multi-client accounts. (accountstatuses.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.
57   * @param array $optParams Optional parameters.
58   *
59   * @opt_param string destinations If set, only issues for the specified
60   * destinations are returned, otherwise only issues for the Shopping
61   * destination.
62   * @return AccountStatus
63   */
64  public function get($merchantId, $accountId, $optParams = [])
65  {
66    $params = ['merchantId' => $merchantId, 'accountId' => $accountId];
67    $params = array_merge($params, $optParams);
68    return $this->call('get', [$params], AccountStatus::class);
69  }
70  /**
71   * Lists the statuses of the sub-accounts in your Merchant Center account.
72   * (accountstatuses.listAccountstatuses)
73   *
74   * @param string $merchantId The ID of the managing account. This must be a
75   * multi-client account.
76   * @param array $optParams Optional parameters.
77   *
78   * @opt_param string destinations If set, only issues for the specified
79   * destinations are returned, otherwise only issues for the Shopping
80   * destination.
81   * @opt_param string maxResults The maximum number of account statuses to return
82   * in the response, used for paging.
83   * @opt_param string name If set, only the accounts with the given name (case
84   * sensitive) will be returned.
85   * @opt_param string pageToken The token returned by the previous request.
86   * @return AccountstatusesListResponse
87   */
88  public function listAccountstatuses($merchantId, $optParams = [])
89  {
90    $params = ['merchantId' => $merchantId];
91    $params = array_merge($params, $optParams);
92    return $this->call('list', [$params], AccountstatusesListResponse::class);
93  }
94}
95
96// Adding a class alias for backwards compatibility with the previous class name.
97class_alias(Accountstatuses::class, 'Google_Service_ShoppingContent_Resource_Accountstatuses');
98