[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\AndroidPublisher\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\AndroidPublisher\ExternalTransaction;
|
---|
| 21 | use Google\Service\AndroidPublisher\RefundExternalTransactionRequest;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "externaltransactions" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $androidpublisherService = new Google\Service\AndroidPublisher(...);
|
---|
| 28 | * $externaltransactions = $androidpublisherService->externaltransactions;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class Externaltransactions extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Creates a new external transaction.
|
---|
| 35 | * (externaltransactions.createexternaltransaction)
|
---|
| 36 | *
|
---|
| 37 | * @param string $parent Required. The parent resource where this external
|
---|
| 38 | * transaction will be created. Format: applications/{package_name}
|
---|
| 39 | * @param ExternalTransaction $postBody
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | *
|
---|
| 42 | * @opt_param string externalTransactionId Required. The id to use for the
|
---|
| 43 | * external transaction. Must be unique across all other transactions for the
|
---|
| 44 | * app. This value should be 1-63 characters and valid characters are
|
---|
| 45 | * /a-zA-Z0-9_-/. Do not use this field to store any Personally Identifiable
|
---|
| 46 | * Information (PII) such as emails. Attempting to store PII in this field may
|
---|
| 47 | * result in requests being blocked.
|
---|
| 48 | * @return ExternalTransaction
|
---|
| 49 | * @throws \Google\Service\Exception
|
---|
| 50 | */
|
---|
| 51 | public function createexternaltransaction($parent, ExternalTransaction $postBody, $optParams = [])
|
---|
| 52 | {
|
---|
| 53 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 54 | $params = array_merge($params, $optParams);
|
---|
| 55 | return $this->call('createexternaltransaction', [$params], ExternalTransaction::class);
|
---|
| 56 | }
|
---|
| 57 | /**
|
---|
| 58 | * Gets an existing external transaction.
|
---|
| 59 | * (externaltransactions.getexternaltransaction)
|
---|
| 60 | *
|
---|
| 61 | * @param string $name Required. The name of the external transaction to
|
---|
| 62 | * retrieve. Format:
|
---|
| 63 | * applications/{package_name}/externalTransactions/{external_transaction}
|
---|
| 64 | * @param array $optParams Optional parameters.
|
---|
| 65 | * @return ExternalTransaction
|
---|
| 66 | * @throws \Google\Service\Exception
|
---|
| 67 | */
|
---|
| 68 | public function getexternaltransaction($name, $optParams = [])
|
---|
| 69 | {
|
---|
| 70 | $params = ['name' => $name];
|
---|
| 71 | $params = array_merge($params, $optParams);
|
---|
| 72 | return $this->call('getexternaltransaction', [$params], ExternalTransaction::class);
|
---|
| 73 | }
|
---|
| 74 | /**
|
---|
| 75 | * Refunds or partially refunds an existing external transaction.
|
---|
| 76 | * (externaltransactions.refundexternaltransaction)
|
---|
| 77 | *
|
---|
| 78 | * @param string $name Required. The name of the external transaction that will
|
---|
| 79 | * be refunded. Format:
|
---|
| 80 | * applications/{package_name}/externalTransactions/{external_transaction}
|
---|
| 81 | * @param RefundExternalTransactionRequest $postBody
|
---|
| 82 | * @param array $optParams Optional parameters.
|
---|
| 83 | * @return ExternalTransaction
|
---|
| 84 | * @throws \Google\Service\Exception
|
---|
| 85 | */
|
---|
| 86 | public function refundexternaltransaction($name, RefundExternalTransactionRequest $postBody, $optParams = [])
|
---|
| 87 | {
|
---|
| 88 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 89 | $params = array_merge($params, $optParams);
|
---|
| 90 | return $this->call('refundexternaltransaction', [$params], ExternalTransaction::class);
|
---|
| 91 | }
|
---|
| 92 | }
|
---|
| 93 |
|
---|
| 94 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 95 | class_alias(Externaltransactions::class, 'Google_Service_AndroidPublisher_Resource_Externaltransactions');
|
---|