[e3d4e0a] | 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\AndroidProvisioningPartner\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\AndroidProvisioningPartner\Company;
|
---|
| 21 | use Google\Service\AndroidProvisioningPartner\CreateCustomerRequest;
|
---|
| 22 | use Google\Service\AndroidProvisioningPartner\ListCustomersResponse;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "customers" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $androiddeviceprovisioningService = new Google\Service\AndroidProvisioningPartner(...);
|
---|
| 29 | * $customers = $androiddeviceprovisioningService->partners_customers;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class PartnersCustomers extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a customer for zero-touch enrollment. After the method returns
|
---|
| 36 | * successfully, admin and owner roles can manage devices and EMM configs by
|
---|
| 37 | * calling API methods or using their zero-touch enrollment portal. The customer
|
---|
| 38 | * receives an email that welcomes them to zero-touch enrollment and explains
|
---|
| 39 | * how to sign into the portal. (customers.create)
|
---|
| 40 | *
|
---|
| 41 | * @param string $parent Required. The parent resource ID in the format
|
---|
| 42 | * `partners/[PARTNER_ID]` that identifies the reseller.
|
---|
| 43 | * @param CreateCustomerRequest $postBody
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | * @return Company
|
---|
| 46 | * @throws \Google\Service\Exception
|
---|
| 47 | */
|
---|
| 48 | public function create($parent, CreateCustomerRequest $postBody, $optParams = [])
|
---|
| 49 | {
|
---|
| 50 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 51 | $params = array_merge($params, $optParams);
|
---|
| 52 | return $this->call('create', [$params], Company::class);
|
---|
| 53 | }
|
---|
| 54 | /**
|
---|
| 55 | * Lists the customers that are enrolled to the reseller identified by the
|
---|
| 56 | * `partnerId` argument. This list includes customers that the reseller created
|
---|
| 57 | * and customers that enrolled themselves using the portal.
|
---|
| 58 | * (customers.listPartnersCustomers)
|
---|
| 59 | *
|
---|
| 60 | * @param string $partnerId Required. The ID of the reseller partner.
|
---|
| 61 | * @param array $optParams Optional parameters.
|
---|
| 62 | *
|
---|
| 63 | * @opt_param int pageSize The maximum number of results to be returned. If not
|
---|
| 64 | * specified or 0, all the records are returned.
|
---|
| 65 | * @opt_param string pageToken A token identifying a page of results returned by
|
---|
| 66 | * the server.
|
---|
| 67 | * @return ListCustomersResponse
|
---|
| 68 | * @throws \Google\Service\Exception
|
---|
| 69 | */
|
---|
| 70 | public function listPartnersCustomers($partnerId, $optParams = [])
|
---|
| 71 | {
|
---|
| 72 | $params = ['partnerId' => $partnerId];
|
---|
| 73 | $params = array_merge($params, $optParams);
|
---|
| 74 | return $this->call('list', [$params], ListCustomersResponse::class);
|
---|
| 75 | }
|
---|
| 76 | }
|
---|
| 77 |
|
---|
| 78 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 79 | class_alias(PartnersCustomers::class, 'Google_Service_AndroidProvisioningPartner_Resource_PartnersCustomers');
|
---|