source: vendor/google/apiclient-services/src/ShoppingContent/Resource/Conversionsources.php

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

Upload project files

  • Property mode set to 100644
File size: 6.0 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\ShoppingContent\Resource;
19
20use Google\Service\ShoppingContent\ConversionSource;
21use Google\Service\ShoppingContent\ListConversionSourcesResponse;
22use Google\Service\ShoppingContent\UndeleteConversionSourceRequest;
23
24/**
25 * The "conversionsources" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $contentService = new Google\Service\ShoppingContent(...);
29 * $conversionsources = $contentService->conversionsources;
30 * </code>
31 */
32class Conversionsources extends \Google\Service\Resource
33{
34 /**
35 * Creates a new conversion source. (conversionsources.create)
36 *
37 * @param string $merchantId Required. The ID of the account that owns the new
38 * conversion source.
39 * @param ConversionSource $postBody
40 * @param array $optParams Optional parameters.
41 * @return ConversionSource
42 * @throws \Google\Service\Exception
43 */
44 public function create($merchantId, ConversionSource $postBody, $optParams = [])
45 {
46 $params = ['merchantId' => $merchantId, 'postBody' => $postBody];
47 $params = array_merge($params, $optParams);
48 return $this->call('create', [$params], ConversionSource::class);
49 }
50 /**
51 * Archives an existing conversion source. It will be recoverable for 30 days.
52 * This archiving behavior is not typical in the Content API and unique to this
53 * service. (conversionsources.delete)
54 *
55 * @param string $merchantId Required. The ID of the account that owns the new
56 * conversion source.
57 * @param string $conversionSourceId Required. The ID of the conversion source
58 * to be deleted.
59 * @param array $optParams Optional parameters.
60 * @throws \Google\Service\Exception
61 */
62 public function delete($merchantId, $conversionSourceId, $optParams = [])
63 {
64 $params = ['merchantId' => $merchantId, 'conversionSourceId' => $conversionSourceId];
65 $params = array_merge($params, $optParams);
66 return $this->call('delete', [$params]);
67 }
68 /**
69 * Fetches a conversion source. (conversionsources.get)
70 *
71 * @param string $merchantId Required. The ID of the account that owns the new
72 * conversion source.
73 * @param string $conversionSourceId Required. The REST ID of the collection.
74 * @param array $optParams Optional parameters.
75 * @return ConversionSource
76 * @throws \Google\Service\Exception
77 */
78 public function get($merchantId, $conversionSourceId, $optParams = [])
79 {
80 $params = ['merchantId' => $merchantId, 'conversionSourceId' => $conversionSourceId];
81 $params = array_merge($params, $optParams);
82 return $this->call('get', [$params], ConversionSource::class);
83 }
84 /**
85 * Retrieves the list of conversion sources the caller has access to.
86 * (conversionsources.listConversionsources)
87 *
88 * @param string $merchantId Required. The ID of the account that owns the new
89 * conversion source.
90 * @param array $optParams Optional parameters.
91 *
92 * @opt_param int pageSize The maximum number of conversion sources to return in
93 * a page. If no `page_size` is specified, `100` is used as the default value.
94 * The maximum value is `200`. Values above `200` will be coerced to `200`.
95 * Regardless of pagination, at most `200` conversion sources are returned in
96 * total.
97 * @opt_param string pageToken Page token.
98 * @opt_param bool showDeleted If true, also returns archived conversion
99 * sources.
100 * @return ListConversionSourcesResponse
101 * @throws \Google\Service\Exception
102 */
103 public function listConversionsources($merchantId, $optParams = [])
104 {
105 $params = ['merchantId' => $merchantId];
106 $params = array_merge($params, $optParams);
107 return $this->call('list', [$params], ListConversionSourcesResponse::class);
108 }
109 /**
110 * Updates information of an existing conversion source.
111 * (conversionsources.patch)
112 *
113 * @param string $merchantId Required. The ID of the account that owns the new
114 * conversion source.
115 * @param string $conversionSourceId Required. The ID of the conversion source
116 * to be updated.
117 * @param ConversionSource $postBody
118 * @param array $optParams Optional parameters.
119 *
120 * @opt_param string updateMask Optional. List of fields being updated.
121 * @return ConversionSource
122 * @throws \Google\Service\Exception
123 */
124 public function patch($merchantId, $conversionSourceId, ConversionSource $postBody, $optParams = [])
125 {
126 $params = ['merchantId' => $merchantId, 'conversionSourceId' => $conversionSourceId, 'postBody' => $postBody];
127 $params = array_merge($params, $optParams);
128 return $this->call('patch', [$params], ConversionSource::class);
129 }
130 /**
131 * Re-enables an archived conversion source. (conversionsources.undelete)
132 *
133 * @param string $merchantId Required. The ID of the account that owns the new
134 * conversion source.
135 * @param string $conversionSourceId Required. The ID of the conversion source
136 * to be undeleted.
137 * @param UndeleteConversionSourceRequest $postBody
138 * @param array $optParams Optional parameters.
139 * @throws \Google\Service\Exception
140 */
141 public function undelete($merchantId, $conversionSourceId, UndeleteConversionSourceRequest $postBody, $optParams = [])
142 {
143 $params = ['merchantId' => $merchantId, 'conversionSourceId' => $conversionSourceId, 'postBody' => $postBody];
144 $params = array_merge($params, $optParams);
145 return $this->call('undelete', [$params]);
146 }
147}
148
149// Adding a class alias for backwards compatibility with the previous class name.
150class_alias(Conversionsources::class, 'Google_Service_ShoppingContent_Resource_Conversionsources');
Note: See TracBrowser for help on using the repository browser.