[e3d4e0a] | 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\DisplayVideo\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\DisplayVideo\ListInvoicesResponse;
|
---|
| 21 | use Google\Service\DisplayVideo\LookupInvoiceCurrencyResponse;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "invoices" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $displayvideoService = new Google\Service\DisplayVideo(...);
|
---|
| 28 | * $invoices = $displayvideoService->advertisers_invoices;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class AdvertisersInvoices extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Lists invoices posted for an advertiser in a given month. Invoices generated
|
---|
| 35 | * by billing profiles with a "Partner" invoice level are not retrievable
|
---|
| 36 | * through this method. (invoices.listAdvertisersInvoices)
|
---|
| 37 | *
|
---|
| 38 | * @param string $advertiserId Required. The ID of the advertiser to list
|
---|
| 39 | * invoices for.
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | *
|
---|
| 42 | * @opt_param string issueMonth The month to list the invoices for. If not set,
|
---|
| 43 | * the request will retrieve invoices for the previous month. Must be in the
|
---|
| 44 | * format YYYYMM.
|
---|
| 45 | * @opt_param string loiSapinInvoiceType Select type of invoice to retrieve for
|
---|
| 46 | * Loi Sapin advertisers. Only applicable to Loi Sapin advertisers. Will be
|
---|
| 47 | * ignored otherwise.
|
---|
| 48 | * @opt_param int pageSize Requested page size. Must be between `1` and `200`.
|
---|
| 49 | * If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT`
|
---|
| 50 | * if an invalid value is specified.
|
---|
| 51 | * @opt_param string pageToken A token identifying a page of results the server
|
---|
| 52 | * should return. Typically, this is the value of next_page_token returned from
|
---|
| 53 | * the previous call to `ListInvoices` method. If not specified, the first page
|
---|
| 54 | * of results will be returned.
|
---|
| 55 | * @return ListInvoicesResponse
|
---|
| 56 | * @throws \Google\Service\Exception
|
---|
| 57 | */
|
---|
| 58 | public function listAdvertisersInvoices($advertiserId, $optParams = [])
|
---|
| 59 | {
|
---|
| 60 | $params = ['advertiserId' => $advertiserId];
|
---|
| 61 | $params = array_merge($params, $optParams);
|
---|
| 62 | return $this->call('list', [$params], ListInvoicesResponse::class);
|
---|
| 63 | }
|
---|
| 64 | /**
|
---|
| 65 | * Retrieves the invoice currency used by an advertiser in a given month.
|
---|
| 66 | * (invoices.lookupInvoiceCurrency)
|
---|
| 67 | *
|
---|
| 68 | * @param string $advertiserId Required. The ID of the advertiser to lookup
|
---|
| 69 | * currency for.
|
---|
| 70 | * @param array $optParams Optional parameters.
|
---|
| 71 | *
|
---|
| 72 | * @opt_param string invoiceMonth Month for which the currency is needed. If not
|
---|
| 73 | * set, the request will return existing currency settings for the advertiser.
|
---|
| 74 | * Must be in the format YYYYMM.
|
---|
| 75 | * @return LookupInvoiceCurrencyResponse
|
---|
| 76 | * @throws \Google\Service\Exception
|
---|
| 77 | */
|
---|
| 78 | public function lookupInvoiceCurrency($advertiserId, $optParams = [])
|
---|
| 79 | {
|
---|
| 80 | $params = ['advertiserId' => $advertiserId];
|
---|
| 81 | $params = array_merge($params, $optParams);
|
---|
| 82 | return $this->call('lookupInvoiceCurrency', [$params], LookupInvoiceCurrencyResponse::class);
|
---|
| 83 | }
|
---|
| 84 | }
|
---|
| 85 |
|
---|
| 86 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 87 | class_alias(AdvertisersInvoices::class, 'Google_Service_DisplayVideo_Resource_AdvertisersInvoices');
|
---|