[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\Apigee\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Apigee\GoogleCloudApigeeV1DeveloperSubscription;
|
---|
| 21 | use Google\Service\Apigee\GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest;
|
---|
| 22 | use Google\Service\Apigee\GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "subscriptions" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
| 29 | * $subscriptions = $apigeeService->organizations_developers_subscriptions;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class OrganizationsDevelopersSubscriptions extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a subscription to an API product. (subscriptions.create)
|
---|
| 36 | *
|
---|
| 37 | * @param string $parent Required. Email address of the developer that is
|
---|
| 38 | * purchasing a subscription to the API product. Use the following structure in
|
---|
| 39 | * your request: `organizations/{org}/developers/{developer_email}`
|
---|
| 40 | * @param GoogleCloudApigeeV1DeveloperSubscription $postBody
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | * @return GoogleCloudApigeeV1DeveloperSubscription
|
---|
| 43 | * @throws \Google\Service\Exception
|
---|
| 44 | */
|
---|
| 45 | public function create($parent, GoogleCloudApigeeV1DeveloperSubscription $postBody, $optParams = [])
|
---|
| 46 | {
|
---|
| 47 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 48 | $params = array_merge($params, $optParams);
|
---|
| 49 | return $this->call('create', [$params], GoogleCloudApigeeV1DeveloperSubscription::class);
|
---|
| 50 | }
|
---|
| 51 | /**
|
---|
| 52 | * Expires an API product subscription immediately. (subscriptions.expire)
|
---|
| 53 | *
|
---|
| 54 | * @param string $name Required. Name of the API product subscription. Use the
|
---|
| 55 | * following structure in your request: `organizations/{org}/developers/{develop
|
---|
| 56 | * er_email}/subscriptions/{subscription}`
|
---|
| 57 | * @param GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest $postBody
|
---|
| 58 | * @param array $optParams Optional parameters.
|
---|
| 59 | * @return GoogleCloudApigeeV1DeveloperSubscription
|
---|
| 60 | * @throws \Google\Service\Exception
|
---|
| 61 | */
|
---|
| 62 | public function expire($name, GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest $postBody, $optParams = [])
|
---|
| 63 | {
|
---|
| 64 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 65 | $params = array_merge($params, $optParams);
|
---|
| 66 | return $this->call('expire', [$params], GoogleCloudApigeeV1DeveloperSubscription::class);
|
---|
| 67 | }
|
---|
| 68 | /**
|
---|
| 69 | * Gets details for an API product subscription. (subscriptions.get)
|
---|
| 70 | *
|
---|
| 71 | * @param string $name Required. Name of the API product subscription. Use the
|
---|
| 72 | * following structure in your request: `organizations/{org}/developers/{develop
|
---|
| 73 | * er_email}/subscriptions/{subscription}`
|
---|
| 74 | * @param array $optParams Optional parameters.
|
---|
| 75 | * @return GoogleCloudApigeeV1DeveloperSubscription
|
---|
| 76 | * @throws \Google\Service\Exception
|
---|
| 77 | */
|
---|
| 78 | public function get($name, $optParams = [])
|
---|
| 79 | {
|
---|
| 80 | $params = ['name' => $name];
|
---|
| 81 | $params = array_merge($params, $optParams);
|
---|
| 82 | return $this->call('get', [$params], GoogleCloudApigeeV1DeveloperSubscription::class);
|
---|
| 83 | }
|
---|
| 84 | /**
|
---|
| 85 | * Lists all API product subscriptions for a developer.
|
---|
| 86 | * (subscriptions.listOrganizationsDevelopersSubscriptions)
|
---|
| 87 | *
|
---|
| 88 | * @param string $parent Required. Email address of the developer. Use the
|
---|
| 89 | * following structure in your request:
|
---|
| 90 | * `organizations/{org}/developers/{developer_email}`
|
---|
| 91 | * @param array $optParams Optional parameters.
|
---|
| 92 | *
|
---|
| 93 | * @opt_param int count Number of API product subscriptions to return in the API
|
---|
| 94 | * call. Use with `startKey` to provide more targeted filtering. Defaults to
|
---|
| 95 | * 100. The maximum limit is 1000.
|
---|
| 96 | * @opt_param string startKey Name of the API product subscription from which to
|
---|
| 97 | * start displaying the list of subscriptions. If omitted, the list starts from
|
---|
| 98 | * the first item. For example, to view the API product subscriptions from
|
---|
| 99 | * 51-150, set the value of `startKey` to the name of the 51st subscription and
|
---|
| 100 | * set the value of `count` to 100.
|
---|
| 101 | * @return GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse
|
---|
| 102 | * @throws \Google\Service\Exception
|
---|
| 103 | */
|
---|
| 104 | public function listOrganizationsDevelopersSubscriptions($parent, $optParams = [])
|
---|
| 105 | {
|
---|
| 106 | $params = ['parent' => $parent];
|
---|
| 107 | $params = array_merge($params, $optParams);
|
---|
| 108 | return $this->call('list', [$params], GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse::class);
|
---|
| 109 | }
|
---|
| 110 | }
|
---|
| 111 |
|
---|
| 112 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 113 | class_alias(OrganizationsDevelopersSubscriptions::class, 'Google_Service_Apigee_Resource_OrganizationsDevelopersSubscriptions');
|
---|