source: vendor/google/apiclient-services/src/ManufacturerCenter/Resource/AccountsLanguagesProductCertifications.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 6 weeks ago

Upload project files

  • Property mode set to 100644
File size: 5.4 KB
Line 
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\ManufacturerCenter\Resource;
19
20use Google\Service\ManufacturerCenter\ListProductCertificationsResponse;
21use Google\Service\ManufacturerCenter\ManufacturersEmpty;
22use Google\Service\ManufacturerCenter\ProductCertification;
23
24/**
25 * The "productCertifications" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $manufacturersService = new Google\Service\ManufacturerCenter(...);
29 * $productCertifications = $manufacturersService->accounts_languages_productCertifications;
30 * </code>
31 */
32class AccountsLanguagesProductCertifications extends \Google\Service\Resource
33{
34 /**
35 * Deletes a product certification by its name. This method can only be called
36 * by certification bodies. (productCertifications.delete)
37 *
38 * @param string $name Required. The name of the product certification to
39 * delete. Format:
40 * accounts/{account}/languages/{language_code}/productCertifications/{id}
41 * @param array $optParams Optional parameters.
42 * @return ManufacturersEmpty
43 * @throws \Google\Service\Exception
44 */
45 public function delete($name, $optParams = [])
46 {
47 $params = ['name' => $name];
48 $params = array_merge($params, $optParams);
49 return $this->call('delete', [$params], ManufacturersEmpty::class);
50 }
51 /**
52 * Gets a product certification by its name. This method can only be called by
53 * certification bodies. (productCertifications.get)
54 *
55 * @param string $name Required. The name of the product certification to get.
56 * Format:
57 * accounts/{account}/languages/{language_code}/productCertifications/{id}
58 * @param array $optParams Optional parameters.
59 * @return ProductCertification
60 * @throws \Google\Service\Exception
61 */
62 public function get($name, $optParams = [])
63 {
64 $params = ['name' => $name];
65 $params = array_merge($params, $optParams);
66 return $this->call('get', [$params], ProductCertification::class);
67 }
68 /**
69 * Lists product certifications from a specified certification body. This method
70 * can only be called by certification bodies.
71 * (productCertifications.listAccountsLanguagesProductCertifications)
72 *
73 * @param string $parent Required. The parent, which owns this collection of
74 * product certifications. Format: accounts/{account}/languages/{language_code}
75 * @param array $optParams Optional parameters.
76 *
77 * @opt_param int pageSize Optional. The maximum number of product
78 * certifications to return. The service may return fewer than this value. If
79 * unspecified, at most 50 product certifications will be returned. The maximum
80 * value is 1000; values above 1000 will be coerced to 1000.
81 * @opt_param string pageToken Optional. A page token, received from a previous
82 * `ListProductCertifications` call. Provide this to retrieve the subsequent
83 * page. When paginating, all other parameters provided to
84 * `ListProductCertifications` must match the call that provided the page token.
85 * Required if requesting the second or higher page.
86 * @return ListProductCertificationsResponse
87 * @throws \Google\Service\Exception
88 */
89 public function listAccountsLanguagesProductCertifications($parent, $optParams = [])
90 {
91 $params = ['parent' => $parent];
92 $params = array_merge($params, $optParams);
93 return $this->call('list', [$params], ListProductCertificationsResponse::class);
94 }
95 /**
96 * Updates (or creates if allow_missing = true) a product certification which
97 * links certifications with products. This method can only be called by
98 * certification bodies. (productCertifications.patch)
99 *
100 * @param string $name Required. The unique name identifier of a product
101 * certification Format:
102 * accounts/{account}/languages/{language_code}/productCertifications/{id} Where
103 * `id` is a some unique identifier and `language_code` is a 2-letter ISO 639-1
104 * code of a Shopping supported language according to
105 * https://support.google.com/merchants/answer/160637.
106 * @param ProductCertification $postBody
107 * @param array $optParams Optional parameters.
108 *
109 * @opt_param string updateMask Optional. The list of fields to update according
110 * to aip.dev/134. However, only full update is supported as of right now.
111 * Therefore, it can be either ignored or set to "*". Setting any other values
112 * will returns UNIMPLEMENTED error.
113 * @return ProductCertification
114 * @throws \Google\Service\Exception
115 */
116 public function patch($name, ProductCertification $postBody, $optParams = [])
117 {
118 $params = ['name' => $name, 'postBody' => $postBody];
119 $params = array_merge($params, $optParams);
120 return $this->call('patch', [$params], ProductCertification::class);
121 }
122}
123
124// Adding a class alias for backwards compatibility with the previous class name.
125class_alias(AccountsLanguagesProductCertifications::class, 'Google_Service_ManufacturerCenter_Resource_AccountsLanguagesProductCertifications');
Note: See TracBrowser for help on using the repository browser.