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\ShoppingContent\Resource; 19 20use Google\Service\ShoppingContent\OrderreportsListDisbursementsResponse; 21use Google\Service\ShoppingContent\OrderreportsListTransactionsResponse; 22 23/** 24 * The "orderreports" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $contentService = new Google\Service\ShoppingContent(...); 28 * $orderreports = $contentService->orderreports; 29 * </code> 30 */ 31class Orderreports extends \Google\Service\Resource 32{ 33 /** 34 * Retrieves a report for disbursements from your Merchant Center account. 35 * (orderreports.listdisbursements) 36 * 37 * @param string $merchantId The ID of the account that manages the order. This 38 * cannot be a multi-client account. 39 * @param array $optParams Optional parameters. 40 * 41 * @opt_param string disbursementEndDate The last date which disbursements 42 * occurred. In ISO 8601 format. Default: current date. 43 * @opt_param string disbursementStartDate The first date which disbursements 44 * occurred. In ISO 8601 format. 45 * @opt_param string maxResults The maximum number of disbursements to return in 46 * the response, used for paging. 47 * @opt_param string pageToken The token returned by the previous request. 48 * @return OrderreportsListDisbursementsResponse 49 */ 50 public function listdisbursements($merchantId, $optParams = []) 51 { 52 $params = ['merchantId' => $merchantId]; 53 $params = array_merge($params, $optParams); 54 return $this->call('listdisbursements', [$params], OrderreportsListDisbursementsResponse::class); 55 } 56 /** 57 * Retrieves a list of transactions for a disbursement from your Merchant Center 58 * account. (orderreports.listtransactions) 59 * 60 * @param string $merchantId The ID of the account that manages the order. This 61 * cannot be a multi-client account. 62 * @param string $disbursementId The Google-provided ID of the disbursement 63 * (found in Wallet). 64 * @param array $optParams Optional parameters. 65 * 66 * @opt_param string maxResults The maximum number of disbursements to return in 67 * the response, used for paging. 68 * @opt_param string pageToken The token returned by the previous request. 69 * @opt_param string transactionEndDate The last date in which transaction 70 * occurred. In ISO 8601 format. Default: current date. 71 * @opt_param string transactionStartDate The first date in which transaction 72 * occurred. In ISO 8601 format. 73 * @return OrderreportsListTransactionsResponse 74 */ 75 public function listtransactions($merchantId, $disbursementId, $optParams = []) 76 { 77 $params = ['merchantId' => $merchantId, 'disbursementId' => $disbursementId]; 78 $params = array_merge($params, $optParams); 79 return $this->call('listtransactions', [$params], OrderreportsListTransactionsResponse::class); 80 } 81} 82 83// Adding a class alias for backwards compatibility with the previous class name. 84class_alias(Orderreports::class, 'Google_Service_ShoppingContent_Resource_Orderreports'); 85