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\GoogleCloudApigeeV1AdjustDeveloperBalanceRequest;
|
---|
21 | use Google\Service\Apigee\GoogleCloudApigeeV1CreditDeveloperBalanceRequest;
|
---|
22 | use Google\Service\Apigee\GoogleCloudApigeeV1DeveloperBalance;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "balance" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
29 | * $balance = $apigeeService->organizations_developers_balance;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class OrganizationsDevelopersBalance extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Adjust the prepaid balance for the developer. This API will be used in
|
---|
36 | * scenarios where the developer has been under-charged or over-charged.
|
---|
37 | * (balance.adjust)
|
---|
38 | *
|
---|
39 | * @param string $name Required. Account balance for the developer. Use the
|
---|
40 | * following structure in your request:
|
---|
41 | * `organizations/{org}/developers/{developer}/balance`
|
---|
42 | * @param GoogleCloudApigeeV1AdjustDeveloperBalanceRequest $postBody
|
---|
43 | * @param array $optParams Optional parameters.
|
---|
44 | * @return GoogleCloudApigeeV1DeveloperBalance
|
---|
45 | * @throws \Google\Service\Exception
|
---|
46 | */
|
---|
47 | public function adjust($name, GoogleCloudApigeeV1AdjustDeveloperBalanceRequest $postBody, $optParams = [])
|
---|
48 | {
|
---|
49 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
50 | $params = array_merge($params, $optParams);
|
---|
51 | return $this->call('adjust', [$params], GoogleCloudApigeeV1DeveloperBalance::class);
|
---|
52 | }
|
---|
53 | /**
|
---|
54 | * Credits the account balance for the developer. (balance.credit)
|
---|
55 | *
|
---|
56 | * @param string $name Required. Account balance for the developer. Use the
|
---|
57 | * following structure in your request:
|
---|
58 | * `organizations/{org}/developers/{developer}/balance`
|
---|
59 | * @param GoogleCloudApigeeV1CreditDeveloperBalanceRequest $postBody
|
---|
60 | * @param array $optParams Optional parameters.
|
---|
61 | * @return GoogleCloudApigeeV1DeveloperBalance
|
---|
62 | * @throws \Google\Service\Exception
|
---|
63 | */
|
---|
64 | public function credit($name, GoogleCloudApigeeV1CreditDeveloperBalanceRequest $postBody, $optParams = [])
|
---|
65 | {
|
---|
66 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
67 | $params = array_merge($params, $optParams);
|
---|
68 | return $this->call('credit', [$params], GoogleCloudApigeeV1DeveloperBalance::class);
|
---|
69 | }
|
---|
70 | }
|
---|
71 |
|
---|
72 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
73 | class_alias(OrganizationsDevelopersBalance::class, 'Google_Service_Apigee_Resource_OrganizationsDevelopersBalance');
|
---|