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\Cloudchannel\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Cloudchannel\GoogleCloudChannelV1ActivateEntitlementRequest;
|
---|
21 | use Google\Service\Cloudchannel\GoogleCloudChannelV1CancelEntitlementRequest;
|
---|
22 | use Google\Service\Cloudchannel\GoogleCloudChannelV1ChangeOfferRequest;
|
---|
23 | use Google\Service\Cloudchannel\GoogleCloudChannelV1ChangeParametersRequest;
|
---|
24 | use Google\Service\Cloudchannel\GoogleCloudChannelV1ChangeRenewalSettingsRequest;
|
---|
25 | use Google\Service\Cloudchannel\GoogleCloudChannelV1CreateEntitlementRequest;
|
---|
26 | use Google\Service\Cloudchannel\GoogleCloudChannelV1Entitlement;
|
---|
27 | use Google\Service\Cloudchannel\GoogleCloudChannelV1ListEntitlementChangesResponse;
|
---|
28 | use Google\Service\Cloudchannel\GoogleCloudChannelV1ListEntitlementsResponse;
|
---|
29 | use Google\Service\Cloudchannel\GoogleCloudChannelV1Offer;
|
---|
30 | use Google\Service\Cloudchannel\GoogleCloudChannelV1StartPaidServiceRequest;
|
---|
31 | use Google\Service\Cloudchannel\GoogleCloudChannelV1SuspendEntitlementRequest;
|
---|
32 | use Google\Service\Cloudchannel\GoogleLongrunningOperation;
|
---|
33 |
|
---|
34 | /**
|
---|
35 | * The "entitlements" collection of methods.
|
---|
36 | * Typical usage is:
|
---|
37 | * <code>
|
---|
38 | * $cloudchannelService = new Google\Service\Cloudchannel(...);
|
---|
39 | * $entitlements = $cloudchannelService->accounts_customers_entitlements;
|
---|
40 | * </code>
|
---|
41 | */
|
---|
42 | class AccountsCustomersEntitlements extends \Google\Service\Resource
|
---|
43 | {
|
---|
44 | /**
|
---|
45 | * Activates a previously suspended entitlement. Entitlements suspended for
|
---|
46 | * pending ToS acceptance can't be activated using this method. An entitlement
|
---|
47 | * activation is a long-running operation and it updates the state of the
|
---|
48 | * customer entitlement. Possible error codes: * PERMISSION_DENIED: The reseller
|
---|
49 | * account making the request is different from the reseller account in the API
|
---|
50 | * request. * INVALID_ARGUMENT: Required request parameters are missing or
|
---|
51 | * invalid. * NOT_FOUND: Entitlement resource not found. *
|
---|
52 | * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated
|
---|
53 | * suspensions and entitlements that have accepted the TOS. * NOT_SUSPENDED: Can
|
---|
54 | * only activate suspended entitlements not in an ACTIVE state. * INTERNAL: Any
|
---|
55 | * non-user error related to a technical issue in the backend. Contact Cloud
|
---|
56 | * Channel support. * UNKNOWN: Any non-user error related to a technical issue
|
---|
57 | * in the backend. Contact Cloud Channel support. Return value: The ID of a
|
---|
58 | * long-running operation. To get the results of the operation, call the
|
---|
59 | * GetOperation method of CloudChannelOperationsService. The Operation metadata
|
---|
60 | * will contain an instance of OperationMetadata. (entitlements.activate)
|
---|
61 | *
|
---|
62 | * @param string $name Required. The resource name of the entitlement to
|
---|
63 | * activate. Name uses the format:
|
---|
64 | * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
|
---|
65 | * @param GoogleCloudChannelV1ActivateEntitlementRequest $postBody
|
---|
66 | * @param array $optParams Optional parameters.
|
---|
67 | * @return GoogleLongrunningOperation
|
---|
68 | * @throws \Google\Service\Exception
|
---|
69 | */
|
---|
70 | public function activate($name, GoogleCloudChannelV1ActivateEntitlementRequest $postBody, $optParams = [])
|
---|
71 | {
|
---|
72 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
73 | $params = array_merge($params, $optParams);
|
---|
74 | return $this->call('activate', [$params], GoogleLongrunningOperation::class);
|
---|
75 | }
|
---|
76 | /**
|
---|
77 | * Cancels a previously fulfilled entitlement. An entitlement cancellation is a
|
---|
78 | * long-running operation. Possible error codes: * PERMISSION_DENIED: The
|
---|
79 | * reseller account making the request is different from the reseller account in
|
---|
80 | * the API request. * FAILED_PRECONDITION: There are Google Cloud projects
|
---|
81 | * linked to the Google Cloud entitlement's Cloud Billing subaccount. *
|
---|
82 | * INVALID_ARGUMENT: Required request parameters are missing or invalid. *
|
---|
83 | * NOT_FOUND: Entitlement resource not found. * DELETION_TYPE_NOT_ALLOWED:
|
---|
84 | * Cancel is only allowed for Google Workspace add-ons, or entitlements for
|
---|
85 | * Google Cloud's development platform. * INTERNAL: Any non-user error related
|
---|
86 | * to a technical issue in the backend. Contact Cloud Channel support. *
|
---|
87 | * UNKNOWN: Any non-user error related to a technical issue in the backend.
|
---|
88 | * Contact Cloud Channel support. Return value: The ID of a long-running
|
---|
89 | * operation. To get the results of the operation, call the GetOperation method
|
---|
90 | * of CloudChannelOperationsService. The response will contain
|
---|
91 | * google.protobuf.Empty on success. The Operation metadata will contain an
|
---|
92 | * instance of OperationMetadata. (entitlements.cancel)
|
---|
93 | *
|
---|
94 | * @param string $name Required. The resource name of the entitlement to cancel.
|
---|
95 | * Name uses the format:
|
---|
96 | * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
|
---|
97 | * @param GoogleCloudChannelV1CancelEntitlementRequest $postBody
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | * @return GoogleLongrunningOperation
|
---|
100 | * @throws \Google\Service\Exception
|
---|
101 | */
|
---|
102 | public function cancel($name, GoogleCloudChannelV1CancelEntitlementRequest $postBody, $optParams = [])
|
---|
103 | {
|
---|
104 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
105 | $params = array_merge($params, $optParams);
|
---|
106 | return $this->call('cancel', [$params], GoogleLongrunningOperation::class);
|
---|
107 | }
|
---|
108 | /**
|
---|
109 | * Updates the Offer for an existing customer entitlement. An entitlement update
|
---|
110 | * is a long-running operation and it updates the entitlement as a result of
|
---|
111 | * fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't
|
---|
112 | * belong to the reseller. * INVALID_ARGUMENT: Required request parameters are
|
---|
113 | * missing or invalid. * NOT_FOUND: Offer or Entitlement resource not found. *
|
---|
114 | * INTERNAL: Any non-user error related to a technical issue in the backend.
|
---|
115 | * Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a
|
---|
116 | * technical issue in the backend. Contact Cloud Channel support. Return value:
|
---|
117 | * The ID of a long-running operation. To get the results of the operation, call
|
---|
118 | * the GetOperation method of CloudChannelOperationsService. The Operation
|
---|
119 | * metadata will contain an instance of OperationMetadata.
|
---|
120 | * (entitlements.changeOffer)
|
---|
121 | *
|
---|
122 | * @param string $name Required. The resource name of the entitlement to update.
|
---|
123 | * Name uses the format:
|
---|
124 | * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
|
---|
125 | * @param GoogleCloudChannelV1ChangeOfferRequest $postBody
|
---|
126 | * @param array $optParams Optional parameters.
|
---|
127 | * @return GoogleLongrunningOperation
|
---|
128 | * @throws \Google\Service\Exception
|
---|
129 | */
|
---|
130 | public function changeOffer($name, GoogleCloudChannelV1ChangeOfferRequest $postBody, $optParams = [])
|
---|
131 | {
|
---|
132 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
133 | $params = array_merge($params, $optParams);
|
---|
134 | return $this->call('changeOffer', [$params], GoogleLongrunningOperation::class);
|
---|
135 | }
|
---|
136 | /**
|
---|
137 | * Change parameters of the entitlement. An entitlement update is a long-running
|
---|
138 | * operation and it updates the entitlement as a result of fulfillment. Possible
|
---|
139 | * error codes: * PERMISSION_DENIED: The customer doesn't belong to the
|
---|
140 | * reseller. * INVALID_ARGUMENT: Required request parameters are missing or
|
---|
141 | * invalid. For example, the number of seats being changed is greater than the
|
---|
142 | * allowed number of max seats, or decreasing seats for a commitment based plan.
|
---|
143 | * * NOT_FOUND: Entitlement resource not found. * INTERNAL: Any non-user error
|
---|
144 | * related to a technical issue in the backend. Contact Cloud Channel support. *
|
---|
145 | * UNKNOWN: Any non-user error related to a technical issue in the backend.
|
---|
146 | * Contact Cloud Channel support. Return value: The ID of a long-running
|
---|
147 | * operation. To get the results of the operation, call the GetOperation method
|
---|
148 | * of CloudChannelOperationsService. The Operation metadata will contain an
|
---|
149 | * instance of OperationMetadata. (entitlements.changeParameters)
|
---|
150 | *
|
---|
151 | * @param string $name Required. The name of the entitlement to update. Name
|
---|
152 | * uses the format:
|
---|
153 | * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
|
---|
154 | * @param GoogleCloudChannelV1ChangeParametersRequest $postBody
|
---|
155 | * @param array $optParams Optional parameters.
|
---|
156 | * @return GoogleLongrunningOperation
|
---|
157 | * @throws \Google\Service\Exception
|
---|
158 | */
|
---|
159 | public function changeParameters($name, GoogleCloudChannelV1ChangeParametersRequest $postBody, $optParams = [])
|
---|
160 | {
|
---|
161 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
162 | $params = array_merge($params, $optParams);
|
---|
163 | return $this->call('changeParameters', [$params], GoogleLongrunningOperation::class);
|
---|
164 | }
|
---|
165 | /**
|
---|
166 | * Updates the renewal settings for an existing customer entitlement. An
|
---|
167 | * entitlement update is a long-running operation and it updates the entitlement
|
---|
168 | * as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The
|
---|
169 | * customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request
|
---|
170 | * parameters are missing or invalid. * NOT_FOUND: Entitlement resource not
|
---|
171 | * found. * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a
|
---|
172 | * commitment plan. Can't enable or disable renewals for non-commitment plans. *
|
---|
173 | * INTERNAL: Any non-user error related to a technical issue in the backend.
|
---|
174 | * Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a
|
---|
175 | * technical issue in the backend. Contact Cloud Channel support. Return value:
|
---|
176 | * The ID of a long-running operation. To get the results of the operation, call
|
---|
177 | * the GetOperation method of CloudChannelOperationsService. The Operation
|
---|
178 | * metadata will contain an instance of OperationMetadata.
|
---|
179 | * (entitlements.changeRenewalSettings)
|
---|
180 | *
|
---|
181 | * @param string $name Required. The name of the entitlement to update. Name
|
---|
182 | * uses the format:
|
---|
183 | * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
|
---|
184 | * @param GoogleCloudChannelV1ChangeRenewalSettingsRequest $postBody
|
---|
185 | * @param array $optParams Optional parameters.
|
---|
186 | * @return GoogleLongrunningOperation
|
---|
187 | * @throws \Google\Service\Exception
|
---|
188 | */
|
---|
189 | public function changeRenewalSettings($name, GoogleCloudChannelV1ChangeRenewalSettingsRequest $postBody, $optParams = [])
|
---|
190 | {
|
---|
191 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
192 | $params = array_merge($params, $optParams);
|
---|
193 | return $this->call('changeRenewalSettings', [$params], GoogleLongrunningOperation::class);
|
---|
194 | }
|
---|
195 | /**
|
---|
196 | * Creates an entitlement for a customer. Possible error codes: *
|
---|
197 | * PERMISSION_DENIED: * The customer doesn't belong to the reseller. * The
|
---|
198 | * reseller is not authorized to transact on this Product. See
|
---|
199 | * https://support.google.com/channelservices/answer/9759265 * INVALID_ARGUMENT:
|
---|
200 | * * Required request parameters are missing or invalid. * There is already a
|
---|
201 | * customer entitlement for a SKU from the same product family. * INVALID_VALUE:
|
---|
202 | * Make sure the OfferId is valid. If it is, contact Google Channel support for
|
---|
203 | * further troubleshooting. * NOT_FOUND: The customer or offer resource was not
|
---|
204 | * found. * ALREADY_EXISTS: * The SKU was already purchased for the customer. *
|
---|
205 | * The customer's primary email already exists. Retry after changing the
|
---|
206 | * customer's primary contact email. * CONDITION_NOT_MET or FAILED_PRECONDITION:
|
---|
207 | * * The domain required for purchasing a SKU has not been verified. * A pre-
|
---|
208 | * requisite SKU required to purchase an Add-On SKU is missing. For example,
|
---|
209 | * Google Workspace Business Starter is required to purchase Vault or Drive. *
|
---|
210 | * (Developer accounts only) Reseller and resold domain must meet the following
|
---|
211 | * naming requirements: * Domain names must start with goog-test. * Domain names
|
---|
212 | * must include the reseller domain. * INTERNAL: Any non-user error related to a
|
---|
213 | * technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any
|
---|
214 | * non-user error related to a technical issue in the backend. Contact Cloud
|
---|
215 | * Channel support. Return value: The ID of a long-running operation. To get the
|
---|
216 | * results of the operation, call the GetOperation method of
|
---|
217 | * CloudChannelOperationsService. The Operation metadata will contain an
|
---|
218 | * instance of OperationMetadata. (entitlements.create)
|
---|
219 | *
|
---|
220 | * @param string $parent Required. The resource name of the reseller's customer
|
---|
221 | * account in which to create the entitlement. Parent uses the format:
|
---|
222 | * accounts/{account_id}/customers/{customer_id}
|
---|
223 | * @param GoogleCloudChannelV1CreateEntitlementRequest $postBody
|
---|
224 | * @param array $optParams Optional parameters.
|
---|
225 | * @return GoogleLongrunningOperation
|
---|
226 | * @throws \Google\Service\Exception
|
---|
227 | */
|
---|
228 | public function create($parent, GoogleCloudChannelV1CreateEntitlementRequest $postBody, $optParams = [])
|
---|
229 | {
|
---|
230 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
231 | $params = array_merge($params, $optParams);
|
---|
232 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
233 | }
|
---|
234 | /**
|
---|
235 | * Returns the requested Entitlement resource. Possible error codes: *
|
---|
236 | * PERMISSION_DENIED: The customer doesn't belong to the reseller. *
|
---|
237 | * INVALID_ARGUMENT: Required request parameters are missing or invalid. *
|
---|
238 | * NOT_FOUND: The customer entitlement was not found. Return value: The
|
---|
239 | * requested Entitlement resource. (entitlements.get)
|
---|
240 | *
|
---|
241 | * @param string $name Required. The resource name of the entitlement to
|
---|
242 | * retrieve. Name uses the format:
|
---|
243 | * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
|
---|
244 | * @param array $optParams Optional parameters.
|
---|
245 | * @return GoogleCloudChannelV1Entitlement
|
---|
246 | * @throws \Google\Service\Exception
|
---|
247 | */
|
---|
248 | public function get($name, $optParams = [])
|
---|
249 | {
|
---|
250 | $params = ['name' => $name];
|
---|
251 | $params = array_merge($params, $optParams);
|
---|
252 | return $this->call('get', [$params], GoogleCloudChannelV1Entitlement::class);
|
---|
253 | }
|
---|
254 | /**
|
---|
255 | * Lists Entitlements belonging to a customer. Possible error codes: *
|
---|
256 | * PERMISSION_DENIED: The customer doesn't belong to the reseller. *
|
---|
257 | * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return
|
---|
258 | * value: A list of the customer's Entitlements.
|
---|
259 | * (entitlements.listAccountsCustomersEntitlements)
|
---|
260 | *
|
---|
261 | * @param string $parent Required. The resource name of the reseller's customer
|
---|
262 | * account to list entitlements for. Parent uses the format:
|
---|
263 | * accounts/{account_id}/customers/{customer_id}
|
---|
264 | * @param array $optParams Optional parameters.
|
---|
265 | *
|
---|
266 | * @opt_param int pageSize Optional. Requested page size. Server might return
|
---|
267 | * fewer results than requested. If unspecified, return at most 50 entitlements.
|
---|
268 | * The maximum value is 100; the server will coerce values above 100.
|
---|
269 | * @opt_param string pageToken Optional. A token for a page of results other
|
---|
270 | * than the first page. Obtained using ListEntitlementsResponse.next_page_token
|
---|
271 | * of the previous CloudChannelService.ListEntitlements call.
|
---|
272 | * @return GoogleCloudChannelV1ListEntitlementsResponse
|
---|
273 | * @throws \Google\Service\Exception
|
---|
274 | */
|
---|
275 | public function listAccountsCustomersEntitlements($parent, $optParams = [])
|
---|
276 | {
|
---|
277 | $params = ['parent' => $parent];
|
---|
278 | $params = array_merge($params, $optParams);
|
---|
279 | return $this->call('list', [$params], GoogleCloudChannelV1ListEntitlementsResponse::class);
|
---|
280 | }
|
---|
281 | /**
|
---|
282 | * List entitlement history. Possible error codes: * PERMISSION_DENIED: The
|
---|
283 | * reseller account making the request and the provided reseller account are
|
---|
284 | * different. * INVALID_ARGUMENT: Missing or invalid required fields in the
|
---|
285 | * request. * NOT_FOUND: The parent resource doesn't exist. Usually the result
|
---|
286 | * of an invalid name parameter. * INTERNAL: Any non-user error related to a
|
---|
287 | * technical issue in the backend. In this case, contact CloudChannel support. *
|
---|
288 | * UNKNOWN: Any non-user error related to a technical issue in the backend. In
|
---|
289 | * this case, contact Cloud Channel support. Return value: List of
|
---|
290 | * EntitlementChanges. (entitlements.listEntitlementChanges)
|
---|
291 | *
|
---|
292 | * @param string $parent Required. The resource name of the entitlement for
|
---|
293 | * which to list entitlement changes. The `-` wildcard may be used to match
|
---|
294 | * entitlements across a customer. Formats: *
|
---|
295 | * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} *
|
---|
296 | * accounts/{account_id}/customers/{customer_id}/entitlements/-
|
---|
297 | * @param array $optParams Optional parameters.
|
---|
298 | *
|
---|
299 | * @opt_param string filter Optional. Filters applied to the list results.
|
---|
300 | * @opt_param int pageSize Optional. The maximum number of entitlement changes
|
---|
301 | * to return. The service may return fewer than this value. If unspecified,
|
---|
302 | * returns at most 10 entitlement changes. The maximum value is 50; the server
|
---|
303 | * will coerce values above 50.
|
---|
304 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
305 | * CloudChannelService.ListEntitlementChanges call. Provide this to retrieve the
|
---|
306 | * subsequent page. When paginating, all other parameters provided to
|
---|
307 | * CloudChannelService.ListEntitlementChanges must match the call that provided
|
---|
308 | * the page token.
|
---|
309 | * @return GoogleCloudChannelV1ListEntitlementChangesResponse
|
---|
310 | * @throws \Google\Service\Exception
|
---|
311 | */
|
---|
312 | public function listEntitlementChanges($parent, $optParams = [])
|
---|
313 | {
|
---|
314 | $params = ['parent' => $parent];
|
---|
315 | $params = array_merge($params, $optParams);
|
---|
316 | return $this->call('listEntitlementChanges', [$params], GoogleCloudChannelV1ListEntitlementChangesResponse::class);
|
---|
317 | }
|
---|
318 | /**
|
---|
319 | * Returns the requested Offer resource. Possible error codes: *
|
---|
320 | * PERMISSION_DENIED: The entitlement doesn't belong to the reseller. *
|
---|
321 | * INVALID_ARGUMENT: Required request parameters are missing or invalid. *
|
---|
322 | * NOT_FOUND: Entitlement or offer was not found. Return value: The Offer
|
---|
323 | * resource. (entitlements.lookupOffer)
|
---|
324 | *
|
---|
325 | * @param string $entitlement Required. The resource name of the entitlement to
|
---|
326 | * retrieve the Offer. Entitlement uses the format:
|
---|
327 | * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
|
---|
328 | * @param array $optParams Optional parameters.
|
---|
329 | * @return GoogleCloudChannelV1Offer
|
---|
330 | * @throws \Google\Service\Exception
|
---|
331 | */
|
---|
332 | public function lookupOffer($entitlement, $optParams = [])
|
---|
333 | {
|
---|
334 | $params = ['entitlement' => $entitlement];
|
---|
335 | $params = array_merge($params, $optParams);
|
---|
336 | return $this->call('lookupOffer', [$params], GoogleCloudChannelV1Offer::class);
|
---|
337 | }
|
---|
338 | /**
|
---|
339 | * Starts paid service for a trial entitlement. Starts paid service for a trial
|
---|
340 | * entitlement immediately. This method is only applicable if a plan is set up
|
---|
341 | * for a trial entitlement but has some trial days remaining. Possible error
|
---|
342 | * codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. *
|
---|
343 | * INVALID_ARGUMENT: Required request parameters are missing or invalid. *
|
---|
344 | * NOT_FOUND: Entitlement resource not found. *
|
---|
345 | * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on
|
---|
346 | * trial plans. * INTERNAL: Any non-user error related to a technical issue in
|
---|
347 | * the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error
|
---|
348 | * related to a technical issue in the backend. Contact Cloud Channel support.
|
---|
349 | * Return value: The ID of a long-running operation. To get the results of the
|
---|
350 | * operation, call the GetOperation method of CloudChannelOperationsService. The
|
---|
351 | * Operation metadata will contain an instance of OperationMetadata.
|
---|
352 | * (entitlements.startPaidService)
|
---|
353 | *
|
---|
354 | * @param string $name Required. The name of the entitlement to start a paid
|
---|
355 | * service for. Name uses the format:
|
---|
356 | * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
|
---|
357 | * @param GoogleCloudChannelV1StartPaidServiceRequest $postBody
|
---|
358 | * @param array $optParams Optional parameters.
|
---|
359 | * @return GoogleLongrunningOperation
|
---|
360 | * @throws \Google\Service\Exception
|
---|
361 | */
|
---|
362 | public function startPaidService($name, GoogleCloudChannelV1StartPaidServiceRequest $postBody, $optParams = [])
|
---|
363 | {
|
---|
364 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
365 | $params = array_merge($params, $optParams);
|
---|
366 | return $this->call('startPaidService', [$params], GoogleLongrunningOperation::class);
|
---|
367 | }
|
---|
368 | /**
|
---|
369 | * Suspends a previously fulfilled entitlement. An entitlement suspension is a
|
---|
370 | * long-running operation. Possible error codes: * PERMISSION_DENIED: The
|
---|
371 | * customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request
|
---|
372 | * parameters are missing or invalid. * NOT_FOUND: Entitlement resource not
|
---|
373 | * found. * NOT_ACTIVE: Entitlement is not active. * INTERNAL: Any non-user
|
---|
374 | * error related to a technical issue in the backend. Contact Cloud Channel
|
---|
375 | * support. * UNKNOWN: Any non-user error related to a technical issue in the
|
---|
376 | * backend. Contact Cloud Channel support. Return value: The ID of a long-
|
---|
377 | * running operation. To get the results of the operation, call the GetOperation
|
---|
378 | * method of CloudChannelOperationsService. The Operation metadata will contain
|
---|
379 | * an instance of OperationMetadata. (entitlements.suspend)
|
---|
380 | *
|
---|
381 | * @param string $name Required. The resource name of the entitlement to
|
---|
382 | * suspend. Name uses the format:
|
---|
383 | * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
|
---|
384 | * @param GoogleCloudChannelV1SuspendEntitlementRequest $postBody
|
---|
385 | * @param array $optParams Optional parameters.
|
---|
386 | * @return GoogleLongrunningOperation
|
---|
387 | * @throws \Google\Service\Exception
|
---|
388 | */
|
---|
389 | public function suspend($name, GoogleCloudChannelV1SuspendEntitlementRequest $postBody, $optParams = [])
|
---|
390 | {
|
---|
391 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
392 | $params = array_merge($params, $optParams);
|
---|
393 | return $this->call('suspend', [$params], GoogleLongrunningOperation::class);
|
---|
394 | }
|
---|
395 | }
|
---|
396 |
|
---|
397 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
398 | class_alias(AccountsCustomersEntitlements::class, 'Google_Service_Cloudchannel_Resource_AccountsCustomersEntitlements');
|
---|