source: vendor/google/apiclient-services/src/Dfareporting/Resource/BillingProfiles.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 4.2 KB
Line 
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\Dfareporting\Resource;
19
20use Google\Service\Dfareporting\BillingProfile;
21use Google\Service\Dfareporting\BillingProfilesListResponse;
22
23/**
24 * The "billingProfiles" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $dfareportingService = new Google\Service\Dfareporting(...);
28 * $billingProfiles = $dfareportingService->billingProfiles;
29 * </code>
30 */
31class BillingProfiles extends \Google\Service\Resource
32{
33 /**
34 * Gets one billing profile by ID. (billingProfiles.get)
35 *
36 * @param string $profileId User profile ID associated with this request.
37 * @param string $id Billing Profile ID.
38 * @param array $optParams Optional parameters.
39 * @return BillingProfile
40 * @throws \Google\Service\Exception
41 */
42 public function get($profileId, $id, $optParams = [])
43 {
44 $params = ['profileId' => $profileId, 'id' => $id];
45 $params = array_merge($params, $optParams);
46 return $this->call('get', [$params], BillingProfile::class);
47 }
48 /**
49 * Retrieves a list of billing profiles, possibly filtered. This method supports
50 * paging. (billingProfiles.listBillingProfiles)
51 *
52 * @param string $profileId User profile ID associated with this request.
53 * @param array $optParams Optional parameters.
54 *
55 * @opt_param string currency_code Select only billing profile with currency.
56 * @opt_param string ids Select only billing profile with these IDs.
57 * @opt_param int maxResults Maximum number of results to return.
58 * @opt_param string name Allows searching for billing profiles by name.
59 * Wildcards (*) are allowed. For example, "profile*2020" will return objects
60 * with names like "profile June 2020", "profile April 2020", or simply "profile
61 * 2020". Most of the searches also add wildcards implicitly at the start and
62 * the end of the search string. For example, a search string of "profile" will
63 * match objects with name "my profile", "profile 2021", or simply "profile".
64 * @opt_param bool onlySuggestion Select only billing profile which is suggested
65 * for the currency_code & subaccount_id using the Billing Suggestion API.
66 * @opt_param string pageToken Value of the nextPageToken from the previous
67 * result page.
68 * @opt_param string sortField Field by which to sort the list.
69 * @opt_param string sortOrder Order of sorted results.
70 * @opt_param string status Select only billing profile with the specified
71 * status.
72 * @opt_param string subaccountIds Select only billing profile with the
73 * specified subaccount.When only_suggestion is true, only a single
74 * subaccount_id is supported.
75 * @return BillingProfilesListResponse
76 * @throws \Google\Service\Exception
77 */
78 public function listBillingProfiles($profileId, $optParams = [])
79 {
80 $params = ['profileId' => $profileId];
81 $params = array_merge($params, $optParams);
82 return $this->call('list', [$params], BillingProfilesListResponse::class);
83 }
84 /**
85 * Updates an existing billing profile. (billingProfiles.update)
86 *
87 * @param string $profileId User profile ID associated with this request.
88 * @param BillingProfile $postBody
89 * @param array $optParams Optional parameters.
90 * @return BillingProfile
91 * @throws \Google\Service\Exception
92 */
93 public function update($profileId, BillingProfile $postBody, $optParams = [])
94 {
95 $params = ['profileId' => $profileId, 'postBody' => $postBody];
96 $params = array_merge($params, $optParams);
97 return $this->call('update', [$params], BillingProfile::class);
98 }
99}
100
101// Adding a class alias for backwards compatibility with the previous class name.
102class_alias(BillingProfiles::class, 'Google_Service_Dfareporting_Resource_BillingProfiles');
Note: See TracBrowser for help on using the repository browser.