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\LiaOmnichannelExperience;
|
---|
21 | use Google\Service\ShoppingContent\LiaSettings as LiaSettingsModel;
|
---|
22 | use Google\Service\ShoppingContent\LiasettingsCustomBatchRequest;
|
---|
23 | use Google\Service\ShoppingContent\LiasettingsCustomBatchResponse;
|
---|
24 | use Google\Service\ShoppingContent\LiasettingsGetAccessibleGmbAccountsResponse;
|
---|
25 | use Google\Service\ShoppingContent\LiasettingsListPosDataProvidersResponse;
|
---|
26 | use Google\Service\ShoppingContent\LiasettingsListResponse;
|
---|
27 | use Google\Service\ShoppingContent\LiasettingsRequestGmbAccessResponse;
|
---|
28 | use Google\Service\ShoppingContent\LiasettingsRequestInventoryVerificationResponse;
|
---|
29 | use Google\Service\ShoppingContent\LiasettingsSetInventoryVerificationContactResponse;
|
---|
30 | use Google\Service\ShoppingContent\LiasettingsSetPosDataProviderResponse;
|
---|
31 |
|
---|
32 | /**
|
---|
33 | * The "liasettings" collection of methods.
|
---|
34 | * Typical usage is:
|
---|
35 | * <code>
|
---|
36 | * $contentService = new Google\Service\ShoppingContent(...);
|
---|
37 | * $liasettings = $contentService->liasettings;
|
---|
38 | * </code>
|
---|
39 | */
|
---|
40 | class Liasettings extends \Google\Service\Resource
|
---|
41 | {
|
---|
42 | /**
|
---|
43 | * Retrieves and/or updates the LIA settings of multiple accounts in a single
|
---|
44 | * request. (liasettings.custombatch)
|
---|
45 | *
|
---|
46 | * @param LiasettingsCustomBatchRequest $postBody
|
---|
47 | * @param array $optParams Optional parameters.
|
---|
48 | * @return LiasettingsCustomBatchResponse
|
---|
49 | * @throws \Google\Service\Exception
|
---|
50 | */
|
---|
51 | public function custombatch(LiasettingsCustomBatchRequest $postBody, $optParams = [])
|
---|
52 | {
|
---|
53 | $params = ['postBody' => $postBody];
|
---|
54 | $params = array_merge($params, $optParams);
|
---|
55 | return $this->call('custombatch', [$params], LiasettingsCustomBatchResponse::class);
|
---|
56 | }
|
---|
57 | /**
|
---|
58 | * Retrieves the LIA settings of the account. (liasettings.get)
|
---|
59 | *
|
---|
60 | * @param string $merchantId The ID of the managing account. If this parameter
|
---|
61 | * is not the same as accountId, then this account must be a multi-client
|
---|
62 | * account and `accountId` must be the ID of a sub-account of this account.
|
---|
63 | * @param string $accountId The ID of the account for which to get or update LIA
|
---|
64 | * settings.
|
---|
65 | * @param array $optParams Optional parameters.
|
---|
66 | * @return LiaSettingsModel
|
---|
67 | * @throws \Google\Service\Exception
|
---|
68 | */
|
---|
69 | public function get($merchantId, $accountId, $optParams = [])
|
---|
70 | {
|
---|
71 | $params = ['merchantId' => $merchantId, 'accountId' => $accountId];
|
---|
72 | $params = array_merge($params, $optParams);
|
---|
73 | return $this->call('get', [$params], LiaSettingsModel::class);
|
---|
74 | }
|
---|
75 | /**
|
---|
76 | * Retrieves the list of accessible Business Profiles.
|
---|
77 | * (liasettings.getaccessiblegmbaccounts)
|
---|
78 | *
|
---|
79 | * @param string $merchantId The ID of the managing account. If this parameter
|
---|
80 | * is not the same as accountId, then this account must be a multi-client
|
---|
81 | * account and `accountId` must be the ID of a sub-account of this account.
|
---|
82 | * @param string $accountId The ID of the account for which to retrieve
|
---|
83 | * accessible Business Profiles.
|
---|
84 | * @param array $optParams Optional parameters.
|
---|
85 | * @return LiasettingsGetAccessibleGmbAccountsResponse
|
---|
86 | * @throws \Google\Service\Exception
|
---|
87 | */
|
---|
88 | public function getaccessiblegmbaccounts($merchantId, $accountId, $optParams = [])
|
---|
89 | {
|
---|
90 | $params = ['merchantId' => $merchantId, 'accountId' => $accountId];
|
---|
91 | $params = array_merge($params, $optParams);
|
---|
92 | return $this->call('getaccessiblegmbaccounts', [$params], LiasettingsGetAccessibleGmbAccountsResponse::class);
|
---|
93 | }
|
---|
94 | /**
|
---|
95 | * Lists the LIA settings of the sub-accounts in your Merchant Center account.
|
---|
96 | * (liasettings.listLiasettings)
|
---|
97 | *
|
---|
98 | * @param string $merchantId The ID of the managing account. This must be a
|
---|
99 | * multi-client account.
|
---|
100 | * @param array $optParams Optional parameters.
|
---|
101 | *
|
---|
102 | * @opt_param string maxResults The maximum number of LIA settings to return in
|
---|
103 | * the response, used for paging.
|
---|
104 | * @opt_param string pageToken The token returned by the previous request.
|
---|
105 | * @return LiasettingsListResponse
|
---|
106 | * @throws \Google\Service\Exception
|
---|
107 | */
|
---|
108 | public function listLiasettings($merchantId, $optParams = [])
|
---|
109 | {
|
---|
110 | $params = ['merchantId' => $merchantId];
|
---|
111 | $params = array_merge($params, $optParams);
|
---|
112 | return $this->call('list', [$params], LiasettingsListResponse::class);
|
---|
113 | }
|
---|
114 | /**
|
---|
115 | * Retrieves the list of POS data providers that have active settings for the
|
---|
116 | * all eiligible countries. (liasettings.listposdataproviders)
|
---|
117 | *
|
---|
118 | * @param array $optParams Optional parameters.
|
---|
119 | * @return LiasettingsListPosDataProvidersResponse
|
---|
120 | * @throws \Google\Service\Exception
|
---|
121 | */
|
---|
122 | public function listposdataproviders($optParams = [])
|
---|
123 | {
|
---|
124 | $params = [];
|
---|
125 | $params = array_merge($params, $optParams);
|
---|
126 | return $this->call('listposdataproviders', [$params], LiasettingsListPosDataProvidersResponse::class);
|
---|
127 | }
|
---|
128 | /**
|
---|
129 | * Requests access to a specified Business Profile.
|
---|
130 | * (liasettings.requestgmbaccess)
|
---|
131 | *
|
---|
132 | * @param string $merchantId The ID of the managing account. If this parameter
|
---|
133 | * is not the same as accountId, then this account must be a multi-client
|
---|
134 | * account and `accountId` must be the ID of a sub-account of this account.
|
---|
135 | * @param string $accountId The ID of the account for which Business Profile
|
---|
136 | * access is requested.
|
---|
137 | * @param string $gmbEmail The email of the Business Profile.
|
---|
138 | * @param array $optParams Optional parameters.
|
---|
139 | * @return LiasettingsRequestGmbAccessResponse
|
---|
140 | * @throws \Google\Service\Exception
|
---|
141 | */
|
---|
142 | public function requestgmbaccess($merchantId, $accountId, $gmbEmail, $optParams = [])
|
---|
143 | {
|
---|
144 | $params = ['merchantId' => $merchantId, 'accountId' => $accountId, 'gmbEmail' => $gmbEmail];
|
---|
145 | $params = array_merge($params, $optParams);
|
---|
146 | return $this->call('requestgmbaccess', [$params], LiasettingsRequestGmbAccessResponse::class);
|
---|
147 | }
|
---|
148 | /**
|
---|
149 | * Requests inventory validation for the specified country.
|
---|
150 | * (liasettings.requestinventoryverification)
|
---|
151 | *
|
---|
152 | * @param string $merchantId The ID of the managing account. If this parameter
|
---|
153 | * is not the same as accountId, then this account must be a multi-client
|
---|
154 | * account and `accountId` must be the ID of a sub-account of this account.
|
---|
155 | * @param string $accountId The ID of the account that manages the order. This
|
---|
156 | * cannot be a multi-client account.
|
---|
157 | * @param string $country The country for which inventory validation is
|
---|
158 | * requested.
|
---|
159 | * @param array $optParams Optional parameters.
|
---|
160 | * @return LiasettingsRequestInventoryVerificationResponse
|
---|
161 | * @throws \Google\Service\Exception
|
---|
162 | */
|
---|
163 | public function requestinventoryverification($merchantId, $accountId, $country, $optParams = [])
|
---|
164 | {
|
---|
165 | $params = ['merchantId' => $merchantId, 'accountId' => $accountId, 'country' => $country];
|
---|
166 | $params = array_merge($params, $optParams);
|
---|
167 | return $this->call('requestinventoryverification', [$params], LiasettingsRequestInventoryVerificationResponse::class);
|
---|
168 | }
|
---|
169 | /**
|
---|
170 | * Sets the inventory verification contract for the specified country.
|
---|
171 | * (liasettings.setinventoryverificationcontact)
|
---|
172 | *
|
---|
173 | * @param string $merchantId The ID of the managing account. If this parameter
|
---|
174 | * is not the same as accountId, then this account must be a multi-client
|
---|
175 | * account and `accountId` must be the ID of a sub-account of this account.
|
---|
176 | * @param string $accountId The ID of the account that manages the order. This
|
---|
177 | * cannot be a multi-client account.
|
---|
178 | * @param string $country The country for which inventory verification is
|
---|
179 | * requested.
|
---|
180 | * @param string $language The language for which inventory verification is
|
---|
181 | * requested.
|
---|
182 | * @param string $contactName The name of the inventory verification contact.
|
---|
183 | * @param string $contactEmail The email of the inventory verification contact.
|
---|
184 | * @param array $optParams Optional parameters.
|
---|
185 | * @return LiasettingsSetInventoryVerificationContactResponse
|
---|
186 | * @throws \Google\Service\Exception
|
---|
187 | */
|
---|
188 | public function setinventoryverificationcontact($merchantId, $accountId, $country, $language, $contactName, $contactEmail, $optParams = [])
|
---|
189 | {
|
---|
190 | $params = ['merchantId' => $merchantId, 'accountId' => $accountId, 'country' => $country, 'language' => $language, 'contactName' => $contactName, 'contactEmail' => $contactEmail];
|
---|
191 | $params = array_merge($params, $optParams);
|
---|
192 | return $this->call('setinventoryverificationcontact', [$params], LiasettingsSetInventoryVerificationContactResponse::class);
|
---|
193 | }
|
---|
194 | /**
|
---|
195 | * Sets the omnichannel experience for the specified country. Only supported for
|
---|
196 | * merchants whose POS data provider is trusted to enable the corresponding
|
---|
197 | * experience. For more context, see these help articles [about
|
---|
198 | * LFP](https://support.google.com/merchants/answer/7676652) and [how to get
|
---|
199 | * started](https://support.google.com/merchants/answer/7676578) with it.
|
---|
200 | * (liasettings.setomnichannelexperience)
|
---|
201 | *
|
---|
202 | * @param string $merchantId The ID of the managing account. If this parameter
|
---|
203 | * is not the same as accountId, then this account must be a multi-client
|
---|
204 | * account and `accountId` must be the ID of a sub-account of this account.
|
---|
205 | * @param string $accountId The ID of the account for which to retrieve
|
---|
206 | * accessible Business Profiles.
|
---|
207 | * @param array $optParams Optional parameters.
|
---|
208 | *
|
---|
209 | * @opt_param string country The CLDR country code (for example, "US") for which
|
---|
210 | * the omnichannel experience is selected.
|
---|
211 | * @opt_param string lsfType The Local Store Front (LSF) type for this country.
|
---|
212 | * Acceptable values are: - "`ghlsf`" (Google-Hosted Local Store Front) -
|
---|
213 | * "`mhlsfBasic`" (Merchant-Hosted Local Store Front Basic) - "`mhlsfFull`"
|
---|
214 | * (Merchant-Hosted Local Store Front Full) More details about these types can
|
---|
215 | * be found here.
|
---|
216 | * @opt_param string pickupTypes The Pickup types for this country. Acceptable
|
---|
217 | * values are: - "`pickupToday`" - "`pickupLater`"
|
---|
218 | * @return LiaOmnichannelExperience
|
---|
219 | * @throws \Google\Service\Exception
|
---|
220 | */
|
---|
221 | public function setomnichannelexperience($merchantId, $accountId, $optParams = [])
|
---|
222 | {
|
---|
223 | $params = ['merchantId' => $merchantId, 'accountId' => $accountId];
|
---|
224 | $params = array_merge($params, $optParams);
|
---|
225 | return $this->call('setomnichannelexperience', [$params], LiaOmnichannelExperience::class);
|
---|
226 | }
|
---|
227 | /**
|
---|
228 | * Sets the POS data provider for the specified country.
|
---|
229 | * (liasettings.setposdataprovider)
|
---|
230 | *
|
---|
231 | * @param string $merchantId The ID of the managing account. If this parameter
|
---|
232 | * is not the same as accountId, then this account must be a multi-client
|
---|
233 | * account and `accountId` must be the ID of a sub-account of this account.
|
---|
234 | * @param string $accountId The ID of the account for which to retrieve
|
---|
235 | * accessible Business Profiles.
|
---|
236 | * @param string $country The country for which the POS data provider is
|
---|
237 | * selected.
|
---|
238 | * @param array $optParams Optional parameters.
|
---|
239 | *
|
---|
240 | * @opt_param string posDataProviderId The ID of POS data provider.
|
---|
241 | * @opt_param string posExternalAccountId The account ID by which this merchant
|
---|
242 | * is known to the POS data provider.
|
---|
243 | * @return LiasettingsSetPosDataProviderResponse
|
---|
244 | * @throws \Google\Service\Exception
|
---|
245 | */
|
---|
246 | public function setposdataprovider($merchantId, $accountId, $country, $optParams = [])
|
---|
247 | {
|
---|
248 | $params = ['merchantId' => $merchantId, 'accountId' => $accountId, 'country' => $country];
|
---|
249 | $params = array_merge($params, $optParams);
|
---|
250 | return $this->call('setposdataprovider', [$params], LiasettingsSetPosDataProviderResponse::class);
|
---|
251 | }
|
---|
252 | /**
|
---|
253 | * Updates the LIA settings of the account. Any fields that are not provided are
|
---|
254 | * deleted from the resource. (liasettings.update)
|
---|
255 | *
|
---|
256 | * @param string $merchantId The ID of the managing account. If this parameter
|
---|
257 | * is not the same as accountId, then this account must be a multi-client
|
---|
258 | * account and `accountId` must be the ID of a sub-account of this account.
|
---|
259 | * @param string $accountId The ID of the account for which to get or update LIA
|
---|
260 | * settings.
|
---|
261 | * @param LiaSettingsModel $postBody
|
---|
262 | * @param array $optParams Optional parameters.
|
---|
263 | * @return LiaSettingsModel
|
---|
264 | * @throws \Google\Service\Exception
|
---|
265 | */
|
---|
266 | public function update($merchantId, $accountId, LiaSettingsModel $postBody, $optParams = [])
|
---|
267 | {
|
---|
268 | $params = ['merchantId' => $merchantId, 'accountId' => $accountId, 'postBody' => $postBody];
|
---|
269 | $params = array_merge($params, $optParams);
|
---|
270 | return $this->call('update', [$params], LiaSettingsModel::class);
|
---|
271 | }
|
---|
272 | }
|
---|
273 |
|
---|
274 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
275 | class_alias(Liasettings::class, 'Google_Service_ShoppingContent_Resource_Liasettings');
|
---|