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\Apigee\Resource; 19 20use Google\Service\Apigee\GoogleCloudApigeeV1AdjustDeveloperBalanceRequest; 21use Google\Service\Apigee\GoogleCloudApigeeV1CreditDeveloperBalanceRequest; 22use 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->balance; 30 * </code> 31 */ 32class 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 */ 46 public function adjust($name, GoogleCloudApigeeV1AdjustDeveloperBalanceRequest $postBody, $optParams = []) 47 { 48 $params = ['name' => $name, 'postBody' => $postBody]; 49 $params = array_merge($params, $optParams); 50 return $this->call('adjust', [$params], GoogleCloudApigeeV1DeveloperBalance::class); 51 } 52 /** 53 * Credits the account balance for the developer. (balance.credit) 54 * 55 * @param string $name Required. Account balance for the developer. Use the 56 * following structure in your request: 57 * `organizations/{org}/developers/{developer}/balance` 58 * @param GoogleCloudApigeeV1CreditDeveloperBalanceRequest $postBody 59 * @param array $optParams Optional parameters. 60 * @return GoogleCloudApigeeV1DeveloperBalance 61 */ 62 public function credit($name, GoogleCloudApigeeV1CreditDeveloperBalanceRequest $postBody, $optParams = []) 63 { 64 $params = ['name' => $name, 'postBody' => $postBody]; 65 $params = array_merge($params, $optParams); 66 return $this->call('credit', [$params], GoogleCloudApigeeV1DeveloperBalance::class); 67 } 68} 69 70// Adding a class alias for backwards compatibility with the previous class name. 71class_alias(OrganizationsDevelopersBalance::class, 'Google_Service_Apigee_Resource_OrganizationsDevelopersBalance'); 72