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\LiaSettings as LiaSettingsModel;
21use Google\Service\ShoppingContent\LiasettingsCustomBatchRequest;
22use Google\Service\ShoppingContent\LiasettingsCustomBatchResponse;
23use Google\Service\ShoppingContent\LiasettingsGetAccessibleGmbAccountsResponse;
24use Google\Service\ShoppingContent\LiasettingsListPosDataProvidersResponse;
25use Google\Service\ShoppingContent\LiasettingsListResponse;
26use Google\Service\ShoppingContent\LiasettingsRequestGmbAccessResponse;
27use Google\Service\ShoppingContent\LiasettingsRequestInventoryVerificationResponse;
28use Google\Service\ShoppingContent\LiasettingsSetInventoryVerificationContactResponse;
29use Google\Service\ShoppingContent\LiasettingsSetPosDataProviderResponse;
30
31/**
32 * The "liasettings" collection of methods.
33 * Typical usage is:
34 *  <code>
35 *   $contentService = new Google\Service\ShoppingContent(...);
36 *   $liasettings = $contentService->liasettings;
37 *  </code>
38 */
39class Liasettings extends \Google\Service\Resource
40{
41  /**
42   * Retrieves and/or updates the LIA settings of multiple accounts in a single
43   * request. (liasettings.custombatch)
44   *
45   * @param LiasettingsCustomBatchRequest $postBody
46   * @param array $optParams Optional parameters.
47   * @return LiasettingsCustomBatchResponse
48   */
49  public function custombatch(LiasettingsCustomBatchRequest $postBody, $optParams = [])
50  {
51    $params = ['postBody' => $postBody];
52    $params = array_merge($params, $optParams);
53    return $this->call('custombatch', [$params], LiasettingsCustomBatchResponse::class);
54  }
55  /**
56   * Retrieves the LIA settings of the account. (liasettings.get)
57   *
58   * @param string $merchantId The ID of the managing account. If this parameter
59   * is not the same as accountId, then this account must be a multi-client
60   * account and `accountId` must be the ID of a sub-account of this account.
61   * @param string $accountId The ID of the account for which to get or update LIA
62   * settings.
63   * @param array $optParams Optional parameters.
64   * @return LiaSettingsModel
65   */
66  public function get($merchantId, $accountId, $optParams = [])
67  {
68    $params = ['merchantId' => $merchantId, 'accountId' => $accountId];
69    $params = array_merge($params, $optParams);
70    return $this->call('get', [$params], LiaSettingsModel::class);
71  }
72  /**
73   * Retrieves the list of accessible Business Profiles.
74   * (liasettings.getaccessiblegmbaccounts)
75   *
76   * @param string $merchantId The ID of the managing account. If this parameter
77   * is not the same as accountId, then this account must be a multi-client
78   * account and `accountId` must be the ID of a sub-account of this account.
79   * @param string $accountId The ID of the account for which to retrieve
80   * accessible Business Profiles.
81   * @param array $optParams Optional parameters.
82   * @return LiasettingsGetAccessibleGmbAccountsResponse
83   */
84  public function getaccessiblegmbaccounts($merchantId, $accountId, $optParams = [])
85  {
86    $params = ['merchantId' => $merchantId, 'accountId' => $accountId];
87    $params = array_merge($params, $optParams);
88    return $this->call('getaccessiblegmbaccounts', [$params], LiasettingsGetAccessibleGmbAccountsResponse::class);
89  }
90  /**
91   * Lists the LIA settings of the sub-accounts in your Merchant Center account.
92   * (liasettings.listLiasettings)
93   *
94   * @param string $merchantId The ID of the managing account. This must be a
95   * multi-client account.
96   * @param array $optParams Optional parameters.
97   *
98   * @opt_param string maxResults The maximum number of LIA settings to return in
99   * the response, used for paging.
100   * @opt_param string pageToken The token returned by the previous request.
101   * @return LiasettingsListResponse
102   */
103  public function listLiasettings($merchantId, $optParams = [])
104  {
105    $params = ['merchantId' => $merchantId];
106    $params = array_merge($params, $optParams);
107    return $this->call('list', [$params], LiasettingsListResponse::class);
108  }
109  /**
110   * Retrieves the list of POS data providers that have active settings for the
111   * all eiligible countries. (liasettings.listposdataproviders)
112   *
113   * @param array $optParams Optional parameters.
114   * @return LiasettingsListPosDataProvidersResponse
115   */
116  public function listposdataproviders($optParams = [])
117  {
118    $params = [];
119    $params = array_merge($params, $optParams);
120    return $this->call('listposdataproviders', [$params], LiasettingsListPosDataProvidersResponse::class);
121  }
122  /**
123   * Requests access to a specified Business Profile.
124   * (liasettings.requestgmbaccess)
125   *
126   * @param string $merchantId The ID of the managing account. If this parameter
127   * is not the same as accountId, then this account must be a multi-client
128   * account and `accountId` must be the ID of a sub-account of this account.
129   * @param string $accountId The ID of the account for which Business Profile
130   * access is requested.
131   * @param string $gmbEmail The email of the Business Profile.
132   * @param array $optParams Optional parameters.
133   * @return LiasettingsRequestGmbAccessResponse
134   */
135  public function requestgmbaccess($merchantId, $accountId, $gmbEmail, $optParams = [])
136  {
137    $params = ['merchantId' => $merchantId, 'accountId' => $accountId, 'gmbEmail' => $gmbEmail];
138    $params = array_merge($params, $optParams);
139    return $this->call('requestgmbaccess', [$params], LiasettingsRequestGmbAccessResponse::class);
140  }
141  /**
142   * Requests inventory validation for the specified country.
143   * (liasettings.requestinventoryverification)
144   *
145   * @param string $merchantId The ID of the managing account. If this parameter
146   * is not the same as accountId, then this account must be a multi-client
147   * account and `accountId` must be the ID of a sub-account of this account.
148   * @param string $accountId The ID of the account that manages the order. This
149   * cannot be a multi-client account.
150   * @param string $country The country for which inventory validation is
151   * requested.
152   * @param array $optParams Optional parameters.
153   * @return LiasettingsRequestInventoryVerificationResponse
154   */
155  public function requestinventoryverification($merchantId, $accountId, $country, $optParams = [])
156  {
157    $params = ['merchantId' => $merchantId, 'accountId' => $accountId, 'country' => $country];
158    $params = array_merge($params, $optParams);
159    return $this->call('requestinventoryverification', [$params], LiasettingsRequestInventoryVerificationResponse::class);
160  }
161  /**
162   * Sets the inventory verification contract for the specified country.
163   * (liasettings.setinventoryverificationcontact)
164   *
165   * @param string $merchantId The ID of the managing account. If this parameter
166   * is not the same as accountId, then this account must be a multi-client
167   * account and `accountId` must be the ID of a sub-account of this account.
168   * @param string $accountId The ID of the account that manages the order. This
169   * cannot be a multi-client account.
170   * @param string $country The country for which inventory verification is
171   * requested.
172   * @param string $language The language for which inventory verification is
173   * requested.
174   * @param string $contactName The name of the inventory verification contact.
175   * @param string $contactEmail The email of the inventory verification contact.
176   * @param array $optParams Optional parameters.
177   * @return LiasettingsSetInventoryVerificationContactResponse
178   */
179  public function setinventoryverificationcontact($merchantId, $accountId, $country, $language, $contactName, $contactEmail, $optParams = [])
180  {
181    $params = ['merchantId' => $merchantId, 'accountId' => $accountId, 'country' => $country, 'language' => $language, 'contactName' => $contactName, 'contactEmail' => $contactEmail];
182    $params = array_merge($params, $optParams);
183    return $this->call('setinventoryverificationcontact', [$params], LiasettingsSetInventoryVerificationContactResponse::class);
184  }
185  /**
186   * Sets the POS data provider for the specified country.
187   * (liasettings.setposdataprovider)
188   *
189   * @param string $merchantId The ID of the managing account. If this parameter
190   * is not the same as accountId, then this account must be a multi-client
191   * account and `accountId` must be the ID of a sub-account of this account.
192   * @param string $accountId The ID of the account for which to retrieve
193   * accessible Business Profiles.
194   * @param string $country The country for which the POS data provider is
195   * selected.
196   * @param array $optParams Optional parameters.
197   *
198   * @opt_param string posDataProviderId The ID of POS data provider.
199   * @opt_param string posExternalAccountId The account ID by which this merchant
200   * is known to the POS data provider.
201   * @return LiasettingsSetPosDataProviderResponse
202   */
203  public function setposdataprovider($merchantId, $accountId, $country, $optParams = [])
204  {
205    $params = ['merchantId' => $merchantId, 'accountId' => $accountId, 'country' => $country];
206    $params = array_merge($params, $optParams);
207    return $this->call('setposdataprovider', [$params], LiasettingsSetPosDataProviderResponse::class);
208  }
209  /**
210   * Updates the LIA settings of the account. Any fields that are not provided are
211   * deleted from the resource. (liasettings.update)
212   *
213   * @param string $merchantId The ID of the managing account. If this parameter
214   * is not the same as accountId, then this account must be a multi-client
215   * account and `accountId` must be the ID of a sub-account of this account.
216   * @param string $accountId The ID of the account for which to get or update LIA
217   * settings.
218   * @param LiaSettingsModel $postBody
219   * @param array $optParams Optional parameters.
220   * @return LiaSettingsModel
221   */
222  public function update($merchantId, $accountId, LiaSettingsModel $postBody, $optParams = [])
223  {
224    $params = ['merchantId' => $merchantId, 'accountId' => $accountId, 'postBody' => $postBody];
225    $params = array_merge($params, $optParams);
226    return $this->call('update', [$params], LiaSettingsModel::class);
227  }
228}
229
230// Adding a class alias for backwards compatibility with the previous class name.
231class_alias(Liasettings::class, 'Google_Service_ShoppingContent_Resource_Liasettings');
232