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\SettlementReport; 21use Google\Service\ShoppingContent\SettlementreportsListResponse; 22 23/** 24 * The "settlementreports" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $contentService = new Google\Service\ShoppingContent(...); 28 * $settlementreports = $contentService->settlementreports; 29 * </code> 30 */ 31class Settlementreports extends \Google\Service\Resource 32{ 33 /** 34 * Retrieves a settlement report from your Merchant Center account. 35 * (settlementreports.get) 36 * 37 * @param string $merchantId The Merchant Center account of the settlement 38 * report. 39 * @param string $settlementId The Google-provided ID of the settlement. 40 * @param array $optParams Optional parameters. 41 * @return SettlementReport 42 */ 43 public function get($merchantId, $settlementId, $optParams = []) 44 { 45 $params = ['merchantId' => $merchantId, 'settlementId' => $settlementId]; 46 $params = array_merge($params, $optParams); 47 return $this->call('get', [$params], SettlementReport::class); 48 } 49 /** 50 * Retrieves a list of settlement reports from your Merchant Center account. 51 * (settlementreports.listSettlementreports) 52 * 53 * @param string $merchantId The Merchant Center account to list settlements 54 * for. 55 * @param array $optParams Optional parameters. 56 * 57 * @opt_param string maxResults The maximum number of settlements to return in 58 * the response, used for paging. The default value is 200 returns per page, and 59 * the maximum allowed value is 5000 returns per page. 60 * @opt_param string pageToken The token returned by the previous request. 61 * @opt_param string transferEndDate Obtains settlements which have transactions 62 * before this date (inclusively), in ISO 8601 format. 63 * @opt_param string transferStartDate Obtains settlements which have 64 * transactions after this date (inclusively), in ISO 8601 format. 65 * @return SettlementreportsListResponse 66 */ 67 public function listSettlementreports($merchantId, $optParams = []) 68 { 69 $params = ['merchantId' => $merchantId]; 70 $params = array_merge($params, $optParams); 71 return $this->call('list', [$params], SettlementreportsListResponse::class); 72 } 73} 74 75// Adding a class alias for backwards compatibility with the previous class name. 76class_alias(Settlementreports::class, 'Google_Service_ShoppingContent_Resource_Settlementreports'); 77