Chromium Code Reviews

Side by Side Diff: generated/googleapis/lib/reseller/v1.dart

Issue 1078053002: Roll of googleapis as of 4/7/2015. (Closed) Base URL: https://github.com/dart-lang/googleapis.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project).
2
1 library googleapis.reseller.v1; 3 library googleapis.reseller.v1;
2 4
3 import "dart:core" as core; 5 import 'dart:core' as core;
4 import "dart:collection" as collection; 6 import 'dart:collection' as collection;
5 import "dart:async" as async; 7 import 'dart:async' as async;
6 import "dart:convert" as convert; 8 import 'dart:convert' as convert;
7 9
8 import "package:crypto/crypto.dart" as crypto; 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
11 import 'package:crypto/crypto.dart' as crypto;
9 import 'package:http/http.dart' as http; 12 import 'package:http/http.dart' as http;
10 import '../src/common_internal.dart' as common_internal;
11 import '../common/common.dart' as common;
12 13
13 export '../common/common.dart' show ApiRequestError; 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
14 export '../common/common.dart' show DetailedApiRequestError; 15 ApiRequestError, DetailedApiRequestError;
16
17 const core.String USER_AGENT = 'dart-api-client reseller/v1';
15 18
16 /** Lets you create and manage your customers and their subscriptions. */ 19 /** Lets you create and manage your customers and their subscriptions. */
17 class ResellerApi { 20 class ResellerApi {
18 /** Manage users on your domain */ 21 /** Manage users on your domain */
19 static const AppsOrderScope = "https://www.googleapis.com/auth/apps.order"; 22 static const AppsOrderScope = "https://www.googleapis.com/auth/apps.order";
20 23
21 /** Manage users on your domain */ 24 /** Manage users on your domain */
22 static const AppsOrderReadonlyScope = "https://www.googleapis.com/auth/apps.or der.readonly"; 25 static const AppsOrderReadonlyScope = "https://www.googleapis.com/auth/apps.or der.readonly";
23 26
24 27
25 final common_internal.ApiRequester _requester; 28 final commons.ApiRequester _requester;
26 29
27 CustomersResourceApi get customers => new CustomersResourceApi(_requester); 30 CustomersResourceApi get customers => new CustomersResourceApi(_requester);
28 SubscriptionsResourceApi get subscriptions => new SubscriptionsResourceApi(_re quester); 31 SubscriptionsResourceApi get subscriptions => new SubscriptionsResourceApi(_re quester);
29 32
30 ResellerApi(http.Client client, {core.String rootUrl: "https://www.googleapis. com/", core.String servicePath: "apps/reseller/v1/"}) : 33 ResellerApi(http.Client client, {core.String rootUrl: "https://www.googleapis. com/", core.String servicePath: "apps/reseller/v1/"}) :
31 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath ); 34 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
32 } 35 }
33 36
34 37
35 /** Not documented yet. */
36 class CustomersResourceApi { 38 class CustomersResourceApi {
37 final common_internal.ApiRequester _requester; 39 final commons.ApiRequester _requester;
38 40
39 CustomersResourceApi(common_internal.ApiRequester client) : 41 CustomersResourceApi(commons.ApiRequester client) :
40 _requester = client; 42 _requester = client;
41 43
42 /** 44 /**
43 * Gets a customer resource if one exists and is owned by the reseller. 45 * Gets a customer resource if one exists and is owned by the reseller.
44 * 46 *
45 * Request parameters: 47 * Request parameters:
46 * 48 *
47 * [customerId] - Id of the Customer 49 * [customerId] - Id of the Customer
48 * 50 *
49 * Completes with a [Customer]. 51 * Completes with a [Customer].
50 * 52 *
51 * Completes with a [common.ApiRequestError] if the API endpoint returned an 53 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
52 * error. 54 * error.
53 * 55 *
54 * If the used [http.Client] completes with an error when making a REST call, 56 * If the used [http.Client] completes with an error when making a REST call,
55 * this method will complete with the same error. 57 * this method will complete with the same error.
56 */ 58 */
57 async.Future<Customer> get(core.String customerId) { 59 async.Future<Customer> get(core.String customerId) {
58 var _url = null; 60 var _url = null;
59 var _queryParams = new core.Map(); 61 var _queryParams = new core.Map();
60 var _uploadMedia = null; 62 var _uploadMedia = null;
61 var _uploadOptions = null; 63 var _uploadOptions = null;
62 var _downloadOptions = common.DownloadOptions.Metadata; 64 var _downloadOptions = commons.DownloadOptions.Metadata;
63 var _body = null; 65 var _body = null;
64 66
65 if (customerId == null) { 67 if (customerId == null) {
66 throw new core.ArgumentError("Parameter customerId is required."); 68 throw new core.ArgumentError("Parameter customerId is required.");
67 } 69 }
68 70
69 71
70 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId'); 72 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId');
71 73
72 var _response = _requester.request(_url, 74 var _response = _requester.request(_url,
73 "GET", 75 "GET",
74 body: _body, 76 body: _body,
75 queryParams: _queryParams, 77 queryParams: _queryParams,
76 uploadOptions: _uploadOptions, 78 uploadOptions: _uploadOptions,
77 uploadMedia: _uploadMedia, 79 uploadMedia: _uploadMedia,
78 downloadOptions: _downloadOptions); 80 downloadOptions: _downloadOptions);
79 return _response.then((data) => new Customer.fromJson(data)); 81 return _response.then((data) => new Customer.fromJson(data));
80 } 82 }
81 83
82 /** 84 /**
83 * Creates a customer resource if one does not already exist. 85 * Creates a customer resource if one does not already exist.
84 * 86 *
85 * [request] - The metadata request object. 87 * [request] - The metadata request object.
86 * 88 *
87 * Request parameters: 89 * Request parameters:
88 * 90 *
89 * [customerAuthToken] - An auth token needed for inserting a customer for 91 * [customerAuthToken] - An auth token needed for inserting a customer for
90 * which domain already exists. Can be generated at 92 * which domain already exists. Can be generated at
91 * https://www.google.com/a/cpanel//TransferToken. Optional. 93 * https://www.google.com/a/cpanel//TransferToken. Optional.
92 * 94 *
93 * Completes with a [Customer]. 95 * Completes with a [Customer].
94 * 96 *
95 * Completes with a [common.ApiRequestError] if the API endpoint returned an 97 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
96 * error. 98 * error.
97 * 99 *
98 * If the used [http.Client] completes with an error when making a REST call, 100 * If the used [http.Client] completes with an error when making a REST call,
99 * this method will complete with the same error. 101 * this method will complete with the same error.
100 */ 102 */
101 async.Future<Customer> insert(Customer request, {core.String customerAuthToken }) { 103 async.Future<Customer> insert(Customer request, {core.String customerAuthToken }) {
102 var _url = null; 104 var _url = null;
103 var _queryParams = new core.Map(); 105 var _queryParams = new core.Map();
104 var _uploadMedia = null; 106 var _uploadMedia = null;
105 var _uploadOptions = null; 107 var _uploadOptions = null;
106 var _downloadOptions = common.DownloadOptions.Metadata; 108 var _downloadOptions = commons.DownloadOptions.Metadata;
107 var _body = null; 109 var _body = null;
108 110
109 if (request != null) { 111 if (request != null) {
110 _body = convert.JSON.encode((request).toJson()); 112 _body = convert.JSON.encode((request).toJson());
111 } 113 }
112 if (customerAuthToken != null) { 114 if (customerAuthToken != null) {
113 _queryParams["customerAuthToken"] = [customerAuthToken]; 115 _queryParams["customerAuthToken"] = [customerAuthToken];
114 } 116 }
115 117
116 118
(...skipping 14 matching lines...)
131 * This method supports patch semantics. 133 * This method supports patch semantics.
132 * 134 *
133 * [request] - The metadata request object. 135 * [request] - The metadata request object.
134 * 136 *
135 * Request parameters: 137 * Request parameters:
136 * 138 *
137 * [customerId] - Id of the Customer 139 * [customerId] - Id of the Customer
138 * 140 *
139 * Completes with a [Customer]. 141 * Completes with a [Customer].
140 * 142 *
141 * Completes with a [common.ApiRequestError] if the API endpoint returned an 143 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
142 * error. 144 * error.
143 * 145 *
144 * If the used [http.Client] completes with an error when making a REST call, 146 * If the used [http.Client] completes with an error when making a REST call,
145 * this method will complete with the same error. 147 * this method will complete with the same error.
146 */ 148 */
147 async.Future<Customer> patch(Customer request, core.String customerId) { 149 async.Future<Customer> patch(Customer request, core.String customerId) {
148 var _url = null; 150 var _url = null;
149 var _queryParams = new core.Map(); 151 var _queryParams = new core.Map();
150 var _uploadMedia = null; 152 var _uploadMedia = null;
151 var _uploadOptions = null; 153 var _uploadOptions = null;
152 var _downloadOptions = common.DownloadOptions.Metadata; 154 var _downloadOptions = commons.DownloadOptions.Metadata;
153 var _body = null; 155 var _body = null;
154 156
155 if (request != null) { 157 if (request != null) {
156 _body = convert.JSON.encode((request).toJson()); 158 _body = convert.JSON.encode((request).toJson());
157 } 159 }
158 if (customerId == null) { 160 if (customerId == null) {
159 throw new core.ArgumentError("Parameter customerId is required."); 161 throw new core.ArgumentError("Parameter customerId is required.");
160 } 162 }
161 163
162 164
163 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId'); 165 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId');
164 166
165 var _response = _requester.request(_url, 167 var _response = _requester.request(_url,
166 "PATCH", 168 "PATCH",
167 body: _body, 169 body: _body,
168 queryParams: _queryParams, 170 queryParams: _queryParams,
169 uploadOptions: _uploadOptions, 171 uploadOptions: _uploadOptions,
170 uploadMedia: _uploadMedia, 172 uploadMedia: _uploadMedia,
171 downloadOptions: _downloadOptions); 173 downloadOptions: _downloadOptions);
172 return _response.then((data) => new Customer.fromJson(data)); 174 return _response.then((data) => new Customer.fromJson(data));
173 } 175 }
174 176
175 /** 177 /**
176 * Update a customer resource if one it exists and is owned by the reseller. 178 * Update a customer resource if one it exists and is owned by the reseller.
177 * 179 *
178 * [request] - The metadata request object. 180 * [request] - The metadata request object.
179 * 181 *
180 * Request parameters: 182 * Request parameters:
181 * 183 *
182 * [customerId] - Id of the Customer 184 * [customerId] - Id of the Customer
183 * 185 *
184 * Completes with a [Customer]. 186 * Completes with a [Customer].
185 * 187 *
186 * Completes with a [common.ApiRequestError] if the API endpoint returned an 188 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
187 * error. 189 * error.
188 * 190 *
189 * If the used [http.Client] completes with an error when making a REST call, 191 * If the used [http.Client] completes with an error when making a REST call,
190 * this method will complete with the same error. 192 * this method will complete with the same error.
191 */ 193 */
192 async.Future<Customer> update(Customer request, core.String customerId) { 194 async.Future<Customer> update(Customer request, core.String customerId) {
193 var _url = null; 195 var _url = null;
194 var _queryParams = new core.Map(); 196 var _queryParams = new core.Map();
195 var _uploadMedia = null; 197 var _uploadMedia = null;
196 var _uploadOptions = null; 198 var _uploadOptions = null;
197 var _downloadOptions = common.DownloadOptions.Metadata; 199 var _downloadOptions = commons.DownloadOptions.Metadata;
198 var _body = null; 200 var _body = null;
199 201
200 if (request != null) { 202 if (request != null) {
201 _body = convert.JSON.encode((request).toJson()); 203 _body = convert.JSON.encode((request).toJson());
202 } 204 }
203 if (customerId == null) { 205 if (customerId == null) {
204 throw new core.ArgumentError("Parameter customerId is required."); 206 throw new core.ArgumentError("Parameter customerId is required.");
205 } 207 }
206 208
207 209
208 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId'); 210 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId');
209 211
210 var _response = _requester.request(_url, 212 var _response = _requester.request(_url,
211 "PUT", 213 "PUT",
212 body: _body, 214 body: _body,
213 queryParams: _queryParams, 215 queryParams: _queryParams,
214 uploadOptions: _uploadOptions, 216 uploadOptions: _uploadOptions,
215 uploadMedia: _uploadMedia, 217 uploadMedia: _uploadMedia,
216 downloadOptions: _downloadOptions); 218 downloadOptions: _downloadOptions);
217 return _response.then((data) => new Customer.fromJson(data)); 219 return _response.then((data) => new Customer.fromJson(data));
218 } 220 }
219 221
220 } 222 }
221 223
222 224
223 /** Not documented yet. */
224 class SubscriptionsResourceApi { 225 class SubscriptionsResourceApi {
225 final common_internal.ApiRequester _requester; 226 final commons.ApiRequester _requester;
226 227
227 SubscriptionsResourceApi(common_internal.ApiRequester client) : 228 SubscriptionsResourceApi(commons.ApiRequester client) :
228 _requester = client; 229 _requester = client;
229 230
230 /** 231 /**
231 * Activates a subscription previously suspended by the reseller 232 * Activates a subscription previously suspended by the reseller
232 * 233 *
233 * Request parameters: 234 * Request parameters:
234 * 235 *
235 * [customerId] - Id of the Customer 236 * [customerId] - Id of the Customer
236 * 237 *
237 * [subscriptionId] - Id of the subscription, which is unique for a customer 238 * [subscriptionId] - Id of the subscription, which is unique for a customer
238 * 239 *
239 * Completes with a [Subscription]. 240 * Completes with a [Subscription].
240 * 241 *
241 * Completes with a [common.ApiRequestError] if the API endpoint returned an 242 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
242 * error. 243 * error.
243 * 244 *
244 * If the used [http.Client] completes with an error when making a REST call, 245 * If the used [http.Client] completes with an error when making a REST call,
245 * this method will complete with the same error. 246 * this method will complete with the same error.
246 */ 247 */
247 async.Future<Subscription> activate(core.String customerId, core.String subscr iptionId) { 248 async.Future<Subscription> activate(core.String customerId, core.String subscr iptionId) {
248 var _url = null; 249 var _url = null;
249 var _queryParams = new core.Map(); 250 var _queryParams = new core.Map();
250 var _uploadMedia = null; 251 var _uploadMedia = null;
251 var _uploadOptions = null; 252 var _uploadOptions = null;
252 var _downloadOptions = common.DownloadOptions.Metadata; 253 var _downloadOptions = commons.DownloadOptions.Metadata;
253 var _body = null; 254 var _body = null;
254 255
255 if (customerId == null) { 256 if (customerId == null) {
256 throw new core.ArgumentError("Parameter customerId is required."); 257 throw new core.ArgumentError("Parameter customerId is required.");
257 } 258 }
258 if (subscriptionId == null) { 259 if (subscriptionId == null) {
259 throw new core.ArgumentError("Parameter subscriptionId is required."); 260 throw new core.ArgumentError("Parameter subscriptionId is required.");
260 } 261 }
261 262
262 263
263 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId') + '/subscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId') + '/activate'; 264 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/activate';
264 265
265 var _response = _requester.request(_url, 266 var _response = _requester.request(_url,
266 "POST", 267 "POST",
267 body: _body, 268 body: _body,
268 queryParams: _queryParams, 269 queryParams: _queryParams,
269 uploadOptions: _uploadOptions, 270 uploadOptions: _uploadOptions,
270 uploadMedia: _uploadMedia, 271 uploadMedia: _uploadMedia,
271 downloadOptions: _downloadOptions); 272 downloadOptions: _downloadOptions);
272 return _response.then((data) => new Subscription.fromJson(data)); 273 return _response.then((data) => new Subscription.fromJson(data));
273 } 274 }
274 275
275 /** 276 /**
276 * Changes the plan of a subscription 277 * Changes the plan of a subscription
277 * 278 *
278 * [request] - The metadata request object. 279 * [request] - The metadata request object.
279 * 280 *
280 * Request parameters: 281 * Request parameters:
281 * 282 *
282 * [customerId] - Id of the Customer 283 * [customerId] - Id of the Customer
283 * 284 *
284 * [subscriptionId] - Id of the subscription, which is unique for a customer 285 * [subscriptionId] - Id of the subscription, which is unique for a customer
285 * 286 *
286 * Completes with a [Subscription]. 287 * Completes with a [Subscription].
287 * 288 *
288 * Completes with a [common.ApiRequestError] if the API endpoint returned an 289 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
289 * error. 290 * error.
290 * 291 *
291 * If the used [http.Client] completes with an error when making a REST call, 292 * If the used [http.Client] completes with an error when making a REST call,
292 * this method will complete with the same error. 293 * this method will complete with the same error.
293 */ 294 */
294 async.Future<Subscription> changePlan(ChangePlanRequest request, core.String c ustomerId, core.String subscriptionId) { 295 async.Future<Subscription> changePlan(ChangePlanRequest request, core.String c ustomerId, core.String subscriptionId) {
295 var _url = null; 296 var _url = null;
296 var _queryParams = new core.Map(); 297 var _queryParams = new core.Map();
297 var _uploadMedia = null; 298 var _uploadMedia = null;
298 var _uploadOptions = null; 299 var _uploadOptions = null;
299 var _downloadOptions = common.DownloadOptions.Metadata; 300 var _downloadOptions = commons.DownloadOptions.Metadata;
300 var _body = null; 301 var _body = null;
301 302
302 if (request != null) { 303 if (request != null) {
303 _body = convert.JSON.encode((request).toJson()); 304 _body = convert.JSON.encode((request).toJson());
304 } 305 }
305 if (customerId == null) { 306 if (customerId == null) {
306 throw new core.ArgumentError("Parameter customerId is required."); 307 throw new core.ArgumentError("Parameter customerId is required.");
307 } 308 }
308 if (subscriptionId == null) { 309 if (subscriptionId == null) {
309 throw new core.ArgumentError("Parameter subscriptionId is required."); 310 throw new core.ArgumentError("Parameter subscriptionId is required.");
310 } 311 }
311 312
312 313
313 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId') + '/subscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId') + '/changePlan'; 314 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/changePlan';
314 315
315 var _response = _requester.request(_url, 316 var _response = _requester.request(_url,
316 "POST", 317 "POST",
317 body: _body, 318 body: _body,
318 queryParams: _queryParams, 319 queryParams: _queryParams,
319 uploadOptions: _uploadOptions, 320 uploadOptions: _uploadOptions,
320 uploadMedia: _uploadMedia, 321 uploadMedia: _uploadMedia,
321 downloadOptions: _downloadOptions); 322 downloadOptions: _downloadOptions);
322 return _response.then((data) => new Subscription.fromJson(data)); 323 return _response.then((data) => new Subscription.fromJson(data));
323 } 324 }
324 325
325 /** 326 /**
326 * Changes the renewal settings of a subscription 327 * Changes the renewal settings of a subscription
327 * 328 *
328 * [request] - The metadata request object. 329 * [request] - The metadata request object.
329 * 330 *
330 * Request parameters: 331 * Request parameters:
331 * 332 *
332 * [customerId] - Id of the Customer 333 * [customerId] - Id of the Customer
333 * 334 *
334 * [subscriptionId] - Id of the subscription, which is unique for a customer 335 * [subscriptionId] - Id of the subscription, which is unique for a customer
335 * 336 *
336 * Completes with a [Subscription]. 337 * Completes with a [Subscription].
337 * 338 *
338 * Completes with a [common.ApiRequestError] if the API endpoint returned an 339 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
339 * error. 340 * error.
340 * 341 *
341 * If the used [http.Client] completes with an error when making a REST call, 342 * If the used [http.Client] completes with an error when making a REST call,
342 * this method will complete with the same error. 343 * this method will complete with the same error.
343 */ 344 */
344 async.Future<Subscription> changeRenewalSettings(RenewalSettings request, core .String customerId, core.String subscriptionId) { 345 async.Future<Subscription> changeRenewalSettings(RenewalSettings request, core .String customerId, core.String subscriptionId) {
345 var _url = null; 346 var _url = null;
346 var _queryParams = new core.Map(); 347 var _queryParams = new core.Map();
347 var _uploadMedia = null; 348 var _uploadMedia = null;
348 var _uploadOptions = null; 349 var _uploadOptions = null;
349 var _downloadOptions = common.DownloadOptions.Metadata; 350 var _downloadOptions = commons.DownloadOptions.Metadata;
350 var _body = null; 351 var _body = null;
351 352
352 if (request != null) { 353 if (request != null) {
353 _body = convert.JSON.encode((request).toJson()); 354 _body = convert.JSON.encode((request).toJson());
354 } 355 }
355 if (customerId == null) { 356 if (customerId == null) {
356 throw new core.ArgumentError("Parameter customerId is required."); 357 throw new core.ArgumentError("Parameter customerId is required.");
357 } 358 }
358 if (subscriptionId == null) { 359 if (subscriptionId == null) {
359 throw new core.ArgumentError("Parameter subscriptionId is required."); 360 throw new core.ArgumentError("Parameter subscriptionId is required.");
360 } 361 }
361 362
362 363
363 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId') + '/subscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId') + '/changeRenewalSettings'; 364 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/changeRenewalS ettings';
364 365
365 var _response = _requester.request(_url, 366 var _response = _requester.request(_url,
366 "POST", 367 "POST",
367 body: _body, 368 body: _body,
368 queryParams: _queryParams, 369 queryParams: _queryParams,
369 uploadOptions: _uploadOptions, 370 uploadOptions: _uploadOptions,
370 uploadMedia: _uploadMedia, 371 uploadMedia: _uploadMedia,
371 downloadOptions: _downloadOptions); 372 downloadOptions: _downloadOptions);
372 return _response.then((data) => new Subscription.fromJson(data)); 373 return _response.then((data) => new Subscription.fromJson(data));
373 } 374 }
374 375
375 /** 376 /**
376 * Changes the seats configuration of a subscription 377 * Changes the seats configuration of a subscription
377 * 378 *
378 * [request] - The metadata request object. 379 * [request] - The metadata request object.
379 * 380 *
380 * Request parameters: 381 * Request parameters:
381 * 382 *
382 * [customerId] - Id of the Customer 383 * [customerId] - Id of the Customer
383 * 384 *
384 * [subscriptionId] - Id of the subscription, which is unique for a customer 385 * [subscriptionId] - Id of the subscription, which is unique for a customer
385 * 386 *
386 * Completes with a [Subscription]. 387 * Completes with a [Subscription].
387 * 388 *
388 * Completes with a [common.ApiRequestError] if the API endpoint returned an 389 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
389 * error. 390 * error.
390 * 391 *
391 * If the used [http.Client] completes with an error when making a REST call, 392 * If the used [http.Client] completes with an error when making a REST call,
392 * this method will complete with the same error. 393 * this method will complete with the same error.
393 */ 394 */
394 async.Future<Subscription> changeSeats(Seats request, core.String customerId, core.String subscriptionId) { 395 async.Future<Subscription> changeSeats(Seats request, core.String customerId, core.String subscriptionId) {
395 var _url = null; 396 var _url = null;
396 var _queryParams = new core.Map(); 397 var _queryParams = new core.Map();
397 var _uploadMedia = null; 398 var _uploadMedia = null;
398 var _uploadOptions = null; 399 var _uploadOptions = null;
399 var _downloadOptions = common.DownloadOptions.Metadata; 400 var _downloadOptions = commons.DownloadOptions.Metadata;
400 var _body = null; 401 var _body = null;
401 402
402 if (request != null) { 403 if (request != null) {
403 _body = convert.JSON.encode((request).toJson()); 404 _body = convert.JSON.encode((request).toJson());
404 } 405 }
405 if (customerId == null) { 406 if (customerId == null) {
406 throw new core.ArgumentError("Parameter customerId is required."); 407 throw new core.ArgumentError("Parameter customerId is required.");
407 } 408 }
408 if (subscriptionId == null) { 409 if (subscriptionId == null) {
409 throw new core.ArgumentError("Parameter subscriptionId is required."); 410 throw new core.ArgumentError("Parameter subscriptionId is required.");
410 } 411 }
411 412
412 413
413 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId') + '/subscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId') + '/changeSeats'; 414 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/changeSeats';
414 415
415 var _response = _requester.request(_url, 416 var _response = _requester.request(_url,
416 "POST", 417 "POST",
417 body: _body, 418 body: _body,
418 queryParams: _queryParams, 419 queryParams: _queryParams,
419 uploadOptions: _uploadOptions, 420 uploadOptions: _uploadOptions,
420 uploadMedia: _uploadMedia, 421 uploadMedia: _uploadMedia,
421 downloadOptions: _downloadOptions); 422 downloadOptions: _downloadOptions);
422 return _response.then((data) => new Subscription.fromJson(data)); 423 return _response.then((data) => new Subscription.fromJson(data));
423 } 424 }
424 425
425 /** 426 /**
426 * Cancels/Downgrades a subscription. 427 * Cancels/Downgrades a subscription.
427 * 428 *
428 * Request parameters: 429 * Request parameters:
429 * 430 *
430 * [customerId] - Id of the Customer 431 * [customerId] - Id of the Customer
431 * 432 *
432 * [subscriptionId] - Id of the subscription, which is unique for a customer 433 * [subscriptionId] - Id of the subscription, which is unique for a customer
433 * 434 *
434 * [deletionType] - Whether the subscription is to be fully cancelled or 435 * [deletionType] - Whether the subscription is to be fully cancelled or
435 * downgraded 436 * downgraded
436 * Possible string values are: 437 * Possible string values are:
437 * - "cancel" : Cancels the subscription immediately 438 * - "cancel" : Cancels the subscription immediately
438 * - "downgrade" : Downgrades a Google Apps for Business subscription to 439 * - "downgrade" : Downgrades a Google Apps for Business subscription to
439 * Google Apps 440 * Google Apps
440 * - "suspend" : Suspends the subscriptions for 4 days before cancelling it 441 * - "suspend" : Suspends the subscriptions for 4 days before cancelling it
441 * - "transfer_to_direct" : Transfers a subscription directly to Google 442 * - "transfer_to_direct" : Transfers a subscription directly to Google
442 * 443 *
443 * Completes with a [common.ApiRequestError] if the API endpoint returned an 444 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
444 * error. 445 * error.
445 * 446 *
446 * If the used [http.Client] completes with an error when making a REST call, 447 * If the used [http.Client] completes with an error when making a REST call,
447 * this method will complete with the same error. 448 * this method will complete with the same error.
448 */ 449 */
449 async.Future delete(core.String customerId, core.String subscriptionId, core.S tring deletionType) { 450 async.Future delete(core.String customerId, core.String subscriptionId, core.S tring deletionType) {
450 var _url = null; 451 var _url = null;
451 var _queryParams = new core.Map(); 452 var _queryParams = new core.Map();
452 var _uploadMedia = null; 453 var _uploadMedia = null;
453 var _uploadOptions = null; 454 var _uploadOptions = null;
454 var _downloadOptions = common.DownloadOptions.Metadata; 455 var _downloadOptions = commons.DownloadOptions.Metadata;
455 var _body = null; 456 var _body = null;
456 457
457 if (customerId == null) { 458 if (customerId == null) {
458 throw new core.ArgumentError("Parameter customerId is required."); 459 throw new core.ArgumentError("Parameter customerId is required.");
459 } 460 }
460 if (subscriptionId == null) { 461 if (subscriptionId == null) {
461 throw new core.ArgumentError("Parameter subscriptionId is required."); 462 throw new core.ArgumentError("Parameter subscriptionId is required.");
462 } 463 }
463 if (deletionType == null) { 464 if (deletionType == null) {
464 throw new core.ArgumentError("Parameter deletionType is required."); 465 throw new core.ArgumentError("Parameter deletionType is required.");
465 } 466 }
466 _queryParams["deletionType"] = [deletionType]; 467 _queryParams["deletionType"] = [deletionType];
467 468
468 _downloadOptions = null; 469 _downloadOptions = null;
469 470
470 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId') + '/subscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId'); 471 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc riptions/' + commons.Escaper.ecapeVariable('$subscriptionId');
471 472
472 var _response = _requester.request(_url, 473 var _response = _requester.request(_url,
473 "DELETE", 474 "DELETE",
474 body: _body, 475 body: _body,
475 queryParams: _queryParams, 476 queryParams: _queryParams,
476 uploadOptions: _uploadOptions, 477 uploadOptions: _uploadOptions,
477 uploadMedia: _uploadMedia, 478 uploadMedia: _uploadMedia,
478 downloadOptions: _downloadOptions); 479 downloadOptions: _downloadOptions);
479 return _response.then((data) => null); 480 return _response.then((data) => null);
480 } 481 }
481 482
482 /** 483 /**
483 * Gets a subscription of the customer. 484 * Gets a subscription of the customer.
484 * 485 *
485 * Request parameters: 486 * Request parameters:
486 * 487 *
487 * [customerId] - Id of the Customer 488 * [customerId] - Id of the Customer
488 * 489 *
489 * [subscriptionId] - Id of the subscription, which is unique for a customer 490 * [subscriptionId] - Id of the subscription, which is unique for a customer
490 * 491 *
491 * Completes with a [Subscription]. 492 * Completes with a [Subscription].
492 * 493 *
493 * Completes with a [common.ApiRequestError] if the API endpoint returned an 494 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
494 * error. 495 * error.
495 * 496 *
496 * If the used [http.Client] completes with an error when making a REST call, 497 * If the used [http.Client] completes with an error when making a REST call,
497 * this method will complete with the same error. 498 * this method will complete with the same error.
498 */ 499 */
499 async.Future<Subscription> get(core.String customerId, core.String subscriptio nId) { 500 async.Future<Subscription> get(core.String customerId, core.String subscriptio nId) {
500 var _url = null; 501 var _url = null;
501 var _queryParams = new core.Map(); 502 var _queryParams = new core.Map();
502 var _uploadMedia = null; 503 var _uploadMedia = null;
503 var _uploadOptions = null; 504 var _uploadOptions = null;
504 var _downloadOptions = common.DownloadOptions.Metadata; 505 var _downloadOptions = commons.DownloadOptions.Metadata;
505 var _body = null; 506 var _body = null;
506 507
507 if (customerId == null) { 508 if (customerId == null) {
508 throw new core.ArgumentError("Parameter customerId is required."); 509 throw new core.ArgumentError("Parameter customerId is required.");
509 } 510 }
510 if (subscriptionId == null) { 511 if (subscriptionId == null) {
511 throw new core.ArgumentError("Parameter subscriptionId is required."); 512 throw new core.ArgumentError("Parameter subscriptionId is required.");
512 } 513 }
513 514
514 515
515 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId') + '/subscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId'); 516 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc riptions/' + commons.Escaper.ecapeVariable('$subscriptionId');
516 517
517 var _response = _requester.request(_url, 518 var _response = _requester.request(_url,
518 "GET", 519 "GET",
519 body: _body, 520 body: _body,
520 queryParams: _queryParams, 521 queryParams: _queryParams,
521 uploadOptions: _uploadOptions, 522 uploadOptions: _uploadOptions,
522 uploadMedia: _uploadMedia, 523 uploadMedia: _uploadMedia,
523 downloadOptions: _downloadOptions); 524 downloadOptions: _downloadOptions);
524 return _response.then((data) => new Subscription.fromJson(data)); 525 return _response.then((data) => new Subscription.fromJson(data));
525 } 526 }
526 527
527 /** 528 /**
528 * Creates/Transfers a subscription for the customer. 529 * Creates/Transfers a subscription for the customer.
529 * 530 *
530 * [request] - The metadata request object. 531 * [request] - The metadata request object.
531 * 532 *
532 * Request parameters: 533 * Request parameters:
533 * 534 *
534 * [customerId] - Id of the Customer 535 * [customerId] - Id of the Customer
535 * 536 *
536 * [customerAuthToken] - An auth token needed for transferring a subscription. 537 * [customerAuthToken] - An auth token needed for transferring a subscription.
537 * Can be generated at 538 * Can be generated at
538 * https://www.google.com/a/cpanel/customer-domain/TransferToken. Optional. 539 * https://www.google.com/a/cpanel/customer-domain/TransferToken. Optional.
539 * 540 *
540 * Completes with a [Subscription]. 541 * Completes with a [Subscription].
541 * 542 *
542 * Completes with a [common.ApiRequestError] if the API endpoint returned an 543 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
543 * error. 544 * error.
544 * 545 *
545 * If the used [http.Client] completes with an error when making a REST call, 546 * If the used [http.Client] completes with an error when making a REST call,
546 * this method will complete with the same error. 547 * this method will complete with the same error.
547 */ 548 */
548 async.Future<Subscription> insert(Subscription request, core.String customerId , {core.String customerAuthToken}) { 549 async.Future<Subscription> insert(Subscription request, core.String customerId , {core.String customerAuthToken}) {
549 var _url = null; 550 var _url = null;
550 var _queryParams = new core.Map(); 551 var _queryParams = new core.Map();
551 var _uploadMedia = null; 552 var _uploadMedia = null;
552 var _uploadOptions = null; 553 var _uploadOptions = null;
553 var _downloadOptions = common.DownloadOptions.Metadata; 554 var _downloadOptions = commons.DownloadOptions.Metadata;
554 var _body = null; 555 var _body = null;
555 556
556 if (request != null) { 557 if (request != null) {
557 _body = convert.JSON.encode((request).toJson()); 558 _body = convert.JSON.encode((request).toJson());
558 } 559 }
559 if (customerId == null) { 560 if (customerId == null) {
560 throw new core.ArgumentError("Parameter customerId is required."); 561 throw new core.ArgumentError("Parameter customerId is required.");
561 } 562 }
562 if (customerAuthToken != null) { 563 if (customerAuthToken != null) {
563 _queryParams["customerAuthToken"] = [customerAuthToken]; 564 _queryParams["customerAuthToken"] = [customerAuthToken];
564 } 565 }
565 566
566 567
567 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId') + '/subscriptions'; 568 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc riptions';
568 569
569 var _response = _requester.request(_url, 570 var _response = _requester.request(_url,
570 "POST", 571 "POST",
571 body: _body, 572 body: _body,
572 queryParams: _queryParams, 573 queryParams: _queryParams,
573 uploadOptions: _uploadOptions, 574 uploadOptions: _uploadOptions,
574 uploadMedia: _uploadMedia, 575 uploadMedia: _uploadMedia,
575 downloadOptions: _downloadOptions); 576 downloadOptions: _downloadOptions);
576 return _response.then((data) => new Subscription.fromJson(data)); 577 return _response.then((data) => new Subscription.fromJson(data));
577 } 578 }
(...skipping 13 matching lines...)
591 * [customerNamePrefix] - Prefix of the customer's domain name by which the 592 * [customerNamePrefix] - Prefix of the customer's domain name by which the
592 * subscriptions should be filtered. Optional 593 * subscriptions should be filtered. Optional
593 * 594 *
594 * [maxResults] - Maximum number of results to return 595 * [maxResults] - Maximum number of results to return
595 * Value must be between "1" and "100". 596 * Value must be between "1" and "100".
596 * 597 *
597 * [pageToken] - Token to specify next page in the list 598 * [pageToken] - Token to specify next page in the list
598 * 599 *
599 * Completes with a [Subscriptions]. 600 * Completes with a [Subscriptions].
600 * 601 *
601 * Completes with a [common.ApiRequestError] if the API endpoint returned an 602 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
602 * error. 603 * error.
603 * 604 *
604 * If the used [http.Client] completes with an error when making a REST call, 605 * If the used [http.Client] completes with an error when making a REST call,
605 * this method will complete with the same error. 606 * this method will complete with the same error.
606 */ 607 */
607 async.Future<Subscriptions> list({core.String customerAuthToken, core.String c ustomerId, core.String customerNamePrefix, core.int maxResults, core.String page Token}) { 608 async.Future<Subscriptions> list({core.String customerAuthToken, core.String c ustomerId, core.String customerNamePrefix, core.int maxResults, core.String page Token}) {
608 var _url = null; 609 var _url = null;
609 var _queryParams = new core.Map(); 610 var _queryParams = new core.Map();
610 var _uploadMedia = null; 611 var _uploadMedia = null;
611 var _uploadOptions = null; 612 var _uploadOptions = null;
612 var _downloadOptions = common.DownloadOptions.Metadata; 613 var _downloadOptions = commons.DownloadOptions.Metadata;
613 var _body = null; 614 var _body = null;
614 615
615 if (customerAuthToken != null) { 616 if (customerAuthToken != null) {
616 _queryParams["customerAuthToken"] = [customerAuthToken]; 617 _queryParams["customerAuthToken"] = [customerAuthToken];
617 } 618 }
618 if (customerId != null) { 619 if (customerId != null) {
619 _queryParams["customerId"] = [customerId]; 620 _queryParams["customerId"] = [customerId];
620 } 621 }
621 if (customerNamePrefix != null) { 622 if (customerNamePrefix != null) {
622 _queryParams["customerNamePrefix"] = [customerNamePrefix]; 623 _queryParams["customerNamePrefix"] = [customerNamePrefix];
(...skipping 22 matching lines...)
645 * Starts paid service of a trial subscription 646 * Starts paid service of a trial subscription
646 * 647 *
647 * Request parameters: 648 * Request parameters:
648 * 649 *
649 * [customerId] - Id of the Customer 650 * [customerId] - Id of the Customer
650 * 651 *
651 * [subscriptionId] - Id of the subscription, which is unique for a customer 652 * [subscriptionId] - Id of the subscription, which is unique for a customer
652 * 653 *
653 * Completes with a [Subscription]. 654 * Completes with a [Subscription].
654 * 655 *
655 * Completes with a [common.ApiRequestError] if the API endpoint returned an 656 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
656 * error. 657 * error.
657 * 658 *
658 * If the used [http.Client] completes with an error when making a REST call, 659 * If the used [http.Client] completes with an error when making a REST call,
659 * this method will complete with the same error. 660 * this method will complete with the same error.
660 */ 661 */
661 async.Future<Subscription> startPaidService(core.String customerId, core.Strin g subscriptionId) { 662 async.Future<Subscription> startPaidService(core.String customerId, core.Strin g subscriptionId) {
662 var _url = null; 663 var _url = null;
663 var _queryParams = new core.Map(); 664 var _queryParams = new core.Map();
664 var _uploadMedia = null; 665 var _uploadMedia = null;
665 var _uploadOptions = null; 666 var _uploadOptions = null;
666 var _downloadOptions = common.DownloadOptions.Metadata; 667 var _downloadOptions = commons.DownloadOptions.Metadata;
667 var _body = null; 668 var _body = null;
668 669
669 if (customerId == null) { 670 if (customerId == null) {
670 throw new core.ArgumentError("Parameter customerId is required."); 671 throw new core.ArgumentError("Parameter customerId is required.");
671 } 672 }
672 if (subscriptionId == null) { 673 if (subscriptionId == null) {
673 throw new core.ArgumentError("Parameter subscriptionId is required."); 674 throw new core.ArgumentError("Parameter subscriptionId is required.");
674 } 675 }
675 676
676 677
677 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId') + '/subscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId') + '/startPaidService'; 678 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/startPaidServi ce';
678 679
679 var _response = _requester.request(_url, 680 var _response = _requester.request(_url,
680 "POST", 681 "POST",
681 body: _body, 682 body: _body,
682 queryParams: _queryParams, 683 queryParams: _queryParams,
683 uploadOptions: _uploadOptions, 684 uploadOptions: _uploadOptions,
684 uploadMedia: _uploadMedia, 685 uploadMedia: _uploadMedia,
685 downloadOptions: _downloadOptions); 686 downloadOptions: _downloadOptions);
686 return _response.then((data) => new Subscription.fromJson(data)); 687 return _response.then((data) => new Subscription.fromJson(data));
687 } 688 }
688 689
689 /** 690 /**
690 * Suspends an active subscription 691 * Suspends an active subscription
691 * 692 *
692 * Request parameters: 693 * Request parameters:
693 * 694 *
694 * [customerId] - Id of the Customer 695 * [customerId] - Id of the Customer
695 * 696 *
696 * [subscriptionId] - Id of the subscription, which is unique for a customer 697 * [subscriptionId] - Id of the subscription, which is unique for a customer
697 * 698 *
698 * Completes with a [Subscription]. 699 * Completes with a [Subscription].
699 * 700 *
700 * Completes with a [common.ApiRequestError] if the API endpoint returned an 701 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
701 * error. 702 * error.
702 * 703 *
703 * If the used [http.Client] completes with an error when making a REST call, 704 * If the used [http.Client] completes with an error when making a REST call,
704 * this method will complete with the same error. 705 * this method will complete with the same error.
705 */ 706 */
706 async.Future<Subscription> suspend(core.String customerId, core.String subscri ptionId) { 707 async.Future<Subscription> suspend(core.String customerId, core.String subscri ptionId) {
707 var _url = null; 708 var _url = null;
708 var _queryParams = new core.Map(); 709 var _queryParams = new core.Map();
709 var _uploadMedia = null; 710 var _uploadMedia = null;
710 var _uploadOptions = null; 711 var _uploadOptions = null;
711 var _downloadOptions = common.DownloadOptions.Metadata; 712 var _downloadOptions = commons.DownloadOptions.Metadata;
712 var _body = null; 713 var _body = null;
713 714
714 if (customerId == null) { 715 if (customerId == null) {
715 throw new core.ArgumentError("Parameter customerId is required."); 716 throw new core.ArgumentError("Parameter customerId is required.");
716 } 717 }
717 if (subscriptionId == null) { 718 if (subscriptionId == null) {
718 throw new core.ArgumentError("Parameter subscriptionId is required."); 719 throw new core.ArgumentError("Parameter subscriptionId is required.");
719 } 720 }
720 721
721 722
722 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId') + '/subscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId') + '/suspend'; 723 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/suspend';
723 724
724 var _response = _requester.request(_url, 725 var _response = _requester.request(_url,
725 "POST", 726 "POST",
726 body: _body, 727 body: _body,
727 queryParams: _queryParams, 728 queryParams: _queryParams,
728 uploadOptions: _uploadOptions, 729 uploadOptions: _uploadOptions,
729 uploadMedia: _uploadMedia, 730 uploadMedia: _uploadMedia,
730 downloadOptions: _downloadOptions); 731 downloadOptions: _downloadOptions);
731 return _response.then((data) => new Subscription.fromJson(data)); 732 return _response.then((data) => new Subscription.fromJson(data));
732 } 733 }
(...skipping 411 matching lines...)
1144 if (planName != null) { 1145 if (planName != null) {
1145 _json["planName"] = planName; 1146 _json["planName"] = planName;
1146 } 1147 }
1147 return _json; 1148 return _json;
1148 } 1149 }
1149 } 1150 }
1150 1151
1151 1152
1152 /** Transfer related information for the subscription. */ 1153 /** Transfer related information for the subscription. */
1153 class SubscriptionTransferInfo { 1154 class SubscriptionTransferInfo {
1154 /** Not documented yet. */
1155 core.int minimumTransferableSeats; 1155 core.int minimumTransferableSeats;
1156 1156
1157 /** Time when transfer token or intent to transfer will expire. */ 1157 /** Time when transfer token or intent to transfer will expire. */
1158 core.String transferabilityExpirationTime; 1158 core.String transferabilityExpirationTime;
1159 1159
1160 1160
1161 SubscriptionTransferInfo(); 1161 SubscriptionTransferInfo();
1162 1162
1163 SubscriptionTransferInfo.fromJson(core.Map _json) { 1163 SubscriptionTransferInfo.fromJson(core.Map _json) {
1164 if (_json.containsKey("minimumTransferableSeats")) { 1164 if (_json.containsKey("minimumTransferableSeats")) {
(...skipping 227 matching lines...)
1392 } 1392 }
1393 if (nextPageToken != null) { 1393 if (nextPageToken != null) {
1394 _json["nextPageToken"] = nextPageToken; 1394 _json["nextPageToken"] = nextPageToken;
1395 } 1395 }
1396 if (subscriptions != null) { 1396 if (subscriptions != null) {
1397 _json["subscriptions"] = subscriptions.map((value) => (value).toJson()).to List(); 1397 _json["subscriptions"] = subscriptions.map((value) => (value).toJson()).to List();
1398 } 1398 }
1399 return _json; 1399 return _json;
1400 } 1400 }
1401 } 1401 }
1402
1403
OLDNEW
« no previous file with comments | « generated/googleapis/lib/qpxexpress/v1.dart ('k') | generated/googleapis/lib/siteverification/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine