source: vendor/google/apiclient-services/src/Cloudchannel/Resource/AccountsCustomersCustomerRepricingConfigs.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 10.5 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\Cloudchannel\Resource;
19
20use Google\Service\Cloudchannel\GoogleCloudChannelV1CustomerRepricingConfig;
21use Google\Service\Cloudchannel\GoogleCloudChannelV1ListCustomerRepricingConfigsResponse;
22use Google\Service\Cloudchannel\GoogleProtobufEmpty;
23
24/**
25 * The "customerRepricingConfigs" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $cloudchannelService = new Google\Service\Cloudchannel(...);
29 * $customerRepricingConfigs = $cloudchannelService->accounts_customers_customerRepricingConfigs;
30 * </code>
31 */
32class AccountsCustomersCustomerRepricingConfigs extends \Google\Service\Resource
33{
34 /**
35 * Creates a CustomerRepricingConfig. Call this method to set modifications for
36 * a specific customer's bill. You can only create configs if the
37 * RepricingConfig.effective_invoice_month is a future month. If needed, you can
38 * create a config for the current month, with some restrictions. When creating
39 * a config for a future month, make sure there are no existing configs for that
40 * RepricingConfig.effective_invoice_month. The following restrictions are for
41 * creating configs in the current month. * This functionality is reserved for
42 * recovering from an erroneous config, and should not be used for regular
43 * business cases. * The new config will not modify exports used with other
44 * configs. Changes to the config may be immediate, but may take up to 24 hours.
45 * * There is a limit of ten configs for any
46 * RepricingConfig.EntitlementGranularity.entitlement, for any
47 * RepricingConfig.effective_invoice_month. * The contained
48 * CustomerRepricingConfig.repricing_config value must be different from the
49 * value used in the current config for a
50 * RepricingConfig.EntitlementGranularity.entitlement. Possible Error Codes: *
51 * PERMISSION_DENIED: If the account making the request and the account being
52 * queried are different. * INVALID_ARGUMENT: Missing or invalid required
53 * parameters in the request. Also displays if the updated config is for the
54 * current month or past months. * NOT_FOUND: The CustomerRepricingConfig
55 * specified does not exist or is not associated with the given account. *
56 * INTERNAL: Any non-user error related to technical issues in the backend. In
57 * this case, contact Cloud Channel support. Return Value: If successful, the
58 * updated CustomerRepricingConfig resource, otherwise returns an error.
59 * (customerRepricingConfigs.create)
60 *
61 * @param string $parent Required. The resource name of the customer that will
62 * receive this repricing config. Parent uses the format:
63 * accounts/{account_id}/customers/{customer_id}
64 * @param GoogleCloudChannelV1CustomerRepricingConfig $postBody
65 * @param array $optParams Optional parameters.
66 * @return GoogleCloudChannelV1CustomerRepricingConfig
67 * @throws \Google\Service\Exception
68 */
69 public function create($parent, GoogleCloudChannelV1CustomerRepricingConfig $postBody, $optParams = [])
70 {
71 $params = ['parent' => $parent, 'postBody' => $postBody];
72 $params = array_merge($params, $optParams);
73 return $this->call('create', [$params], GoogleCloudChannelV1CustomerRepricingConfig::class);
74 }
75 /**
76 * Deletes the given CustomerRepricingConfig permanently. You can only delete
77 * configs if their RepricingConfig.effective_invoice_month is set to a date
78 * after the current month. Possible error codes: * PERMISSION_DENIED: The
79 * account making the request does not own this customer. * INVALID_ARGUMENT:
80 * Required request parameters are missing or invalid. * FAILED_PRECONDITION:
81 * The CustomerRepricingConfig is active or in the past. * NOT_FOUND: No
82 * CustomerRepricingConfig found for the name in the request.
83 * (customerRepricingConfigs.delete)
84 *
85 * @param string $name Required. The resource name of the customer repricing
86 * config rule to delete. Format:
87 * accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
88 * @param array $optParams Optional parameters.
89 * @return GoogleProtobufEmpty
90 * @throws \Google\Service\Exception
91 */
92 public function delete($name, $optParams = [])
93 {
94 $params = ['name' => $name];
95 $params = array_merge($params, $optParams);
96 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
97 }
98 /**
99 * Gets information about how a Reseller modifies their bill before sending it
100 * to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account
101 * making the request and the account being queried are different. * NOT_FOUND:
102 * The CustomerRepricingConfig was not found. * INTERNAL: Any non-user error
103 * related to technical issues in the backend. In this case, contact Cloud
104 * Channel support. Return Value: If successful, the CustomerRepricingConfig
105 * resource, otherwise returns an error. (customerRepricingConfigs.get)
106 *
107 * @param string $name Required. The resource name of the
108 * CustomerRepricingConfig. Format:
109 * accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
110 * @param array $optParams Optional parameters.
111 * @return GoogleCloudChannelV1CustomerRepricingConfig
112 * @throws \Google\Service\Exception
113 */
114 public function get($name, $optParams = [])
115 {
116 $params = ['name' => $name];
117 $params = array_merge($params, $optParams);
118 return $this->call('get', [$params], GoogleCloudChannelV1CustomerRepricingConfig::class);
119 }
120 /**
121 * Lists information about how a Reseller modifies their bill before sending it
122 * to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account
123 * making the request and the account being queried are different. * NOT_FOUND:
124 * The CustomerRepricingConfig specified does not exist or is not associated
125 * with the given account. * INTERNAL: Any non-user error related to technical
126 * issues in the backend. In this case, contact Cloud Channel support. Return
127 * Value: If successful, the CustomerRepricingConfig resources. The data for
128 * each resource is displayed in the ascending order of: * Customer ID *
129 * RepricingConfig.EntitlementGranularity.entitlement *
130 * RepricingConfig.effective_invoice_month * CustomerRepricingConfig.update_time
131 * If unsuccessful, returns an error.
132 * (customerRepricingConfigs.listAccountsCustomersCustomerRepricingConfigs)
133 *
134 * @param string $parent Required. The resource name of the customer. Parent
135 * uses the format: accounts/{account_id}/customers/{customer_id}. Supports
136 * accounts/{account_id}/customers/- to retrieve configs for all customers.
137 * @param array $optParams Optional parameters.
138 *
139 * @opt_param string filter Optional. A filter for
140 * [CloudChannelService.ListCustomerRepricingConfigs] results (customer only).
141 * You can use this filter when you support a BatchGet-like query. To use the
142 * filter, you must set `parent=accounts/{account_id}/customers/-`. Example:
143 * customer = accounts/account_id/customers/c1 OR customer =
144 * accounts/account_id/customers/c2.
145 * @opt_param int pageSize Optional. The maximum number of repricing configs to
146 * return. The service may return fewer than this value. If unspecified, returns
147 * a maximum of 50 rules. The maximum value is 100; values above 100 will be
148 * coerced to 100.
149 * @opt_param string pageToken Optional. A token identifying a page of results
150 * beyond the first page. Obtained through
151 * ListCustomerRepricingConfigsResponse.next_page_token of the previous
152 * CloudChannelService.ListCustomerRepricingConfigs call.
153 * @return GoogleCloudChannelV1ListCustomerRepricingConfigsResponse
154 * @throws \Google\Service\Exception
155 */
156 public function listAccountsCustomersCustomerRepricingConfigs($parent, $optParams = [])
157 {
158 $params = ['parent' => $parent];
159 $params = array_merge($params, $optParams);
160 return $this->call('list', [$params], GoogleCloudChannelV1ListCustomerRepricingConfigsResponse::class);
161 }
162 /**
163 * Updates a CustomerRepricingConfig. Call this method to set modifications for
164 * a specific customer's bill. This method overwrites the existing
165 * CustomerRepricingConfig. You can only update configs if the
166 * RepricingConfig.effective_invoice_month is a future month. To make changes to
167 * configs for the current month, use CreateCustomerRepricingConfig, taking note
168 * of its restrictions. You cannot update the
169 * RepricingConfig.effective_invoice_month. When updating a config in the
170 * future: * This config must already exist. Possible Error Codes: *
171 * PERMISSION_DENIED: If the account making the request and the account being
172 * queried are different. * INVALID_ARGUMENT: Missing or invalid required
173 * parameters in the request. Also displays if the updated config is for the
174 * current month or past months. * NOT_FOUND: The CustomerRepricingConfig
175 * specified does not exist or is not associated with the given account. *
176 * INTERNAL: Any non-user error related to technical issues in the backend. In
177 * this case, contact Cloud Channel support. Return Value: If successful, the
178 * updated CustomerRepricingConfig resource, otherwise returns an error.
179 * (customerRepricingConfigs.patch)
180 *
181 * @param string $name Output only. Resource name of the
182 * CustomerRepricingConfig. Format:
183 * accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
184 * @param GoogleCloudChannelV1CustomerRepricingConfig $postBody
185 * @param array $optParams Optional parameters.
186 * @return GoogleCloudChannelV1CustomerRepricingConfig
187 * @throws \Google\Service\Exception
188 */
189 public function patch($name, GoogleCloudChannelV1CustomerRepricingConfig $postBody, $optParams = [])
190 {
191 $params = ['name' => $name, 'postBody' => $postBody];
192 $params = array_merge($params, $optParams);
193 return $this->call('patch', [$params], GoogleCloudChannelV1CustomerRepricingConfig::class);
194 }
195}
196
197// Adding a class alias for backwards compatibility with the previous class name.
198class_alias(AccountsCustomersCustomerRepricingConfigs::class, 'Google_Service_Cloudchannel_Resource_AccountsCustomersCustomerRepricingConfigs');
Note: See TracBrowser for help on using the repository browser.