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