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\AndroidPublisher\Resource; 19 20use Google\Service\AndroidPublisher\VoidedPurchasesListResponse; 21 22/** 23 * The "voidedpurchases" collection of methods. 24 * Typical usage is: 25 * <code> 26 * $androidpublisherService = new Google\Service\AndroidPublisher(...); 27 * $voidedpurchases = $androidpublisherService->voidedpurchases; 28 * </code> 29 */ 30class PurchasesVoidedpurchases extends \Google\Service\Resource 31{ 32 /** 33 * Lists the purchases that were canceled, refunded or charged-back. 34 * (voidedpurchases.listPurchasesVoidedpurchases) 35 * 36 * @param string $packageName The package name of the application for which 37 * voided purchases need to be returned (for example, 'com.some.thing'). 38 * @param array $optParams Optional parameters. 39 * 40 * @opt_param string endTime The time, in milliseconds since the Epoch, of the 41 * newest voided purchase that you want to see in the response. The value of 42 * this parameter cannot be greater than the current time and is ignored if a 43 * pagination token is set. Default value is current time. Note: This filter is 44 * applied on the time at which the record is seen as voided by our systems and 45 * not the actual voided time returned in the response. 46 * @opt_param string maxResults Defines how many results the list operation 47 * should return. The default number depends on the resource collection. 48 * @opt_param string startIndex Defines the index of the first element to 49 * return. This can only be used if indexed paging is enabled. 50 * @opt_param string startTime The time, in milliseconds since the Epoch, of the 51 * oldest voided purchase that you want to see in the response. The value of 52 * this parameter cannot be older than 30 days and is ignored if a pagination 53 * token is set. Default value is current time minus 30 days. Note: This filter 54 * is applied on the time at which the record is seen as voided by our systems 55 * and not the actual voided time returned in the response. 56 * @opt_param string token Defines the token of the page to return, usually 57 * taken from TokenPagination. This can only be used if token paging is enabled. 58 * @opt_param int type The type of voided purchases that you want to see in the 59 * response. Possible values are: 0. Only voided in-app product purchases will 60 * be returned in the response. This is the default value. 1. Both voided in-app 61 * purchases and voided subscription purchases will be returned in the response. 62 * Note: Before requesting to receive voided subscription purchases, you must 63 * switch to use orderId in the response which uniquely identifies one-time 64 * purchases and subscriptions. Otherwise, you will receive multiple 65 * subscription orders with the same PurchaseToken, because subscription renewal 66 * orders share the same PurchaseToken. 67 * @return VoidedPurchasesListResponse 68 */ 69 public function listPurchasesVoidedpurchases($packageName, $optParams = []) 70 { 71 $params = ['packageName' => $packageName]; 72 $params = array_merge($params, $optParams); 73 return $this->call('list', [$params], VoidedPurchasesListResponse::class); 74 } 75} 76 77// Adding a class alias for backwards compatibility with the previous class name. 78class_alias(PurchasesVoidedpurchases::class, 'Google_Service_AndroidPublisher_Resource_PurchasesVoidedpurchases'); 79