Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

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

Issue 663113002: Api roll 4: 2014-10-20 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis.reseller.v1; 1 library googleapis.reseller.v1;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import "package:crypto/crypto.dart" as crypto; 8 import "package:crypto/crypto.dart" as crypto;
9 import 'package:http/http.dart' as http; 9 import 'package:http/http.dart' as http;
10 import '../src/common_internal.dart' as common_internal; 10 import '../src/common_internal.dart' as common_internal;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 222
223 /** Not documented yet. */ 223 /** Not documented yet. */
224 class SubscriptionsResourceApi { 224 class SubscriptionsResourceApi {
225 final common_internal.ApiRequester _requester; 225 final common_internal.ApiRequester _requester;
226 226
227 SubscriptionsResourceApi(common_internal.ApiRequester client) : 227 SubscriptionsResourceApi(common_internal.ApiRequester client) :
228 _requester = client; 228 _requester = client;
229 229
230 /** 230 /**
231 * Activates a subscription previously suspended by the reseller
232 *
233 * Request parameters:
234 *
235 * [customerId] - Id of the Customer
236 *
237 * [subscriptionId] - Id of the subscription, which is unique for a customer
238 *
239 * Completes with a [Subscription].
240 *
241 * Completes with a [common.ApiRequestError] if the API endpoint returned an
242 * error.
243 *
244 * If the used [http.Client] completes with an error when making a REST call,
245 * this method will complete with the same error.
246 */
247 async.Future<Subscription> activate(core.String customerId, core.String subscr iptionId) {
248 var _url = null;
249 var _queryParams = new core.Map();
250 var _uploadMedia = null;
251 var _uploadOptions = null;
252 var _downloadOptions = common.DownloadOptions.Metadata;
253 var _body = null;
254
255 if (customerId == null) {
256 throw new core.ArgumentError("Parameter customerId is required.");
257 }
258 if (subscriptionId == null) {
259 throw new core.ArgumentError("Parameter subscriptionId is required.");
260 }
261
262
263 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId') + '/subscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId') + '/activate';
264
265 var _response = _requester.request(_url,
266 "POST",
267 body: _body,
268 queryParams: _queryParams,
269 uploadOptions: _uploadOptions,
270 uploadMedia: _uploadMedia,
271 downloadOptions: _downloadOptions);
272 return _response.then((data) => new Subscription.fromJson(data));
273 }
274
275 /**
231 * Changes the plan of a subscription 276 * Changes the plan of a subscription
232 * 277 *
233 * [request] - The metadata request object. 278 * [request] - The metadata request object.
234 * 279 *
235 * Request parameters: 280 * Request parameters:
236 * 281 *
237 * [customerId] - Id of the Customer 282 * [customerId] - Id of the Customer
238 * 283 *
239 * [subscriptionId] - Id of the subscription, which is unique for a customer 284 * [subscriptionId] - Id of the subscription, which is unique for a customer
240 * 285 *
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 var _response = _requester.request(_url, 678 var _response = _requester.request(_url,
634 "POST", 679 "POST",
635 body: _body, 680 body: _body,
636 queryParams: _queryParams, 681 queryParams: _queryParams,
637 uploadOptions: _uploadOptions, 682 uploadOptions: _uploadOptions,
638 uploadMedia: _uploadMedia, 683 uploadMedia: _uploadMedia,
639 downloadOptions: _downloadOptions); 684 downloadOptions: _downloadOptions);
640 return _response.then((data) => new Subscription.fromJson(data)); 685 return _response.then((data) => new Subscription.fromJson(data));
641 } 686 }
642 687
688 /**
689 * Suspends an active subscription
690 *
691 * Request parameters:
692 *
693 * [customerId] - Id of the Customer
694 *
695 * [subscriptionId] - Id of the subscription, which is unique for a customer
696 *
697 * Completes with a [Subscription].
698 *
699 * Completes with a [common.ApiRequestError] if the API endpoint returned an
700 * error.
701 *
702 * If the used [http.Client] completes with an error when making a REST call,
703 * this method will complete with the same error.
704 */
705 async.Future<Subscription> suspend(core.String customerId, core.String subscri ptionId) {
706 var _url = null;
707 var _queryParams = new core.Map();
708 var _uploadMedia = null;
709 var _uploadOptions = null;
710 var _downloadOptions = common.DownloadOptions.Metadata;
711 var _body = null;
712
713 if (customerId == null) {
714 throw new core.ArgumentError("Parameter customerId is required.");
715 }
716 if (subscriptionId == null) {
717 throw new core.ArgumentError("Parameter subscriptionId is required.");
718 }
719
720
721 _url = 'customers/' + common_internal.Escaper.ecapeVariable('$customerId') + '/subscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId') + '/suspend';
722
723 var _response = _requester.request(_url,
724 "POST",
725 body: _body,
726 queryParams: _queryParams,
727 uploadOptions: _uploadOptions,
728 uploadMedia: _uploadMedia,
729 downloadOptions: _downloadOptions);
730 return _response.then((data) => new Subscription.fromJson(data));
731 }
732
643 } 733 }
644 734
645 735
646 736
647 /** JSON template for address of a customer. */ 737 /** JSON template for address of a customer. */
648 class Address { 738 class Address {
649 /** Address line 1 of the address. */ 739 /** Address line 1 of the address. */
650 core.String addressLine1; 740 core.String addressLine1;
651 741
652 /** Address line 2 of the address. */ 742 /** Address line 2 of the address. */
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 } 1009 }
920 } 1010 }
921 1011
922 1012
923 /** JSON template for subscription seats. */ 1013 /** JSON template for subscription seats. */
924 class Seats { 1014 class Seats {
925 /** Identifies the resource as a subscription change plan request. */ 1015 /** Identifies the resource as a subscription change plan request. */
926 core.String kind; 1016 core.String kind;
927 1017
928 /** 1018 /**
1019 * Read only field containing the current number of licensed seats. Resellers
1020 * can utilize this field to gather insights into usage for FLEXIBLE
1021 * Google-Apps subscriptions and other secondary subscriptions (e.g.
1022 * Google-Vault, Drive-storage).
1023 */
1024 core.int licensedNumberOfSeats;
1025
1026 /**
929 * Maximum number of seats that can be purchased. This needs to be provided 1027 * Maximum number of seats that can be purchased. This needs to be provided
930 * only for a non-commitment plan. For a commitment plan it is decided by the 1028 * only for a non-commitment plan. For a commitment plan it is decided by the
931 * contract. 1029 * contract.
932 */ 1030 */
933 core.int maximumNumberOfSeats; 1031 core.int maximumNumberOfSeats;
934 1032
935 /** 1033 /**
936 * Number of seats to purchase. This is applicable only for a commitment plan. 1034 * Number of seats to purchase. This is applicable only for a commitment plan.
937 */ 1035 */
938 core.int numberOfSeats; 1036 core.int numberOfSeats;
939 1037
940 1038
941 Seats(); 1039 Seats();
942 1040
943 Seats.fromJson(core.Map _json) { 1041 Seats.fromJson(core.Map _json) {
944 if (_json.containsKey("kind")) { 1042 if (_json.containsKey("kind")) {
945 kind = _json["kind"]; 1043 kind = _json["kind"];
946 } 1044 }
1045 if (_json.containsKey("licensedNumberOfSeats")) {
1046 licensedNumberOfSeats = _json["licensedNumberOfSeats"];
1047 }
947 if (_json.containsKey("maximumNumberOfSeats")) { 1048 if (_json.containsKey("maximumNumberOfSeats")) {
948 maximumNumberOfSeats = _json["maximumNumberOfSeats"]; 1049 maximumNumberOfSeats = _json["maximumNumberOfSeats"];
949 } 1050 }
950 if (_json.containsKey("numberOfSeats")) { 1051 if (_json.containsKey("numberOfSeats")) {
951 numberOfSeats = _json["numberOfSeats"]; 1052 numberOfSeats = _json["numberOfSeats"];
952 } 1053 }
953 } 1054 }
954 1055
955 core.Map toJson() { 1056 core.Map toJson() {
956 var _json = new core.Map(); 1057 var _json = new core.Map();
957 if (kind != null) { 1058 if (kind != null) {
958 _json["kind"] = kind; 1059 _json["kind"] = kind;
959 } 1060 }
1061 if (licensedNumberOfSeats != null) {
1062 _json["licensedNumberOfSeats"] = licensedNumberOfSeats;
1063 }
960 if (maximumNumberOfSeats != null) { 1064 if (maximumNumberOfSeats != null) {
961 _json["maximumNumberOfSeats"] = maximumNumberOfSeats; 1065 _json["maximumNumberOfSeats"] = maximumNumberOfSeats;
962 } 1066 }
963 if (numberOfSeats != null) { 1067 if (numberOfSeats != null) {
964 _json["numberOfSeats"] = numberOfSeats; 1068 _json["numberOfSeats"] = numberOfSeats;
965 } 1069 }
966 return _json; 1070 return _json;
967 } 1071 }
968 } 1072 }
969 1073
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 _json["nextPageToken"] = nextPageToken; 1385 _json["nextPageToken"] = nextPageToken;
1282 } 1386 }
1283 if (subscriptions != null) { 1387 if (subscriptions != null) {
1284 _json["subscriptions"] = subscriptions.map((value) => (value).toJson()).to List(); 1388 _json["subscriptions"] = subscriptions.map((value) => (value).toJson()).to List();
1285 } 1389 }
1286 return _json; 1390 return _json;
1287 } 1391 }
1288 } 1392 }
1289 1393
1290 1394
OLDNEW
« no previous file with comments | « generated/googleapis/lib/mapsengine/v1.dart ('k') | generated/googleapis/lib/src/common_internal.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698