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\RenderAccountIssuesRequestPayload;
|
---|
21 | use Google\Service\ShoppingContent\RenderAccountIssuesResponse;
|
---|
22 | use Google\Service\ShoppingContent\RenderProductIssuesRequestPayload;
|
---|
23 | use Google\Service\ShoppingContent\RenderProductIssuesResponse;
|
---|
24 | use Google\Service\ShoppingContent\TriggerActionPayload;
|
---|
25 | use Google\Service\ShoppingContent\TriggerActionResponse;
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * The "merchantsupport" collection of methods.
|
---|
29 | * Typical usage is:
|
---|
30 | * <code>
|
---|
31 | * $contentService = new Google\Service\ShoppingContent(...);
|
---|
32 | * $merchantsupport = $contentService->merchantsupport;
|
---|
33 | * </code>
|
---|
34 | */
|
---|
35 | class Merchantsupport extends \Google\Service\Resource
|
---|
36 | {
|
---|
37 | /**
|
---|
38 | * Provide a list of merchant's issues with a support content and available
|
---|
39 | * actions. This content and actions are meant to be rendered and shown in
|
---|
40 | * third-party applications. (merchantsupport.renderaccountissues)
|
---|
41 | *
|
---|
42 | * @param string $merchantId Required. The ID of the account to fetch issues
|
---|
43 | * for.
|
---|
44 | * @param RenderAccountIssuesRequestPayload $postBody
|
---|
45 | * @param array $optParams Optional parameters.
|
---|
46 | *
|
---|
47 | * @opt_param string languageCode Optional. The [IETF
|
---|
48 | * BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize
|
---|
49 | * support content. If not set, the result will be in default language `en-US`.
|
---|
50 | * @opt_param string timeZone Optional. The [IANA](https://www.iana.org/time-
|
---|
51 | * zones) timezone used to localize times in support content. For example
|
---|
52 | * 'America/Los_Angeles'. If not set, results will use as a default UTC.
|
---|
53 | * @return RenderAccountIssuesResponse
|
---|
54 | * @throws \Google\Service\Exception
|
---|
55 | */
|
---|
56 | public function renderaccountissues($merchantId, RenderAccountIssuesRequestPayload $postBody, $optParams = [])
|
---|
57 | {
|
---|
58 | $params = ['merchantId' => $merchantId, 'postBody' => $postBody];
|
---|
59 | $params = array_merge($params, $optParams);
|
---|
60 | return $this->call('renderaccountissues', [$params], RenderAccountIssuesResponse::class);
|
---|
61 | }
|
---|
62 | /**
|
---|
63 | * Provide a list of issues for merchant's product with a support content and
|
---|
64 | * available actions. This content and actions are meant to be rendered and
|
---|
65 | * shown in third-party applications. (merchantsupport.renderproductissues)
|
---|
66 | *
|
---|
67 | * @param string $merchantId Required. The ID of the account that contains the
|
---|
68 | * product.
|
---|
69 | * @param string $productId Required. The
|
---|
70 | * [REST_ID](https://developers.google.com/shopping-
|
---|
71 | * content/reference/rest/v2.1/products#Product.FIELDS.id) of the product to
|
---|
72 | * fetch issues for.
|
---|
73 | * @param RenderProductIssuesRequestPayload $postBody
|
---|
74 | * @param array $optParams Optional parameters.
|
---|
75 | *
|
---|
76 | * @opt_param string languageCode Optional. The [IETF
|
---|
77 | * BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize
|
---|
78 | * support content. If not set, the result will be in default language `en-US`.
|
---|
79 | * @opt_param string timeZone Optional. The [IANA](https://www.iana.org/time-
|
---|
80 | * zones) timezone used to localize times in support content. For example
|
---|
81 | * 'America/Los_Angeles'. If not set, results will use as a default UTC.
|
---|
82 | * @return RenderProductIssuesResponse
|
---|
83 | * @throws \Google\Service\Exception
|
---|
84 | */
|
---|
85 | public function renderproductissues($merchantId, $productId, RenderProductIssuesRequestPayload $postBody, $optParams = [])
|
---|
86 | {
|
---|
87 | $params = ['merchantId' => $merchantId, 'productId' => $productId, 'postBody' => $postBody];
|
---|
88 | $params = array_merge($params, $optParams);
|
---|
89 | return $this->call('renderproductissues', [$params], RenderProductIssuesResponse::class);
|
---|
90 | }
|
---|
91 | /**
|
---|
92 | * Start an action. The action can be requested by merchants in third-party
|
---|
93 | * application. Before merchants can request the action, the third-party
|
---|
94 | * application needs to show them action specific content and display a user
|
---|
95 | * input form. The action can be successfully started only once all `required`
|
---|
96 | * inputs are provided. If any `required` input is missing, or invalid value was
|
---|
97 | * provided, the service will return 400 error. Validation errors will contain
|
---|
98 | * Ids for all problematic field together with translated, human readable error
|
---|
99 | * messages that can be shown to the user. (merchantsupport.triggeraction)
|
---|
100 | *
|
---|
101 | * @param string $merchantId Required. The ID of the merchant's account.
|
---|
102 | * @param TriggerActionPayload $postBody
|
---|
103 | * @param array $optParams Optional parameters.
|
---|
104 | *
|
---|
105 | * @opt_param string languageCode Optional. Language code [IETF BCP 47
|
---|
106 | * syntax](https://tools.ietf.org/html/bcp47) used to localize the response. If
|
---|
107 | * not set, the result will be in default language `en-US`.
|
---|
108 | * @return TriggerActionResponse
|
---|
109 | * @throws \Google\Service\Exception
|
---|
110 | */
|
---|
111 | public function triggeraction($merchantId, TriggerActionPayload $postBody, $optParams = [])
|
---|
112 | {
|
---|
113 | $params = ['merchantId' => $merchantId, 'postBody' => $postBody];
|
---|
114 | $params = array_merge($params, $optParams);
|
---|
115 | return $this->call('triggeraction', [$params], TriggerActionResponse::class);
|
---|
116 | }
|
---|
117 | }
|
---|
118 |
|
---|
119 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
120 | class_alias(Merchantsupport::class, 'Google_Service_ShoppingContent_Resource_Merchantsupport');
|
---|