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\OrderreportsListDisbursementsResponse;
|
---|
21 | use 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 | */
|
---|
31 | class 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 | * @throws \Google\Service\Exception
|
---|
50 | */
|
---|
51 | public function listdisbursements($merchantId, $optParams = [])
|
---|
52 | {
|
---|
53 | $params = ['merchantId' => $merchantId];
|
---|
54 | $params = array_merge($params, $optParams);
|
---|
55 | return $this->call('listdisbursements', [$params], OrderreportsListDisbursementsResponse::class);
|
---|
56 | }
|
---|
57 | /**
|
---|
58 | * Retrieves a list of transactions for a disbursement from your Merchant Center
|
---|
59 | * account. (orderreports.listtransactions)
|
---|
60 | *
|
---|
61 | * @param string $merchantId The ID of the account that manages the order. This
|
---|
62 | * cannot be a multi-client account.
|
---|
63 | * @param string $disbursementId The Google-provided ID of the disbursement
|
---|
64 | * (found in Wallet).
|
---|
65 | * @param array $optParams Optional parameters.
|
---|
66 | *
|
---|
67 | * @opt_param string maxResults The maximum number of disbursements to return in
|
---|
68 | * the response, used for paging.
|
---|
69 | * @opt_param string pageToken The token returned by the previous request.
|
---|
70 | * @opt_param string transactionEndDate The last date in which transaction
|
---|
71 | * occurred. In ISO 8601 format. Default: current date.
|
---|
72 | * @opt_param string transactionStartDate The first date in which transaction
|
---|
73 | * occurred. In ISO 8601 format.
|
---|
74 | * @return OrderreportsListTransactionsResponse
|
---|
75 | * @throws \Google\Service\Exception
|
---|
76 | */
|
---|
77 | public function listtransactions($merchantId, $disbursementId, $optParams = [])
|
---|
78 | {
|
---|
79 | $params = ['merchantId' => $merchantId, 'disbursementId' => $disbursementId];
|
---|
80 | $params = array_merge($params, $optParams);
|
---|
81 | return $this->call('listtransactions', [$params], OrderreportsListTransactionsResponse::class);
|
---|
82 | }
|
---|
83 | }
|
---|
84 |
|
---|
85 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
86 | class_alias(Orderreports::class, 'Google_Service_ShoppingContent_Resource_Orderreports');
|
---|