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\AndroidProvisioningPartner\Resource;
19
20use Google\Service\AndroidProvisioningPartner\Company;
21use Google\Service\AndroidProvisioningPartner\CreateCustomerRequest;
22use 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->customers;
30 *  </code>
31 */
32class 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   */
47  public function create($parent, CreateCustomerRequest $postBody, $optParams = [])
48  {
49    $params = ['parent' => $parent, 'postBody' => $postBody];
50    $params = array_merge($params, $optParams);
51    return $this->call('create', [$params], Company::class);
52  }
53  /**
54   * Lists the customers that are enrolled to the reseller identified by the
55   * `partnerId` argument. This list includes customers that the reseller created
56   * and customers that enrolled themselves using the portal.
57   * (customers.listPartnersCustomers)
58   *
59   * @param string $partnerId Required. The ID of the reseller partner.
60   * @param array $optParams Optional parameters.
61   *
62   * @opt_param int pageSize The maximum number of results to be returned. If not
63   * specified or 0, all the records are returned.
64   * @opt_param string pageToken A token identifying a page of results returned by
65   * the server.
66   * @return ListCustomersResponse
67   */
68  public function listPartnersCustomers($partnerId, $optParams = [])
69  {
70    $params = ['partnerId' => $partnerId];
71    $params = array_merge($params, $optParams);
72    return $this->call('list', [$params], ListCustomersResponse::class);
73  }
74}
75
76// Adding a class alias for backwards compatibility with the previous class name.
77class_alias(PartnersCustomers::class, 'Google_Service_AndroidProvisioningPartner_Resource_PartnersCustomers');
78