OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.reseller.v1; | 3 library googleapis.reseller.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client reseller/v1'; | 15 const core.String USER_AGENT = 'dart-api-client reseller/v1'; |
16 | 16 |
17 /** Creates and manages your customers and their subscriptions. */ | 17 /// Creates and manages your customers and their subscriptions. |
18 class ResellerApi { | 18 class ResellerApi { |
19 /** Manage users on your domain */ | 19 /// Manage users on your domain |
20 static const AppsOrderScope = "https://www.googleapis.com/auth/apps.order"; | 20 static const AppsOrderScope = "https://www.googleapis.com/auth/apps.order"; |
21 | 21 |
22 /** Manage users on your domain */ | 22 /// Manage users on your domain |
23 static const AppsOrderReadonlyScope = "https://www.googleapis.com/auth/apps.or
der.readonly"; | 23 static const AppsOrderReadonlyScope = |
24 | 24 "https://www.googleapis.com/auth/apps.order.readonly"; |
25 | 25 |
26 final commons.ApiRequester _requester; | 26 final commons.ApiRequester _requester; |
27 | 27 |
28 CustomersResourceApi get customers => new CustomersResourceApi(_requester); | 28 CustomersResourceApi get customers => new CustomersResourceApi(_requester); |
29 ResellernotifyResourceApi get resellernotify => new ResellernotifyResourceApi(
_requester); | 29 ResellernotifyResourceApi get resellernotify => |
30 SubscriptionsResourceApi get subscriptions => new SubscriptionsResourceApi(_re
quester); | 30 new ResellernotifyResourceApi(_requester); |
| 31 SubscriptionsResourceApi get subscriptions => |
| 32 new SubscriptionsResourceApi(_requester); |
31 | 33 |
32 ResellerApi(http.Client client, {core.String rootUrl: "https://www.googleapis.
com/", core.String servicePath: "apps/reseller/v1/"}) : | 34 ResellerApi(http.Client client, |
33 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 35 {core.String rootUrl: "https://www.googleapis.com/", |
| 36 core.String servicePath: "apps/reseller/v1/"}) |
| 37 : _requester = |
| 38 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
34 } | 39 } |
35 | 40 |
36 | |
37 class CustomersResourceApi { | 41 class CustomersResourceApi { |
38 final commons.ApiRequester _requester; | 42 final commons.ApiRequester _requester; |
39 | 43 |
40 CustomersResourceApi(commons.ApiRequester client) : | 44 CustomersResourceApi(commons.ApiRequester client) : _requester = client; |
41 _requester = client; | |
42 | 45 |
43 /** | 46 /// Get a customer account. |
44 * Get a customer account. | 47 /// |
45 * | 48 /// Request parameters: |
46 * Request parameters: | 49 /// |
47 * | 50 /// [customerId] - Either the customer's primary domain name or the |
48 * [customerId] - Either the customer's primary domain name or the customer's | 51 /// customer's unique identifier. If using the domain name, we do not |
49 * unique identifier. If using the domain name, we do not recommend using a | 52 /// recommend using a customerId as a key for persistent data. If the domain |
50 * customerId as a key for persistent data. If the domain name for a | 53 /// name for a customerId is changed, the Google system automatically |
51 * customerId is changed, the Google system automatically updates. | 54 /// updates. |
52 * | 55 /// |
53 * Completes with a [Customer]. | 56 /// Completes with a [Customer]. |
54 * | 57 /// |
55 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 58 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
56 * error. | 59 /// an error. |
57 * | 60 /// |
58 * If the used [http.Client] completes with an error when making a REST call, | 61 /// If the used [http.Client] completes with an error when making a REST |
59 * this method will complete with the same error. | 62 /// call, this method will complete with the same error. |
60 */ | |
61 async.Future<Customer> get(core.String customerId) { | 63 async.Future<Customer> get(core.String customerId) { |
62 var _url = null; | 64 var _url = null; |
63 var _queryParams = new core.Map(); | 65 var _queryParams = new core.Map(); |
64 var _uploadMedia = null; | 66 var _uploadMedia = null; |
65 var _uploadOptions = null; | 67 var _uploadOptions = null; |
66 var _downloadOptions = commons.DownloadOptions.Metadata; | 68 var _downloadOptions = commons.DownloadOptions.Metadata; |
67 var _body = null; | 69 var _body = null; |
68 | 70 |
69 if (customerId == null) { | 71 if (customerId == null) { |
70 throw new core.ArgumentError("Parameter customerId is required."); | 72 throw new core.ArgumentError("Parameter customerId is required."); |
71 } | 73 } |
72 | 74 |
73 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId'); | 75 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId'); |
74 | 76 |
75 var _response = _requester.request(_url, | 77 var _response = _requester.request(_url, "GET", |
76 "GET", | 78 body: _body, |
77 body: _body, | 79 queryParams: _queryParams, |
78 queryParams: _queryParams, | 80 uploadOptions: _uploadOptions, |
79 uploadOptions: _uploadOptions, | 81 uploadMedia: _uploadMedia, |
80 uploadMedia: _uploadMedia, | 82 downloadOptions: _downloadOptions); |
81 downloadOptions: _downloadOptions); | |
82 return _response.then((data) => new Customer.fromJson(data)); | 83 return _response.then((data) => new Customer.fromJson(data)); |
83 } | 84 } |
84 | 85 |
85 /** | 86 /// Order a new customer's account. |
86 * Order a new customer's account. | 87 /// |
87 * | 88 /// [request] - The metadata request object. |
88 * [request] - The metadata request object. | 89 /// |
89 * | 90 /// Request parameters: |
90 * Request parameters: | 91 /// |
91 * | 92 /// [customerAuthToken] - The customerAuthToken query string is required when |
92 * [customerAuthToken] - The customerAuthToken query string is required when | 93 /// creating a resold account that transfers a direct customer's subscription |
93 * creating a resold account that transfers a direct customer's subscription | 94 /// or transfers another reseller customer's subscription to your reseller |
94 * or transfers another reseller customer's subscription to your reseller | 95 /// management. This is a hexadecimal authentication token needed to complete |
95 * management. This is a hexadecimal authentication token needed to complete | 96 /// the subscription transfer. For more information, see the administrator |
96 * the subscription transfer. For more information, see the administrator help | 97 /// help center. |
97 * center. | 98 /// |
98 * | 99 /// Completes with a [Customer]. |
99 * Completes with a [Customer]. | 100 /// |
100 * | 101 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
101 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 102 /// an error. |
102 * error. | 103 /// |
103 * | 104 /// If the used [http.Client] completes with an error when making a REST |
104 * If the used [http.Client] completes with an error when making a REST call, | 105 /// call, this method will complete with the same error. |
105 * this method will complete with the same error. | 106 async.Future<Customer> insert(Customer request, |
106 */ | 107 {core.String customerAuthToken}) { |
107 async.Future<Customer> insert(Customer request, {core.String customerAuthToken
}) { | |
108 var _url = null; | 108 var _url = null; |
109 var _queryParams = new core.Map(); | 109 var _queryParams = new core.Map(); |
110 var _uploadMedia = null; | 110 var _uploadMedia = null; |
111 var _uploadOptions = null; | 111 var _uploadOptions = null; |
112 var _downloadOptions = commons.DownloadOptions.Metadata; | 112 var _downloadOptions = commons.DownloadOptions.Metadata; |
113 var _body = null; | 113 var _body = null; |
114 | 114 |
115 if (request != null) { | 115 if (request != null) { |
116 _body = convert.JSON.encode((request).toJson()); | 116 _body = convert.JSON.encode((request).toJson()); |
117 } | 117 } |
118 if (customerAuthToken != null) { | 118 if (customerAuthToken != null) { |
119 _queryParams["customerAuthToken"] = [customerAuthToken]; | 119 _queryParams["customerAuthToken"] = [customerAuthToken]; |
120 } | 120 } |
121 | 121 |
122 _url = 'customers'; | 122 _url = 'customers'; |
123 | 123 |
124 var _response = _requester.request(_url, | 124 var _response = _requester.request(_url, "POST", |
125 "POST", | 125 body: _body, |
126 body: _body, | 126 queryParams: _queryParams, |
127 queryParams: _queryParams, | 127 uploadOptions: _uploadOptions, |
128 uploadOptions: _uploadOptions, | 128 uploadMedia: _uploadMedia, |
129 uploadMedia: _uploadMedia, | 129 downloadOptions: _downloadOptions); |
130 downloadOptions: _downloadOptions); | |
131 return _response.then((data) => new Customer.fromJson(data)); | 130 return _response.then((data) => new Customer.fromJson(data)); |
132 } | 131 } |
133 | 132 |
134 /** | 133 /// Update a customer account's settings. This method supports patch |
135 * Update a customer account's settings. This method supports patch semantics. | 134 /// semantics. |
136 * | 135 /// |
137 * [request] - The metadata request object. | 136 /// [request] - The metadata request object. |
138 * | 137 /// |
139 * Request parameters: | 138 /// Request parameters: |
140 * | 139 /// |
141 * [customerId] - Either the customer's primary domain name or the customer's | 140 /// [customerId] - Either the customer's primary domain name or the |
142 * unique identifier. If using the domain name, we do not recommend using a | 141 /// customer's unique identifier. If using the domain name, we do not |
143 * customerId as a key for persistent data. If the domain name for a | 142 /// recommend using a customerId as a key for persistent data. If the domain |
144 * customerId is changed, the Google system automatically updates. | 143 /// name for a customerId is changed, the Google system automatically |
145 * | 144 /// updates. |
146 * Completes with a [Customer]. | 145 /// |
147 * | 146 /// Completes with a [Customer]. |
148 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 147 /// |
149 * error. | 148 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
150 * | 149 /// an error. |
151 * If the used [http.Client] completes with an error when making a REST call, | 150 /// |
152 * this method will complete with the same error. | 151 /// If the used [http.Client] completes with an error when making a REST |
153 */ | 152 /// call, this method will complete with the same error. |
154 async.Future<Customer> patch(Customer request, core.String customerId) { | 153 async.Future<Customer> patch(Customer request, core.String customerId) { |
155 var _url = null; | 154 var _url = null; |
156 var _queryParams = new core.Map(); | 155 var _queryParams = new core.Map(); |
157 var _uploadMedia = null; | 156 var _uploadMedia = null; |
158 var _uploadOptions = null; | 157 var _uploadOptions = null; |
159 var _downloadOptions = commons.DownloadOptions.Metadata; | 158 var _downloadOptions = commons.DownloadOptions.Metadata; |
160 var _body = null; | 159 var _body = null; |
161 | 160 |
162 if (request != null) { | 161 if (request != null) { |
163 _body = convert.JSON.encode((request).toJson()); | 162 _body = convert.JSON.encode((request).toJson()); |
164 } | 163 } |
165 if (customerId == null) { | 164 if (customerId == null) { |
166 throw new core.ArgumentError("Parameter customerId is required."); | 165 throw new core.ArgumentError("Parameter customerId is required."); |
167 } | 166 } |
168 | 167 |
169 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId'); | 168 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId'); |
170 | 169 |
171 var _response = _requester.request(_url, | 170 var _response = _requester.request(_url, "PATCH", |
172 "PATCH", | 171 body: _body, |
173 body: _body, | 172 queryParams: _queryParams, |
174 queryParams: _queryParams, | 173 uploadOptions: _uploadOptions, |
175 uploadOptions: _uploadOptions, | 174 uploadMedia: _uploadMedia, |
176 uploadMedia: _uploadMedia, | 175 downloadOptions: _downloadOptions); |
177 downloadOptions: _downloadOptions); | |
178 return _response.then((data) => new Customer.fromJson(data)); | 176 return _response.then((data) => new Customer.fromJson(data)); |
179 } | 177 } |
180 | 178 |
181 /** | 179 /// Update a customer account's settings. |
182 * Update a customer account's settings. | 180 /// |
183 * | 181 /// [request] - The metadata request object. |
184 * [request] - The metadata request object. | 182 /// |
185 * | 183 /// Request parameters: |
186 * Request parameters: | 184 /// |
187 * | 185 /// [customerId] - Either the customer's primary domain name or the |
188 * [customerId] - Either the customer's primary domain name or the customer's | 186 /// customer's unique identifier. If using the domain name, we do not |
189 * unique identifier. If using the domain name, we do not recommend using a | 187 /// recommend using a customerId as a key for persistent data. If the domain |
190 * customerId as a key for persistent data. If the domain name for a | 188 /// name for a customerId is changed, the Google system automatically |
191 * customerId is changed, the Google system automatically updates. | 189 /// updates. |
192 * | 190 /// |
193 * Completes with a [Customer]. | 191 /// Completes with a [Customer]. |
194 * | 192 /// |
195 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 193 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
196 * error. | 194 /// an error. |
197 * | 195 /// |
198 * If the used [http.Client] completes with an error when making a REST call, | 196 /// If the used [http.Client] completes with an error when making a REST |
199 * this method will complete with the same error. | 197 /// call, this method will complete with the same error. |
200 */ | |
201 async.Future<Customer> update(Customer request, core.String customerId) { | 198 async.Future<Customer> update(Customer request, core.String customerId) { |
202 var _url = null; | 199 var _url = null; |
203 var _queryParams = new core.Map(); | 200 var _queryParams = new core.Map(); |
204 var _uploadMedia = null; | 201 var _uploadMedia = null; |
205 var _uploadOptions = null; | 202 var _uploadOptions = null; |
206 var _downloadOptions = commons.DownloadOptions.Metadata; | 203 var _downloadOptions = commons.DownloadOptions.Metadata; |
207 var _body = null; | 204 var _body = null; |
208 | 205 |
209 if (request != null) { | 206 if (request != null) { |
210 _body = convert.JSON.encode((request).toJson()); | 207 _body = convert.JSON.encode((request).toJson()); |
211 } | 208 } |
212 if (customerId == null) { | 209 if (customerId == null) { |
213 throw new core.ArgumentError("Parameter customerId is required."); | 210 throw new core.ArgumentError("Parameter customerId is required."); |
214 } | 211 } |
215 | 212 |
216 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId'); | 213 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId'); |
217 | 214 |
218 var _response = _requester.request(_url, | 215 var _response = _requester.request(_url, "PUT", |
219 "PUT", | 216 body: _body, |
220 body: _body, | 217 queryParams: _queryParams, |
221 queryParams: _queryParams, | 218 uploadOptions: _uploadOptions, |
222 uploadOptions: _uploadOptions, | 219 uploadMedia: _uploadMedia, |
223 uploadMedia: _uploadMedia, | 220 downloadOptions: _downloadOptions); |
224 downloadOptions: _downloadOptions); | |
225 return _response.then((data) => new Customer.fromJson(data)); | 221 return _response.then((data) => new Customer.fromJson(data)); |
226 } | 222 } |
227 | |
228 } | 223 } |
229 | 224 |
230 | |
231 class ResellernotifyResourceApi { | 225 class ResellernotifyResourceApi { |
232 final commons.ApiRequester _requester; | 226 final commons.ApiRequester _requester; |
233 | 227 |
234 ResellernotifyResourceApi(commons.ApiRequester client) : | 228 ResellernotifyResourceApi(commons.ApiRequester client) : _requester = client; |
235 _requester = client; | |
236 | 229 |
237 /** | 230 /// Returns all the details of the watch corresponding to the reseller. |
238 * Returns all the details of the watch corresponding to the reseller. | 231 /// |
239 * | 232 /// Request parameters: |
240 * Request parameters: | 233 /// |
241 * | 234 /// Completes with a [ResellernotifyGetwatchdetailsResponse]. |
242 * Completes with a [ResellernotifyGetwatchdetailsResponse]. | 235 /// |
243 * | 236 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
244 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 237 /// an error. |
245 * error. | 238 /// |
246 * | 239 /// If the used [http.Client] completes with an error when making a REST |
247 * If the used [http.Client] completes with an error when making a REST call, | 240 /// call, this method will complete with the same error. |
248 * this method will complete with the same error. | |
249 */ | |
250 async.Future<ResellernotifyGetwatchdetailsResponse> getwatchdetails() { | 241 async.Future<ResellernotifyGetwatchdetailsResponse> getwatchdetails() { |
251 var _url = null; | 242 var _url = null; |
252 var _queryParams = new core.Map(); | 243 var _queryParams = new core.Map(); |
253 var _uploadMedia = null; | 244 var _uploadMedia = null; |
254 var _uploadOptions = null; | 245 var _uploadOptions = null; |
255 var _downloadOptions = commons.DownloadOptions.Metadata; | 246 var _downloadOptions = commons.DownloadOptions.Metadata; |
256 var _body = null; | 247 var _body = null; |
257 | 248 |
258 | |
259 _url = 'resellernotify/getwatchdetails'; | 249 _url = 'resellernotify/getwatchdetails'; |
260 | 250 |
261 var _response = _requester.request(_url, | 251 var _response = _requester.request(_url, "GET", |
262 "GET", | 252 body: _body, |
263 body: _body, | 253 queryParams: _queryParams, |
264 queryParams: _queryParams, | 254 uploadOptions: _uploadOptions, |
265 uploadOptions: _uploadOptions, | 255 uploadMedia: _uploadMedia, |
266 uploadMedia: _uploadMedia, | 256 downloadOptions: _downloadOptions); |
267 downloadOptions: _downloadOptions); | 257 return _response.then( |
268 return _response.then((data) => new ResellernotifyGetwatchdetailsResponse.fr
omJson(data)); | 258 (data) => new ResellernotifyGetwatchdetailsResponse.fromJson(data)); |
269 } | 259 } |
270 | 260 |
271 /** | 261 /// Registers a Reseller for receiving notifications. |
272 * Registers a Reseller for receiving notifications. | 262 /// |
273 * | 263 /// Request parameters: |
274 * Request parameters: | 264 /// |
275 * | 265 /// [serviceAccountEmailAddress] - The service account which will own the |
276 * [serviceAccountEmailAddress] - The service account which will own the | 266 /// created Cloud-PubSub topic. |
277 * created Cloud-PubSub topic. | 267 /// |
278 * | 268 /// Completes with a [ResellernotifyResource]. |
279 * Completes with a [ResellernotifyResource]. | 269 /// |
280 * | 270 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
281 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 271 /// an error. |
282 * error. | 272 /// |
283 * | 273 /// If the used [http.Client] completes with an error when making a REST |
284 * If the used [http.Client] completes with an error when making a REST call, | 274 /// call, this method will complete with the same error. |
285 * this method will complete with the same error. | 275 async.Future<ResellernotifyResource> register( |
286 */ | 276 {core.String serviceAccountEmailAddress}) { |
287 async.Future<ResellernotifyResource> register({core.String serviceAccountEmail
Address}) { | |
288 var _url = null; | 277 var _url = null; |
289 var _queryParams = new core.Map(); | 278 var _queryParams = new core.Map(); |
290 var _uploadMedia = null; | 279 var _uploadMedia = null; |
291 var _uploadOptions = null; | 280 var _uploadOptions = null; |
292 var _downloadOptions = commons.DownloadOptions.Metadata; | 281 var _downloadOptions = commons.DownloadOptions.Metadata; |
293 var _body = null; | 282 var _body = null; |
294 | 283 |
295 if (serviceAccountEmailAddress != null) { | 284 if (serviceAccountEmailAddress != null) { |
296 _queryParams["serviceAccountEmailAddress"] = [serviceAccountEmailAddress]; | 285 _queryParams["serviceAccountEmailAddress"] = [serviceAccountEmailAddress]; |
297 } | 286 } |
298 | 287 |
299 _url = 'resellernotify/register'; | 288 _url = 'resellernotify/register'; |
300 | 289 |
301 var _response = _requester.request(_url, | 290 var _response = _requester.request(_url, "POST", |
302 "POST", | 291 body: _body, |
303 body: _body, | 292 queryParams: _queryParams, |
304 queryParams: _queryParams, | 293 uploadOptions: _uploadOptions, |
305 uploadOptions: _uploadOptions, | 294 uploadMedia: _uploadMedia, |
306 uploadMedia: _uploadMedia, | 295 downloadOptions: _downloadOptions); |
307 downloadOptions: _downloadOptions); | |
308 return _response.then((data) => new ResellernotifyResource.fromJson(data)); | 296 return _response.then((data) => new ResellernotifyResource.fromJson(data)); |
309 } | 297 } |
310 | 298 |
311 /** | 299 /// Unregisters a Reseller for receiving notifications. |
312 * Unregisters a Reseller for receiving notifications. | 300 /// |
313 * | 301 /// Request parameters: |
314 * Request parameters: | 302 /// |
315 * | 303 /// [serviceAccountEmailAddress] - The service account which owns the |
316 * [serviceAccountEmailAddress] - The service account which owns the | 304 /// Cloud-PubSub topic. |
317 * Cloud-PubSub topic. | 305 /// |
318 * | 306 /// Completes with a [ResellernotifyResource]. |
319 * Completes with a [ResellernotifyResource]. | 307 /// |
320 * | 308 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
321 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 309 /// an error. |
322 * error. | 310 /// |
323 * | 311 /// If the used [http.Client] completes with an error when making a REST |
324 * If the used [http.Client] completes with an error when making a REST call, | 312 /// call, this method will complete with the same error. |
325 * this method will complete with the same error. | 313 async.Future<ResellernotifyResource> unregister( |
326 */ | 314 {core.String serviceAccountEmailAddress}) { |
327 async.Future<ResellernotifyResource> unregister({core.String serviceAccountEma
ilAddress}) { | |
328 var _url = null; | 315 var _url = null; |
329 var _queryParams = new core.Map(); | 316 var _queryParams = new core.Map(); |
330 var _uploadMedia = null; | 317 var _uploadMedia = null; |
331 var _uploadOptions = null; | 318 var _uploadOptions = null; |
332 var _downloadOptions = commons.DownloadOptions.Metadata; | 319 var _downloadOptions = commons.DownloadOptions.Metadata; |
333 var _body = null; | 320 var _body = null; |
334 | 321 |
335 if (serviceAccountEmailAddress != null) { | 322 if (serviceAccountEmailAddress != null) { |
336 _queryParams["serviceAccountEmailAddress"] = [serviceAccountEmailAddress]; | 323 _queryParams["serviceAccountEmailAddress"] = [serviceAccountEmailAddress]; |
337 } | 324 } |
338 | 325 |
339 _url = 'resellernotify/unregister'; | 326 _url = 'resellernotify/unregister'; |
340 | 327 |
341 var _response = _requester.request(_url, | 328 var _response = _requester.request(_url, "POST", |
342 "POST", | 329 body: _body, |
343 body: _body, | 330 queryParams: _queryParams, |
344 queryParams: _queryParams, | 331 uploadOptions: _uploadOptions, |
345 uploadOptions: _uploadOptions, | 332 uploadMedia: _uploadMedia, |
346 uploadMedia: _uploadMedia, | 333 downloadOptions: _downloadOptions); |
347 downloadOptions: _downloadOptions); | |
348 return _response.then((data) => new ResellernotifyResource.fromJson(data)); | 334 return _response.then((data) => new ResellernotifyResource.fromJson(data)); |
349 } | 335 } |
350 | |
351 } | 336 } |
352 | 337 |
353 | |
354 class SubscriptionsResourceApi { | 338 class SubscriptionsResourceApi { |
355 final commons.ApiRequester _requester; | 339 final commons.ApiRequester _requester; |
356 | 340 |
357 SubscriptionsResourceApi(commons.ApiRequester client) : | 341 SubscriptionsResourceApi(commons.ApiRequester client) : _requester = client; |
358 _requester = client; | |
359 | 342 |
360 /** | 343 /// Activates a subscription previously suspended by the reseller |
361 * Activates a subscription previously suspended by the reseller | 344 /// |
362 * | 345 /// Request parameters: |
363 * Request parameters: | 346 /// |
364 * | 347 /// [customerId] - Either the customer's primary domain name or the |
365 * [customerId] - Either the customer's primary domain name or the customer's | 348 /// customer's unique identifier. If using the domain name, we do not |
366 * unique identifier. If using the domain name, we do not recommend using a | 349 /// recommend using a customerId as a key for persistent data. If the domain |
367 * customerId as a key for persistent data. If the domain name for a | 350 /// name for a customerId is changed, the Google system automatically |
368 * customerId is changed, the Google system automatically updates. | 351 /// updates. |
369 * | 352 /// |
370 * [subscriptionId] - This is a required property. The subscriptionId is the | 353 /// [subscriptionId] - This is a required property. The subscriptionId is the |
371 * subscription identifier and is unique for each customer. Since a | 354 /// subscription identifier and is unique for each customer. Since a |
372 * subscriptionId changes when a subscription is updated, we recommend to not | 355 /// subscriptionId changes when a subscription is updated, we recommend to |
373 * use this ID as a key for persistent data. And the subscriptionId can be | 356 /// not use this ID as a key for persistent data. And the subscriptionId can |
374 * found using the retrieve all reseller subscriptions method. | 357 /// be found using the retrieve all reseller subscriptions method. |
375 * | 358 /// |
376 * Completes with a [Subscription]. | 359 /// Completes with a [Subscription]. |
377 * | 360 /// |
378 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 361 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
379 * error. | 362 /// an error. |
380 * | 363 /// |
381 * If the used [http.Client] completes with an error when making a REST call, | 364 /// If the used [http.Client] completes with an error when making a REST |
382 * this method will complete with the same error. | 365 /// call, this method will complete with the same error. |
383 */ | 366 async.Future<Subscription> activate( |
384 async.Future<Subscription> activate(core.String customerId, core.String subscr
iptionId) { | 367 core.String customerId, core.String subscriptionId) { |
385 var _url = null; | 368 var _url = null; |
386 var _queryParams = new core.Map(); | 369 var _queryParams = new core.Map(); |
387 var _uploadMedia = null; | 370 var _uploadMedia = null; |
388 var _uploadOptions = null; | 371 var _uploadOptions = null; |
389 var _downloadOptions = commons.DownloadOptions.Metadata; | 372 var _downloadOptions = commons.DownloadOptions.Metadata; |
390 var _body = null; | 373 var _body = null; |
391 | 374 |
392 if (customerId == null) { | 375 if (customerId == null) { |
393 throw new core.ArgumentError("Parameter customerId is required."); | 376 throw new core.ArgumentError("Parameter customerId is required."); |
394 } | 377 } |
395 if (subscriptionId == null) { | 378 if (subscriptionId == null) { |
396 throw new core.ArgumentError("Parameter subscriptionId is required."); | 379 throw new core.ArgumentError("Parameter subscriptionId is required."); |
397 } | 380 } |
398 | 381 |
399 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc
riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/activate'; | 382 _url = 'customers/' + |
| 383 commons.Escaper.ecapeVariable('$customerId') + |
| 384 '/subscriptions/' + |
| 385 commons.Escaper.ecapeVariable('$subscriptionId') + |
| 386 '/activate'; |
400 | 387 |
401 var _response = _requester.request(_url, | 388 var _response = _requester.request(_url, "POST", |
402 "POST", | 389 body: _body, |
403 body: _body, | 390 queryParams: _queryParams, |
404 queryParams: _queryParams, | 391 uploadOptions: _uploadOptions, |
405 uploadOptions: _uploadOptions, | 392 uploadMedia: _uploadMedia, |
406 uploadMedia: _uploadMedia, | 393 downloadOptions: _downloadOptions); |
407 downloadOptions: _downloadOptions); | |
408 return _response.then((data) => new Subscription.fromJson(data)); | 394 return _response.then((data) => new Subscription.fromJson(data)); |
409 } | 395 } |
410 | 396 |
411 /** | 397 /// Update a subscription plan. Use this method to update a plan for a 30-day |
412 * Update a subscription plan. Use this method to update a plan for a 30-day | 398 /// trial or a flexible plan subscription to an annual commitment plan with |
413 * trial or a flexible plan subscription to an annual commitment plan with | 399 /// monthly or yearly payments. |
414 * monthly or yearly payments. | 400 /// |
415 * | 401 /// [request] - The metadata request object. |
416 * [request] - The metadata request object. | 402 /// |
417 * | 403 /// Request parameters: |
418 * Request parameters: | 404 /// |
419 * | 405 /// [customerId] - Either the customer's primary domain name or the |
420 * [customerId] - Either the customer's primary domain name or the customer's | 406 /// customer's unique identifier. If using the domain name, we do not |
421 * unique identifier. If using the domain name, we do not recommend using a | 407 /// recommend using a customerId as a key for persistent data. If the domain |
422 * customerId as a key for persistent data. If the domain name for a | 408 /// name for a customerId is changed, the Google system automatically |
423 * customerId is changed, the Google system automatically updates. | 409 /// updates. |
424 * | 410 /// |
425 * [subscriptionId] - This is a required property. The subscriptionId is the | 411 /// [subscriptionId] - This is a required property. The subscriptionId is the |
426 * subscription identifier and is unique for each customer. Since a | 412 /// subscription identifier and is unique for each customer. Since a |
427 * subscriptionId changes when a subscription is updated, we recommend to not | 413 /// subscriptionId changes when a subscription is updated, we recommend to |
428 * use this ID as a key for persistent data. And the subscriptionId can be | 414 /// not use this ID as a key for persistent data. And the subscriptionId can |
429 * found using the retrieve all reseller subscriptions method. | 415 /// be found using the retrieve all reseller subscriptions method. |
430 * | 416 /// |
431 * Completes with a [Subscription]. | 417 /// Completes with a [Subscription]. |
432 * | 418 /// |
433 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 419 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
434 * error. | 420 /// an error. |
435 * | 421 /// |
436 * If the used [http.Client] completes with an error when making a REST call, | 422 /// If the used [http.Client] completes with an error when making a REST |
437 * this method will complete with the same error. | 423 /// call, this method will complete with the same error. |
438 */ | 424 async.Future<Subscription> changePlan(ChangePlanRequest request, |
439 async.Future<Subscription> changePlan(ChangePlanRequest request, core.String c
ustomerId, core.String subscriptionId) { | 425 core.String customerId, core.String subscriptionId) { |
440 var _url = null; | 426 var _url = null; |
441 var _queryParams = new core.Map(); | 427 var _queryParams = new core.Map(); |
442 var _uploadMedia = null; | 428 var _uploadMedia = null; |
443 var _uploadOptions = null; | 429 var _uploadOptions = null; |
444 var _downloadOptions = commons.DownloadOptions.Metadata; | 430 var _downloadOptions = commons.DownloadOptions.Metadata; |
445 var _body = null; | 431 var _body = null; |
446 | 432 |
447 if (request != null) { | 433 if (request != null) { |
448 _body = convert.JSON.encode((request).toJson()); | 434 _body = convert.JSON.encode((request).toJson()); |
449 } | 435 } |
450 if (customerId == null) { | 436 if (customerId == null) { |
451 throw new core.ArgumentError("Parameter customerId is required."); | 437 throw new core.ArgumentError("Parameter customerId is required."); |
452 } | 438 } |
453 if (subscriptionId == null) { | 439 if (subscriptionId == null) { |
454 throw new core.ArgumentError("Parameter subscriptionId is required."); | 440 throw new core.ArgumentError("Parameter subscriptionId is required."); |
455 } | 441 } |
456 | 442 |
457 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc
riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/changePlan'; | 443 _url = 'customers/' + |
| 444 commons.Escaper.ecapeVariable('$customerId') + |
| 445 '/subscriptions/' + |
| 446 commons.Escaper.ecapeVariable('$subscriptionId') + |
| 447 '/changePlan'; |
458 | 448 |
459 var _response = _requester.request(_url, | 449 var _response = _requester.request(_url, "POST", |
460 "POST", | 450 body: _body, |
461 body: _body, | 451 queryParams: _queryParams, |
462 queryParams: _queryParams, | 452 uploadOptions: _uploadOptions, |
463 uploadOptions: _uploadOptions, | 453 uploadMedia: _uploadMedia, |
464 uploadMedia: _uploadMedia, | 454 downloadOptions: _downloadOptions); |
465 downloadOptions: _downloadOptions); | |
466 return _response.then((data) => new Subscription.fromJson(data)); | 455 return _response.then((data) => new Subscription.fromJson(data)); |
467 } | 456 } |
468 | 457 |
469 /** | 458 /// Update a user license's renewal settings. This is applicable for accounts |
470 * Update a user license's renewal settings. This is applicable for accounts | 459 /// with annual commitment plans only. |
471 * with annual commitment plans only. | 460 /// |
472 * | 461 /// [request] - The metadata request object. |
473 * [request] - The metadata request object. | 462 /// |
474 * | 463 /// Request parameters: |
475 * Request parameters: | 464 /// |
476 * | 465 /// [customerId] - Either the customer's primary domain name or the |
477 * [customerId] - Either the customer's primary domain name or the customer's | 466 /// customer's unique identifier. If using the domain name, we do not |
478 * unique identifier. If using the domain name, we do not recommend using a | 467 /// recommend using a customerId as a key for persistent data. If the domain |
479 * customerId as a key for persistent data. If the domain name for a | 468 /// name for a customerId is changed, the Google system automatically |
480 * customerId is changed, the Google system automatically updates. | 469 /// updates. |
481 * | 470 /// |
482 * [subscriptionId] - This is a required property. The subscriptionId is the | 471 /// [subscriptionId] - This is a required property. The subscriptionId is the |
483 * subscription identifier and is unique for each customer. Since a | 472 /// subscription identifier and is unique for each customer. Since a |
484 * subscriptionId changes when a subscription is updated, we recommend to not | 473 /// subscriptionId changes when a subscription is updated, we recommend to |
485 * use this ID as a key for persistent data. And the subscriptionId can be | 474 /// not use this ID as a key for persistent data. And the subscriptionId can |
486 * found using the retrieve all reseller subscriptions method. | 475 /// be found using the retrieve all reseller subscriptions method. |
487 * | 476 /// |
488 * Completes with a [Subscription]. | 477 /// Completes with a [Subscription]. |
489 * | 478 /// |
490 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 479 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
491 * error. | 480 /// an error. |
492 * | 481 /// |
493 * If the used [http.Client] completes with an error when making a REST call, | 482 /// If the used [http.Client] completes with an error when making a REST |
494 * this method will complete with the same error. | 483 /// call, this method will complete with the same error. |
495 */ | 484 async.Future<Subscription> changeRenewalSettings(RenewalSettings request, |
496 async.Future<Subscription> changeRenewalSettings(RenewalSettings request, core
.String customerId, core.String subscriptionId) { | 485 core.String customerId, core.String subscriptionId) { |
497 var _url = null; | 486 var _url = null; |
498 var _queryParams = new core.Map(); | 487 var _queryParams = new core.Map(); |
499 var _uploadMedia = null; | 488 var _uploadMedia = null; |
500 var _uploadOptions = null; | 489 var _uploadOptions = null; |
501 var _downloadOptions = commons.DownloadOptions.Metadata; | 490 var _downloadOptions = commons.DownloadOptions.Metadata; |
502 var _body = null; | 491 var _body = null; |
503 | 492 |
504 if (request != null) { | 493 if (request != null) { |
505 _body = convert.JSON.encode((request).toJson()); | 494 _body = convert.JSON.encode((request).toJson()); |
506 } | 495 } |
507 if (customerId == null) { | 496 if (customerId == null) { |
508 throw new core.ArgumentError("Parameter customerId is required."); | 497 throw new core.ArgumentError("Parameter customerId is required."); |
509 } | 498 } |
510 if (subscriptionId == null) { | 499 if (subscriptionId == null) { |
511 throw new core.ArgumentError("Parameter subscriptionId is required."); | 500 throw new core.ArgumentError("Parameter subscriptionId is required."); |
512 } | 501 } |
513 | 502 |
514 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc
riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/changeRenewalS
ettings'; | 503 _url = 'customers/' + |
| 504 commons.Escaper.ecapeVariable('$customerId') + |
| 505 '/subscriptions/' + |
| 506 commons.Escaper.ecapeVariable('$subscriptionId') + |
| 507 '/changeRenewalSettings'; |
515 | 508 |
516 var _response = _requester.request(_url, | 509 var _response = _requester.request(_url, "POST", |
517 "POST", | 510 body: _body, |
518 body: _body, | 511 queryParams: _queryParams, |
519 queryParams: _queryParams, | 512 uploadOptions: _uploadOptions, |
520 uploadOptions: _uploadOptions, | 513 uploadMedia: _uploadMedia, |
521 uploadMedia: _uploadMedia, | 514 downloadOptions: _downloadOptions); |
522 downloadOptions: _downloadOptions); | |
523 return _response.then((data) => new Subscription.fromJson(data)); | 515 return _response.then((data) => new Subscription.fromJson(data)); |
524 } | 516 } |
525 | 517 |
526 /** | 518 /// Update a subscription's user license settings. |
527 * Update a subscription's user license settings. | 519 /// |
528 * | 520 /// [request] - The metadata request object. |
529 * [request] - The metadata request object. | 521 /// |
530 * | 522 /// Request parameters: |
531 * Request parameters: | 523 /// |
532 * | 524 /// [customerId] - Either the customer's primary domain name or the |
533 * [customerId] - Either the customer's primary domain name or the customer's | 525 /// customer's unique identifier. If using the domain name, we do not |
534 * unique identifier. If using the domain name, we do not recommend using a | 526 /// recommend using a customerId as a key for persistent data. If the domain |
535 * customerId as a key for persistent data. If the domain name for a | 527 /// name for a customerId is changed, the Google system automatically |
536 * customerId is changed, the Google system automatically updates. | 528 /// updates. |
537 * | 529 /// |
538 * [subscriptionId] - This is a required property. The subscriptionId is the | 530 /// [subscriptionId] - This is a required property. The subscriptionId is the |
539 * subscription identifier and is unique for each customer. Since a | 531 /// subscription identifier and is unique for each customer. Since a |
540 * subscriptionId changes when a subscription is updated, we recommend to not | 532 /// subscriptionId changes when a subscription is updated, we recommend to |
541 * use this ID as a key for persistent data. And the subscriptionId can be | 533 /// not use this ID as a key for persistent data. And the subscriptionId can |
542 * found using the retrieve all reseller subscriptions method. | 534 /// be found using the retrieve all reseller subscriptions method. |
543 * | 535 /// |
544 * Completes with a [Subscription]. | 536 /// Completes with a [Subscription]. |
545 * | 537 /// |
546 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 538 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
547 * error. | 539 /// an error. |
548 * | 540 /// |
549 * If the used [http.Client] completes with an error when making a REST call, | 541 /// If the used [http.Client] completes with an error when making a REST |
550 * this method will complete with the same error. | 542 /// call, this method will complete with the same error. |
551 */ | 543 async.Future<Subscription> changeSeats( |
552 async.Future<Subscription> changeSeats(Seats request, core.String customerId,
core.String subscriptionId) { | 544 Seats request, core.String customerId, core.String subscriptionId) { |
553 var _url = null; | 545 var _url = null; |
554 var _queryParams = new core.Map(); | 546 var _queryParams = new core.Map(); |
555 var _uploadMedia = null; | 547 var _uploadMedia = null; |
556 var _uploadOptions = null; | 548 var _uploadOptions = null; |
557 var _downloadOptions = commons.DownloadOptions.Metadata; | 549 var _downloadOptions = commons.DownloadOptions.Metadata; |
558 var _body = null; | 550 var _body = null; |
559 | 551 |
560 if (request != null) { | 552 if (request != null) { |
561 _body = convert.JSON.encode((request).toJson()); | 553 _body = convert.JSON.encode((request).toJson()); |
562 } | 554 } |
563 if (customerId == null) { | 555 if (customerId == null) { |
564 throw new core.ArgumentError("Parameter customerId is required."); | 556 throw new core.ArgumentError("Parameter customerId is required."); |
565 } | 557 } |
566 if (subscriptionId == null) { | 558 if (subscriptionId == null) { |
567 throw new core.ArgumentError("Parameter subscriptionId is required."); | 559 throw new core.ArgumentError("Parameter subscriptionId is required."); |
568 } | 560 } |
569 | 561 |
570 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc
riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/changeSeats'; | 562 _url = 'customers/' + |
| 563 commons.Escaper.ecapeVariable('$customerId') + |
| 564 '/subscriptions/' + |
| 565 commons.Escaper.ecapeVariable('$subscriptionId') + |
| 566 '/changeSeats'; |
571 | 567 |
572 var _response = _requester.request(_url, | 568 var _response = _requester.request(_url, "POST", |
573 "POST", | 569 body: _body, |
574 body: _body, | 570 queryParams: _queryParams, |
575 queryParams: _queryParams, | 571 uploadOptions: _uploadOptions, |
576 uploadOptions: _uploadOptions, | 572 uploadMedia: _uploadMedia, |
577 uploadMedia: _uploadMedia, | 573 downloadOptions: _downloadOptions); |
578 downloadOptions: _downloadOptions); | |
579 return _response.then((data) => new Subscription.fromJson(data)); | 574 return _response.then((data) => new Subscription.fromJson(data)); |
580 } | 575 } |
581 | 576 |
582 /** | 577 /// Cancel, suspend or transfer a subscription to direct. |
583 * Cancel, suspend or transfer a subscription to direct. | 578 /// |
584 * | 579 /// Request parameters: |
585 * Request parameters: | 580 /// |
586 * | 581 /// [customerId] - Either the customer's primary domain name or the |
587 * [customerId] - Either the customer's primary domain name or the customer's | 582 /// customer's unique identifier. If using the domain name, we do not |
588 * unique identifier. If using the domain name, we do not recommend using a | 583 /// recommend using a customerId as a key for persistent data. If the domain |
589 * customerId as a key for persistent data. If the domain name for a | 584 /// name for a customerId is changed, the Google system automatically |
590 * customerId is changed, the Google system automatically updates. | 585 /// updates. |
591 * | 586 /// |
592 * [subscriptionId] - This is a required property. The subscriptionId is the | 587 /// [subscriptionId] - This is a required property. The subscriptionId is the |
593 * subscription identifier and is unique for each customer. Since a | 588 /// subscription identifier and is unique for each customer. Since a |
594 * subscriptionId changes when a subscription is updated, we recommend to not | 589 /// subscriptionId changes when a subscription is updated, we recommend to |
595 * use this ID as a key for persistent data. And the subscriptionId can be | 590 /// not use this ID as a key for persistent data. And the subscriptionId can |
596 * found using the retrieve all reseller subscriptions method. | 591 /// be found using the retrieve all reseller subscriptions method. |
597 * | 592 /// |
598 * [deletionType] - The deletionType query string enables the cancellation, | 593 /// [deletionType] - The deletionType query string enables the cancellation, |
599 * downgrade, or suspension of a subscription. | 594 /// downgrade, or suspension of a subscription. |
600 * Possible string values are: | 595 /// Possible string values are: |
601 * - "cancel" : Cancels the subscription immediately. This does not apply to a | 596 /// - "cancel" : Cancels the subscription immediately. This does not apply to |
602 * G Suite subscription. | 597 /// a G Suite subscription. |
603 * - "downgrade" : Downgrades a G Suite subscription to a Google Apps Free | 598 /// - "downgrade" : Downgrades a G Suite subscription to a Google Apps Free |
604 * edition subscription only if the customer was initially subscribed to a | 599 /// edition subscription only if the customer was initially subscribed to a |
605 * Google Apps Free edition (also known as the Standard edition). Once | 600 /// Google Apps Free edition (also known as the Standard edition). Once |
606 * downgraded, the customer no longer has access to the previous G Suite | 601 /// downgraded, the customer no longer has access to the previous G Suite |
607 * subscription and is no longer managed by the reseller. | 602 /// subscription and is no longer managed by the reseller. |
608 * | 603 /// |
609 * A G Suite subscription's downgrade cannot be invoked if an active or | 604 /// A G Suite subscription's downgrade cannot be invoked if an active or |
610 * suspended Google Drive or Google Vault subscription is present. The Google | 605 /// suspended Google Drive or Google Vault subscription is present. The |
611 * Drive or Google Vault subscription must be cancelled before the G Suite | 606 /// Google Drive or Google Vault subscription must be cancelled before the G |
612 * subscription's downgrade is invoked. | 607 /// Suite subscription's downgrade is invoked. |
613 * | 608 /// |
614 * The downgrade deletionType does not apply to other products or G Suite | 609 /// The downgrade deletionType does not apply to other products or G Suite |
615 * SKUs. | 610 /// SKUs. |
616 * - "suspend" : (DEPRECATED) The G Suite account is suspended for four days | 611 /// - "suspend" : (DEPRECATED) The G Suite account is suspended for four days |
617 * and then cancelled. Once suspended, an administrator has access to the | 612 /// and then cancelled. Once suspended, an administrator has access to the |
618 * suspended account, but the account users can not access their services. A | 613 /// suspended account, but the account users can not access their services. A |
619 * suspension can be lifted, using the reseller tools. | 614 /// suspension can be lifted, using the reseller tools. |
620 * | 615 /// |
621 * A G Suite subscription's suspension can not be invoked if an active or | 616 /// A G Suite subscription's suspension can not be invoked if an active or |
622 * suspended Google Drive or Google Vault subscription is present. The Google | 617 /// suspended Google Drive or Google Vault subscription is present. The |
623 * Drive or Google Vault subscription must be cancelled before the G Suite | 618 /// Google Drive or Google Vault subscription must be cancelled before the G |
624 * subscription's suspension is invoked. | 619 /// Suite subscription's suspension is invoked. |
625 * - "transfer_to_direct" : Transfers a subscription directly to Google.  The | 620 /// - "transfer_to_direct" : Transfers a subscription directly to |
626 * customer is immediately transferred to a direct billing relationship with | 621 /// Google.  The customer is immediately transferred to a direct billing |
627 * Google and is given a short amount of time with no service interruption. | 622 /// relationship with Google and is given a short amount of time with no |
628 * The customer can then choose to set up billing directly with Google by | 623 /// service interruption. The customer can then choose to set up billing |
629 * using a credit card, or they can transfer to another reseller. | 624 /// directly with Google by using a credit card, or they can transfer to |
630 * | 625 /// another reseller. |
631 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 626 /// |
632 * error. | 627 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
633 * | 628 /// an error. |
634 * If the used [http.Client] completes with an error when making a REST call, | 629 /// |
635 * this method will complete with the same error. | 630 /// If the used [http.Client] completes with an error when making a REST |
636 */ | 631 /// call, this method will complete with the same error. |
637 async.Future delete(core.String customerId, core.String subscriptionId, core.S
tring deletionType) { | 632 async.Future delete(core.String customerId, core.String subscriptionId, |
| 633 core.String deletionType) { |
638 var _url = null; | 634 var _url = null; |
639 var _queryParams = new core.Map(); | 635 var _queryParams = new core.Map(); |
640 var _uploadMedia = null; | 636 var _uploadMedia = null; |
641 var _uploadOptions = null; | 637 var _uploadOptions = null; |
642 var _downloadOptions = commons.DownloadOptions.Metadata; | 638 var _downloadOptions = commons.DownloadOptions.Metadata; |
643 var _body = null; | 639 var _body = null; |
644 | 640 |
645 if (customerId == null) { | 641 if (customerId == null) { |
646 throw new core.ArgumentError("Parameter customerId is required."); | 642 throw new core.ArgumentError("Parameter customerId is required."); |
647 } | 643 } |
648 if (subscriptionId == null) { | 644 if (subscriptionId == null) { |
649 throw new core.ArgumentError("Parameter subscriptionId is required."); | 645 throw new core.ArgumentError("Parameter subscriptionId is required."); |
650 } | 646 } |
651 if (deletionType == null) { | 647 if (deletionType == null) { |
652 throw new core.ArgumentError("Parameter deletionType is required."); | 648 throw new core.ArgumentError("Parameter deletionType is required."); |
653 } | 649 } |
654 _queryParams["deletionType"] = [deletionType]; | 650 _queryParams["deletionType"] = [deletionType]; |
655 | 651 |
656 _downloadOptions = null; | 652 _downloadOptions = null; |
657 | 653 |
658 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc
riptions/' + commons.Escaper.ecapeVariable('$subscriptionId'); | 654 _url = 'customers/' + |
| 655 commons.Escaper.ecapeVariable('$customerId') + |
| 656 '/subscriptions/' + |
| 657 commons.Escaper.ecapeVariable('$subscriptionId'); |
659 | 658 |
660 var _response = _requester.request(_url, | 659 var _response = _requester.request(_url, "DELETE", |
661 "DELETE", | 660 body: _body, |
662 body: _body, | 661 queryParams: _queryParams, |
663 queryParams: _queryParams, | 662 uploadOptions: _uploadOptions, |
664 uploadOptions: _uploadOptions, | 663 uploadMedia: _uploadMedia, |
665 uploadMedia: _uploadMedia, | 664 downloadOptions: _downloadOptions); |
666 downloadOptions: _downloadOptions); | |
667 return _response.then((data) => null); | 665 return _response.then((data) => null); |
668 } | 666 } |
669 | 667 |
670 /** | 668 /// Get a specific subscription. |
671 * Get a specific subscription. | 669 /// |
672 * | 670 /// Request parameters: |
673 * Request parameters: | 671 /// |
674 * | 672 /// [customerId] - Either the customer's primary domain name or the |
675 * [customerId] - Either the customer's primary domain name or the customer's | 673 /// customer's unique identifier. If using the domain name, we do not |
676 * unique identifier. If using the domain name, we do not recommend using a | 674 /// recommend using a customerId as a key for persistent data. If the domain |
677 * customerId as a key for persistent data. If the domain name for a | 675 /// name for a customerId is changed, the Google system automatically |
678 * customerId is changed, the Google system automatically updates. | 676 /// updates. |
679 * | 677 /// |
680 * [subscriptionId] - This is a required property. The subscriptionId is the | 678 /// [subscriptionId] - This is a required property. The subscriptionId is the |
681 * subscription identifier and is unique for each customer. Since a | 679 /// subscription identifier and is unique for each customer. Since a |
682 * subscriptionId changes when a subscription is updated, we recommend to not | 680 /// subscriptionId changes when a subscription is updated, we recommend to |
683 * use this ID as a key for persistent data. And the subscriptionId can be | 681 /// not use this ID as a key for persistent data. And the subscriptionId can |
684 * found using the retrieve all reseller subscriptions method. | 682 /// be found using the retrieve all reseller subscriptions method. |
685 * | 683 /// |
686 * Completes with a [Subscription]. | 684 /// Completes with a [Subscription]. |
687 * | 685 /// |
688 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 686 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
689 * error. | 687 /// an error. |
690 * | 688 /// |
691 * If the used [http.Client] completes with an error when making a REST call, | 689 /// If the used [http.Client] completes with an error when making a REST |
692 * this method will complete with the same error. | 690 /// call, this method will complete with the same error. |
693 */ | 691 async.Future<Subscription> get( |
694 async.Future<Subscription> get(core.String customerId, core.String subscriptio
nId) { | 692 core.String customerId, core.String subscriptionId) { |
695 var _url = null; | 693 var _url = null; |
696 var _queryParams = new core.Map(); | 694 var _queryParams = new core.Map(); |
697 var _uploadMedia = null; | 695 var _uploadMedia = null; |
698 var _uploadOptions = null; | 696 var _uploadOptions = null; |
699 var _downloadOptions = commons.DownloadOptions.Metadata; | 697 var _downloadOptions = commons.DownloadOptions.Metadata; |
700 var _body = null; | 698 var _body = null; |
701 | 699 |
702 if (customerId == null) { | 700 if (customerId == null) { |
703 throw new core.ArgumentError("Parameter customerId is required."); | 701 throw new core.ArgumentError("Parameter customerId is required."); |
704 } | 702 } |
705 if (subscriptionId == null) { | 703 if (subscriptionId == null) { |
706 throw new core.ArgumentError("Parameter subscriptionId is required."); | 704 throw new core.ArgumentError("Parameter subscriptionId is required."); |
707 } | 705 } |
708 | 706 |
709 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc
riptions/' + commons.Escaper.ecapeVariable('$subscriptionId'); | 707 _url = 'customers/' + |
| 708 commons.Escaper.ecapeVariable('$customerId') + |
| 709 '/subscriptions/' + |
| 710 commons.Escaper.ecapeVariable('$subscriptionId'); |
710 | 711 |
711 var _response = _requester.request(_url, | 712 var _response = _requester.request(_url, "GET", |
712 "GET", | 713 body: _body, |
713 body: _body, | 714 queryParams: _queryParams, |
714 queryParams: _queryParams, | 715 uploadOptions: _uploadOptions, |
715 uploadOptions: _uploadOptions, | 716 uploadMedia: _uploadMedia, |
716 uploadMedia: _uploadMedia, | 717 downloadOptions: _downloadOptions); |
717 downloadOptions: _downloadOptions); | |
718 return _response.then((data) => new Subscription.fromJson(data)); | 718 return _response.then((data) => new Subscription.fromJson(data)); |
719 } | 719 } |
720 | 720 |
721 /** | 721 /// Create or transfer a subscription. |
722 * Create or transfer a subscription. | 722 /// |
723 * | 723 /// [request] - The metadata request object. |
724 * [request] - The metadata request object. | 724 /// |
725 * | 725 /// Request parameters: |
726 * Request parameters: | 726 /// |
727 * | 727 /// [customerId] - Either the customer's primary domain name or the |
728 * [customerId] - Either the customer's primary domain name or the customer's | 728 /// customer's unique identifier. If using the domain name, we do not |
729 * unique identifier. If using the domain name, we do not recommend using a | 729 /// recommend using a customerId as a key for persistent data. If the domain |
730 * customerId as a key for persistent data. If the domain name for a | 730 /// name for a customerId is changed, the Google system automatically |
731 * customerId is changed, the Google system automatically updates. | 731 /// updates. |
732 * | 732 /// |
733 * [customerAuthToken] - The customerAuthToken query string is required when | 733 /// [customerAuthToken] - The customerAuthToken query string is required when |
734 * creating a resold account that transfers a direct customer's subscription | 734 /// creating a resold account that transfers a direct customer's subscription |
735 * or transfers another reseller customer's subscription to your reseller | 735 /// or transfers another reseller customer's subscription to your reseller |
736 * management. This is a hexadecimal authentication token needed to complete | 736 /// management. This is a hexadecimal authentication token needed to complete |
737 * the subscription transfer. For more information, see the administrator help | 737 /// the subscription transfer. For more information, see the administrator |
738 * center. | 738 /// help center. |
739 * | 739 /// |
740 * Completes with a [Subscription]. | 740 /// Completes with a [Subscription]. |
741 * | 741 /// |
742 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 742 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
743 * error. | 743 /// an error. |
744 * | 744 /// |
745 * If the used [http.Client] completes with an error when making a REST call, | 745 /// If the used [http.Client] completes with an error when making a REST |
746 * this method will complete with the same error. | 746 /// call, this method will complete with the same error. |
747 */ | 747 async.Future<Subscription> insert( |
748 async.Future<Subscription> insert(Subscription request, core.String customerId
, {core.String customerAuthToken}) { | 748 Subscription request, core.String customerId, |
| 749 {core.String customerAuthToken}) { |
749 var _url = null; | 750 var _url = null; |
750 var _queryParams = new core.Map(); | 751 var _queryParams = new core.Map(); |
751 var _uploadMedia = null; | 752 var _uploadMedia = null; |
752 var _uploadOptions = null; | 753 var _uploadOptions = null; |
753 var _downloadOptions = commons.DownloadOptions.Metadata; | 754 var _downloadOptions = commons.DownloadOptions.Metadata; |
754 var _body = null; | 755 var _body = null; |
755 | 756 |
756 if (request != null) { | 757 if (request != null) { |
757 _body = convert.JSON.encode((request).toJson()); | 758 _body = convert.JSON.encode((request).toJson()); |
758 } | 759 } |
759 if (customerId == null) { | 760 if (customerId == null) { |
760 throw new core.ArgumentError("Parameter customerId is required."); | 761 throw new core.ArgumentError("Parameter customerId is required."); |
761 } | 762 } |
762 if (customerAuthToken != null) { | 763 if (customerAuthToken != null) { |
763 _queryParams["customerAuthToken"] = [customerAuthToken]; | 764 _queryParams["customerAuthToken"] = [customerAuthToken]; |
764 } | 765 } |
765 | 766 |
766 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc
riptions'; | 767 _url = 'customers/' + |
| 768 commons.Escaper.ecapeVariable('$customerId') + |
| 769 '/subscriptions'; |
767 | 770 |
768 var _response = _requester.request(_url, | 771 var _response = _requester.request(_url, "POST", |
769 "POST", | 772 body: _body, |
770 body: _body, | 773 queryParams: _queryParams, |
771 queryParams: _queryParams, | 774 uploadOptions: _uploadOptions, |
772 uploadOptions: _uploadOptions, | 775 uploadMedia: _uploadMedia, |
773 uploadMedia: _uploadMedia, | 776 downloadOptions: _downloadOptions); |
774 downloadOptions: _downloadOptions); | |
775 return _response.then((data) => new Subscription.fromJson(data)); | 777 return _response.then((data) => new Subscription.fromJson(data)); |
776 } | 778 } |
777 | 779 |
778 /** | 780 /// List of subscriptions managed by the reseller. The list can be all |
779 * List of subscriptions managed by the reseller. The list can be all | 781 /// subscriptions, all of a customer's subscriptions, or all of a customer's |
780 * subscriptions, all of a customer's subscriptions, or all of a customer's | 782 /// transferable subscriptions. |
781 * transferable subscriptions. | 783 /// |
782 * | 784 /// Request parameters: |
783 * Request parameters: | 785 /// |
784 * | 786 /// [customerAuthToken] - The customerAuthToken query string is required when |
785 * [customerAuthToken] - The customerAuthToken query string is required when | 787 /// creating a resold account that transfers a direct customer's subscription |
786 * creating a resold account that transfers a direct customer's subscription | 788 /// or transfers another reseller customer's subscription to your reseller |
787 * or transfers another reseller customer's subscription to your reseller | 789 /// management. This is a hexadecimal authentication token needed to complete |
788 * management. This is a hexadecimal authentication token needed to complete | 790 /// the subscription transfer. For more information, see the administrator |
789 * the subscription transfer. For more information, see the administrator help | 791 /// help center. |
790 * center. | 792 /// |
791 * | 793 /// [customerId] - Either the customer's primary domain name or the |
792 * [customerId] - Either the customer's primary domain name or the customer's | 794 /// customer's unique identifier. If using the domain name, we do not |
793 * unique identifier. If using the domain name, we do not recommend using a | 795 /// recommend using a customerId as a key for persistent data. If the domain |
794 * customerId as a key for persistent data. If the domain name for a | 796 /// name for a customerId is changed, the Google system automatically |
795 * customerId is changed, the Google system automatically updates. | 797 /// updates. |
796 * | 798 /// |
797 * [customerNamePrefix] - When retrieving all of your subscriptions and | 799 /// [customerNamePrefix] - When retrieving all of your subscriptions and |
798 * filtering for specific customers, you can enter a prefix for a customer | 800 /// filtering for specific customers, you can enter a prefix for a customer |
799 * name. Using an example customer group that includes exam.com, example20.com | 801 /// name. Using an example customer group that includes exam.com, |
800 * and example.com: | 802 /// example20.com and example.com: |
801 * - exa -- Returns all customer names that start with 'exa' which could | 803 /// - exa -- Returns all customer names that start with 'exa' which could |
802 * include exam.com, example20.com, and example.com. A name prefix is similar | 804 /// include exam.com, example20.com, and example.com. A name prefix is |
803 * to using a regular expression's asterisk, exa*. | 805 /// similar to using a regular expression's asterisk, exa*. |
804 * - example -- Returns example20.com and example.com. | 806 /// - example -- Returns example20.com and example.com. |
805 * | 807 /// |
806 * [maxResults] - When retrieving a large list, the maxResults is the maximum | 808 /// [maxResults] - When retrieving a large list, the maxResults is the |
807 * number of results per page. The nextPageToken value takes you to the next | 809 /// maximum number of results per page. The nextPageToken value takes you to |
808 * page. The default is 20. | 810 /// the next page. The default is 20. |
809 * Value must be between "1" and "100". | 811 /// Value must be between "1" and "100". |
810 * | 812 /// |
811 * [pageToken] - Token to specify next page in the list | 813 /// [pageToken] - Token to specify next page in the list |
812 * | 814 /// |
813 * Completes with a [Subscriptions]. | 815 /// Completes with a [Subscriptions]. |
814 * | 816 /// |
815 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 817 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
816 * error. | 818 /// an error. |
817 * | 819 /// |
818 * If the used [http.Client] completes with an error when making a REST call, | 820 /// If the used [http.Client] completes with an error when making a REST |
819 * this method will complete with the same error. | 821 /// call, this method will complete with the same error. |
820 */ | 822 async.Future<Subscriptions> list( |
821 async.Future<Subscriptions> list({core.String customerAuthToken, core.String c
ustomerId, core.String customerNamePrefix, core.int maxResults, core.String page
Token}) { | 823 {core.String customerAuthToken, |
| 824 core.String customerId, |
| 825 core.String customerNamePrefix, |
| 826 core.int maxResults, |
| 827 core.String pageToken}) { |
822 var _url = null; | 828 var _url = null; |
823 var _queryParams = new core.Map(); | 829 var _queryParams = new core.Map(); |
824 var _uploadMedia = null; | 830 var _uploadMedia = null; |
825 var _uploadOptions = null; | 831 var _uploadOptions = null; |
826 var _downloadOptions = commons.DownloadOptions.Metadata; | 832 var _downloadOptions = commons.DownloadOptions.Metadata; |
827 var _body = null; | 833 var _body = null; |
828 | 834 |
829 if (customerAuthToken != null) { | 835 if (customerAuthToken != null) { |
830 _queryParams["customerAuthToken"] = [customerAuthToken]; | 836 _queryParams["customerAuthToken"] = [customerAuthToken]; |
831 } | 837 } |
832 if (customerId != null) { | 838 if (customerId != null) { |
833 _queryParams["customerId"] = [customerId]; | 839 _queryParams["customerId"] = [customerId]; |
834 } | 840 } |
835 if (customerNamePrefix != null) { | 841 if (customerNamePrefix != null) { |
836 _queryParams["customerNamePrefix"] = [customerNamePrefix]; | 842 _queryParams["customerNamePrefix"] = [customerNamePrefix]; |
837 } | 843 } |
838 if (maxResults != null) { | 844 if (maxResults != null) { |
839 _queryParams["maxResults"] = ["${maxResults}"]; | 845 _queryParams["maxResults"] = ["${maxResults}"]; |
840 } | 846 } |
841 if (pageToken != null) { | 847 if (pageToken != null) { |
842 _queryParams["pageToken"] = [pageToken]; | 848 _queryParams["pageToken"] = [pageToken]; |
843 } | 849 } |
844 | 850 |
845 _url = 'subscriptions'; | 851 _url = 'subscriptions'; |
846 | 852 |
847 var _response = _requester.request(_url, | 853 var _response = _requester.request(_url, "GET", |
848 "GET", | 854 body: _body, |
849 body: _body, | 855 queryParams: _queryParams, |
850 queryParams: _queryParams, | 856 uploadOptions: _uploadOptions, |
851 uploadOptions: _uploadOptions, | 857 uploadMedia: _uploadMedia, |
852 uploadMedia: _uploadMedia, | 858 downloadOptions: _downloadOptions); |
853 downloadOptions: _downloadOptions); | |
854 return _response.then((data) => new Subscriptions.fromJson(data)); | 859 return _response.then((data) => new Subscriptions.fromJson(data)); |
855 } | 860 } |
856 | 861 |
857 /** | 862 /// Immediately move a 30-day free trial subscription to a paid service |
858 * Immediately move a 30-day free trial subscription to a paid service | 863 /// subscription. |
859 * subscription. | 864 /// |
860 * | 865 /// Request parameters: |
861 * Request parameters: | 866 /// |
862 * | 867 /// [customerId] - Either the customer's primary domain name or the |
863 * [customerId] - Either the customer's primary domain name or the customer's | 868 /// customer's unique identifier. If using the domain name, we do not |
864 * unique identifier. If using the domain name, we do not recommend using a | 869 /// recommend using a customerId as a key for persistent data. If the domain |
865 * customerId as a key for persistent data. If the domain name for a | 870 /// name for a customerId is changed, the Google system automatically |
866 * customerId is changed, the Google system automatically updates. | 871 /// updates. |
867 * | 872 /// |
868 * [subscriptionId] - This is a required property. The subscriptionId is the | 873 /// [subscriptionId] - This is a required property. The subscriptionId is the |
869 * subscription identifier and is unique for each customer. Since a | 874 /// subscription identifier and is unique for each customer. Since a |
870 * subscriptionId changes when a subscription is updated, we recommend to not | 875 /// subscriptionId changes when a subscription is updated, we recommend to |
871 * use this ID as a key for persistent data. And the subscriptionId can be | 876 /// not use this ID as a key for persistent data. And the subscriptionId can |
872 * found using the retrieve all reseller subscriptions method. | 877 /// be found using the retrieve all reseller subscriptions method. |
873 * | 878 /// |
874 * Completes with a [Subscription]. | 879 /// Completes with a [Subscription]. |
875 * | 880 /// |
876 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 881 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
877 * error. | 882 /// an error. |
878 * | 883 /// |
879 * If the used [http.Client] completes with an error when making a REST call, | 884 /// If the used [http.Client] completes with an error when making a REST |
880 * this method will complete with the same error. | 885 /// call, this method will complete with the same error. |
881 */ | 886 async.Future<Subscription> startPaidService( |
882 async.Future<Subscription> startPaidService(core.String customerId, core.Strin
g subscriptionId) { | 887 core.String customerId, core.String subscriptionId) { |
883 var _url = null; | 888 var _url = null; |
884 var _queryParams = new core.Map(); | 889 var _queryParams = new core.Map(); |
885 var _uploadMedia = null; | 890 var _uploadMedia = null; |
886 var _uploadOptions = null; | 891 var _uploadOptions = null; |
887 var _downloadOptions = commons.DownloadOptions.Metadata; | 892 var _downloadOptions = commons.DownloadOptions.Metadata; |
888 var _body = null; | 893 var _body = null; |
889 | 894 |
890 if (customerId == null) { | 895 if (customerId == null) { |
891 throw new core.ArgumentError("Parameter customerId is required."); | 896 throw new core.ArgumentError("Parameter customerId is required."); |
892 } | 897 } |
893 if (subscriptionId == null) { | 898 if (subscriptionId == null) { |
894 throw new core.ArgumentError("Parameter subscriptionId is required."); | 899 throw new core.ArgumentError("Parameter subscriptionId is required."); |
895 } | 900 } |
896 | 901 |
897 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc
riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/startPaidServi
ce'; | 902 _url = 'customers/' + |
| 903 commons.Escaper.ecapeVariable('$customerId') + |
| 904 '/subscriptions/' + |
| 905 commons.Escaper.ecapeVariable('$subscriptionId') + |
| 906 '/startPaidService'; |
898 | 907 |
899 var _response = _requester.request(_url, | 908 var _response = _requester.request(_url, "POST", |
900 "POST", | 909 body: _body, |
901 body: _body, | 910 queryParams: _queryParams, |
902 queryParams: _queryParams, | 911 uploadOptions: _uploadOptions, |
903 uploadOptions: _uploadOptions, | 912 uploadMedia: _uploadMedia, |
904 uploadMedia: _uploadMedia, | 913 downloadOptions: _downloadOptions); |
905 downloadOptions: _downloadOptions); | |
906 return _response.then((data) => new Subscription.fromJson(data)); | 914 return _response.then((data) => new Subscription.fromJson(data)); |
907 } | 915 } |
908 | 916 |
909 /** | 917 /// Suspends an active subscription. |
910 * Suspends an active subscription. | 918 /// |
911 * | 919 /// Request parameters: |
912 * Request parameters: | 920 /// |
913 * | 921 /// [customerId] - Either the customer's primary domain name or the |
914 * [customerId] - Either the customer's primary domain name or the customer's | 922 /// customer's unique identifier. If using the domain name, we do not |
915 * unique identifier. If using the domain name, we do not recommend using a | 923 /// recommend using a customerId as a key for persistent data. If the domain |
916 * customerId as a key for persistent data. If the domain name for a | 924 /// name for a customerId is changed, the Google system automatically |
917 * customerId is changed, the Google system automatically updates. | 925 /// updates. |
918 * | 926 /// |
919 * [subscriptionId] - This is a required property. The subscriptionId is the | 927 /// [subscriptionId] - This is a required property. The subscriptionId is the |
920 * subscription identifier and is unique for each customer. Since a | 928 /// subscription identifier and is unique for each customer. Since a |
921 * subscriptionId changes when a subscription is updated, we recommend to not | 929 /// subscriptionId changes when a subscription is updated, we recommend to |
922 * use this ID as a key for persistent data. And the subscriptionId can be | 930 /// not use this ID as a key for persistent data. And the subscriptionId can |
923 * found using the retrieve all reseller subscriptions method. | 931 /// be found using the retrieve all reseller subscriptions method. |
924 * | 932 /// |
925 * Completes with a [Subscription]. | 933 /// Completes with a [Subscription]. |
926 * | 934 /// |
927 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 935 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
928 * error. | 936 /// an error. |
929 * | 937 /// |
930 * If the used [http.Client] completes with an error when making a REST call, | 938 /// If the used [http.Client] completes with an error when making a REST |
931 * this method will complete with the same error. | 939 /// call, this method will complete with the same error. |
932 */ | 940 async.Future<Subscription> suspend( |
933 async.Future<Subscription> suspend(core.String customerId, core.String subscri
ptionId) { | 941 core.String customerId, core.String subscriptionId) { |
934 var _url = null; | 942 var _url = null; |
935 var _queryParams = new core.Map(); | 943 var _queryParams = new core.Map(); |
936 var _uploadMedia = null; | 944 var _uploadMedia = null; |
937 var _uploadOptions = null; | 945 var _uploadOptions = null; |
938 var _downloadOptions = commons.DownloadOptions.Metadata; | 946 var _downloadOptions = commons.DownloadOptions.Metadata; |
939 var _body = null; | 947 var _body = null; |
940 | 948 |
941 if (customerId == null) { | 949 if (customerId == null) { |
942 throw new core.ArgumentError("Parameter customerId is required."); | 950 throw new core.ArgumentError("Parameter customerId is required."); |
943 } | 951 } |
944 if (subscriptionId == null) { | 952 if (subscriptionId == null) { |
945 throw new core.ArgumentError("Parameter subscriptionId is required."); | 953 throw new core.ArgumentError("Parameter subscriptionId is required."); |
946 } | 954 } |
947 | 955 |
948 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerId') + '/subsc
riptions/' + commons.Escaper.ecapeVariable('$subscriptionId') + '/suspend'; | 956 _url = 'customers/' + |
| 957 commons.Escaper.ecapeVariable('$customerId') + |
| 958 '/subscriptions/' + |
| 959 commons.Escaper.ecapeVariable('$subscriptionId') + |
| 960 '/suspend'; |
949 | 961 |
950 var _response = _requester.request(_url, | 962 var _response = _requester.request(_url, "POST", |
951 "POST", | 963 body: _body, |
952 body: _body, | 964 queryParams: _queryParams, |
953 queryParams: _queryParams, | 965 uploadOptions: _uploadOptions, |
954 uploadOptions: _uploadOptions, | 966 uploadMedia: _uploadMedia, |
955 uploadMedia: _uploadMedia, | 967 downloadOptions: _downloadOptions); |
956 downloadOptions: _downloadOptions); | |
957 return _response.then((data) => new Subscription.fromJson(data)); | 968 return _response.then((data) => new Subscription.fromJson(data)); |
958 } | 969 } |
959 | |
960 } | 970 } |
961 | 971 |
| 972 /// JSON template for address of a customer. |
| 973 class Address { |
| 974 /// A customer's physical address. An address can be composed of one to three |
| 975 /// lines. The addressline2 and addressLine3 are optional. |
| 976 core.String addressLine1; |
962 | 977 |
| 978 /// Line 2 of the address. |
| 979 core.String addressLine2; |
963 | 980 |
964 /** JSON template for address of a customer. */ | 981 /// Line 3 of the address. |
965 class Address { | |
966 /** | |
967 * A customer's physical address. An address can be composed of one to three | |
968 * lines. The addressline2 and addressLine3 are optional. | |
969 */ | |
970 core.String addressLine1; | |
971 /** Line 2 of the address. */ | |
972 core.String addressLine2; | |
973 /** Line 3 of the address. */ | |
974 core.String addressLine3; | 982 core.String addressLine3; |
975 /** The customer contact's name. This is required. */ | 983 |
| 984 /// The customer contact's name. This is required. |
976 core.String contactName; | 985 core.String contactName; |
977 /** | 986 |
978 * For countryCode information, see the ISO 3166 country code elements. Verify | 987 /// For countryCode information, see the ISO 3166 country code elements. |
979 * that country is approved for resale of Google products. This property is | 988 /// Verify that country is approved for resale of Google products. This |
980 * required when creating a new customer. | 989 /// property is required when creating a new customer. |
981 */ | |
982 core.String countryCode; | 990 core.String countryCode; |
983 /** | 991 |
984 * Identifies the resource as a customer address. Value: customers#address | 992 /// Identifies the resource as a customer address. Value: customers#address |
985 */ | |
986 core.String kind; | 993 core.String kind; |
987 /** An example of a locality value is the city of San Francisco. */ | 994 |
| 995 /// An example of a locality value is the city of San Francisco. |
988 core.String locality; | 996 core.String locality; |
989 /** The company or company division name. This is required. */ | 997 |
| 998 /// The company or company division name. This is required. |
990 core.String organizationName; | 999 core.String organizationName; |
991 /** | 1000 |
992 * A postalCode example is a postal zip code such as 94043. This property is | 1001 /// A postalCode example is a postal zip code such as 94043. This property is |
993 * required when creating a new customer. | 1002 /// required when creating a new customer. |
994 */ | |
995 core.String postalCode; | 1003 core.String postalCode; |
996 /** An example of a region value is CA for the state of California. */ | 1004 |
| 1005 /// An example of a region value is CA for the state of California. |
997 core.String region; | 1006 core.String region; |
998 | 1007 |
999 Address(); | 1008 Address(); |
1000 | 1009 |
1001 Address.fromJson(core.Map _json) { | 1010 Address.fromJson(core.Map _json) { |
1002 if (_json.containsKey("addressLine1")) { | 1011 if (_json.containsKey("addressLine1")) { |
1003 addressLine1 = _json["addressLine1"]; | 1012 addressLine1 = _json["addressLine1"]; |
1004 } | 1013 } |
1005 if (_json.containsKey("addressLine2")) { | 1014 if (_json.containsKey("addressLine2")) { |
1006 addressLine2 = _json["addressLine2"]; | 1015 addressLine2 = _json["addressLine2"]; |
(...skipping 18 matching lines...) Expand all Loading... |
1025 } | 1034 } |
1026 if (_json.containsKey("postalCode")) { | 1035 if (_json.containsKey("postalCode")) { |
1027 postalCode = _json["postalCode"]; | 1036 postalCode = _json["postalCode"]; |
1028 } | 1037 } |
1029 if (_json.containsKey("region")) { | 1038 if (_json.containsKey("region")) { |
1030 region = _json["region"]; | 1039 region = _json["region"]; |
1031 } | 1040 } |
1032 } | 1041 } |
1033 | 1042 |
1034 core.Map<core.String, core.Object> toJson() { | 1043 core.Map<core.String, core.Object> toJson() { |
1035 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1044 final core.Map<core.String, core.Object> _json = |
| 1045 new core.Map<core.String, core.Object>(); |
1036 if (addressLine1 != null) { | 1046 if (addressLine1 != null) { |
1037 _json["addressLine1"] = addressLine1; | 1047 _json["addressLine1"] = addressLine1; |
1038 } | 1048 } |
1039 if (addressLine2 != null) { | 1049 if (addressLine2 != null) { |
1040 _json["addressLine2"] = addressLine2; | 1050 _json["addressLine2"] = addressLine2; |
1041 } | 1051 } |
1042 if (addressLine3 != null) { | 1052 if (addressLine3 != null) { |
1043 _json["addressLine3"] = addressLine3; | 1053 _json["addressLine3"] = addressLine3; |
1044 } | 1054 } |
1045 if (contactName != null) { | 1055 if (contactName != null) { |
(...skipping 14 matching lines...) Expand all Loading... |
1060 if (postalCode != null) { | 1070 if (postalCode != null) { |
1061 _json["postalCode"] = postalCode; | 1071 _json["postalCode"] = postalCode; |
1062 } | 1072 } |
1063 if (region != null) { | 1073 if (region != null) { |
1064 _json["region"] = region; | 1074 _json["region"] = region; |
1065 } | 1075 } |
1066 return _json; | 1076 return _json; |
1067 } | 1077 } |
1068 } | 1078 } |
1069 | 1079 |
1070 /** JSON template for the ChangePlan rpc request. */ | 1080 /// JSON template for the ChangePlan rpc request. |
1071 class ChangePlanRequest { | 1081 class ChangePlanRequest { |
1072 /** | 1082 /// Google-issued code (100 char max) for discounted pricing on subscription |
1073 * Google-issued code (100 char max) for discounted pricing on subscription | 1083 /// plans. Deal code must be included in changePlan request in order to |
1074 * plans. Deal code must be included in changePlan request in order to receive | 1084 /// receive discounted rate. This property is optional. If a deal code has |
1075 * discounted rate. This property is optional. If a deal code has already been | 1085 /// already been added to a subscription, this property may be left empty and |
1076 * added to a subscription, this property may be left empty and the existing | 1086 /// the existing discounted rate will still apply (if not empty, only provide |
1077 * discounted rate will still apply (if not empty, only provide the deal code | 1087 /// the deal code that is already present on the subscription). If a deal |
1078 * that is already present on the subscription). If a deal code has never been | 1088 /// code has never been added to a subscription and this property is left |
1079 * added to a subscription and this property is left blank, regular pricing | 1089 /// blank, regular pricing will apply. |
1080 * will apply. | |
1081 */ | |
1082 core.String dealCode; | 1090 core.String dealCode; |
1083 /** | 1091 |
1084 * Identifies the resource as a subscription change plan request. Value: | 1092 /// Identifies the resource as a subscription change plan request. Value: |
1085 * subscriptions#changePlanRequest | 1093 /// subscriptions#changePlanRequest |
1086 */ | |
1087 core.String kind; | 1094 core.String kind; |
1088 /** | 1095 |
1089 * The planName property is required. This is the name of the subscription's | 1096 /// The planName property is required. This is the name of the subscription's |
1090 * payment plan. For more information about the Google payment plans, see API | 1097 /// payment plan. For more information about the Google payment plans, see |
1091 * concepts. | 1098 /// API concepts. |
1092 * | 1099 /// |
1093 * Possible values are: | 1100 /// Possible values are: |
1094 * - ANNUAL_MONTHLY_PAY - The annual commitment plan with monthly payments | 1101 /// - ANNUAL_MONTHLY_PAY - The annual commitment plan with monthly payments |
1095 * - ANNUAL_YEARLY_PAY - The annual commitment plan with yearly payments | 1102 /// - ANNUAL_YEARLY_PAY - The annual commitment plan with yearly payments |
1096 * - FLEXIBLE - The flexible plan | 1103 /// - FLEXIBLE - The flexible plan |
1097 * - TRIAL - The 30-day free trial plan | 1104 /// - TRIAL - The 30-day free trial plan |
1098 */ | |
1099 core.String planName; | 1105 core.String planName; |
1100 /** | 1106 |
1101 * This is an optional property. This purchase order (PO) information is for | 1107 /// This is an optional property. This purchase order (PO) information is for |
1102 * resellers to use for their company tracking usage. If a purchaseOrderId | 1108 /// resellers to use for their company tracking usage. If a purchaseOrderId |
1103 * value is given it appears in the API responses and shows up in the invoice. | 1109 /// value is given it appears in the API responses and shows up in the |
1104 * The property accepts up to 80 plain text characters. | 1110 /// invoice. The property accepts up to 80 plain text characters. |
1105 */ | |
1106 core.String purchaseOrderId; | 1111 core.String purchaseOrderId; |
1107 /** | 1112 |
1108 * This is a required property. The seats property is the number of user seat | 1113 /// This is a required property. The seats property is the number of user |
1109 * licenses. | 1114 /// seat licenses. |
1110 */ | |
1111 Seats seats; | 1115 Seats seats; |
1112 | 1116 |
1113 ChangePlanRequest(); | 1117 ChangePlanRequest(); |
1114 | 1118 |
1115 ChangePlanRequest.fromJson(core.Map _json) { | 1119 ChangePlanRequest.fromJson(core.Map _json) { |
1116 if (_json.containsKey("dealCode")) { | 1120 if (_json.containsKey("dealCode")) { |
1117 dealCode = _json["dealCode"]; | 1121 dealCode = _json["dealCode"]; |
1118 } | 1122 } |
1119 if (_json.containsKey("kind")) { | 1123 if (_json.containsKey("kind")) { |
1120 kind = _json["kind"]; | 1124 kind = _json["kind"]; |
1121 } | 1125 } |
1122 if (_json.containsKey("planName")) { | 1126 if (_json.containsKey("planName")) { |
1123 planName = _json["planName"]; | 1127 planName = _json["planName"]; |
1124 } | 1128 } |
1125 if (_json.containsKey("purchaseOrderId")) { | 1129 if (_json.containsKey("purchaseOrderId")) { |
1126 purchaseOrderId = _json["purchaseOrderId"]; | 1130 purchaseOrderId = _json["purchaseOrderId"]; |
1127 } | 1131 } |
1128 if (_json.containsKey("seats")) { | 1132 if (_json.containsKey("seats")) { |
1129 seats = new Seats.fromJson(_json["seats"]); | 1133 seats = new Seats.fromJson(_json["seats"]); |
1130 } | 1134 } |
1131 } | 1135 } |
1132 | 1136 |
1133 core.Map<core.String, core.Object> toJson() { | 1137 core.Map<core.String, core.Object> toJson() { |
1134 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1138 final core.Map<core.String, core.Object> _json = |
| 1139 new core.Map<core.String, core.Object>(); |
1135 if (dealCode != null) { | 1140 if (dealCode != null) { |
1136 _json["dealCode"] = dealCode; | 1141 _json["dealCode"] = dealCode; |
1137 } | 1142 } |
1138 if (kind != null) { | 1143 if (kind != null) { |
1139 _json["kind"] = kind; | 1144 _json["kind"] = kind; |
1140 } | 1145 } |
1141 if (planName != null) { | 1146 if (planName != null) { |
1142 _json["planName"] = planName; | 1147 _json["planName"] = planName; |
1143 } | 1148 } |
1144 if (purchaseOrderId != null) { | 1149 if (purchaseOrderId != null) { |
1145 _json["purchaseOrderId"] = purchaseOrderId; | 1150 _json["purchaseOrderId"] = purchaseOrderId; |
1146 } | 1151 } |
1147 if (seats != null) { | 1152 if (seats != null) { |
1148 _json["seats"] = (seats).toJson(); | 1153 _json["seats"] = (seats).toJson(); |
1149 } | 1154 } |
1150 return _json; | 1155 return _json; |
1151 } | 1156 } |
1152 } | 1157 } |
1153 | 1158 |
1154 /** JSON template for a customer. */ | 1159 /// JSON template for a customer. |
1155 class Customer { | 1160 class Customer { |
1156 /** | 1161 /// Like the "Customer email" in the reseller tools, this email is the |
1157 * Like the "Customer email" in the reseller tools, this email is the | 1162 /// secondary contact used if something happens to the customer's service |
1158 * secondary contact used if something happens to the customer's service such | 1163 /// such as service outage or a security issue. This property is required |
1159 * as service outage or a security issue. This property is required when | 1164 /// when creating a new customer and should not use the same domain as |
1160 * creating a new customer and should not use the same domain as | 1165 /// customerDomain. |
1161 * customerDomain. | |
1162 */ | |
1163 core.String alternateEmail; | 1166 core.String alternateEmail; |
1164 /** | 1167 |
1165 * The customer's primary domain name string. customerDomain is required when | 1168 /// The customer's primary domain name string. customerDomain is required |
1166 * creating a new customer. Do not include the www prefix in the domain when | 1169 /// when creating a new customer. Do not include the www prefix in the domain |
1167 * adding a customer. | 1170 /// when adding a customer. |
1168 */ | |
1169 core.String customerDomain; | 1171 core.String customerDomain; |
1170 /** Whether the customer's primary domain has been verified. */ | 1172 |
| 1173 /// Whether the customer's primary domain has been verified. |
1171 core.bool customerDomainVerified; | 1174 core.bool customerDomainVerified; |
1172 /** | 1175 |
1173 * This property will always be returned in a response as the unique | 1176 /// This property will always be returned in a response as the unique |
1174 * identifier generated by Google. In a request, this property can be either | 1177 /// identifier generated by Google. In a request, this property can be either |
1175 * the primary domain or the unique identifier generated by Google. | 1178 /// the primary domain or the unique identifier generated by Google. |
1176 */ | |
1177 core.String customerId; | 1179 core.String customerId; |
1178 /** Identifies the resource as a customer. Value: reseller#customer */ | 1180 |
| 1181 /// Identifies the resource as a customer. Value: reseller#customer |
1179 core.String kind; | 1182 core.String kind; |
1180 /** | 1183 |
1181 * Customer contact phone number. This can be continuous numbers, with spaces, | 1184 /// Customer contact phone number. This can be continuous numbers, with |
1182 * etc. But it must be a real phone number and not, for example, "123". See | 1185 /// spaces, etc. But it must be a real phone number and not, for example, |
1183 * phone local format conventions. | 1186 /// "123". See phone local format conventions. |
1184 */ | |
1185 core.String phoneNumber; | 1187 core.String phoneNumber; |
1186 /** | 1188 |
1187 * A customer's address information. Each field has a limit of 255 charcters. | 1189 /// A customer's address information. Each field has a limit of 255 |
1188 */ | 1190 /// charcters. |
1189 Address postalAddress; | 1191 Address postalAddress; |
1190 /** | 1192 |
1191 * URL to customer's Admin console dashboard. The read-only URL is generated | 1193 /// URL to customer's Admin console dashboard. The read-only URL is generated |
1192 * by the API service. This is used if your client application requires the | 1194 /// by the API service. This is used if your client application requires the |
1193 * customer to complete a task in the Admin console. | 1195 /// customer to complete a task in the Admin console. |
1194 */ | |
1195 core.String resourceUiUrl; | 1196 core.String resourceUiUrl; |
1196 | 1197 |
1197 Customer(); | 1198 Customer(); |
1198 | 1199 |
1199 Customer.fromJson(core.Map _json) { | 1200 Customer.fromJson(core.Map _json) { |
1200 if (_json.containsKey("alternateEmail")) { | 1201 if (_json.containsKey("alternateEmail")) { |
1201 alternateEmail = _json["alternateEmail"]; | 1202 alternateEmail = _json["alternateEmail"]; |
1202 } | 1203 } |
1203 if (_json.containsKey("customerDomain")) { | 1204 if (_json.containsKey("customerDomain")) { |
1204 customerDomain = _json["customerDomain"]; | 1205 customerDomain = _json["customerDomain"]; |
(...skipping 12 matching lines...) Expand all Loading... |
1217 } | 1218 } |
1218 if (_json.containsKey("postalAddress")) { | 1219 if (_json.containsKey("postalAddress")) { |
1219 postalAddress = new Address.fromJson(_json["postalAddress"]); | 1220 postalAddress = new Address.fromJson(_json["postalAddress"]); |
1220 } | 1221 } |
1221 if (_json.containsKey("resourceUiUrl")) { | 1222 if (_json.containsKey("resourceUiUrl")) { |
1222 resourceUiUrl = _json["resourceUiUrl"]; | 1223 resourceUiUrl = _json["resourceUiUrl"]; |
1223 } | 1224 } |
1224 } | 1225 } |
1225 | 1226 |
1226 core.Map<core.String, core.Object> toJson() { | 1227 core.Map<core.String, core.Object> toJson() { |
1227 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1228 final core.Map<core.String, core.Object> _json = |
| 1229 new core.Map<core.String, core.Object>(); |
1228 if (alternateEmail != null) { | 1230 if (alternateEmail != null) { |
1229 _json["alternateEmail"] = alternateEmail; | 1231 _json["alternateEmail"] = alternateEmail; |
1230 } | 1232 } |
1231 if (customerDomain != null) { | 1233 if (customerDomain != null) { |
1232 _json["customerDomain"] = customerDomain; | 1234 _json["customerDomain"] = customerDomain; |
1233 } | 1235 } |
1234 if (customerDomainVerified != null) { | 1236 if (customerDomainVerified != null) { |
1235 _json["customerDomainVerified"] = customerDomainVerified; | 1237 _json["customerDomainVerified"] = customerDomainVerified; |
1236 } | 1238 } |
1237 if (customerId != null) { | 1239 if (customerId != null) { |
1238 _json["customerId"] = customerId; | 1240 _json["customerId"] = customerId; |
1239 } | 1241 } |
1240 if (kind != null) { | 1242 if (kind != null) { |
1241 _json["kind"] = kind; | 1243 _json["kind"] = kind; |
1242 } | 1244 } |
1243 if (phoneNumber != null) { | 1245 if (phoneNumber != null) { |
1244 _json["phoneNumber"] = phoneNumber; | 1246 _json["phoneNumber"] = phoneNumber; |
1245 } | 1247 } |
1246 if (postalAddress != null) { | 1248 if (postalAddress != null) { |
1247 _json["postalAddress"] = (postalAddress).toJson(); | 1249 _json["postalAddress"] = (postalAddress).toJson(); |
1248 } | 1250 } |
1249 if (resourceUiUrl != null) { | 1251 if (resourceUiUrl != null) { |
1250 _json["resourceUiUrl"] = resourceUiUrl; | 1252 _json["resourceUiUrl"] = resourceUiUrl; |
1251 } | 1253 } |
1252 return _json; | 1254 return _json; |
1253 } | 1255 } |
1254 } | 1256 } |
1255 | 1257 |
1256 /** JSON template for a subscription renewal settings. */ | 1258 /// JSON template for a subscription renewal settings. |
1257 class RenewalSettings { | 1259 class RenewalSettings { |
1258 /** | 1260 /// Identifies the resource as a subscription renewal setting. Value: |
1259 * Identifies the resource as a subscription renewal setting. Value: | 1261 /// subscriptions#renewalSettings |
1260 * subscriptions#renewalSettings | |
1261 */ | |
1262 core.String kind; | 1262 core.String kind; |
1263 /** | 1263 |
1264 * Renewal settings for the annual commitment plan. For more detailed | 1264 /// Renewal settings for the annual commitment plan. For more detailed |
1265 * information, see renewal options in the administrator help center. When | 1265 /// information, see renewal options in the administrator help center. When |
1266 * renewing a subscription, the renewalType is a required property. | 1266 /// renewing a subscription, the renewalType is a required property. |
1267 */ | |
1268 core.String renewalType; | 1267 core.String renewalType; |
1269 | 1268 |
1270 RenewalSettings(); | 1269 RenewalSettings(); |
1271 | 1270 |
1272 RenewalSettings.fromJson(core.Map _json) { | 1271 RenewalSettings.fromJson(core.Map _json) { |
1273 if (_json.containsKey("kind")) { | 1272 if (_json.containsKey("kind")) { |
1274 kind = _json["kind"]; | 1273 kind = _json["kind"]; |
1275 } | 1274 } |
1276 if (_json.containsKey("renewalType")) { | 1275 if (_json.containsKey("renewalType")) { |
1277 renewalType = _json["renewalType"]; | 1276 renewalType = _json["renewalType"]; |
1278 } | 1277 } |
1279 } | 1278 } |
1280 | 1279 |
1281 core.Map<core.String, core.Object> toJson() { | 1280 core.Map<core.String, core.Object> toJson() { |
1282 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1281 final core.Map<core.String, core.Object> _json = |
| 1282 new core.Map<core.String, core.Object>(); |
1283 if (kind != null) { | 1283 if (kind != null) { |
1284 _json["kind"] = kind; | 1284 _json["kind"] = kind; |
1285 } | 1285 } |
1286 if (renewalType != null) { | 1286 if (renewalType != null) { |
1287 _json["renewalType"] = renewalType; | 1287 _json["renewalType"] = renewalType; |
1288 } | 1288 } |
1289 return _json; | 1289 return _json; |
1290 } | 1290 } |
1291 } | 1291 } |
1292 | 1292 |
1293 /** JSON template for resellernotify getwatchdetails response. */ | 1293 /// JSON template for resellernotify getwatchdetails response. |
1294 class ResellernotifyGetwatchdetailsResponse { | 1294 class ResellernotifyGetwatchdetailsResponse { |
1295 /** List of registered service accounts. */ | 1295 /// List of registered service accounts. |
1296 core.List<core.String> serviceAccountEmailAddresses; | 1296 core.List<core.String> serviceAccountEmailAddresses; |
1297 /** Topic name of the PubSub */ | 1297 |
| 1298 /// Topic name of the PubSub |
1298 core.String topicName; | 1299 core.String topicName; |
1299 | 1300 |
1300 ResellernotifyGetwatchdetailsResponse(); | 1301 ResellernotifyGetwatchdetailsResponse(); |
1301 | 1302 |
1302 ResellernotifyGetwatchdetailsResponse.fromJson(core.Map _json) { | 1303 ResellernotifyGetwatchdetailsResponse.fromJson(core.Map _json) { |
1303 if (_json.containsKey("serviceAccountEmailAddresses")) { | 1304 if (_json.containsKey("serviceAccountEmailAddresses")) { |
1304 serviceAccountEmailAddresses = _json["serviceAccountEmailAddresses"]; | 1305 serviceAccountEmailAddresses = _json["serviceAccountEmailAddresses"]; |
1305 } | 1306 } |
1306 if (_json.containsKey("topicName")) { | 1307 if (_json.containsKey("topicName")) { |
1307 topicName = _json["topicName"]; | 1308 topicName = _json["topicName"]; |
1308 } | 1309 } |
1309 } | 1310 } |
1310 | 1311 |
1311 core.Map<core.String, core.Object> toJson() { | 1312 core.Map<core.String, core.Object> toJson() { |
1312 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1313 final core.Map<core.String, core.Object> _json = |
| 1314 new core.Map<core.String, core.Object>(); |
1313 if (serviceAccountEmailAddresses != null) { | 1315 if (serviceAccountEmailAddresses != null) { |
1314 _json["serviceAccountEmailAddresses"] = serviceAccountEmailAddresses; | 1316 _json["serviceAccountEmailAddresses"] = serviceAccountEmailAddresses; |
1315 } | 1317 } |
1316 if (topicName != null) { | 1318 if (topicName != null) { |
1317 _json["topicName"] = topicName; | 1319 _json["topicName"] = topicName; |
1318 } | 1320 } |
1319 return _json; | 1321 return _json; |
1320 } | 1322 } |
1321 } | 1323 } |
1322 | 1324 |
1323 /** JSON template for resellernotify response. */ | 1325 /// JSON template for resellernotify response. |
1324 class ResellernotifyResource { | 1326 class ResellernotifyResource { |
1325 /** Topic name of the PubSub */ | 1327 /// Topic name of the PubSub |
1326 core.String topicName; | 1328 core.String topicName; |
1327 | 1329 |
1328 ResellernotifyResource(); | 1330 ResellernotifyResource(); |
1329 | 1331 |
1330 ResellernotifyResource.fromJson(core.Map _json) { | 1332 ResellernotifyResource.fromJson(core.Map _json) { |
1331 if (_json.containsKey("topicName")) { | 1333 if (_json.containsKey("topicName")) { |
1332 topicName = _json["topicName"]; | 1334 topicName = _json["topicName"]; |
1333 } | 1335 } |
1334 } | 1336 } |
1335 | 1337 |
1336 core.Map<core.String, core.Object> toJson() { | 1338 core.Map<core.String, core.Object> toJson() { |
1337 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1339 final core.Map<core.String, core.Object> _json = |
| 1340 new core.Map<core.String, core.Object>(); |
1338 if (topicName != null) { | 1341 if (topicName != null) { |
1339 _json["topicName"] = topicName; | 1342 _json["topicName"] = topicName; |
1340 } | 1343 } |
1341 return _json; | 1344 return _json; |
1342 } | 1345 } |
1343 } | 1346 } |
1344 | 1347 |
1345 /** JSON template for subscription seats. */ | 1348 /// JSON template for subscription seats. |
1346 class Seats { | 1349 class Seats { |
1347 /** | 1350 /// Identifies the resource as a subscription change plan request. Value: |
1348 * Identifies the resource as a subscription change plan request. Value: | 1351 /// subscriptions#seats |
1349 * subscriptions#seats | |
1350 */ | |
1351 core.String kind; | 1352 core.String kind; |
1352 /** | 1353 |
1353 * Read-only field containing the current number of licensed seats for | 1354 /// Read-only field containing the current number of licensed seats for |
1354 * FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as | 1355 /// FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as |
1355 * Google-Vault and Drive-storage. | 1356 /// Google-Vault and Drive-storage. |
1356 */ | |
1357 core.int licensedNumberOfSeats; | 1357 core.int licensedNumberOfSeats; |
1358 /** | 1358 |
1359 * The maximumNumberOfSeats property is the maximum number of licenses that | 1359 /// The maximumNumberOfSeats property is the maximum number of licenses that |
1360 * the customer can purchase. This property applies to plans other than the | 1360 /// the customer can purchase. This property applies to plans other than the |
1361 * annual commitment plan. How a user's licenses are managed depends on the | 1361 /// annual commitment plan. How a user's licenses are managed depends on the |
1362 * subscription's payment plan: | 1362 /// subscription's payment plan: |
1363 * - annual commitment plan (with monthly or yearly payments) — For this plan, | 1363 /// - annual commitment plan (with monthly or yearly payments) — For this |
1364 * a reseller is invoiced on the number of user licenses in the numberOfSeats | 1364 /// plan, a reseller is invoiced on the number of user licenses in the |
1365 * property. The maximumNumberOfSeats property is a read-only property in the | 1365 /// numberOfSeats property. The maximumNumberOfSeats property is a read-only |
1366 * API's response. | 1366 /// property in the API's response. |
1367 * - flexible plan — For this plan, a reseller is invoiced on the actual | 1367 /// - flexible plan — For this plan, a reseller is invoiced on the actual |
1368 * number of users which is capped by the maximumNumberOfSeats. This is the | 1368 /// number of users which is capped by the maximumNumberOfSeats. This is the |
1369 * maximum number of user licenses a customer has for user license | 1369 /// maximum number of user licenses a customer has for user license |
1370 * provisioning. This quantity can be increased up to the maximum limit | 1370 /// provisioning. This quantity can be increased up to the maximum limit |
1371 * defined in the reseller's contract. And the minimum quantity is the current | 1371 /// defined in the reseller's contract. And the minimum quantity is the |
1372 * number of users in the customer account. | 1372 /// current number of users in the customer account. |
1373 * - 30-day free trial plan — A subscription in a 30-day free trial is | 1373 /// - 30-day free trial plan — A subscription in a 30-day free trial is |
1374 * restricted to maximum 10 seats. | 1374 /// restricted to maximum 10 seats. |
1375 */ | |
1376 core.int maximumNumberOfSeats; | 1375 core.int maximumNumberOfSeats; |
1377 /** | 1376 |
1378 * The numberOfSeats property holds the customer's number of user licenses. | 1377 /// The numberOfSeats property holds the customer's number of user licenses. |
1379 * How a user's licenses are managed depends on the subscription's plan: | 1378 /// How a user's licenses are managed depends on the subscription's plan: |
1380 * - annual commitment plan (with monthly or yearly pay) — For this plan, a | 1379 /// - annual commitment plan (with monthly or yearly pay) — For this plan, a |
1381 * reseller is invoiced on the number of user licenses in the numberOfSeats | 1380 /// reseller is invoiced on the number of user licenses in the numberOfSeats |
1382 * property. This is the maximum number of user licenses that a reseller's | 1381 /// property. This is the maximum number of user licenses that a reseller's |
1383 * customer can create. The reseller can add more licenses, but once set, the | 1382 /// customer can create. The reseller can add more licenses, but once set, |
1384 * numberOfSeats can not be reduced until renewal. The reseller is invoiced | 1383 /// the numberOfSeats can not be reduced until renewal. The reseller is |
1385 * based on the numberOfSeats value regardless of how many of these user | 1384 /// invoiced based on the numberOfSeats value regardless of how many of these |
1386 * licenses are provisioned users. | 1385 /// user licenses are provisioned users. |
1387 * - flexible plan — For this plan, a reseller is invoiced on the actual | 1386 /// - flexible plan — For this plan, a reseller is invoiced on the actual |
1388 * number of users which is capped by the maximumNumberOfSeats. The | 1387 /// number of users which is capped by the maximumNumberOfSeats. The |
1389 * numberOfSeats property is not used in the request or response for flexible | 1388 /// numberOfSeats property is not used in the request or response for |
1390 * plan customers. | 1389 /// flexible plan customers. |
1391 * - 30-day free trial plan — The numberOfSeats property is not used in the | 1390 /// - 30-day free trial plan — The numberOfSeats property is not used in the |
1392 * request or response for an account in a 30-day trial. | 1391 /// request or response for an account in a 30-day trial. |
1393 */ | |
1394 core.int numberOfSeats; | 1392 core.int numberOfSeats; |
1395 | 1393 |
1396 Seats(); | 1394 Seats(); |
1397 | 1395 |
1398 Seats.fromJson(core.Map _json) { | 1396 Seats.fromJson(core.Map _json) { |
1399 if (_json.containsKey("kind")) { | 1397 if (_json.containsKey("kind")) { |
1400 kind = _json["kind"]; | 1398 kind = _json["kind"]; |
1401 } | 1399 } |
1402 if (_json.containsKey("licensedNumberOfSeats")) { | 1400 if (_json.containsKey("licensedNumberOfSeats")) { |
1403 licensedNumberOfSeats = _json["licensedNumberOfSeats"]; | 1401 licensedNumberOfSeats = _json["licensedNumberOfSeats"]; |
1404 } | 1402 } |
1405 if (_json.containsKey("maximumNumberOfSeats")) { | 1403 if (_json.containsKey("maximumNumberOfSeats")) { |
1406 maximumNumberOfSeats = _json["maximumNumberOfSeats"]; | 1404 maximumNumberOfSeats = _json["maximumNumberOfSeats"]; |
1407 } | 1405 } |
1408 if (_json.containsKey("numberOfSeats")) { | 1406 if (_json.containsKey("numberOfSeats")) { |
1409 numberOfSeats = _json["numberOfSeats"]; | 1407 numberOfSeats = _json["numberOfSeats"]; |
1410 } | 1408 } |
1411 } | 1409 } |
1412 | 1410 |
1413 core.Map<core.String, core.Object> toJson() { | 1411 core.Map<core.String, core.Object> toJson() { |
1414 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1412 final core.Map<core.String, core.Object> _json = |
| 1413 new core.Map<core.String, core.Object>(); |
1415 if (kind != null) { | 1414 if (kind != null) { |
1416 _json["kind"] = kind; | 1415 _json["kind"] = kind; |
1417 } | 1416 } |
1418 if (licensedNumberOfSeats != null) { | 1417 if (licensedNumberOfSeats != null) { |
1419 _json["licensedNumberOfSeats"] = licensedNumberOfSeats; | 1418 _json["licensedNumberOfSeats"] = licensedNumberOfSeats; |
1420 } | 1419 } |
1421 if (maximumNumberOfSeats != null) { | 1420 if (maximumNumberOfSeats != null) { |
1422 _json["maximumNumberOfSeats"] = maximumNumberOfSeats; | 1421 _json["maximumNumberOfSeats"] = maximumNumberOfSeats; |
1423 } | 1422 } |
1424 if (numberOfSeats != null) { | 1423 if (numberOfSeats != null) { |
1425 _json["numberOfSeats"] = numberOfSeats; | 1424 _json["numberOfSeats"] = numberOfSeats; |
1426 } | 1425 } |
1427 return _json; | 1426 return _json; |
1428 } | 1427 } |
1429 } | 1428 } |
1430 | 1429 |
1431 /** | 1430 /// In this version of the API, annual commitment plan's interval is one year. |
1432 * In this version of the API, annual commitment plan's interval is one year. | |
1433 */ | |
1434 class SubscriptionPlanCommitmentInterval { | 1431 class SubscriptionPlanCommitmentInterval { |
1435 /** | 1432 /// An annual commitment plan's interval's endTime in milliseconds using the |
1436 * An annual commitment plan's interval's endTime in milliseconds using the | 1433 /// UNIX Epoch format. See an example Epoch converter. |
1437 * UNIX Epoch format. See an example Epoch converter. | |
1438 */ | |
1439 core.String endTime; | 1434 core.String endTime; |
1440 /** | 1435 |
1441 * An annual commitment plan's interval's startTime in milliseconds using UNIX | 1436 /// An annual commitment plan's interval's startTime in milliseconds using |
1442 * Epoch format. See an example Epoch converter. | 1437 /// UNIX Epoch format. See an example Epoch converter. |
1443 */ | |
1444 core.String startTime; | 1438 core.String startTime; |
1445 | 1439 |
1446 SubscriptionPlanCommitmentInterval(); | 1440 SubscriptionPlanCommitmentInterval(); |
1447 | 1441 |
1448 SubscriptionPlanCommitmentInterval.fromJson(core.Map _json) { | 1442 SubscriptionPlanCommitmentInterval.fromJson(core.Map _json) { |
1449 if (_json.containsKey("endTime")) { | 1443 if (_json.containsKey("endTime")) { |
1450 endTime = _json["endTime"]; | 1444 endTime = _json["endTime"]; |
1451 } | 1445 } |
1452 if (_json.containsKey("startTime")) { | 1446 if (_json.containsKey("startTime")) { |
1453 startTime = _json["startTime"]; | 1447 startTime = _json["startTime"]; |
1454 } | 1448 } |
1455 } | 1449 } |
1456 | 1450 |
1457 core.Map<core.String, core.Object> toJson() { | 1451 core.Map<core.String, core.Object> toJson() { |
1458 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1452 final core.Map<core.String, core.Object> _json = |
| 1453 new core.Map<core.String, core.Object>(); |
1459 if (endTime != null) { | 1454 if (endTime != null) { |
1460 _json["endTime"] = endTime; | 1455 _json["endTime"] = endTime; |
1461 } | 1456 } |
1462 if (startTime != null) { | 1457 if (startTime != null) { |
1463 _json["startTime"] = startTime; | 1458 _json["startTime"] = startTime; |
1464 } | 1459 } |
1465 return _json; | 1460 return _json; |
1466 } | 1461 } |
1467 } | 1462 } |
1468 | 1463 |
1469 /** | 1464 /// The plan property is required. In this version of the API, the G Suite |
1470 * The plan property is required. In this version of the API, the G Suite plans | 1465 /// plans are the flexible plan, annual commitment plan, and the 30-day free |
1471 * are the flexible plan, annual commitment plan, and the 30-day free trial | 1466 /// trial plan. For more information about the API"s payment plans, see the API |
1472 * plan. For more information about the API"s payment plans, see the API | 1467 /// concepts. |
1473 * concepts. | |
1474 */ | |
1475 class SubscriptionPlan { | 1468 class SubscriptionPlan { |
1476 /** | 1469 /// In this version of the API, annual commitment plan's interval is one |
1477 * In this version of the API, annual commitment plan's interval is one year. | 1470 /// year. |
1478 */ | |
1479 SubscriptionPlanCommitmentInterval commitmentInterval; | 1471 SubscriptionPlanCommitmentInterval commitmentInterval; |
1480 /** | 1472 |
1481 * The isCommitmentPlan property's boolean value identifies the plan as an | 1473 /// The isCommitmentPlan property's boolean value identifies the plan as an |
1482 * annual commitment plan: | 1474 /// annual commitment plan: |
1483 * - true — The subscription's plan is an annual commitment plan. | 1475 /// - true — The subscription's plan is an annual commitment plan. |
1484 * - false — The plan is not an annual commitment plan. | 1476 /// - false — The plan is not an annual commitment plan. |
1485 */ | |
1486 core.bool isCommitmentPlan; | 1477 core.bool isCommitmentPlan; |
1487 /** | 1478 |
1488 * The planName property is required. This is the name of the subscription's | 1479 /// The planName property is required. This is the name of the subscription's |
1489 * plan. For more information about the Google payment plans, see the API | 1480 /// plan. For more information about the Google payment plans, see the API |
1490 * concepts. | 1481 /// concepts. |
1491 * | 1482 /// |
1492 * Possible values are: | 1483 /// Possible values are: |
1493 * - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments | 1484 /// - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments |
1494 * - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments | 1485 /// - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments |
1495 * - FLEXIBLE — The flexible plan | 1486 /// - FLEXIBLE — The flexible plan |
1496 * - TRIAL — The 30-day free trial plan. A subscription in trial will be | 1487 /// - TRIAL — The 30-day free trial plan. A subscription in trial will be |
1497 * suspended after the 30th free day if no payment plan is assigned. Calling | 1488 /// suspended after the 30th free day if no payment plan is assigned. Calling |
1498 * changePlan will assign a payment plan to a trial but will not activate the | 1489 /// changePlan will assign a payment plan to a trial but will not activate |
1499 * plan. A trial will automatically begin its assigned payment plan after its | 1490 /// the plan. A trial will automatically begin its assigned payment plan |
1500 * 30th free day or immediately after calling startPaidService. | 1491 /// after its 30th free day or immediately after calling startPaidService. |
1501 */ | |
1502 core.String planName; | 1492 core.String planName; |
1503 | 1493 |
1504 SubscriptionPlan(); | 1494 SubscriptionPlan(); |
1505 | 1495 |
1506 SubscriptionPlan.fromJson(core.Map _json) { | 1496 SubscriptionPlan.fromJson(core.Map _json) { |
1507 if (_json.containsKey("commitmentInterval")) { | 1497 if (_json.containsKey("commitmentInterval")) { |
1508 commitmentInterval = new SubscriptionPlanCommitmentInterval.fromJson(_json
["commitmentInterval"]); | 1498 commitmentInterval = new SubscriptionPlanCommitmentInterval.fromJson( |
| 1499 _json["commitmentInterval"]); |
1509 } | 1500 } |
1510 if (_json.containsKey("isCommitmentPlan")) { | 1501 if (_json.containsKey("isCommitmentPlan")) { |
1511 isCommitmentPlan = _json["isCommitmentPlan"]; | 1502 isCommitmentPlan = _json["isCommitmentPlan"]; |
1512 } | 1503 } |
1513 if (_json.containsKey("planName")) { | 1504 if (_json.containsKey("planName")) { |
1514 planName = _json["planName"]; | 1505 planName = _json["planName"]; |
1515 } | 1506 } |
1516 } | 1507 } |
1517 | 1508 |
1518 core.Map<core.String, core.Object> toJson() { | 1509 core.Map<core.String, core.Object> toJson() { |
1519 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1510 final core.Map<core.String, core.Object> _json = |
| 1511 new core.Map<core.String, core.Object>(); |
1520 if (commitmentInterval != null) { | 1512 if (commitmentInterval != null) { |
1521 _json["commitmentInterval"] = (commitmentInterval).toJson(); | 1513 _json["commitmentInterval"] = (commitmentInterval).toJson(); |
1522 } | 1514 } |
1523 if (isCommitmentPlan != null) { | 1515 if (isCommitmentPlan != null) { |
1524 _json["isCommitmentPlan"] = isCommitmentPlan; | 1516 _json["isCommitmentPlan"] = isCommitmentPlan; |
1525 } | 1517 } |
1526 if (planName != null) { | 1518 if (planName != null) { |
1527 _json["planName"] = planName; | 1519 _json["planName"] = planName; |
1528 } | 1520 } |
1529 return _json; | 1521 return _json; |
1530 } | 1522 } |
1531 } | 1523 } |
1532 | 1524 |
1533 /** | 1525 /// Read-only transfer related information for the subscription. For more |
1534 * Read-only transfer related information for the subscription. For more | 1526 /// information, see retrieve transferable subscriptions for a customer. |
1535 * information, see retrieve transferable subscriptions for a customer. | |
1536 */ | |
1537 class SubscriptionTransferInfo { | 1527 class SubscriptionTransferInfo { |
1538 /** | 1528 /// When inserting a subscription, this is the minimum number of seats listed |
1539 * When inserting a subscription, this is the minimum number of seats listed | 1529 /// in the transfer order for this product. For example, if the customer has |
1540 * in the transfer order for this product. For example, if the customer has 20 | 1530 /// 20 users, the reseller cannot place a transfer order of 15 seats. The |
1541 * users, the reseller cannot place a transfer order of 15 seats. The minimum | 1531 /// minimum is 20 seats. |
1542 * is 20 seats. | |
1543 */ | |
1544 core.int minimumTransferableSeats; | 1532 core.int minimumTransferableSeats; |
1545 /** | 1533 |
1546 * The time when transfer token or intent to transfer will expire. The time is | 1534 /// The time when transfer token or intent to transfer will expire. The time |
1547 * in milliseconds using UNIX Epoch format. | 1535 /// is in milliseconds using UNIX Epoch format. |
1548 */ | |
1549 core.String transferabilityExpirationTime; | 1536 core.String transferabilityExpirationTime; |
1550 | 1537 |
1551 SubscriptionTransferInfo(); | 1538 SubscriptionTransferInfo(); |
1552 | 1539 |
1553 SubscriptionTransferInfo.fromJson(core.Map _json) { | 1540 SubscriptionTransferInfo.fromJson(core.Map _json) { |
1554 if (_json.containsKey("minimumTransferableSeats")) { | 1541 if (_json.containsKey("minimumTransferableSeats")) { |
1555 minimumTransferableSeats = _json["minimumTransferableSeats"]; | 1542 minimumTransferableSeats = _json["minimumTransferableSeats"]; |
1556 } | 1543 } |
1557 if (_json.containsKey("transferabilityExpirationTime")) { | 1544 if (_json.containsKey("transferabilityExpirationTime")) { |
1558 transferabilityExpirationTime = _json["transferabilityExpirationTime"]; | 1545 transferabilityExpirationTime = _json["transferabilityExpirationTime"]; |
1559 } | 1546 } |
1560 } | 1547 } |
1561 | 1548 |
1562 core.Map<core.String, core.Object> toJson() { | 1549 core.Map<core.String, core.Object> toJson() { |
1563 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1550 final core.Map<core.String, core.Object> _json = |
| 1551 new core.Map<core.String, core.Object>(); |
1564 if (minimumTransferableSeats != null) { | 1552 if (minimumTransferableSeats != null) { |
1565 _json["minimumTransferableSeats"] = minimumTransferableSeats; | 1553 _json["minimumTransferableSeats"] = minimumTransferableSeats; |
1566 } | 1554 } |
1567 if (transferabilityExpirationTime != null) { | 1555 if (transferabilityExpirationTime != null) { |
1568 _json["transferabilityExpirationTime"] = transferabilityExpirationTime; | 1556 _json["transferabilityExpirationTime"] = transferabilityExpirationTime; |
1569 } | 1557 } |
1570 return _json; | 1558 return _json; |
1571 } | 1559 } |
1572 } | 1560 } |
1573 | 1561 |
1574 /** | 1562 /// The G Suite annual commitment and flexible payment plans can be in a 30-day |
1575 * The G Suite annual commitment and flexible payment plans can be in a 30-day | 1563 /// free trial. For more information, see the API concepts. |
1576 * free trial. For more information, see the API concepts. | |
1577 */ | |
1578 class SubscriptionTrialSettings { | 1564 class SubscriptionTrialSettings { |
1579 /** | 1565 /// Determines if a subscription's plan is in a 30-day free trial or not: |
1580 * Determines if a subscription's plan is in a 30-day free trial or not: | 1566 /// - true — The plan is in trial. |
1581 * - true — The plan is in trial. | 1567 /// - false — The plan is not in trial. |
1582 * - false — The plan is not in trial. | |
1583 */ | |
1584 core.bool isInTrial; | 1568 core.bool isInTrial; |
1585 /** | 1569 |
1586 * Date when the trial ends. The value is in milliseconds using the UNIX Epoch | 1570 /// Date when the trial ends. The value is in milliseconds using the UNIX |
1587 * format. See an example Epoch converter. | 1571 /// Epoch format. See an example Epoch converter. |
1588 */ | |
1589 core.String trialEndTime; | 1572 core.String trialEndTime; |
1590 | 1573 |
1591 SubscriptionTrialSettings(); | 1574 SubscriptionTrialSettings(); |
1592 | 1575 |
1593 SubscriptionTrialSettings.fromJson(core.Map _json) { | 1576 SubscriptionTrialSettings.fromJson(core.Map _json) { |
1594 if (_json.containsKey("isInTrial")) { | 1577 if (_json.containsKey("isInTrial")) { |
1595 isInTrial = _json["isInTrial"]; | 1578 isInTrial = _json["isInTrial"]; |
1596 } | 1579 } |
1597 if (_json.containsKey("trialEndTime")) { | 1580 if (_json.containsKey("trialEndTime")) { |
1598 trialEndTime = _json["trialEndTime"]; | 1581 trialEndTime = _json["trialEndTime"]; |
1599 } | 1582 } |
1600 } | 1583 } |
1601 | 1584 |
1602 core.Map<core.String, core.Object> toJson() { | 1585 core.Map<core.String, core.Object> toJson() { |
1603 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1586 final core.Map<core.String, core.Object> _json = |
| 1587 new core.Map<core.String, core.Object>(); |
1604 if (isInTrial != null) { | 1588 if (isInTrial != null) { |
1605 _json["isInTrial"] = isInTrial; | 1589 _json["isInTrial"] = isInTrial; |
1606 } | 1590 } |
1607 if (trialEndTime != null) { | 1591 if (trialEndTime != null) { |
1608 _json["trialEndTime"] = trialEndTime; | 1592 _json["trialEndTime"] = trialEndTime; |
1609 } | 1593 } |
1610 return _json; | 1594 return _json; |
1611 } | 1595 } |
1612 } | 1596 } |
1613 | 1597 |
1614 /** JSON template for a subscription. */ | 1598 /// JSON template for a subscription. |
1615 class Subscription { | 1599 class Subscription { |
1616 /** | 1600 /// Read-only field that returns the current billing method for a |
1617 * Read-only field that returns the current billing method for a subscription. | 1601 /// subscription. |
1618 */ | |
1619 core.String billingMethod; | 1602 core.String billingMethod; |
1620 /** | 1603 |
1621 * The creationTime property is the date when subscription was created. It is | 1604 /// The creationTime property is the date when subscription was created. It |
1622 * in milliseconds using the Epoch format. See an example Epoch converter. | 1605 /// is in milliseconds using the Epoch format. See an example Epoch |
1623 */ | 1606 /// converter. |
1624 core.String creationTime; | 1607 core.String creationTime; |
1625 /** Primary domain name of the customer */ | 1608 |
| 1609 /// Primary domain name of the customer |
1626 core.String customerDomain; | 1610 core.String customerDomain; |
1627 /** | 1611 |
1628 * This property will always be returned in a response as the unique | 1612 /// This property will always be returned in a response as the unique |
1629 * identifier generated by Google. In a request, this property can be either | 1613 /// identifier generated by Google. In a request, this property can be either |
1630 * the primary domain or the unique identifier generated by Google. | 1614 /// the primary domain or the unique identifier generated by Google. |
1631 */ | |
1632 core.String customerId; | 1615 core.String customerId; |
1633 /** | 1616 |
1634 * Google-issued code (100 char max) for discounted pricing on subscription | 1617 /// Google-issued code (100 char max) for discounted pricing on subscription |
1635 * plans. Deal code must be included in insert requests in order to receive | 1618 /// plans. Deal code must be included in insert requests in order to receive |
1636 * discounted rate. This property is optional, regular pricing applies if left | 1619 /// discounted rate. This property is optional, regular pricing applies if |
1637 * empty. | 1620 /// left empty. |
1638 */ | |
1639 core.String dealCode; | 1621 core.String dealCode; |
1640 /** | 1622 |
1641 * Identifies the resource as a Subscription. Value: reseller#subscription | 1623 /// Identifies the resource as a Subscription. Value: reseller#subscription |
1642 */ | |
1643 core.String kind; | 1624 core.String kind; |
1644 /** | 1625 |
1645 * The plan property is required. In this version of the API, the G Suite | 1626 /// The plan property is required. In this version of the API, the G Suite |
1646 * plans are the flexible plan, annual commitment plan, and the 30-day free | 1627 /// plans are the flexible plan, annual commitment plan, and the 30-day free |
1647 * trial plan. For more information about the API"s payment plans, see the API | 1628 /// trial plan. For more information about the API"s payment plans, see the |
1648 * concepts. | 1629 /// API concepts. |
1649 */ | |
1650 SubscriptionPlan plan; | 1630 SubscriptionPlan plan; |
1651 /** | 1631 |
1652 * This is an optional property. This purchase order (PO) information is for | 1632 /// This is an optional property. This purchase order (PO) information is for |
1653 * resellers to use for their company tracking usage. If a purchaseOrderId | 1633 /// resellers to use for their company tracking usage. If a purchaseOrderId |
1654 * value is given it appears in the API responses and shows up in the invoice. | 1634 /// value is given it appears in the API responses and shows up in the |
1655 * The property accepts up to 80 plain text characters. | 1635 /// invoice. The property accepts up to 80 plain text characters. |
1656 */ | |
1657 core.String purchaseOrderId; | 1636 core.String purchaseOrderId; |
1658 /** | 1637 |
1659 * Renewal settings for the annual commitment plan. For more detailed | 1638 /// Renewal settings for the annual commitment plan. For more detailed |
1660 * information, see renewal options in the administrator help center. | 1639 /// information, see renewal options in the administrator help center. |
1661 */ | |
1662 RenewalSettings renewalSettings; | 1640 RenewalSettings renewalSettings; |
1663 /** | 1641 |
1664 * URL to customer's Subscriptions page in the Admin console. The read-only | 1642 /// URL to customer's Subscriptions page in the Admin console. The read-only |
1665 * URL is generated by the API service. This is used if your client | 1643 /// URL is generated by the API service. This is used if your client |
1666 * application requires the customer to complete a task using the | 1644 /// application requires the customer to complete a task using the |
1667 * Subscriptions page in the Admin console. | 1645 /// Subscriptions page in the Admin console. |
1668 */ | |
1669 core.String resourceUiUrl; | 1646 core.String resourceUiUrl; |
1670 /** | 1647 |
1671 * This is a required property. The number and limit of user seat licenses in | 1648 /// This is a required property. The number and limit of user seat licenses |
1672 * the plan. | 1649 /// in the plan. |
1673 */ | |
1674 Seats seats; | 1650 Seats seats; |
1675 /** | 1651 |
1676 * A required property. The skuId is a unique system identifier for a | 1652 /// A required property. The skuId is a unique system identifier for a |
1677 * product's SKU assigned to a customer in the subscription. For products and | 1653 /// product's SKU assigned to a customer in the subscription. For products |
1678 * SKUs available in this version of the API, see Product and SKU IDs. | 1654 /// and SKUs available in this version of the API, see Product and SKU IDs. |
1679 */ | |
1680 core.String skuId; | 1655 core.String skuId; |
1681 /** | 1656 |
1682 * Read-only external display name for a product's SKU assigned to a customer | 1657 /// Read-only external display name for a product's SKU assigned to a |
1683 * in the subscription. SKU names are subject to change at Google's | 1658 /// customer in the subscription. SKU names are subject to change at Google's |
1684 * discretion. For products and SKUs available in this version of the API, see | 1659 /// discretion. For products and SKUs available in this version of the API, |
1685 * Product and SKU IDs. | 1660 /// see Product and SKU IDs. |
1686 */ | |
1687 core.String skuName; | 1661 core.String skuName; |
1688 /** This is an optional property. */ | 1662 |
| 1663 /// This is an optional property. |
1689 core.String status; | 1664 core.String status; |
1690 /** | 1665 |
1691 * The subscriptionId is the subscription identifier and is unique for each | 1666 /// The subscriptionId is the subscription identifier and is unique for each |
1692 * customer. This is a required property. Since a subscriptionId changes when | 1667 /// customer. This is a required property. Since a subscriptionId changes |
1693 * a subscription is updated, we recommend not using this ID as a key for | 1668 /// when a subscription is updated, we recommend not using this ID as a key |
1694 * persistent data. Use the subscriptionId as described in retrieve all | 1669 /// for persistent data. Use the subscriptionId as described in retrieve all |
1695 * reseller subscriptions. | 1670 /// reseller subscriptions. |
1696 */ | |
1697 core.String subscriptionId; | 1671 core.String subscriptionId; |
1698 /** | 1672 |
1699 * Read-only field containing an enumerable of all the current suspension | 1673 /// Read-only field containing an enumerable of all the current suspension |
1700 * reasons for a subscription. It is possible for a subscription to have many | 1674 /// reasons for a subscription. It is possible for a subscription to have |
1701 * concurrent, overlapping suspension reasons. A subscription's STATUS is | 1675 /// many concurrent, overlapping suspension reasons. A subscription's STATUS |
1702 * SUSPENDED until all pending suspensions are removed. | 1676 /// is SUSPENDED until all pending suspensions are removed. |
1703 * | 1677 /// |
1704 * Possible options include: | 1678 /// Possible options include: |
1705 * - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the | 1679 /// - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted |
1706 * G Suite Resold Terms of Services. | 1680 /// the G Suite Resold Terms of Services. |
1707 * - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their | 1681 /// - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their |
1708 * service was cancelled at the end of their term. | 1682 /// service was cancelled at the end of their term. |
1709 * - RESELLER_INITIATED - A manual suspension invoked by a Reseller. | 1683 /// - RESELLER_INITIATED - A manual suspension invoked by a Reseller. |
1710 * - TRIAL_ENDED - The customer's trial expired without a plan selected. | 1684 /// - TRIAL_ENDED - The customer's trial expired without a plan selected. |
1711 * - OTHER - The customer is suspended for an internal Google reason (e.g. | 1685 /// - OTHER - The customer is suspended for an internal Google reason (e.g. |
1712 * abuse or otherwise). | 1686 /// abuse or otherwise). |
1713 */ | |
1714 core.List<core.String> suspensionReasons; | 1687 core.List<core.String> suspensionReasons; |
1715 /** | 1688 |
1716 * Read-only transfer related information for the subscription. For more | 1689 /// Read-only transfer related information for the subscription. For more |
1717 * information, see retrieve transferable subscriptions for a customer. | 1690 /// information, see retrieve transferable subscriptions for a customer. |
1718 */ | |
1719 SubscriptionTransferInfo transferInfo; | 1691 SubscriptionTransferInfo transferInfo; |
1720 /** | 1692 |
1721 * The G Suite annual commitment and flexible payment plans can be in a 30-day | 1693 /// The G Suite annual commitment and flexible payment plans can be in a |
1722 * free trial. For more information, see the API concepts. | 1694 /// 30-day free trial. For more information, see the API concepts. |
1723 */ | |
1724 SubscriptionTrialSettings trialSettings; | 1695 SubscriptionTrialSettings trialSettings; |
1725 | 1696 |
1726 Subscription(); | 1697 Subscription(); |
1727 | 1698 |
1728 Subscription.fromJson(core.Map _json) { | 1699 Subscription.fromJson(core.Map _json) { |
1729 if (_json.containsKey("billingMethod")) { | 1700 if (_json.containsKey("billingMethod")) { |
1730 billingMethod = _json["billingMethod"]; | 1701 billingMethod = _json["billingMethod"]; |
1731 } | 1702 } |
1732 if (_json.containsKey("creationTime")) { | 1703 if (_json.containsKey("creationTime")) { |
1733 creationTime = _json["creationTime"]; | 1704 creationTime = _json["creationTime"]; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1768 if (_json.containsKey("status")) { | 1739 if (_json.containsKey("status")) { |
1769 status = _json["status"]; | 1740 status = _json["status"]; |
1770 } | 1741 } |
1771 if (_json.containsKey("subscriptionId")) { | 1742 if (_json.containsKey("subscriptionId")) { |
1772 subscriptionId = _json["subscriptionId"]; | 1743 subscriptionId = _json["subscriptionId"]; |
1773 } | 1744 } |
1774 if (_json.containsKey("suspensionReasons")) { | 1745 if (_json.containsKey("suspensionReasons")) { |
1775 suspensionReasons = _json["suspensionReasons"]; | 1746 suspensionReasons = _json["suspensionReasons"]; |
1776 } | 1747 } |
1777 if (_json.containsKey("transferInfo")) { | 1748 if (_json.containsKey("transferInfo")) { |
1778 transferInfo = new SubscriptionTransferInfo.fromJson(_json["transferInfo"]
); | 1749 transferInfo = |
| 1750 new SubscriptionTransferInfo.fromJson(_json["transferInfo"]); |
1779 } | 1751 } |
1780 if (_json.containsKey("trialSettings")) { | 1752 if (_json.containsKey("trialSettings")) { |
1781 trialSettings = new SubscriptionTrialSettings.fromJson(_json["trialSetting
s"]); | 1753 trialSettings = |
| 1754 new SubscriptionTrialSettings.fromJson(_json["trialSettings"]); |
1782 } | 1755 } |
1783 } | 1756 } |
1784 | 1757 |
1785 core.Map<core.String, core.Object> toJson() { | 1758 core.Map<core.String, core.Object> toJson() { |
1786 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1759 final core.Map<core.String, core.Object> _json = |
| 1760 new core.Map<core.String, core.Object>(); |
1787 if (billingMethod != null) { | 1761 if (billingMethod != null) { |
1788 _json["billingMethod"] = billingMethod; | 1762 _json["billingMethod"] = billingMethod; |
1789 } | 1763 } |
1790 if (creationTime != null) { | 1764 if (creationTime != null) { |
1791 _json["creationTime"] = creationTime; | 1765 _json["creationTime"] = creationTime; |
1792 } | 1766 } |
1793 if (customerDomain != null) { | 1767 if (customerDomain != null) { |
1794 _json["customerDomain"] = customerDomain; | 1768 _json["customerDomain"] = customerDomain; |
1795 } | 1769 } |
1796 if (customerId != null) { | 1770 if (customerId != null) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1835 if (transferInfo != null) { | 1809 if (transferInfo != null) { |
1836 _json["transferInfo"] = (transferInfo).toJson(); | 1810 _json["transferInfo"] = (transferInfo).toJson(); |
1837 } | 1811 } |
1838 if (trialSettings != null) { | 1812 if (trialSettings != null) { |
1839 _json["trialSettings"] = (trialSettings).toJson(); | 1813 _json["trialSettings"] = (trialSettings).toJson(); |
1840 } | 1814 } |
1841 return _json; | 1815 return _json; |
1842 } | 1816 } |
1843 } | 1817 } |
1844 | 1818 |
1845 /** JSON template for a subscription list. */ | 1819 /// JSON template for a subscription list. |
1846 class Subscriptions { | 1820 class Subscriptions { |
1847 /** | 1821 /// Identifies the resource as a collection of subscriptions. Value: |
1848 * Identifies the resource as a collection of subscriptions. Value: | 1822 /// reseller#subscriptions |
1849 * reseller#subscriptions | |
1850 */ | |
1851 core.String kind; | 1823 core.String kind; |
1852 /** | 1824 |
1853 * The continuation token, used to page through large result sets. Provide | 1825 /// The continuation token, used to page through large result sets. Provide |
1854 * this value in a subsequent request to return the next page of results. | 1826 /// this value in a subsequent request to return the next page of results. |
1855 */ | |
1856 core.String nextPageToken; | 1827 core.String nextPageToken; |
1857 /** The subscriptions in this page of results. */ | 1828 |
| 1829 /// The subscriptions in this page of results. |
1858 core.List<Subscription> subscriptions; | 1830 core.List<Subscription> subscriptions; |
1859 | 1831 |
1860 Subscriptions(); | 1832 Subscriptions(); |
1861 | 1833 |
1862 Subscriptions.fromJson(core.Map _json) { | 1834 Subscriptions.fromJson(core.Map _json) { |
1863 if (_json.containsKey("kind")) { | 1835 if (_json.containsKey("kind")) { |
1864 kind = _json["kind"]; | 1836 kind = _json["kind"]; |
1865 } | 1837 } |
1866 if (_json.containsKey("nextPageToken")) { | 1838 if (_json.containsKey("nextPageToken")) { |
1867 nextPageToken = _json["nextPageToken"]; | 1839 nextPageToken = _json["nextPageToken"]; |
1868 } | 1840 } |
1869 if (_json.containsKey("subscriptions")) { | 1841 if (_json.containsKey("subscriptions")) { |
1870 subscriptions = _json["subscriptions"].map((value) => new Subscription.fro
mJson(value)).toList(); | 1842 subscriptions = _json["subscriptions"] |
| 1843 .map((value) => new Subscription.fromJson(value)) |
| 1844 .toList(); |
1871 } | 1845 } |
1872 } | 1846 } |
1873 | 1847 |
1874 core.Map<core.String, core.Object> toJson() { | 1848 core.Map<core.String, core.Object> toJson() { |
1875 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1849 final core.Map<core.String, core.Object> _json = |
| 1850 new core.Map<core.String, core.Object>(); |
1876 if (kind != null) { | 1851 if (kind != null) { |
1877 _json["kind"] = kind; | 1852 _json["kind"] = kind; |
1878 } | 1853 } |
1879 if (nextPageToken != null) { | 1854 if (nextPageToken != null) { |
1880 _json["nextPageToken"] = nextPageToken; | 1855 _json["nextPageToken"] = nextPageToken; |
1881 } | 1856 } |
1882 if (subscriptions != null) { | 1857 if (subscriptions != null) { |
1883 _json["subscriptions"] = subscriptions.map((value) => (value).toJson()).to
List(); | 1858 _json["subscriptions"] = |
| 1859 subscriptions.map((value) => (value).toJson()).toList(); |
1884 } | 1860 } |
1885 return _json; | 1861 return _json; |
1886 } | 1862 } |
1887 } | 1863 } |
OLD | NEW |