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

Side by Side Diff: generated/googleapis/lib/content/v2sandbox.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 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
« no previous file with comments | « generated/googleapis/lib/content/v2.dart ('k') | generated/googleapis/lib/customsearch/v1.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.content.v2sandbox; 3 library googleapis.content.v2sandbox;
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 content/v2sandbox'; 15 const core.String USER_AGENT = 'dart-api-client content/v2sandbox';
16 16
17 /** 17 /// Manages product items, inventory, and Merchant Center accounts for Google
18 * Manages product items, inventory, and Merchant Center accounts for Google 18 /// Shopping.
19 * Shopping.
20 */
21 class ContentApi { 19 class ContentApi {
22 /** Manage your product listings and accounts for Google Shopping */ 20 /// Manage your product listings and accounts for Google Shopping
23 static const ContentScope = "https://www.googleapis.com/auth/content"; 21 static const ContentScope = "https://www.googleapis.com/auth/content";
24 22
25
26 final commons.ApiRequester _requester; 23 final commons.ApiRequester _requester;
27 24
28 OrdersResourceApi get orders => new OrdersResourceApi(_requester); 25 OrdersResourceApi get orders => new OrdersResourceApi(_requester);
29 26
30 ContentApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c om/", core.String servicePath: "content/v2sandbox/"}) : 27 ContentApi(http.Client client,
31 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 28 {core.String rootUrl: "https://www.googleapis.com/",
29 core.String servicePath: "content/v2sandbox/"})
30 : _requester =
31 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
32 } 32 }
33 33
34
35 class OrdersResourceApi { 34 class OrdersResourceApi {
36 final commons.ApiRequester _requester; 35 final commons.ApiRequester _requester;
37 36
38 OrdersResourceApi(commons.ApiRequester client) : 37 OrdersResourceApi(commons.ApiRequester client) : _requester = client;
39 _requester = client;
40 38
41 /** 39 /// Marks an order as acknowledged. This method can only be called for
42 * Marks an order as acknowledged. This method can only be called for 40 /// non-multi-client accounts.
43 * non-multi-client accounts. 41 ///
44 * 42 /// [request] - The metadata request object.
45 * [request] - The metadata request object. 43 ///
46 * 44 /// Request parameters:
47 * Request parameters: 45 ///
48 * 46 /// [merchantId] - The ID of the managing account.
49 * [merchantId] - The ID of the managing account. 47 ///
50 * 48 /// [orderId] - The ID of the order.
51 * [orderId] - The ID of the order. 49 ///
52 * 50 /// Completes with a [OrdersAcknowledgeResponse].
53 * Completes with a [OrdersAcknowledgeResponse]. 51 ///
54 * 52 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
55 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 53 /// an error.
56 * error. 54 ///
57 * 55 /// If the used [http.Client] completes with an error when making a REST
58 * If the used [http.Client] completes with an error when making a REST call, 56 /// call, this method will complete with the same error.
59 * this method will complete with the same error. 57 async.Future<OrdersAcknowledgeResponse> acknowledge(
60 */ 58 OrdersAcknowledgeRequest request,
61 async.Future<OrdersAcknowledgeResponse> acknowledge(OrdersAcknowledgeRequest r equest, core.String merchantId, core.String orderId) { 59 core.String merchantId,
60 core.String orderId) {
62 var _url = null; 61 var _url = null;
63 var _queryParams = new core.Map(); 62 var _queryParams = new core.Map();
64 var _uploadMedia = null; 63 var _uploadMedia = null;
65 var _uploadOptions = null; 64 var _uploadOptions = null;
66 var _downloadOptions = commons.DownloadOptions.Metadata; 65 var _downloadOptions = commons.DownloadOptions.Metadata;
67 var _body = null; 66 var _body = null;
68 67
69 if (request != null) { 68 if (request != null) {
70 _body = convert.JSON.encode((request).toJson()); 69 _body = convert.JSON.encode((request).toJson());
71 } 70 }
72 if (merchantId == null) { 71 if (merchantId == null) {
73 throw new core.ArgumentError("Parameter merchantId is required."); 72 throw new core.ArgumentError("Parameter merchantId is required.");
74 } 73 }
75 if (orderId == null) { 74 if (orderId == null) {
76 throw new core.ArgumentError("Parameter orderId is required."); 75 throw new core.ArgumentError("Parameter orderId is required.");
77 } 76 }
78 77
79 _url = commons.Escaper.ecapeVariable('$merchantId') + '/orders/' + commons.E scaper.ecapeVariable('$orderId') + '/acknowledge'; 78 _url = commons.Escaper.ecapeVariable('$merchantId') +
79 '/orders/' +
80 commons.Escaper.ecapeVariable('$orderId') +
81 '/acknowledge';
80 82
81 var _response = _requester.request(_url, 83 var _response = _requester.request(_url, "POST",
82 "POST", 84 body: _body,
83 body: _body, 85 queryParams: _queryParams,
84 queryParams: _queryParams, 86 uploadOptions: _uploadOptions,
85 uploadOptions: _uploadOptions, 87 uploadMedia: _uploadMedia,
86 uploadMedia: _uploadMedia, 88 downloadOptions: _downloadOptions);
87 downloadOptions: _downloadOptions); 89 return _response
88 return _response.then((data) => new OrdersAcknowledgeResponse.fromJson(data) ); 90 .then((data) => new OrdersAcknowledgeResponse.fromJson(data));
89 } 91 }
90 92
91 /** 93 /// Sandbox only. Moves a test order from state "inProgress" to state
92 * Sandbox only. Moves a test order from state "inProgress" to state 94 /// "pendingShipment". This method can only be called for non-multi-client
93 * "pendingShipment". This method can only be called for non-multi-client 95 /// accounts.
94 * accounts. 96 ///
95 * 97 /// Request parameters:
96 * Request parameters: 98 ///
97 * 99 /// [merchantId] - The ID of the managing account.
98 * [merchantId] - The ID of the managing account. 100 ///
99 * 101 /// [orderId] - The ID of the test order to modify.
100 * [orderId] - The ID of the test order to modify. 102 ///
101 * 103 /// Completes with a [OrdersAdvanceTestOrderResponse].
102 * Completes with a [OrdersAdvanceTestOrderResponse]. 104 ///
103 * 105 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
104 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 106 /// an error.
105 * error. 107 ///
106 * 108 /// If the used [http.Client] completes with an error when making a REST
107 * If the used [http.Client] completes with an error when making a REST call, 109 /// call, this method will complete with the same error.
108 * this method will complete with the same error. 110 async.Future<OrdersAdvanceTestOrderResponse> advancetestorder(
109 */ 111 core.String merchantId, core.String orderId) {
110 async.Future<OrdersAdvanceTestOrderResponse> advancetestorder(core.String merc hantId, core.String orderId) {
111 var _url = null; 112 var _url = null;
112 var _queryParams = new core.Map(); 113 var _queryParams = new core.Map();
113 var _uploadMedia = null; 114 var _uploadMedia = null;
114 var _uploadOptions = null; 115 var _uploadOptions = null;
115 var _downloadOptions = commons.DownloadOptions.Metadata; 116 var _downloadOptions = commons.DownloadOptions.Metadata;
116 var _body = null; 117 var _body = null;
117 118
118 if (merchantId == null) { 119 if (merchantId == null) {
119 throw new core.ArgumentError("Parameter merchantId is required."); 120 throw new core.ArgumentError("Parameter merchantId is required.");
120 } 121 }
121 if (orderId == null) { 122 if (orderId == null) {
122 throw new core.ArgumentError("Parameter orderId is required."); 123 throw new core.ArgumentError("Parameter orderId is required.");
123 } 124 }
124 125
125 _url = commons.Escaper.ecapeVariable('$merchantId') + '/testorders/' + commo ns.Escaper.ecapeVariable('$orderId') + '/advance'; 126 _url = commons.Escaper.ecapeVariable('$merchantId') +
127 '/testorders/' +
128 commons.Escaper.ecapeVariable('$orderId') +
129 '/advance';
126 130
127 var _response = _requester.request(_url, 131 var _response = _requester.request(_url, "POST",
128 "POST", 132 body: _body,
129 body: _body, 133 queryParams: _queryParams,
130 queryParams: _queryParams, 134 uploadOptions: _uploadOptions,
131 uploadOptions: _uploadOptions, 135 uploadMedia: _uploadMedia,
132 uploadMedia: _uploadMedia, 136 downloadOptions: _downloadOptions);
133 downloadOptions: _downloadOptions); 137 return _response
134 return _response.then((data) => new OrdersAdvanceTestOrderResponse.fromJson( data)); 138 .then((data) => new OrdersAdvanceTestOrderResponse.fromJson(data));
135 } 139 }
136 140
137 /** 141 /// Cancels all line items in an order, making a full refund. This method can
138 * Cancels all line items in an order, making a full refund. This method can 142 /// only be called for non-multi-client accounts.
139 * only be called for non-multi-client accounts. 143 ///
140 * 144 /// [request] - The metadata request object.
141 * [request] - The metadata request object. 145 ///
142 * 146 /// Request parameters:
143 * Request parameters: 147 ///
144 * 148 /// [merchantId] - The ID of the managing account.
145 * [merchantId] - The ID of the managing account. 149 ///
146 * 150 /// [orderId] - The ID of the order to cancel.
147 * [orderId] - The ID of the order to cancel. 151 ///
148 * 152 /// Completes with a [OrdersCancelResponse].
149 * Completes with a [OrdersCancelResponse]. 153 ///
150 * 154 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
151 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 155 /// an error.
152 * error. 156 ///
153 * 157 /// If the used [http.Client] completes with an error when making a REST
154 * If the used [http.Client] completes with an error when making a REST call, 158 /// call, this method will complete with the same error.
155 * this method will complete with the same error. 159 async.Future<OrdersCancelResponse> cancel(OrdersCancelRequest request,
156 */ 160 core.String merchantId, core.String orderId) {
157 async.Future<OrdersCancelResponse> cancel(OrdersCancelRequest request, core.St ring merchantId, core.String orderId) {
158 var _url = null; 161 var _url = null;
159 var _queryParams = new core.Map(); 162 var _queryParams = new core.Map();
160 var _uploadMedia = null; 163 var _uploadMedia = null;
161 var _uploadOptions = null; 164 var _uploadOptions = null;
162 var _downloadOptions = commons.DownloadOptions.Metadata; 165 var _downloadOptions = commons.DownloadOptions.Metadata;
163 var _body = null; 166 var _body = null;
164 167
165 if (request != null) { 168 if (request != null) {
166 _body = convert.JSON.encode((request).toJson()); 169 _body = convert.JSON.encode((request).toJson());
167 } 170 }
168 if (merchantId == null) { 171 if (merchantId == null) {
169 throw new core.ArgumentError("Parameter merchantId is required."); 172 throw new core.ArgumentError("Parameter merchantId is required.");
170 } 173 }
171 if (orderId == null) { 174 if (orderId == null) {
172 throw new core.ArgumentError("Parameter orderId is required."); 175 throw new core.ArgumentError("Parameter orderId is required.");
173 } 176 }
174 177
175 _url = commons.Escaper.ecapeVariable('$merchantId') + '/orders/' + commons.E scaper.ecapeVariable('$orderId') + '/cancel'; 178 _url = commons.Escaper.ecapeVariable('$merchantId') +
179 '/orders/' +
180 commons.Escaper.ecapeVariable('$orderId') +
181 '/cancel';
176 182
177 var _response = _requester.request(_url, 183 var _response = _requester.request(_url, "POST",
178 "POST", 184 body: _body,
179 body: _body, 185 queryParams: _queryParams,
180 queryParams: _queryParams, 186 uploadOptions: _uploadOptions,
181 uploadOptions: _uploadOptions, 187 uploadMedia: _uploadMedia,
182 uploadMedia: _uploadMedia, 188 downloadOptions: _downloadOptions);
183 downloadOptions: _downloadOptions);
184 return _response.then((data) => new OrdersCancelResponse.fromJson(data)); 189 return _response.then((data) => new OrdersCancelResponse.fromJson(data));
185 } 190 }
186 191
187 /** 192 /// Cancels a line item, making a full refund. This method can only be called
188 * Cancels a line item, making a full refund. This method can only be called 193 /// for non-multi-client accounts.
189 * for non-multi-client accounts. 194 ///
190 * 195 /// [request] - The metadata request object.
191 * [request] - The metadata request object. 196 ///
192 * 197 /// Request parameters:
193 * Request parameters: 198 ///
194 * 199 /// [merchantId] - The ID of the managing account.
195 * [merchantId] - The ID of the managing account. 200 ///
196 * 201 /// [orderId] - The ID of the order.
197 * [orderId] - The ID of the order. 202 ///
198 * 203 /// Completes with a [OrdersCancelLineItemResponse].
199 * Completes with a [OrdersCancelLineItemResponse]. 204 ///
200 * 205 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
201 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 206 /// an error.
202 * error. 207 ///
203 * 208 /// If the used [http.Client] completes with an error when making a REST
204 * If the used [http.Client] completes with an error when making a REST call, 209 /// call, this method will complete with the same error.
205 * this method will complete with the same error. 210 async.Future<OrdersCancelLineItemResponse> cancellineitem(
206 */ 211 OrdersCancelLineItemRequest request,
207 async.Future<OrdersCancelLineItemResponse> cancellineitem(OrdersCancelLineItem Request request, core.String merchantId, core.String orderId) { 212 core.String merchantId,
213 core.String orderId) {
208 var _url = null; 214 var _url = null;
209 var _queryParams = new core.Map(); 215 var _queryParams = new core.Map();
210 var _uploadMedia = null; 216 var _uploadMedia = null;
211 var _uploadOptions = null; 217 var _uploadOptions = null;
212 var _downloadOptions = commons.DownloadOptions.Metadata; 218 var _downloadOptions = commons.DownloadOptions.Metadata;
213 var _body = null; 219 var _body = null;
214 220
215 if (request != null) { 221 if (request != null) {
216 _body = convert.JSON.encode((request).toJson()); 222 _body = convert.JSON.encode((request).toJson());
217 } 223 }
218 if (merchantId == null) { 224 if (merchantId == null) {
219 throw new core.ArgumentError("Parameter merchantId is required."); 225 throw new core.ArgumentError("Parameter merchantId is required.");
220 } 226 }
221 if (orderId == null) { 227 if (orderId == null) {
222 throw new core.ArgumentError("Parameter orderId is required."); 228 throw new core.ArgumentError("Parameter orderId is required.");
223 } 229 }
224 230
225 _url = commons.Escaper.ecapeVariable('$merchantId') + '/orders/' + commons.E scaper.ecapeVariable('$orderId') + '/cancelLineItem'; 231 _url = commons.Escaper.ecapeVariable('$merchantId') +
232 '/orders/' +
233 commons.Escaper.ecapeVariable('$orderId') +
234 '/cancelLineItem';
226 235
227 var _response = _requester.request(_url, 236 var _response = _requester.request(_url, "POST",
228 "POST", 237 body: _body,
229 body: _body, 238 queryParams: _queryParams,
230 queryParams: _queryParams, 239 uploadOptions: _uploadOptions,
231 uploadOptions: _uploadOptions, 240 uploadMedia: _uploadMedia,
232 uploadMedia: _uploadMedia, 241 downloadOptions: _downloadOptions);
233 downloadOptions: _downloadOptions); 242 return _response
234 return _response.then((data) => new OrdersCancelLineItemResponse.fromJson(da ta)); 243 .then((data) => new OrdersCancelLineItemResponse.fromJson(data));
235 } 244 }
236 245
237 /** 246 /// Sandbox only. Creates a test order. This method can only be called for
238 * Sandbox only. Creates a test order. This method can only be called for 247 /// non-multi-client accounts.
239 * non-multi-client accounts. 248 ///
240 * 249 /// [request] - The metadata request object.
241 * [request] - The metadata request object. 250 ///
242 * 251 /// Request parameters:
243 * Request parameters: 252 ///
244 * 253 /// [merchantId] - The ID of the managing account.
245 * [merchantId] - The ID of the managing account. 254 ///
246 * 255 /// Completes with a [OrdersCreateTestOrderResponse].
247 * Completes with a [OrdersCreateTestOrderResponse]. 256 ///
248 * 257 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
249 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 258 /// an error.
250 * error. 259 ///
251 * 260 /// If the used [http.Client] completes with an error when making a REST
252 * If the used [http.Client] completes with an error when making a REST call, 261 /// call, this method will complete with the same error.
253 * this method will complete with the same error. 262 async.Future<OrdersCreateTestOrderResponse> createtestorder(
254 */ 263 OrdersCreateTestOrderRequest request, core.String merchantId) {
255 async.Future<OrdersCreateTestOrderResponse> createtestorder(OrdersCreateTestOr derRequest request, core.String merchantId) {
256 var _url = null; 264 var _url = null;
257 var _queryParams = new core.Map(); 265 var _queryParams = new core.Map();
258 var _uploadMedia = null; 266 var _uploadMedia = null;
259 var _uploadOptions = null; 267 var _uploadOptions = null;
260 var _downloadOptions = commons.DownloadOptions.Metadata; 268 var _downloadOptions = commons.DownloadOptions.Metadata;
261 var _body = null; 269 var _body = null;
262 270
263 if (request != null) { 271 if (request != null) {
264 _body = convert.JSON.encode((request).toJson()); 272 _body = convert.JSON.encode((request).toJson());
265 } 273 }
266 if (merchantId == null) { 274 if (merchantId == null) {
267 throw new core.ArgumentError("Parameter merchantId is required."); 275 throw new core.ArgumentError("Parameter merchantId is required.");
268 } 276 }
269 277
270 _url = commons.Escaper.ecapeVariable('$merchantId') + '/testorders'; 278 _url = commons.Escaper.ecapeVariable('$merchantId') + '/testorders';
271 279
272 var _response = _requester.request(_url, 280 var _response = _requester.request(_url, "POST",
273 "POST", 281 body: _body,
274 body: _body, 282 queryParams: _queryParams,
275 queryParams: _queryParams, 283 uploadOptions: _uploadOptions,
276 uploadOptions: _uploadOptions, 284 uploadMedia: _uploadMedia,
277 uploadMedia: _uploadMedia, 285 downloadOptions: _downloadOptions);
278 downloadOptions: _downloadOptions); 286 return _response
279 return _response.then((data) => new OrdersCreateTestOrderResponse.fromJson(d ata)); 287 .then((data) => new OrdersCreateTestOrderResponse.fromJson(data));
280 } 288 }
281 289
282 /** 290 /// Retrieves or modifies multiple orders in a single request. This method
283 * Retrieves or modifies multiple orders in a single request. This method can 291 /// can only be called for non-multi-client accounts.
284 * only be called for non-multi-client accounts. 292 ///
285 * 293 /// [request] - The metadata request object.
286 * [request] - The metadata request object. 294 ///
287 * 295 /// Request parameters:
288 * Request parameters: 296 ///
289 * 297 /// Completes with a [OrdersCustomBatchResponse].
290 * Completes with a [OrdersCustomBatchResponse]. 298 ///
291 * 299 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
292 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 300 /// an error.
293 * error. 301 ///
294 * 302 /// If the used [http.Client] completes with an error when making a REST
295 * If the used [http.Client] completes with an error when making a REST call, 303 /// call, this method will complete with the same error.
296 * this method will complete with the same error. 304 async.Future<OrdersCustomBatchResponse> custombatch(
297 */ 305 OrdersCustomBatchRequest request) {
298 async.Future<OrdersCustomBatchResponse> custombatch(OrdersCustomBatchRequest r equest) {
299 var _url = null; 306 var _url = null;
300 var _queryParams = new core.Map(); 307 var _queryParams = new core.Map();
301 var _uploadMedia = null; 308 var _uploadMedia = null;
302 var _uploadOptions = null; 309 var _uploadOptions = null;
303 var _downloadOptions = commons.DownloadOptions.Metadata; 310 var _downloadOptions = commons.DownloadOptions.Metadata;
304 var _body = null; 311 var _body = null;
305 312
306 if (request != null) { 313 if (request != null) {
307 _body = convert.JSON.encode((request).toJson()); 314 _body = convert.JSON.encode((request).toJson());
308 } 315 }
309 316
310 _url = 'orders/batch'; 317 _url = 'orders/batch';
311 318
312 var _response = _requester.request(_url, 319 var _response = _requester.request(_url, "POST",
313 "POST", 320 body: _body,
314 body: _body, 321 queryParams: _queryParams,
315 queryParams: _queryParams, 322 uploadOptions: _uploadOptions,
316 uploadOptions: _uploadOptions, 323 uploadMedia: _uploadMedia,
317 uploadMedia: _uploadMedia, 324 downloadOptions: _downloadOptions);
318 downloadOptions: _downloadOptions); 325 return _response
319 return _response.then((data) => new OrdersCustomBatchResponse.fromJson(data) ); 326 .then((data) => new OrdersCustomBatchResponse.fromJson(data));
320 } 327 }
321 328
322 /** 329 /// Retrieves an order from your Merchant Center account. This method can
323 * Retrieves an order from your Merchant Center account. This method can only 330 /// only be called for non-multi-client accounts.
324 * be called for non-multi-client accounts. 331 ///
325 * 332 /// Request parameters:
326 * Request parameters: 333 ///
327 * 334 /// [merchantId] - The ID of the managing account.
328 * [merchantId] - The ID of the managing account. 335 ///
329 * 336 /// [orderId] - The ID of the order.
330 * [orderId] - The ID of the order. 337 ///
331 * 338 /// Completes with a [Order].
332 * Completes with a [Order]. 339 ///
333 * 340 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
334 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 341 /// an error.
335 * error. 342 ///
336 * 343 /// If the used [http.Client] completes with an error when making a REST
337 * If the used [http.Client] completes with an error when making a REST call, 344 /// call, this method will complete with the same error.
338 * this method will complete with the same error.
339 */
340 async.Future<Order> get(core.String merchantId, core.String orderId) { 345 async.Future<Order> get(core.String merchantId, core.String orderId) {
341 var _url = null; 346 var _url = null;
342 var _queryParams = new core.Map(); 347 var _queryParams = new core.Map();
343 var _uploadMedia = null; 348 var _uploadMedia = null;
344 var _uploadOptions = null; 349 var _uploadOptions = null;
345 var _downloadOptions = commons.DownloadOptions.Metadata; 350 var _downloadOptions = commons.DownloadOptions.Metadata;
346 var _body = null; 351 var _body = null;
347 352
348 if (merchantId == null) { 353 if (merchantId == null) {
349 throw new core.ArgumentError("Parameter merchantId is required."); 354 throw new core.ArgumentError("Parameter merchantId is required.");
350 } 355 }
351 if (orderId == null) { 356 if (orderId == null) {
352 throw new core.ArgumentError("Parameter orderId is required."); 357 throw new core.ArgumentError("Parameter orderId is required.");
353 } 358 }
354 359
355 _url = commons.Escaper.ecapeVariable('$merchantId') + '/orders/' + commons.E scaper.ecapeVariable('$orderId'); 360 _url = commons.Escaper.ecapeVariable('$merchantId') +
361 '/orders/' +
362 commons.Escaper.ecapeVariable('$orderId');
356 363
357 var _response = _requester.request(_url, 364 var _response = _requester.request(_url, "GET",
358 "GET", 365 body: _body,
359 body: _body, 366 queryParams: _queryParams,
360 queryParams: _queryParams, 367 uploadOptions: _uploadOptions,
361 uploadOptions: _uploadOptions, 368 uploadMedia: _uploadMedia,
362 uploadMedia: _uploadMedia, 369 downloadOptions: _downloadOptions);
363 downloadOptions: _downloadOptions);
364 return _response.then((data) => new Order.fromJson(data)); 370 return _response.then((data) => new Order.fromJson(data));
365 } 371 }
366 372
367 /** 373 /// Retrieves an order using merchant order id. This method can only be
368 * Retrieves an order using merchant order id. This method can only be called 374 /// called for non-multi-client accounts.
369 * for non-multi-client accounts. 375 ///
370 * 376 /// Request parameters:
371 * Request parameters: 377 ///
372 * 378 /// [merchantId] - The ID of the managing account.
373 * [merchantId] - The ID of the managing account. 379 ///
374 * 380 /// [merchantOrderId] - The merchant order id to be looked for.
375 * [merchantOrderId] - The merchant order id to be looked for. 381 ///
376 * 382 /// Completes with a [OrdersGetByMerchantOrderIdResponse].
377 * Completes with a [OrdersGetByMerchantOrderIdResponse]. 383 ///
378 * 384 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
379 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 385 /// an error.
380 * error. 386 ///
381 * 387 /// If the used [http.Client] completes with an error when making a REST
382 * If the used [http.Client] completes with an error when making a REST call, 388 /// call, this method will complete with the same error.
383 * this method will complete with the same error. 389 async.Future<OrdersGetByMerchantOrderIdResponse> getbymerchantorderid(
384 */ 390 core.String merchantId, core.String merchantOrderId) {
385 async.Future<OrdersGetByMerchantOrderIdResponse> getbymerchantorderid(core.Str ing merchantId, core.String merchantOrderId) {
386 var _url = null; 391 var _url = null;
387 var _queryParams = new core.Map(); 392 var _queryParams = new core.Map();
388 var _uploadMedia = null; 393 var _uploadMedia = null;
389 var _uploadOptions = null; 394 var _uploadOptions = null;
390 var _downloadOptions = commons.DownloadOptions.Metadata; 395 var _downloadOptions = commons.DownloadOptions.Metadata;
391 var _body = null; 396 var _body = null;
392 397
393 if (merchantId == null) { 398 if (merchantId == null) {
394 throw new core.ArgumentError("Parameter merchantId is required."); 399 throw new core.ArgumentError("Parameter merchantId is required.");
395 } 400 }
396 if (merchantOrderId == null) { 401 if (merchantOrderId == null) {
397 throw new core.ArgumentError("Parameter merchantOrderId is required."); 402 throw new core.ArgumentError("Parameter merchantOrderId is required.");
398 } 403 }
399 404
400 _url = commons.Escaper.ecapeVariable('$merchantId') + '/ordersbymerchantid/' + commons.Escaper.ecapeVariable('$merchantOrderId'); 405 _url = commons.Escaper.ecapeVariable('$merchantId') +
406 '/ordersbymerchantid/' +
407 commons.Escaper.ecapeVariable('$merchantOrderId');
401 408
402 var _response = _requester.request(_url, 409 var _response = _requester.request(_url, "GET",
403 "GET", 410 body: _body,
404 body: _body, 411 queryParams: _queryParams,
405 queryParams: _queryParams, 412 uploadOptions: _uploadOptions,
406 uploadOptions: _uploadOptions, 413 uploadMedia: _uploadMedia,
407 uploadMedia: _uploadMedia, 414 downloadOptions: _downloadOptions);
408 downloadOptions: _downloadOptions); 415 return _response
409 return _response.then((data) => new OrdersGetByMerchantOrderIdResponse.fromJ son(data)); 416 .then((data) => new OrdersGetByMerchantOrderIdResponse.fromJson(data));
410 } 417 }
411 418
412 /** 419 /// Sandbox only. Retrieves an order template that can be used to quickly
413 * Sandbox only. Retrieves an order template that can be used to quickly 420 /// create a new order in sandbox. This method can only be called for
414 * create a new order in sandbox. This method can only be called for 421 /// non-multi-client accounts.
415 * non-multi-client accounts. 422 ///
416 * 423 /// Request parameters:
417 * Request parameters: 424 ///
418 * 425 /// [merchantId] - The ID of the managing account.
419 * [merchantId] - The ID of the managing account. 426 ///
420 * 427 /// [templateName] - The name of the template to retrieve.
421 * [templateName] - The name of the template to retrieve. 428 /// Possible string values are:
422 * Possible string values are: 429 /// - "template1"
423 * - "template1" 430 /// - "template1a"
424 * - "template1a" 431 /// - "template1b"
425 * - "template1b" 432 /// - "template2"
426 * - "template2" 433 ///
427 * 434 /// Completes with a [OrdersGetTestOrderTemplateResponse].
428 * Completes with a [OrdersGetTestOrderTemplateResponse]. 435 ///
429 * 436 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
430 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 437 /// an error.
431 * error. 438 ///
432 * 439 /// If the used [http.Client] completes with an error when making a REST
433 * If the used [http.Client] completes with an error when making a REST call, 440 /// call, this method will complete with the same error.
434 * this method will complete with the same error. 441 async.Future<OrdersGetTestOrderTemplateResponse> gettestordertemplate(
435 */ 442 core.String merchantId, core.String templateName) {
436 async.Future<OrdersGetTestOrderTemplateResponse> gettestordertemplate(core.Str ing merchantId, core.String templateName) {
437 var _url = null; 443 var _url = null;
438 var _queryParams = new core.Map(); 444 var _queryParams = new core.Map();
439 var _uploadMedia = null; 445 var _uploadMedia = null;
440 var _uploadOptions = null; 446 var _uploadOptions = null;
441 var _downloadOptions = commons.DownloadOptions.Metadata; 447 var _downloadOptions = commons.DownloadOptions.Metadata;
442 var _body = null; 448 var _body = null;
443 449
444 if (merchantId == null) { 450 if (merchantId == null) {
445 throw new core.ArgumentError("Parameter merchantId is required."); 451 throw new core.ArgumentError("Parameter merchantId is required.");
446 } 452 }
447 if (templateName == null) { 453 if (templateName == null) {
448 throw new core.ArgumentError("Parameter templateName is required."); 454 throw new core.ArgumentError("Parameter templateName is required.");
449 } 455 }
450 456
451 _url = commons.Escaper.ecapeVariable('$merchantId') + '/testordertemplates/' + commons.Escaper.ecapeVariable('$templateName'); 457 _url = commons.Escaper.ecapeVariable('$merchantId') +
458 '/testordertemplates/' +
459 commons.Escaper.ecapeVariable('$templateName');
452 460
453 var _response = _requester.request(_url, 461 var _response = _requester.request(_url, "GET",
454 "GET", 462 body: _body,
455 body: _body, 463 queryParams: _queryParams,
456 queryParams: _queryParams, 464 uploadOptions: _uploadOptions,
457 uploadOptions: _uploadOptions, 465 uploadMedia: _uploadMedia,
458 uploadMedia: _uploadMedia, 466 downloadOptions: _downloadOptions);
459 downloadOptions: _downloadOptions); 467 return _response
460 return _response.then((data) => new OrdersGetTestOrderTemplateResponse.fromJ son(data)); 468 .then((data) => new OrdersGetTestOrderTemplateResponse.fromJson(data));
461 } 469 }
462 470
463 /** 471 /// Lists the orders in your Merchant Center account. This method can only be
464 * Lists the orders in your Merchant Center account. This method can only be 472 /// called for non-multi-client accounts.
465 * called for non-multi-client accounts. 473 ///
466 * 474 /// Request parameters:
467 * Request parameters: 475 ///
468 * 476 /// [merchantId] - The ID of the managing account.
469 * [merchantId] - The ID of the managing account. 477 ///
470 * 478 /// [acknowledged] - Obtains orders that match the acknowledgement status.
471 * [acknowledged] - Obtains orders that match the acknowledgement status. When 479 /// When set to true, obtains orders that have been acknowledged. When false,
472 * set to true, obtains orders that have been acknowledged. When false, 480 /// obtains orders that have not been acknowledged.
473 * obtains orders that have not been acknowledged. 481 /// We recommend using this filter set to false, in conjunction with the
474 * We recommend using this filter set to false, in conjunction with the 482 /// acknowledge call, such that only un-acknowledged orders are returned.
475 * acknowledge call, such that only un-acknowledged orders are returned. 483 ///
476 * 484 /// [maxResults] - The maximum number of orders to return in the response,
477 * [maxResults] - The maximum number of orders to return in the response, used 485 /// used for paging. The default value is 25 orders per page, and the maximum
478 * for paging. The default value is 25 orders per page, and the maximum 486 /// allowed value is 250 orders per page.
479 * allowed value is 250 orders per page. 487 /// Known issue: All List calls will return all Orders without limit
480 * Known issue: All List calls will return all Orders without limit regardless 488 /// regardless of the value of this field.
481 * of the value of this field. 489 ///
482 * 490 /// [orderBy] - The ordering of the returned list. The only supported value
483 * [orderBy] - The ordering of the returned list. The only supported value are 491 /// are placedDate desc and placedDate asc for now, which returns orders
484 * placedDate desc and placedDate asc for now, which returns orders sorted by 492 /// sorted by placement date. "placedDate desc" stands for listing orders by
485 * placement date. "placedDate desc" stands for listing orders by placement 493 /// placement date, from oldest to most recent. "placedDate asc" stands for
486 * date, from oldest to most recent. "placedDate asc" stands for listing 494 /// listing orders by placement date, from most recent to oldest. In future
487 * orders by placement date, from most recent to oldest. In future releases 495 /// releases we'll support other sorting criteria.
488 * we'll support other sorting criteria. 496 /// Possible string values are:
489 * Possible string values are: 497 /// - "placedDate asc"
490 * - "placedDate asc" 498 /// - "placedDate desc"
491 * - "placedDate desc" 499 ///
492 * 500 /// [pageToken] - The token returned by the previous request.
493 * [pageToken] - The token returned by the previous request. 501 ///
494 * 502 /// [placedDateEnd] - Obtains orders placed before this date (exclusively),
495 * [placedDateEnd] - Obtains orders placed before this date (exclusively), in 503 /// in ISO 8601 format.
496 * ISO 8601 format. 504 ///
497 * 505 /// [placedDateStart] - Obtains orders placed after this date (inclusively),
498 * [placedDateStart] - Obtains orders placed after this date (inclusively), in 506 /// in ISO 8601 format.
499 * ISO 8601 format. 507 ///
500 * 508 /// [statuses] - Obtains orders that match any of the specified statuses.
501 * [statuses] - Obtains orders that match any of the specified statuses. 509 /// Multiple values can be specified with comma separation. Additionally,
502 * Multiple values can be specified with comma separation. Additionally, 510 /// please note that active is a shortcut for pendingShipment and
503 * please note that active is a shortcut for pendingShipment and 511 /// partiallyShipped, and completed is a shortcut for shipped ,
504 * partiallyShipped, and completed is a shortcut for shipped , 512 /// partiallyDelivered, delivered, partiallyReturned, returned, and canceled.
505 * partiallyDelivered, delivered, partiallyReturned, returned, and canceled. 513 ///
506 * 514 /// Completes with a [OrdersListResponse].
507 * Completes with a [OrdersListResponse]. 515 ///
508 * 516 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
509 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 517 /// an error.
510 * error. 518 ///
511 * 519 /// If the used [http.Client] completes with an error when making a REST
512 * If the used [http.Client] completes with an error when making a REST call, 520 /// call, this method will complete with the same error.
513 * this method will complete with the same error. 521 async.Future<OrdersListResponse> list(core.String merchantId,
514 */ 522 {core.bool acknowledged,
515 async.Future<OrdersListResponse> list(core.String merchantId, {core.bool ackno wledged, core.int maxResults, core.String orderBy, core.String pageToken, core.S tring placedDateEnd, core.String placedDateStart, core.List<core.String> statuse s}) { 523 core.int maxResults,
524 core.String orderBy,
525 core.String pageToken,
526 core.String placedDateEnd,
527 core.String placedDateStart,
528 core.List<core.String> statuses}) {
516 var _url = null; 529 var _url = null;
517 var _queryParams = new core.Map(); 530 var _queryParams = new core.Map();
518 var _uploadMedia = null; 531 var _uploadMedia = null;
519 var _uploadOptions = null; 532 var _uploadOptions = null;
520 var _downloadOptions = commons.DownloadOptions.Metadata; 533 var _downloadOptions = commons.DownloadOptions.Metadata;
521 var _body = null; 534 var _body = null;
522 535
523 if (merchantId == null) { 536 if (merchantId == null) {
524 throw new core.ArgumentError("Parameter merchantId is required."); 537 throw new core.ArgumentError("Parameter merchantId is required.");
525 } 538 }
(...skipping 14 matching lines...) Expand all
540 } 553 }
541 if (placedDateStart != null) { 554 if (placedDateStart != null) {
542 _queryParams["placedDateStart"] = [placedDateStart]; 555 _queryParams["placedDateStart"] = [placedDateStart];
543 } 556 }
544 if (statuses != null) { 557 if (statuses != null) {
545 _queryParams["statuses"] = statuses; 558 _queryParams["statuses"] = statuses;
546 } 559 }
547 560
548 _url = commons.Escaper.ecapeVariable('$merchantId') + '/orders'; 561 _url = commons.Escaper.ecapeVariable('$merchantId') + '/orders';
549 562
550 var _response = _requester.request(_url, 563 var _response = _requester.request(_url, "GET",
551 "GET", 564 body: _body,
552 body: _body, 565 queryParams: _queryParams,
553 queryParams: _queryParams, 566 uploadOptions: _uploadOptions,
554 uploadOptions: _uploadOptions, 567 uploadMedia: _uploadMedia,
555 uploadMedia: _uploadMedia, 568 downloadOptions: _downloadOptions);
556 downloadOptions: _downloadOptions);
557 return _response.then((data) => new OrdersListResponse.fromJson(data)); 569 return _response.then((data) => new OrdersListResponse.fromJson(data));
558 } 570 }
559 571
560 /** 572 /// Refund a portion of the order, up to the full amount paid. This method
561 * Refund a portion of the order, up to the full amount paid. This method can 573 /// can only be called for non-multi-client accounts.
562 * only be called for non-multi-client accounts. 574 ///
563 * 575 /// [request] - The metadata request object.
564 * [request] - The metadata request object. 576 ///
565 * 577 /// Request parameters:
566 * Request parameters: 578 ///
567 * 579 /// [merchantId] - The ID of the managing account.
568 * [merchantId] - The ID of the managing account. 580 ///
569 * 581 /// [orderId] - The ID of the order to refund.
570 * [orderId] - The ID of the order to refund. 582 ///
571 * 583 /// Completes with a [OrdersRefundResponse].
572 * Completes with a [OrdersRefundResponse]. 584 ///
573 * 585 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
574 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 586 /// an error.
575 * error. 587 ///
576 * 588 /// If the used [http.Client] completes with an error when making a REST
577 * If the used [http.Client] completes with an error when making a REST call, 589 /// call, this method will complete with the same error.
578 * this method will complete with the same error. 590 async.Future<OrdersRefundResponse> refund(OrdersRefundRequest request,
579 */ 591 core.String merchantId, core.String orderId) {
580 async.Future<OrdersRefundResponse> refund(OrdersRefundRequest request, core.St ring merchantId, core.String orderId) {
581 var _url = null; 592 var _url = null;
582 var _queryParams = new core.Map(); 593 var _queryParams = new core.Map();
583 var _uploadMedia = null; 594 var _uploadMedia = null;
584 var _uploadOptions = null; 595 var _uploadOptions = null;
585 var _downloadOptions = commons.DownloadOptions.Metadata; 596 var _downloadOptions = commons.DownloadOptions.Metadata;
586 var _body = null; 597 var _body = null;
587 598
588 if (request != null) { 599 if (request != null) {
589 _body = convert.JSON.encode((request).toJson()); 600 _body = convert.JSON.encode((request).toJson());
590 } 601 }
591 if (merchantId == null) { 602 if (merchantId == null) {
592 throw new core.ArgumentError("Parameter merchantId is required."); 603 throw new core.ArgumentError("Parameter merchantId is required.");
593 } 604 }
594 if (orderId == null) { 605 if (orderId == null) {
595 throw new core.ArgumentError("Parameter orderId is required."); 606 throw new core.ArgumentError("Parameter orderId is required.");
596 } 607 }
597 608
598 _url = commons.Escaper.ecapeVariable('$merchantId') + '/orders/' + commons.E scaper.ecapeVariable('$orderId') + '/refund'; 609 _url = commons.Escaper.ecapeVariable('$merchantId') +
610 '/orders/' +
611 commons.Escaper.ecapeVariable('$orderId') +
612 '/refund';
599 613
600 var _response = _requester.request(_url, 614 var _response = _requester.request(_url, "POST",
601 "POST", 615 body: _body,
602 body: _body, 616 queryParams: _queryParams,
603 queryParams: _queryParams, 617 uploadOptions: _uploadOptions,
604 uploadOptions: _uploadOptions, 618 uploadMedia: _uploadMedia,
605 uploadMedia: _uploadMedia, 619 downloadOptions: _downloadOptions);
606 downloadOptions: _downloadOptions);
607 return _response.then((data) => new OrdersRefundResponse.fromJson(data)); 620 return _response.then((data) => new OrdersRefundResponse.fromJson(data));
608 } 621 }
609 622
610 /** 623 /// Returns a line item. This method can only be called for non-multi-client
611 * Returns a line item. This method can only be called for non-multi-client 624 /// accounts.
612 * accounts. 625 ///
613 * 626 /// [request] - The metadata request object.
614 * [request] - The metadata request object. 627 ///
615 * 628 /// Request parameters:
616 * Request parameters: 629 ///
617 * 630 /// [merchantId] - The ID of the managing account.
618 * [merchantId] - The ID of the managing account. 631 ///
619 * 632 /// [orderId] - The ID of the order.
620 * [orderId] - The ID of the order. 633 ///
621 * 634 /// Completes with a [OrdersReturnLineItemResponse].
622 * Completes with a [OrdersReturnLineItemResponse]. 635 ///
623 * 636 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
624 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 637 /// an error.
625 * error. 638 ///
626 * 639 /// If the used [http.Client] completes with an error when making a REST
627 * If the used [http.Client] completes with an error when making a REST call, 640 /// call, this method will complete with the same error.
628 * this method will complete with the same error. 641 async.Future<OrdersReturnLineItemResponse> returnlineitem(
629 */ 642 OrdersReturnLineItemRequest request,
630 async.Future<OrdersReturnLineItemResponse> returnlineitem(OrdersReturnLineItem Request request, core.String merchantId, core.String orderId) { 643 core.String merchantId,
644 core.String orderId) {
631 var _url = null; 645 var _url = null;
632 var _queryParams = new core.Map(); 646 var _queryParams = new core.Map();
633 var _uploadMedia = null; 647 var _uploadMedia = null;
634 var _uploadOptions = null; 648 var _uploadOptions = null;
635 var _downloadOptions = commons.DownloadOptions.Metadata; 649 var _downloadOptions = commons.DownloadOptions.Metadata;
636 var _body = null; 650 var _body = null;
637 651
638 if (request != null) { 652 if (request != null) {
639 _body = convert.JSON.encode((request).toJson()); 653 _body = convert.JSON.encode((request).toJson());
640 } 654 }
641 if (merchantId == null) { 655 if (merchantId == null) {
642 throw new core.ArgumentError("Parameter merchantId is required."); 656 throw new core.ArgumentError("Parameter merchantId is required.");
643 } 657 }
644 if (orderId == null) { 658 if (orderId == null) {
645 throw new core.ArgumentError("Parameter orderId is required."); 659 throw new core.ArgumentError("Parameter orderId is required.");
646 } 660 }
647 661
648 _url = commons.Escaper.ecapeVariable('$merchantId') + '/orders/' + commons.E scaper.ecapeVariable('$orderId') + '/returnLineItem'; 662 _url = commons.Escaper.ecapeVariable('$merchantId') +
663 '/orders/' +
664 commons.Escaper.ecapeVariable('$orderId') +
665 '/returnLineItem';
649 666
650 var _response = _requester.request(_url, 667 var _response = _requester.request(_url, "POST",
651 "POST", 668 body: _body,
652 body: _body, 669 queryParams: _queryParams,
653 queryParams: _queryParams, 670 uploadOptions: _uploadOptions,
654 uploadOptions: _uploadOptions, 671 uploadMedia: _uploadMedia,
655 uploadMedia: _uploadMedia, 672 downloadOptions: _downloadOptions);
656 downloadOptions: _downloadOptions); 673 return _response
657 return _response.then((data) => new OrdersReturnLineItemResponse.fromJson(da ta)); 674 .then((data) => new OrdersReturnLineItemResponse.fromJson(data));
658 } 675 }
659 676
660 /** 677 /// Marks line item(s) as shipped. This method can only be called for
661 * Marks line item(s) as shipped. This method can only be called for 678 /// non-multi-client accounts.
662 * non-multi-client accounts. 679 ///
663 * 680 /// [request] - The metadata request object.
664 * [request] - The metadata request object. 681 ///
665 * 682 /// Request parameters:
666 * Request parameters: 683 ///
667 * 684 /// [merchantId] - The ID of the managing account.
668 * [merchantId] - The ID of the managing account. 685 ///
669 * 686 /// [orderId] - The ID of the order.
670 * [orderId] - The ID of the order. 687 ///
671 * 688 /// Completes with a [OrdersShipLineItemsResponse].
672 * Completes with a [OrdersShipLineItemsResponse]. 689 ///
673 * 690 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
674 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 691 /// an error.
675 * error. 692 ///
676 * 693 /// If the used [http.Client] completes with an error when making a REST
677 * If the used [http.Client] completes with an error when making a REST call, 694 /// call, this method will complete with the same error.
678 * this method will complete with the same error. 695 async.Future<OrdersShipLineItemsResponse> shiplineitems(
679 */ 696 OrdersShipLineItemsRequest request,
680 async.Future<OrdersShipLineItemsResponse> shiplineitems(OrdersShipLineItemsReq uest request, core.String merchantId, core.String orderId) { 697 core.String merchantId,
698 core.String orderId) {
681 var _url = null; 699 var _url = null;
682 var _queryParams = new core.Map(); 700 var _queryParams = new core.Map();
683 var _uploadMedia = null; 701 var _uploadMedia = null;
684 var _uploadOptions = null; 702 var _uploadOptions = null;
685 var _downloadOptions = commons.DownloadOptions.Metadata; 703 var _downloadOptions = commons.DownloadOptions.Metadata;
686 var _body = null; 704 var _body = null;
687 705
688 if (request != null) { 706 if (request != null) {
689 _body = convert.JSON.encode((request).toJson()); 707 _body = convert.JSON.encode((request).toJson());
690 } 708 }
691 if (merchantId == null) { 709 if (merchantId == null) {
692 throw new core.ArgumentError("Parameter merchantId is required."); 710 throw new core.ArgumentError("Parameter merchantId is required.");
693 } 711 }
694 if (orderId == null) { 712 if (orderId == null) {
695 throw new core.ArgumentError("Parameter orderId is required."); 713 throw new core.ArgumentError("Parameter orderId is required.");
696 } 714 }
697 715
698 _url = commons.Escaper.ecapeVariable('$merchantId') + '/orders/' + commons.E scaper.ecapeVariable('$orderId') + '/shipLineItems'; 716 _url = commons.Escaper.ecapeVariable('$merchantId') +
717 '/orders/' +
718 commons.Escaper.ecapeVariable('$orderId') +
719 '/shipLineItems';
699 720
700 var _response = _requester.request(_url, 721 var _response = _requester.request(_url, "POST",
701 "POST", 722 body: _body,
702 body: _body, 723 queryParams: _queryParams,
703 queryParams: _queryParams, 724 uploadOptions: _uploadOptions,
704 uploadOptions: _uploadOptions, 725 uploadMedia: _uploadMedia,
705 uploadMedia: _uploadMedia, 726 downloadOptions: _downloadOptions);
706 downloadOptions: _downloadOptions); 727 return _response
707 return _response.then((data) => new OrdersShipLineItemsResponse.fromJson(dat a)); 728 .then((data) => new OrdersShipLineItemsResponse.fromJson(data));
708 } 729 }
709 730
710 /** 731 /// Updates the merchant order ID for a given order. This method can only be
711 * Updates the merchant order ID for a given order. This method can only be 732 /// called for non-multi-client accounts.
712 * called for non-multi-client accounts. 733 ///
713 * 734 /// [request] - The metadata request object.
714 * [request] - The metadata request object. 735 ///
715 * 736 /// Request parameters:
716 * Request parameters: 737 ///
717 * 738 /// [merchantId] - The ID of the managing account.
718 * [merchantId] - The ID of the managing account. 739 ///
719 * 740 /// [orderId] - The ID of the order.
720 * [orderId] - The ID of the order. 741 ///
721 * 742 /// Completes with a [OrdersUpdateMerchantOrderIdResponse].
722 * Completes with a [OrdersUpdateMerchantOrderIdResponse]. 743 ///
723 * 744 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
724 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 745 /// an error.
725 * error. 746 ///
726 * 747 /// If the used [http.Client] completes with an error when making a REST
727 * If the used [http.Client] completes with an error when making a REST call, 748 /// call, this method will complete with the same error.
728 * this method will complete with the same error. 749 async.Future<OrdersUpdateMerchantOrderIdResponse> updatemerchantorderid(
729 */ 750 OrdersUpdateMerchantOrderIdRequest request,
730 async.Future<OrdersUpdateMerchantOrderIdResponse> updatemerchantorderid(Orders UpdateMerchantOrderIdRequest request, core.String merchantId, core.String orderI d) { 751 core.String merchantId,
752 core.String orderId) {
731 var _url = null; 753 var _url = null;
732 var _queryParams = new core.Map(); 754 var _queryParams = new core.Map();
733 var _uploadMedia = null; 755 var _uploadMedia = null;
734 var _uploadOptions = null; 756 var _uploadOptions = null;
735 var _downloadOptions = commons.DownloadOptions.Metadata; 757 var _downloadOptions = commons.DownloadOptions.Metadata;
736 var _body = null; 758 var _body = null;
737 759
738 if (request != null) { 760 if (request != null) {
739 _body = convert.JSON.encode((request).toJson()); 761 _body = convert.JSON.encode((request).toJson());
740 } 762 }
741 if (merchantId == null) { 763 if (merchantId == null) {
742 throw new core.ArgumentError("Parameter merchantId is required."); 764 throw new core.ArgumentError("Parameter merchantId is required.");
743 } 765 }
744 if (orderId == null) { 766 if (orderId == null) {
745 throw new core.ArgumentError("Parameter orderId is required."); 767 throw new core.ArgumentError("Parameter orderId is required.");
746 } 768 }
747 769
748 _url = commons.Escaper.ecapeVariable('$merchantId') + '/orders/' + commons.E scaper.ecapeVariable('$orderId') + '/updateMerchantOrderId'; 770 _url = commons.Escaper.ecapeVariable('$merchantId') +
771 '/orders/' +
772 commons.Escaper.ecapeVariable('$orderId') +
773 '/updateMerchantOrderId';
749 774
750 var _response = _requester.request(_url, 775 var _response = _requester.request(_url, "POST",
751 "POST", 776 body: _body,
752 body: _body, 777 queryParams: _queryParams,
753 queryParams: _queryParams, 778 uploadOptions: _uploadOptions,
754 uploadOptions: _uploadOptions, 779 uploadMedia: _uploadMedia,
755 uploadMedia: _uploadMedia, 780 downloadOptions: _downloadOptions);
756 downloadOptions: _downloadOptions); 781 return _response
757 return _response.then((data) => new OrdersUpdateMerchantOrderIdResponse.from Json(data)); 782 .then((data) => new OrdersUpdateMerchantOrderIdResponse.fromJson(data));
758 } 783 }
759 784
760 /** 785 /// Updates a shipment's status, carrier, and/or tracking ID. This method can
761 * Updates a shipment's status, carrier, and/or tracking ID. This method can 786 /// only be called for non-multi-client accounts.
762 * only be called for non-multi-client accounts. 787 ///
763 * 788 /// [request] - The metadata request object.
764 * [request] - The metadata request object. 789 ///
765 * 790 /// Request parameters:
766 * Request parameters: 791 ///
767 * 792 /// [merchantId] - The ID of the managing account.
768 * [merchantId] - The ID of the managing account. 793 ///
769 * 794 /// [orderId] - The ID of the order.
770 * [orderId] - The ID of the order. 795 ///
771 * 796 /// Completes with a [OrdersUpdateShipmentResponse].
772 * Completes with a [OrdersUpdateShipmentResponse]. 797 ///
773 * 798 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
774 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 799 /// an error.
775 * error. 800 ///
776 * 801 /// If the used [http.Client] completes with an error when making a REST
777 * If the used [http.Client] completes with an error when making a REST call, 802 /// call, this method will complete with the same error.
778 * this method will complete with the same error. 803 async.Future<OrdersUpdateShipmentResponse> updateshipment(
779 */ 804 OrdersUpdateShipmentRequest request,
780 async.Future<OrdersUpdateShipmentResponse> updateshipment(OrdersUpdateShipment Request request, core.String merchantId, core.String orderId) { 805 core.String merchantId,
806 core.String orderId) {
781 var _url = null; 807 var _url = null;
782 var _queryParams = new core.Map(); 808 var _queryParams = new core.Map();
783 var _uploadMedia = null; 809 var _uploadMedia = null;
784 var _uploadOptions = null; 810 var _uploadOptions = null;
785 var _downloadOptions = commons.DownloadOptions.Metadata; 811 var _downloadOptions = commons.DownloadOptions.Metadata;
786 var _body = null; 812 var _body = null;
787 813
788 if (request != null) { 814 if (request != null) {
789 _body = convert.JSON.encode((request).toJson()); 815 _body = convert.JSON.encode((request).toJson());
790 } 816 }
791 if (merchantId == null) { 817 if (merchantId == null) {
792 throw new core.ArgumentError("Parameter merchantId is required."); 818 throw new core.ArgumentError("Parameter merchantId is required.");
793 } 819 }
794 if (orderId == null) { 820 if (orderId == null) {
795 throw new core.ArgumentError("Parameter orderId is required."); 821 throw new core.ArgumentError("Parameter orderId is required.");
796 } 822 }
797 823
798 _url = commons.Escaper.ecapeVariable('$merchantId') + '/orders/' + commons.E scaper.ecapeVariable('$orderId') + '/updateShipment'; 824 _url = commons.Escaper.ecapeVariable('$merchantId') +
825 '/orders/' +
826 commons.Escaper.ecapeVariable('$orderId') +
827 '/updateShipment';
799 828
800 var _response = _requester.request(_url, 829 var _response = _requester.request(_url, "POST",
801 "POST", 830 body: _body,
802 body: _body, 831 queryParams: _queryParams,
803 queryParams: _queryParams, 832 uploadOptions: _uploadOptions,
804 uploadOptions: _uploadOptions, 833 uploadMedia: _uploadMedia,
805 uploadMedia: _uploadMedia, 834 downloadOptions: _downloadOptions);
806 downloadOptions: _downloadOptions); 835 return _response
807 return _response.then((data) => new OrdersUpdateShipmentResponse.fromJson(da ta)); 836 .then((data) => new OrdersUpdateShipmentResponse.fromJson(data));
808 } 837 }
809
810 } 838 }
811 839
840 /// An error returned by the API.
841 class Error {
842 /// The domain of the error.
843 core.String domain;
812 844
845 /// A description of the error.
846 core.String message;
813 847
814 /** An error returned by the API. */ 848 /// The error code.
815 class Error {
816 /** The domain of the error. */
817 core.String domain;
818 /** A description of the error. */
819 core.String message;
820 /** The error code. */
821 core.String reason; 849 core.String reason;
822 850
823 Error(); 851 Error();
824 852
825 Error.fromJson(core.Map _json) { 853 Error.fromJson(core.Map _json) {
826 if (_json.containsKey("domain")) { 854 if (_json.containsKey("domain")) {
827 domain = _json["domain"]; 855 domain = _json["domain"];
828 } 856 }
829 if (_json.containsKey("message")) { 857 if (_json.containsKey("message")) {
830 message = _json["message"]; 858 message = _json["message"];
831 } 859 }
832 if (_json.containsKey("reason")) { 860 if (_json.containsKey("reason")) {
833 reason = _json["reason"]; 861 reason = _json["reason"];
834 } 862 }
835 } 863 }
836 864
837 core.Map<core.String, core.Object> toJson() { 865 core.Map<core.String, core.Object> toJson() {
838 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 866 final core.Map<core.String, core.Object> _json =
867 new core.Map<core.String, core.Object>();
839 if (domain != null) { 868 if (domain != null) {
840 _json["domain"] = domain; 869 _json["domain"] = domain;
841 } 870 }
842 if (message != null) { 871 if (message != null) {
843 _json["message"] = message; 872 _json["message"] = message;
844 } 873 }
845 if (reason != null) { 874 if (reason != null) {
846 _json["reason"] = reason; 875 _json["reason"] = reason;
847 } 876 }
848 return _json; 877 return _json;
849 } 878 }
850 } 879 }
851 880
852 /** A list of errors returned by a failed batch entry. */ 881 /// A list of errors returned by a failed batch entry.
853 class Errors { 882 class Errors {
854 /** The HTTP status of the first error in errors. */ 883 /// The HTTP status of the first error in errors.
855 core.int code; 884 core.int code;
856 /** A list of errors. */ 885
886 /// A list of errors.
857 core.List<Error> errors; 887 core.List<Error> errors;
858 /** The message of the first error in errors. */ 888
889 /// The message of the first error in errors.
859 core.String message; 890 core.String message;
860 891
861 Errors(); 892 Errors();
862 893
863 Errors.fromJson(core.Map _json) { 894 Errors.fromJson(core.Map _json) {
864 if (_json.containsKey("code")) { 895 if (_json.containsKey("code")) {
865 code = _json["code"]; 896 code = _json["code"];
866 } 897 }
867 if (_json.containsKey("errors")) { 898 if (_json.containsKey("errors")) {
868 errors = _json["errors"].map((value) => new Error.fromJson(value)).toList( ); 899 errors =
900 _json["errors"].map((value) => new Error.fromJson(value)).toList();
869 } 901 }
870 if (_json.containsKey("message")) { 902 if (_json.containsKey("message")) {
871 message = _json["message"]; 903 message = _json["message"];
872 } 904 }
873 } 905 }
874 906
875 core.Map<core.String, core.Object> toJson() { 907 core.Map<core.String, core.Object> toJson() {
876 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 908 final core.Map<core.String, core.Object> _json =
909 new core.Map<core.String, core.Object>();
877 if (code != null) { 910 if (code != null) {
878 _json["code"] = code; 911 _json["code"] = code;
879 } 912 }
880 if (errors != null) { 913 if (errors != null) {
881 _json["errors"] = errors.map((value) => (value).toJson()).toList(); 914 _json["errors"] = errors.map((value) => (value).toJson()).toList();
882 } 915 }
883 if (message != null) { 916 if (message != null) {
884 _json["message"] = message; 917 _json["message"] = message;
885 } 918 }
886 return _json; 919 return _json;
887 } 920 }
888 } 921 }
889 922
890 class Order { 923 class Order {
891 /** Whether the order was acknowledged. */ 924 /// Whether the order was acknowledged.
892 core.bool acknowledged; 925 core.bool acknowledged;
893 /** The channel type of the order: "purchaseOnGoogle" or "googleExpress". */ 926
927 /// The channel type of the order: "purchaseOnGoogle" or "googleExpress".
894 core.String channelType; 928 core.String channelType;
895 /** The details of the customer who placed the order. */ 929
930 /// The details of the customer who placed the order.
896 OrderCustomer customer; 931 OrderCustomer customer;
897 /** The details for the delivery. */ 932
933 /// The details for the delivery.
898 OrderDeliveryDetails deliveryDetails; 934 OrderDeliveryDetails deliveryDetails;
899 /** The REST id of the order. Globally unique. */ 935
936 /// The REST id of the order. Globally unique.
900 core.String id; 937 core.String id;
901 /** 938
902 * Identifies what kind of resource this is. Value: the fixed string 939 /// Identifies what kind of resource this is. Value: the fixed string
903 * "content#order". 940 /// "content#order".
904 */
905 core.String kind; 941 core.String kind;
906 /** Line items that are ordered. */ 942
943 /// Line items that are ordered.
907 core.List<OrderLineItem> lineItems; 944 core.List<OrderLineItem> lineItems;
908 core.String merchantId; 945 core.String merchantId;
909 /** Merchant-provided id of the order. */ 946
947 /// Merchant-provided id of the order.
910 core.String merchantOrderId; 948 core.String merchantOrderId;
911 /** 949
912 * The net amount for the order. For example, if an order was originally for a 950 /// The net amount for the order. For example, if an order was originally for
913 * grand total of $100 and a refund was issued for $20, the net amount will be 951 /// a grand total of $100 and a refund was issued for $20, the net amount
914 * $80. 952 /// will be $80.
915 */
916 Price netAmount; 953 Price netAmount;
917 /** The details of the payment method. */ 954
955 /// The details of the payment method.
918 OrderPaymentMethod paymentMethod; 956 OrderPaymentMethod paymentMethod;
919 /** The status of the payment. */ 957
958 /// The status of the payment.
920 core.String paymentStatus; 959 core.String paymentStatus;
921 /** The date when the order was placed, in ISO 8601 format. */ 960
961 /// The date when the order was placed, in ISO 8601 format.
922 core.String placedDate; 962 core.String placedDate;
923 /** 963
924 * The details of the merchant provided promotions applied to the order. More 964 /// The details of the merchant provided promotions applied to the order.
925 * details about the program are here. 965 /// More details about the program are here.
926 */
927 core.List<OrderPromotion> promotions; 966 core.List<OrderPromotion> promotions;
928 /** Refunds for the order. */ 967
968 /// Refunds for the order.
929 core.List<OrderRefund> refunds; 969 core.List<OrderRefund> refunds;
930 /** Shipments of the order. */ 970
971 /// Shipments of the order.
931 core.List<OrderShipment> shipments; 972 core.List<OrderShipment> shipments;
932 /** The total cost of shipping for all items. */ 973
974 /// The total cost of shipping for all items.
933 Price shippingCost; 975 Price shippingCost;
934 /** The tax for the total shipping cost. */ 976
977 /// The tax for the total shipping cost.
935 Price shippingCostTax; 978 Price shippingCostTax;
936 /** The requested shipping option. */ 979
980 /// The requested shipping option.
937 core.String shippingOption; 981 core.String shippingOption;
938 /** The status of the order. */ 982
983 /// The status of the order.
939 core.String status; 984 core.String status;
940 985
941 Order(); 986 Order();
942 987
943 Order.fromJson(core.Map _json) { 988 Order.fromJson(core.Map _json) {
944 if (_json.containsKey("acknowledged")) { 989 if (_json.containsKey("acknowledged")) {
945 acknowledged = _json["acknowledged"]; 990 acknowledged = _json["acknowledged"];
946 } 991 }
947 if (_json.containsKey("channelType")) { 992 if (_json.containsKey("channelType")) {
948 channelType = _json["channelType"]; 993 channelType = _json["channelType"];
949 } 994 }
950 if (_json.containsKey("customer")) { 995 if (_json.containsKey("customer")) {
951 customer = new OrderCustomer.fromJson(_json["customer"]); 996 customer = new OrderCustomer.fromJson(_json["customer"]);
952 } 997 }
953 if (_json.containsKey("deliveryDetails")) { 998 if (_json.containsKey("deliveryDetails")) {
954 deliveryDetails = new OrderDeliveryDetails.fromJson(_json["deliveryDetails "]); 999 deliveryDetails =
1000 new OrderDeliveryDetails.fromJson(_json["deliveryDetails"]);
955 } 1001 }
956 if (_json.containsKey("id")) { 1002 if (_json.containsKey("id")) {
957 id = _json["id"]; 1003 id = _json["id"];
958 } 1004 }
959 if (_json.containsKey("kind")) { 1005 if (_json.containsKey("kind")) {
960 kind = _json["kind"]; 1006 kind = _json["kind"];
961 } 1007 }
962 if (_json.containsKey("lineItems")) { 1008 if (_json.containsKey("lineItems")) {
963 lineItems = _json["lineItems"].map((value) => new OrderLineItem.fromJson(v alue)).toList(); 1009 lineItems = _json["lineItems"]
1010 .map((value) => new OrderLineItem.fromJson(value))
1011 .toList();
964 } 1012 }
965 if (_json.containsKey("merchantId")) { 1013 if (_json.containsKey("merchantId")) {
966 merchantId = _json["merchantId"]; 1014 merchantId = _json["merchantId"];
967 } 1015 }
968 if (_json.containsKey("merchantOrderId")) { 1016 if (_json.containsKey("merchantOrderId")) {
969 merchantOrderId = _json["merchantOrderId"]; 1017 merchantOrderId = _json["merchantOrderId"];
970 } 1018 }
971 if (_json.containsKey("netAmount")) { 1019 if (_json.containsKey("netAmount")) {
972 netAmount = new Price.fromJson(_json["netAmount"]); 1020 netAmount = new Price.fromJson(_json["netAmount"]);
973 } 1021 }
974 if (_json.containsKey("paymentMethod")) { 1022 if (_json.containsKey("paymentMethod")) {
975 paymentMethod = new OrderPaymentMethod.fromJson(_json["paymentMethod"]); 1023 paymentMethod = new OrderPaymentMethod.fromJson(_json["paymentMethod"]);
976 } 1024 }
977 if (_json.containsKey("paymentStatus")) { 1025 if (_json.containsKey("paymentStatus")) {
978 paymentStatus = _json["paymentStatus"]; 1026 paymentStatus = _json["paymentStatus"];
979 } 1027 }
980 if (_json.containsKey("placedDate")) { 1028 if (_json.containsKey("placedDate")) {
981 placedDate = _json["placedDate"]; 1029 placedDate = _json["placedDate"];
982 } 1030 }
983 if (_json.containsKey("promotions")) { 1031 if (_json.containsKey("promotions")) {
984 promotions = _json["promotions"].map((value) => new OrderPromotion.fromJso n(value)).toList(); 1032 promotions = _json["promotions"]
1033 .map((value) => new OrderPromotion.fromJson(value))
1034 .toList();
985 } 1035 }
986 if (_json.containsKey("refunds")) { 1036 if (_json.containsKey("refunds")) {
987 refunds = _json["refunds"].map((value) => new OrderRefund.fromJson(value)) .toList(); 1037 refunds = _json["refunds"]
1038 .map((value) => new OrderRefund.fromJson(value))
1039 .toList();
988 } 1040 }
989 if (_json.containsKey("shipments")) { 1041 if (_json.containsKey("shipments")) {
990 shipments = _json["shipments"].map((value) => new OrderShipment.fromJson(v alue)).toList(); 1042 shipments = _json["shipments"]
1043 .map((value) => new OrderShipment.fromJson(value))
1044 .toList();
991 } 1045 }
992 if (_json.containsKey("shippingCost")) { 1046 if (_json.containsKey("shippingCost")) {
993 shippingCost = new Price.fromJson(_json["shippingCost"]); 1047 shippingCost = new Price.fromJson(_json["shippingCost"]);
994 } 1048 }
995 if (_json.containsKey("shippingCostTax")) { 1049 if (_json.containsKey("shippingCostTax")) {
996 shippingCostTax = new Price.fromJson(_json["shippingCostTax"]); 1050 shippingCostTax = new Price.fromJson(_json["shippingCostTax"]);
997 } 1051 }
998 if (_json.containsKey("shippingOption")) { 1052 if (_json.containsKey("shippingOption")) {
999 shippingOption = _json["shippingOption"]; 1053 shippingOption = _json["shippingOption"];
1000 } 1054 }
1001 if (_json.containsKey("status")) { 1055 if (_json.containsKey("status")) {
1002 status = _json["status"]; 1056 status = _json["status"];
1003 } 1057 }
1004 } 1058 }
1005 1059
1006 core.Map<core.String, core.Object> toJson() { 1060 core.Map<core.String, core.Object> toJson() {
1007 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1061 final core.Map<core.String, core.Object> _json =
1062 new core.Map<core.String, core.Object>();
1008 if (acknowledged != null) { 1063 if (acknowledged != null) {
1009 _json["acknowledged"] = acknowledged; 1064 _json["acknowledged"] = acknowledged;
1010 } 1065 }
1011 if (channelType != null) { 1066 if (channelType != null) {
1012 _json["channelType"] = channelType; 1067 _json["channelType"] = channelType;
1013 } 1068 }
1014 if (customer != null) { 1069 if (customer != null) {
1015 _json["customer"] = (customer).toJson(); 1070 _json["customer"] = (customer).toJson();
1016 } 1071 }
1017 if (deliveryDetails != null) { 1072 if (deliveryDetails != null) {
(...skipping 20 matching lines...) Expand all
1038 if (paymentMethod != null) { 1093 if (paymentMethod != null) {
1039 _json["paymentMethod"] = (paymentMethod).toJson(); 1094 _json["paymentMethod"] = (paymentMethod).toJson();
1040 } 1095 }
1041 if (paymentStatus != null) { 1096 if (paymentStatus != null) {
1042 _json["paymentStatus"] = paymentStatus; 1097 _json["paymentStatus"] = paymentStatus;
1043 } 1098 }
1044 if (placedDate != null) { 1099 if (placedDate != null) {
1045 _json["placedDate"] = placedDate; 1100 _json["placedDate"] = placedDate;
1046 } 1101 }
1047 if (promotions != null) { 1102 if (promotions != null) {
1048 _json["promotions"] = promotions.map((value) => (value).toJson()).toList() ; 1103 _json["promotions"] =
1104 promotions.map((value) => (value).toJson()).toList();
1049 } 1105 }
1050 if (refunds != null) { 1106 if (refunds != null) {
1051 _json["refunds"] = refunds.map((value) => (value).toJson()).toList(); 1107 _json["refunds"] = refunds.map((value) => (value).toJson()).toList();
1052 } 1108 }
1053 if (shipments != null) { 1109 if (shipments != null) {
1054 _json["shipments"] = shipments.map((value) => (value).toJson()).toList(); 1110 _json["shipments"] = shipments.map((value) => (value).toJson()).toList();
1055 } 1111 }
1056 if (shippingCost != null) { 1112 if (shippingCost != null) {
1057 _json["shippingCost"] = (shippingCost).toJson(); 1113 _json["shippingCost"] = (shippingCost).toJson();
1058 } 1114 }
1059 if (shippingCostTax != null) { 1115 if (shippingCostTax != null) {
1060 _json["shippingCostTax"] = (shippingCostTax).toJson(); 1116 _json["shippingCostTax"] = (shippingCostTax).toJson();
1061 } 1117 }
1062 if (shippingOption != null) { 1118 if (shippingOption != null) {
1063 _json["shippingOption"] = shippingOption; 1119 _json["shippingOption"] = shippingOption;
1064 } 1120 }
1065 if (status != null) { 1121 if (status != null) {
1066 _json["status"] = status; 1122 _json["status"] = status;
1067 } 1123 }
1068 return _json; 1124 return _json;
1069 } 1125 }
1070 } 1126 }
1071 1127
1072 class OrderAddress { 1128 class OrderAddress {
1073 /** CLDR country code (e.g. "US"). */ 1129 /// CLDR country code (e.g. "US").
1074 core.String country; 1130 core.String country;
1075 /** 1131
1076 * Strings representing the lines of the printed label for mailing the order, 1132 /// Strings representing the lines of the printed label for mailing the
1077 * for example: 1133 /// order, for example:
1078 * John Smith 1134 /// John Smith
1079 * 1600 Amphitheatre Parkway 1135 /// 1600 Amphitheatre Parkway
1080 * Mountain View, CA, 94043 1136 /// Mountain View, CA, 94043
1081 * United States 1137 /// United States
1082 */
1083 core.List<core.String> fullAddress; 1138 core.List<core.String> fullAddress;
1084 /** Whether the address is a post office box. */ 1139
1140 /// Whether the address is a post office box.
1085 core.bool isPostOfficeBox; 1141 core.bool isPostOfficeBox;
1086 /** 1142
1087 * City, town or commune. May also include dependent localities or 1143 /// City, town or commune. May also include dependent localities or
1088 * sublocalities (e.g. neighborhoods or suburbs). 1144 /// sublocalities (e.g. neighborhoods or suburbs).
1089 */
1090 core.String locality; 1145 core.String locality;
1091 /** Postal Code or ZIP (e.g. "94043"). */ 1146
1147 /// Postal Code or ZIP (e.g. "94043").
1092 core.String postalCode; 1148 core.String postalCode;
1093 /** Name of the recipient. */ 1149
1150 /// Name of the recipient.
1094 core.String recipientName; 1151 core.String recipientName;
1095 /** Top-level administrative subdivision of the country (e.g. "CA"). */ 1152
1153 /// Top-level administrative subdivision of the country (e.g. "CA").
1096 core.String region; 1154 core.String region;
1097 /** Street-level part of the address. */ 1155
1156 /// Street-level part of the address.
1098 core.List<core.String> streetAddress; 1157 core.List<core.String> streetAddress;
1099 1158
1100 OrderAddress(); 1159 OrderAddress();
1101 1160
1102 OrderAddress.fromJson(core.Map _json) { 1161 OrderAddress.fromJson(core.Map _json) {
1103 if (_json.containsKey("country")) { 1162 if (_json.containsKey("country")) {
1104 country = _json["country"]; 1163 country = _json["country"];
1105 } 1164 }
1106 if (_json.containsKey("fullAddress")) { 1165 if (_json.containsKey("fullAddress")) {
1107 fullAddress = _json["fullAddress"]; 1166 fullAddress = _json["fullAddress"];
(...skipping 12 matching lines...) Expand all
1120 } 1179 }
1121 if (_json.containsKey("region")) { 1180 if (_json.containsKey("region")) {
1122 region = _json["region"]; 1181 region = _json["region"];
1123 } 1182 }
1124 if (_json.containsKey("streetAddress")) { 1183 if (_json.containsKey("streetAddress")) {
1125 streetAddress = _json["streetAddress"]; 1184 streetAddress = _json["streetAddress"];
1126 } 1185 }
1127 } 1186 }
1128 1187
1129 core.Map<core.String, core.Object> toJson() { 1188 core.Map<core.String, core.Object> toJson() {
1130 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1189 final core.Map<core.String, core.Object> _json =
1190 new core.Map<core.String, core.Object>();
1131 if (country != null) { 1191 if (country != null) {
1132 _json["country"] = country; 1192 _json["country"] = country;
1133 } 1193 }
1134 if (fullAddress != null) { 1194 if (fullAddress != null) {
1135 _json["fullAddress"] = fullAddress; 1195 _json["fullAddress"] = fullAddress;
1136 } 1196 }
1137 if (isPostOfficeBox != null) { 1197 if (isPostOfficeBox != null) {
1138 _json["isPostOfficeBox"] = isPostOfficeBox; 1198 _json["isPostOfficeBox"] = isPostOfficeBox;
1139 } 1199 }
1140 if (locality != null) { 1200 if (locality != null) {
1141 _json["locality"] = locality; 1201 _json["locality"] = locality;
1142 } 1202 }
1143 if (postalCode != null) { 1203 if (postalCode != null) {
1144 _json["postalCode"] = postalCode; 1204 _json["postalCode"] = postalCode;
1145 } 1205 }
1146 if (recipientName != null) { 1206 if (recipientName != null) {
1147 _json["recipientName"] = recipientName; 1207 _json["recipientName"] = recipientName;
1148 } 1208 }
1149 if (region != null) { 1209 if (region != null) {
1150 _json["region"] = region; 1210 _json["region"] = region;
1151 } 1211 }
1152 if (streetAddress != null) { 1212 if (streetAddress != null) {
1153 _json["streetAddress"] = streetAddress; 1213 _json["streetAddress"] = streetAddress;
1154 } 1214 }
1155 return _json; 1215 return _json;
1156 } 1216 }
1157 } 1217 }
1158 1218
1159 class OrderCancellation { 1219 class OrderCancellation {
1160 /** The actor that created the cancellation. */ 1220 /// The actor that created the cancellation.
1161 core.String actor; 1221 core.String actor;
1162 /** Date on which the cancellation has been created, in ISO 8601 format. */ 1222
1223 /// Date on which the cancellation has been created, in ISO 8601 format.
1163 core.String creationDate; 1224 core.String creationDate;
1164 /** The quantity that was canceled. */ 1225
1226 /// The quantity that was canceled.
1165 core.int quantity; 1227 core.int quantity;
1166 /** 1228
1167 * The reason for the cancellation. Orders that are cancelled with a 1229 /// The reason for the cancellation. Orders that are cancelled with a
1168 * noInventory reason will lead to the removal of the product from POG until 1230 /// noInventory reason will lead to the removal of the product from POG until
1169 * you make an update to that product. This will not affect your Shopping ads. 1231 /// you make an update to that product. This will not affect your Shopping
1170 */ 1232 /// ads.
1171 core.String reason; 1233 core.String reason;
1172 /** The explanation of the reason. */ 1234
1235 /// The explanation of the reason.
1173 core.String reasonText; 1236 core.String reasonText;
1174 1237
1175 OrderCancellation(); 1238 OrderCancellation();
1176 1239
1177 OrderCancellation.fromJson(core.Map _json) { 1240 OrderCancellation.fromJson(core.Map _json) {
1178 if (_json.containsKey("actor")) { 1241 if (_json.containsKey("actor")) {
1179 actor = _json["actor"]; 1242 actor = _json["actor"];
1180 } 1243 }
1181 if (_json.containsKey("creationDate")) { 1244 if (_json.containsKey("creationDate")) {
1182 creationDate = _json["creationDate"]; 1245 creationDate = _json["creationDate"];
1183 } 1246 }
1184 if (_json.containsKey("quantity")) { 1247 if (_json.containsKey("quantity")) {
1185 quantity = _json["quantity"]; 1248 quantity = _json["quantity"];
1186 } 1249 }
1187 if (_json.containsKey("reason")) { 1250 if (_json.containsKey("reason")) {
1188 reason = _json["reason"]; 1251 reason = _json["reason"];
1189 } 1252 }
1190 if (_json.containsKey("reasonText")) { 1253 if (_json.containsKey("reasonText")) {
1191 reasonText = _json["reasonText"]; 1254 reasonText = _json["reasonText"];
1192 } 1255 }
1193 } 1256 }
1194 1257
1195 core.Map<core.String, core.Object> toJson() { 1258 core.Map<core.String, core.Object> toJson() {
1196 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1259 final core.Map<core.String, core.Object> _json =
1260 new core.Map<core.String, core.Object>();
1197 if (actor != null) { 1261 if (actor != null) {
1198 _json["actor"] = actor; 1262 _json["actor"] = actor;
1199 } 1263 }
1200 if (creationDate != null) { 1264 if (creationDate != null) {
1201 _json["creationDate"] = creationDate; 1265 _json["creationDate"] = creationDate;
1202 } 1266 }
1203 if (quantity != null) { 1267 if (quantity != null) {
1204 _json["quantity"] = quantity; 1268 _json["quantity"] = quantity;
1205 } 1269 }
1206 if (reason != null) { 1270 if (reason != null) {
1207 _json["reason"] = reason; 1271 _json["reason"] = reason;
1208 } 1272 }
1209 if (reasonText != null) { 1273 if (reasonText != null) {
1210 _json["reasonText"] = reasonText; 1274 _json["reasonText"] = reasonText;
1211 } 1275 }
1212 return _json; 1276 return _json;
1213 } 1277 }
1214 } 1278 }
1215 1279
1216 class OrderCustomer { 1280 class OrderCustomer {
1217 /** Email address of the customer. */ 1281 /// Email address of the customer.
1218 core.String email; 1282 core.String email;
1219 /** 1283
1220 * If set, this indicates the user explicitly chose to opt in or out of 1284 /// If set, this indicates the user explicitly chose to opt in or out of
1221 * providing marketing rights to the merchant. If unset, this indicates the 1285 /// providing marketing rights to the merchant. If unset, this indicates the
1222 * user has already made this choice in a previous purchase, and was thus not 1286 /// user has already made this choice in a previous purchase, and was thus
1223 * shown the marketing right opt in/out checkbox during the checkout flow. 1287 /// not shown the marketing right opt in/out checkbox during the checkout
1224 */ 1288 /// flow.
1225 core.bool explicitMarketingPreference; 1289 core.bool explicitMarketingPreference;
1226 /** Full name of the customer. */ 1290
1291 /// Full name of the customer.
1227 core.String fullName; 1292 core.String fullName;
1228 1293
1229 OrderCustomer(); 1294 OrderCustomer();
1230 1295
1231 OrderCustomer.fromJson(core.Map _json) { 1296 OrderCustomer.fromJson(core.Map _json) {
1232 if (_json.containsKey("email")) { 1297 if (_json.containsKey("email")) {
1233 email = _json["email"]; 1298 email = _json["email"];
1234 } 1299 }
1235 if (_json.containsKey("explicitMarketingPreference")) { 1300 if (_json.containsKey("explicitMarketingPreference")) {
1236 explicitMarketingPreference = _json["explicitMarketingPreference"]; 1301 explicitMarketingPreference = _json["explicitMarketingPreference"];
1237 } 1302 }
1238 if (_json.containsKey("fullName")) { 1303 if (_json.containsKey("fullName")) {
1239 fullName = _json["fullName"]; 1304 fullName = _json["fullName"];
1240 } 1305 }
1241 } 1306 }
1242 1307
1243 core.Map<core.String, core.Object> toJson() { 1308 core.Map<core.String, core.Object> toJson() {
1244 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1309 final core.Map<core.String, core.Object> _json =
1310 new core.Map<core.String, core.Object>();
1245 if (email != null) { 1311 if (email != null) {
1246 _json["email"] = email; 1312 _json["email"] = email;
1247 } 1313 }
1248 if (explicitMarketingPreference != null) { 1314 if (explicitMarketingPreference != null) {
1249 _json["explicitMarketingPreference"] = explicitMarketingPreference; 1315 _json["explicitMarketingPreference"] = explicitMarketingPreference;
1250 } 1316 }
1251 if (fullName != null) { 1317 if (fullName != null) {
1252 _json["fullName"] = fullName; 1318 _json["fullName"] = fullName;
1253 } 1319 }
1254 return _json; 1320 return _json;
1255 } 1321 }
1256 } 1322 }
1257 1323
1258 class OrderDeliveryDetails { 1324 class OrderDeliveryDetails {
1259 /** The delivery address */ 1325 /// The delivery address
1260 OrderAddress address; 1326 OrderAddress address;
1261 /** The phone number of the person receiving the delivery. */ 1327
1328 /// The phone number of the person receiving the delivery.
1262 core.String phoneNumber; 1329 core.String phoneNumber;
1263 1330
1264 OrderDeliveryDetails(); 1331 OrderDeliveryDetails();
1265 1332
1266 OrderDeliveryDetails.fromJson(core.Map _json) { 1333 OrderDeliveryDetails.fromJson(core.Map _json) {
1267 if (_json.containsKey("address")) { 1334 if (_json.containsKey("address")) {
1268 address = new OrderAddress.fromJson(_json["address"]); 1335 address = new OrderAddress.fromJson(_json["address"]);
1269 } 1336 }
1270 if (_json.containsKey("phoneNumber")) { 1337 if (_json.containsKey("phoneNumber")) {
1271 phoneNumber = _json["phoneNumber"]; 1338 phoneNumber = _json["phoneNumber"];
1272 } 1339 }
1273 } 1340 }
1274 1341
1275 core.Map<core.String, core.Object> toJson() { 1342 core.Map<core.String, core.Object> toJson() {
1276 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1343 final core.Map<core.String, core.Object> _json =
1344 new core.Map<core.String, core.Object>();
1277 if (address != null) { 1345 if (address != null) {
1278 _json["address"] = (address).toJson(); 1346 _json["address"] = (address).toJson();
1279 } 1347 }
1280 if (phoneNumber != null) { 1348 if (phoneNumber != null) {
1281 _json["phoneNumber"] = phoneNumber; 1349 _json["phoneNumber"] = phoneNumber;
1282 } 1350 }
1283 return _json; 1351 return _json;
1284 } 1352 }
1285 } 1353 }
1286 1354
1287 class OrderLineItem { 1355 class OrderLineItem {
1288 /** Cancellations of the line item. */ 1356 /// Cancellations of the line item.
1289 core.List<OrderCancellation> cancellations; 1357 core.List<OrderCancellation> cancellations;
1290 /** The id of the line item. */ 1358
1359 /// The id of the line item.
1291 core.String id; 1360 core.String id;
1292 /** 1361
1293 * Total price for the line item. For example, if two items for $10 are 1362 /// Total price for the line item. For example, if two items for $10 are
1294 * purchased, the total price will be $20. 1363 /// purchased, the total price will be $20.
1295 */
1296 Price price; 1364 Price price;
1297 /** Product data from the time of the order placement. */ 1365
1366 /// Product data from the time of the order placement.
1298 OrderLineItemProduct product; 1367 OrderLineItemProduct product;
1299 /** Number of items canceled. */ 1368
1369 /// Number of items canceled.
1300 core.int quantityCanceled; 1370 core.int quantityCanceled;
1301 /** Number of items delivered. */ 1371
1372 /// Number of items delivered.
1302 core.int quantityDelivered; 1373 core.int quantityDelivered;
1303 /** Number of items ordered. */ 1374
1375 /// Number of items ordered.
1304 core.int quantityOrdered; 1376 core.int quantityOrdered;
1305 /** Number of items pending. */ 1377
1378 /// Number of items pending.
1306 core.int quantityPending; 1379 core.int quantityPending;
1307 /** Number of items returned. */ 1380
1381 /// Number of items returned.
1308 core.int quantityReturned; 1382 core.int quantityReturned;
1309 /** Number of items shipped. */ 1383
1384 /// Number of items shipped.
1310 core.int quantityShipped; 1385 core.int quantityShipped;
1311 /** Details of the return policy for the line item. */ 1386
1387 /// Details of the return policy for the line item.
1312 OrderLineItemReturnInfo returnInfo; 1388 OrderLineItemReturnInfo returnInfo;
1313 /** Returns of the line item. */ 1389
1390 /// Returns of the line item.
1314 core.List<OrderReturn> returns; 1391 core.List<OrderReturn> returns;
1315 /** Details of the requested shipping for the line item. */ 1392
1393 /// Details of the requested shipping for the line item.
1316 OrderLineItemShippingDetails shippingDetails; 1394 OrderLineItemShippingDetails shippingDetails;
1317 /** 1395
1318 * Total tax amount for the line item. For example, if two items are 1396 /// Total tax amount for the line item. For example, if two items are
1319 * purchased, and each have a cost tax of $2, the total tax amount will be $4. 1397 /// purchased, and each have a cost tax of $2, the total tax amount will be
1320 */ 1398 /// $4.
1321 Price tax; 1399 Price tax;
1322 1400
1323 OrderLineItem(); 1401 OrderLineItem();
1324 1402
1325 OrderLineItem.fromJson(core.Map _json) { 1403 OrderLineItem.fromJson(core.Map _json) {
1326 if (_json.containsKey("cancellations")) { 1404 if (_json.containsKey("cancellations")) {
1327 cancellations = _json["cancellations"].map((value) => new OrderCancellatio n.fromJson(value)).toList(); 1405 cancellations = _json["cancellations"]
1406 .map((value) => new OrderCancellation.fromJson(value))
1407 .toList();
1328 } 1408 }
1329 if (_json.containsKey("id")) { 1409 if (_json.containsKey("id")) {
1330 id = _json["id"]; 1410 id = _json["id"];
1331 } 1411 }
1332 if (_json.containsKey("price")) { 1412 if (_json.containsKey("price")) {
1333 price = new Price.fromJson(_json["price"]); 1413 price = new Price.fromJson(_json["price"]);
1334 } 1414 }
1335 if (_json.containsKey("product")) { 1415 if (_json.containsKey("product")) {
1336 product = new OrderLineItemProduct.fromJson(_json["product"]); 1416 product = new OrderLineItemProduct.fromJson(_json["product"]);
1337 } 1417 }
(...skipping 12 matching lines...) Expand all
1350 if (_json.containsKey("quantityReturned")) { 1430 if (_json.containsKey("quantityReturned")) {
1351 quantityReturned = _json["quantityReturned"]; 1431 quantityReturned = _json["quantityReturned"];
1352 } 1432 }
1353 if (_json.containsKey("quantityShipped")) { 1433 if (_json.containsKey("quantityShipped")) {
1354 quantityShipped = _json["quantityShipped"]; 1434 quantityShipped = _json["quantityShipped"];
1355 } 1435 }
1356 if (_json.containsKey("returnInfo")) { 1436 if (_json.containsKey("returnInfo")) {
1357 returnInfo = new OrderLineItemReturnInfo.fromJson(_json["returnInfo"]); 1437 returnInfo = new OrderLineItemReturnInfo.fromJson(_json["returnInfo"]);
1358 } 1438 }
1359 if (_json.containsKey("returns")) { 1439 if (_json.containsKey("returns")) {
1360 returns = _json["returns"].map((value) => new OrderReturn.fromJson(value)) .toList(); 1440 returns = _json["returns"]
1441 .map((value) => new OrderReturn.fromJson(value))
1442 .toList();
1361 } 1443 }
1362 if (_json.containsKey("shippingDetails")) { 1444 if (_json.containsKey("shippingDetails")) {
1363 shippingDetails = new OrderLineItemShippingDetails.fromJson(_json["shippin gDetails"]); 1445 shippingDetails =
1446 new OrderLineItemShippingDetails.fromJson(_json["shippingDetails"]);
1364 } 1447 }
1365 if (_json.containsKey("tax")) { 1448 if (_json.containsKey("tax")) {
1366 tax = new Price.fromJson(_json["tax"]); 1449 tax = new Price.fromJson(_json["tax"]);
1367 } 1450 }
1368 } 1451 }
1369 1452
1370 core.Map<core.String, core.Object> toJson() { 1453 core.Map<core.String, core.Object> toJson() {
1371 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1454 final core.Map<core.String, core.Object> _json =
1455 new core.Map<core.String, core.Object>();
1372 if (cancellations != null) { 1456 if (cancellations != null) {
1373 _json["cancellations"] = cancellations.map((value) => (value).toJson()).to List(); 1457 _json["cancellations"] =
1458 cancellations.map((value) => (value).toJson()).toList();
1374 } 1459 }
1375 if (id != null) { 1460 if (id != null) {
1376 _json["id"] = id; 1461 _json["id"] = id;
1377 } 1462 }
1378 if (price != null) { 1463 if (price != null) {
1379 _json["price"] = (price).toJson(); 1464 _json["price"] = (price).toJson();
1380 } 1465 }
1381 if (product != null) { 1466 if (product != null) {
1382 _json["product"] = (product).toJson(); 1467 _json["product"] = (product).toJson();
1383 } 1468 }
(...skipping 25 matching lines...) Expand all
1409 _json["shippingDetails"] = (shippingDetails).toJson(); 1494 _json["shippingDetails"] = (shippingDetails).toJson();
1410 } 1495 }
1411 if (tax != null) { 1496 if (tax != null) {
1412 _json["tax"] = (tax).toJson(); 1497 _json["tax"] = (tax).toJson();
1413 } 1498 }
1414 return _json; 1499 return _json;
1415 } 1500 }
1416 } 1501 }
1417 1502
1418 class OrderLineItemProduct { 1503 class OrderLineItemProduct {
1419 /** Brand of the item. */ 1504 /// Brand of the item.
1420 core.String brand; 1505 core.String brand;
1421 /** The item's channel (online or local). */ 1506
1507 /// The item's channel (online or local).
1422 core.String channel; 1508 core.String channel;
1423 /** Condition or state of the item. */ 1509
1510 /// Condition or state of the item.
1424 core.String condition; 1511 core.String condition;
1425 /** The two-letter ISO 639-1 language code for the item. */ 1512
1513 /// The two-letter ISO 639-1 language code for the item.
1426 core.String contentLanguage; 1514 core.String contentLanguage;
1427 /** Global Trade Item Number (GTIN) of the item. */ 1515
1516 /// Global Trade Item Number (GTIN) of the item.
1428 core.String gtin; 1517 core.String gtin;
1429 /** The REST id of the product. */ 1518
1519 /// The REST id of the product.
1430 core.String id; 1520 core.String id;
1431 /** URL of an image of the item. */ 1521
1522 /// URL of an image of the item.
1432 core.String imageLink; 1523 core.String imageLink;
1433 /** Shared identifier for all variants of the same product. */ 1524
1525 /// Shared identifier for all variants of the same product.
1434 core.String itemGroupId; 1526 core.String itemGroupId;
1435 /** Manufacturer Part Number (MPN) of the item. */ 1527
1528 /// Manufacturer Part Number (MPN) of the item.
1436 core.String mpn; 1529 core.String mpn;
1437 /** An identifier of the item. */ 1530
1531 /// An identifier of the item.
1438 core.String offerId; 1532 core.String offerId;
1439 /** Price of the item. */ 1533
1534 /// Price of the item.
1440 Price price; 1535 Price price;
1441 /** URL to the cached image shown to the user when order was placed. */ 1536
1537 /// URL to the cached image shown to the user when order was placed.
1442 core.String shownImage; 1538 core.String shownImage;
1443 /** The CLDR territory code of the target country of the product. */ 1539
1540 /// The CLDR territory code of the target country of the product.
1444 core.String targetCountry; 1541 core.String targetCountry;
1445 /** The title of the product. */ 1542
1543 /// The title of the product.
1446 core.String title; 1544 core.String title;
1447 /** 1545
1448 * Variant attributes for the item. These are dimensions of the product, such 1546 /// Variant attributes for the item. These are dimensions of the product,
1449 * as color, gender, material, pattern, and size. You can find a comprehensive 1547 /// such as color, gender, material, pattern, and size. You can find a
1450 * list of variant attributes here. 1548 /// comprehensive list of variant attributes here.
1451 */
1452 core.List<OrderLineItemProductVariantAttribute> variantAttributes; 1549 core.List<OrderLineItemProductVariantAttribute> variantAttributes;
1453 1550
1454 OrderLineItemProduct(); 1551 OrderLineItemProduct();
1455 1552
1456 OrderLineItemProduct.fromJson(core.Map _json) { 1553 OrderLineItemProduct.fromJson(core.Map _json) {
1457 if (_json.containsKey("brand")) { 1554 if (_json.containsKey("brand")) {
1458 brand = _json["brand"]; 1555 brand = _json["brand"];
1459 } 1556 }
1460 if (_json.containsKey("channel")) { 1557 if (_json.containsKey("channel")) {
1461 channel = _json["channel"]; 1558 channel = _json["channel"];
(...skipping 28 matching lines...) Expand all
1490 if (_json.containsKey("shownImage")) { 1587 if (_json.containsKey("shownImage")) {
1491 shownImage = _json["shownImage"]; 1588 shownImage = _json["shownImage"];
1492 } 1589 }
1493 if (_json.containsKey("targetCountry")) { 1590 if (_json.containsKey("targetCountry")) {
1494 targetCountry = _json["targetCountry"]; 1591 targetCountry = _json["targetCountry"];
1495 } 1592 }
1496 if (_json.containsKey("title")) { 1593 if (_json.containsKey("title")) {
1497 title = _json["title"]; 1594 title = _json["title"];
1498 } 1595 }
1499 if (_json.containsKey("variantAttributes")) { 1596 if (_json.containsKey("variantAttributes")) {
1500 variantAttributes = _json["variantAttributes"].map((value) => new OrderLin eItemProductVariantAttribute.fromJson(value)).toList(); 1597 variantAttributes = _json["variantAttributes"]
1598 .map((value) =>
1599 new OrderLineItemProductVariantAttribute.fromJson(value))
1600 .toList();
1501 } 1601 }
1502 } 1602 }
1503 1603
1504 core.Map<core.String, core.Object> toJson() { 1604 core.Map<core.String, core.Object> toJson() {
1505 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1605 final core.Map<core.String, core.Object> _json =
1606 new core.Map<core.String, core.Object>();
1506 if (brand != null) { 1607 if (brand != null) {
1507 _json["brand"] = brand; 1608 _json["brand"] = brand;
1508 } 1609 }
1509 if (channel != null) { 1610 if (channel != null) {
1510 _json["channel"] = channel; 1611 _json["channel"] = channel;
1511 } 1612 }
1512 if (condition != null) { 1613 if (condition != null) {
1513 _json["condition"] = condition; 1614 _json["condition"] = condition;
1514 } 1615 }
1515 if (contentLanguage != null) { 1616 if (contentLanguage != null) {
(...skipping 23 matching lines...) Expand all
1539 if (shownImage != null) { 1640 if (shownImage != null) {
1540 _json["shownImage"] = shownImage; 1641 _json["shownImage"] = shownImage;
1541 } 1642 }
1542 if (targetCountry != null) { 1643 if (targetCountry != null) {
1543 _json["targetCountry"] = targetCountry; 1644 _json["targetCountry"] = targetCountry;
1544 } 1645 }
1545 if (title != null) { 1646 if (title != null) {
1546 _json["title"] = title; 1647 _json["title"] = title;
1547 } 1648 }
1548 if (variantAttributes != null) { 1649 if (variantAttributes != null) {
1549 _json["variantAttributes"] = variantAttributes.map((value) => (value).toJs on()).toList(); 1650 _json["variantAttributes"] =
1651 variantAttributes.map((value) => (value).toJson()).toList();
1550 } 1652 }
1551 return _json; 1653 return _json;
1552 } 1654 }
1553 } 1655 }
1554 1656
1555 class OrderLineItemProductVariantAttribute { 1657 class OrderLineItemProductVariantAttribute {
1556 /** The dimension of the variant. */ 1658 /// The dimension of the variant.
1557 core.String dimension; 1659 core.String dimension;
1558 /** The value for the dimension. */ 1660
1661 /// The value for the dimension.
1559 core.String value; 1662 core.String value;
1560 1663
1561 OrderLineItemProductVariantAttribute(); 1664 OrderLineItemProductVariantAttribute();
1562 1665
1563 OrderLineItemProductVariantAttribute.fromJson(core.Map _json) { 1666 OrderLineItemProductVariantAttribute.fromJson(core.Map _json) {
1564 if (_json.containsKey("dimension")) { 1667 if (_json.containsKey("dimension")) {
1565 dimension = _json["dimension"]; 1668 dimension = _json["dimension"];
1566 } 1669 }
1567 if (_json.containsKey("value")) { 1670 if (_json.containsKey("value")) {
1568 value = _json["value"]; 1671 value = _json["value"];
1569 } 1672 }
1570 } 1673 }
1571 1674
1572 core.Map<core.String, core.Object> toJson() { 1675 core.Map<core.String, core.Object> toJson() {
1573 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1676 final core.Map<core.String, core.Object> _json =
1677 new core.Map<core.String, core.Object>();
1574 if (dimension != null) { 1678 if (dimension != null) {
1575 _json["dimension"] = dimension; 1679 _json["dimension"] = dimension;
1576 } 1680 }
1577 if (value != null) { 1681 if (value != null) {
1578 _json["value"] = value; 1682 _json["value"] = value;
1579 } 1683 }
1580 return _json; 1684 return _json;
1581 } 1685 }
1582 } 1686 }
1583 1687
1584 class OrderLineItemReturnInfo { 1688 class OrderLineItemReturnInfo {
1585 /** How many days later the item can be returned. */ 1689 /// How many days later the item can be returned.
1586 core.int daysToReturn; 1690 core.int daysToReturn;
1587 /** Whether the item is returnable. */ 1691
1692 /// Whether the item is returnable.
1588 core.bool isReturnable; 1693 core.bool isReturnable;
1589 /** URL of the item return policy. */ 1694
1695 /// URL of the item return policy.
1590 core.String policyUrl; 1696 core.String policyUrl;
1591 1697
1592 OrderLineItemReturnInfo(); 1698 OrderLineItemReturnInfo();
1593 1699
1594 OrderLineItemReturnInfo.fromJson(core.Map _json) { 1700 OrderLineItemReturnInfo.fromJson(core.Map _json) {
1595 if (_json.containsKey("daysToReturn")) { 1701 if (_json.containsKey("daysToReturn")) {
1596 daysToReturn = _json["daysToReturn"]; 1702 daysToReturn = _json["daysToReturn"];
1597 } 1703 }
1598 if (_json.containsKey("isReturnable")) { 1704 if (_json.containsKey("isReturnable")) {
1599 isReturnable = _json["isReturnable"]; 1705 isReturnable = _json["isReturnable"];
1600 } 1706 }
1601 if (_json.containsKey("policyUrl")) { 1707 if (_json.containsKey("policyUrl")) {
1602 policyUrl = _json["policyUrl"]; 1708 policyUrl = _json["policyUrl"];
1603 } 1709 }
1604 } 1710 }
1605 1711
1606 core.Map<core.String, core.Object> toJson() { 1712 core.Map<core.String, core.Object> toJson() {
1607 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1713 final core.Map<core.String, core.Object> _json =
1714 new core.Map<core.String, core.Object>();
1608 if (daysToReturn != null) { 1715 if (daysToReturn != null) {
1609 _json["daysToReturn"] = daysToReturn; 1716 _json["daysToReturn"] = daysToReturn;
1610 } 1717 }
1611 if (isReturnable != null) { 1718 if (isReturnable != null) {
1612 _json["isReturnable"] = isReturnable; 1719 _json["isReturnable"] = isReturnable;
1613 } 1720 }
1614 if (policyUrl != null) { 1721 if (policyUrl != null) {
1615 _json["policyUrl"] = policyUrl; 1722 _json["policyUrl"] = policyUrl;
1616 } 1723 }
1617 return _json; 1724 return _json;
1618 } 1725 }
1619 } 1726 }
1620 1727
1621 class OrderLineItemShippingDetails { 1728 class OrderLineItemShippingDetails {
1622 /** The delivery by date, in ISO 8601 format. */ 1729 /// The delivery by date, in ISO 8601 format.
1623 core.String deliverByDate; 1730 core.String deliverByDate;
1624 /** Details of the shipping method. */ 1731
1732 /// Details of the shipping method.
1625 OrderLineItemShippingDetailsMethod method; 1733 OrderLineItemShippingDetailsMethod method;
1626 /** The ship by date, in ISO 8601 format. */ 1734
1735 /// The ship by date, in ISO 8601 format.
1627 core.String shipByDate; 1736 core.String shipByDate;
1628 1737
1629 OrderLineItemShippingDetails(); 1738 OrderLineItemShippingDetails();
1630 1739
1631 OrderLineItemShippingDetails.fromJson(core.Map _json) { 1740 OrderLineItemShippingDetails.fromJson(core.Map _json) {
1632 if (_json.containsKey("deliverByDate")) { 1741 if (_json.containsKey("deliverByDate")) {
1633 deliverByDate = _json["deliverByDate"]; 1742 deliverByDate = _json["deliverByDate"];
1634 } 1743 }
1635 if (_json.containsKey("method")) { 1744 if (_json.containsKey("method")) {
1636 method = new OrderLineItemShippingDetailsMethod.fromJson(_json["method"]); 1745 method = new OrderLineItemShippingDetailsMethod.fromJson(_json["method"]);
1637 } 1746 }
1638 if (_json.containsKey("shipByDate")) { 1747 if (_json.containsKey("shipByDate")) {
1639 shipByDate = _json["shipByDate"]; 1748 shipByDate = _json["shipByDate"];
1640 } 1749 }
1641 } 1750 }
1642 1751
1643 core.Map<core.String, core.Object> toJson() { 1752 core.Map<core.String, core.Object> toJson() {
1644 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1753 final core.Map<core.String, core.Object> _json =
1754 new core.Map<core.String, core.Object>();
1645 if (deliverByDate != null) { 1755 if (deliverByDate != null) {
1646 _json["deliverByDate"] = deliverByDate; 1756 _json["deliverByDate"] = deliverByDate;
1647 } 1757 }
1648 if (method != null) { 1758 if (method != null) {
1649 _json["method"] = (method).toJson(); 1759 _json["method"] = (method).toJson();
1650 } 1760 }
1651 if (shipByDate != null) { 1761 if (shipByDate != null) {
1652 _json["shipByDate"] = shipByDate; 1762 _json["shipByDate"] = shipByDate;
1653 } 1763 }
1654 return _json; 1764 return _json;
1655 } 1765 }
1656 } 1766 }
1657 1767
1658 class OrderLineItemShippingDetailsMethod { 1768 class OrderLineItemShippingDetailsMethod {
1659 /** The carrier for the shipping. Optional. */ 1769 /// The carrier for the shipping. Optional.
1660 core.String carrier; 1770 core.String carrier;
1661 /** Maximum transit time. */ 1771
1772 /// Maximum transit time.
1662 core.int maxDaysInTransit; 1773 core.int maxDaysInTransit;
1663 /** The name of the shipping method. */ 1774
1775 /// The name of the shipping method.
1664 core.String methodName; 1776 core.String methodName;
1665 /** Minimum transit time. */ 1777
1778 /// Minimum transit time.
1666 core.int minDaysInTransit; 1779 core.int minDaysInTransit;
1667 1780
1668 OrderLineItemShippingDetailsMethod(); 1781 OrderLineItemShippingDetailsMethod();
1669 1782
1670 OrderLineItemShippingDetailsMethod.fromJson(core.Map _json) { 1783 OrderLineItemShippingDetailsMethod.fromJson(core.Map _json) {
1671 if (_json.containsKey("carrier")) { 1784 if (_json.containsKey("carrier")) {
1672 carrier = _json["carrier"]; 1785 carrier = _json["carrier"];
1673 } 1786 }
1674 if (_json.containsKey("maxDaysInTransit")) { 1787 if (_json.containsKey("maxDaysInTransit")) {
1675 maxDaysInTransit = _json["maxDaysInTransit"]; 1788 maxDaysInTransit = _json["maxDaysInTransit"];
1676 } 1789 }
1677 if (_json.containsKey("methodName")) { 1790 if (_json.containsKey("methodName")) {
1678 methodName = _json["methodName"]; 1791 methodName = _json["methodName"];
1679 } 1792 }
1680 if (_json.containsKey("minDaysInTransit")) { 1793 if (_json.containsKey("minDaysInTransit")) {
1681 minDaysInTransit = _json["minDaysInTransit"]; 1794 minDaysInTransit = _json["minDaysInTransit"];
1682 } 1795 }
1683 } 1796 }
1684 1797
1685 core.Map<core.String, core.Object> toJson() { 1798 core.Map<core.String, core.Object> toJson() {
1686 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1799 final core.Map<core.String, core.Object> _json =
1800 new core.Map<core.String, core.Object>();
1687 if (carrier != null) { 1801 if (carrier != null) {
1688 _json["carrier"] = carrier; 1802 _json["carrier"] = carrier;
1689 } 1803 }
1690 if (maxDaysInTransit != null) { 1804 if (maxDaysInTransit != null) {
1691 _json["maxDaysInTransit"] = maxDaysInTransit; 1805 _json["maxDaysInTransit"] = maxDaysInTransit;
1692 } 1806 }
1693 if (methodName != null) { 1807 if (methodName != null) {
1694 _json["methodName"] = methodName; 1808 _json["methodName"] = methodName;
1695 } 1809 }
1696 if (minDaysInTransit != null) { 1810 if (minDaysInTransit != null) {
1697 _json["minDaysInTransit"] = minDaysInTransit; 1811 _json["minDaysInTransit"] = minDaysInTransit;
1698 } 1812 }
1699 return _json; 1813 return _json;
1700 } 1814 }
1701 } 1815 }
1702 1816
1703 class OrderPaymentMethod { 1817 class OrderPaymentMethod {
1704 /** The billing address. */ 1818 /// The billing address.
1705 OrderAddress billingAddress; 1819 OrderAddress billingAddress;
1706 /** The card expiration month (January = 1, February = 2 etc.). */ 1820
1821 /// The card expiration month (January = 1, February = 2 etc.).
1707 core.int expirationMonth; 1822 core.int expirationMonth;
1708 /** The card expiration year (4-digit, e.g. 2015). */ 1823
1824 /// The card expiration year (4-digit, e.g. 2015).
1709 core.int expirationYear; 1825 core.int expirationYear;
1710 /** The last four digits of the card number. */ 1826
1827 /// The last four digits of the card number.
1711 core.String lastFourDigits; 1828 core.String lastFourDigits;
1712 /** The billing phone number. */ 1829
1830 /// The billing phone number.
1713 core.String phoneNumber; 1831 core.String phoneNumber;
1714 /** The type of instrument (VISA, Mastercard, etc). */ 1832
1833 /// The type of instrument (VISA, Mastercard, etc).
1715 core.String type; 1834 core.String type;
1716 1835
1717 OrderPaymentMethod(); 1836 OrderPaymentMethod();
1718 1837
1719 OrderPaymentMethod.fromJson(core.Map _json) { 1838 OrderPaymentMethod.fromJson(core.Map _json) {
1720 if (_json.containsKey("billingAddress")) { 1839 if (_json.containsKey("billingAddress")) {
1721 billingAddress = new OrderAddress.fromJson(_json["billingAddress"]); 1840 billingAddress = new OrderAddress.fromJson(_json["billingAddress"]);
1722 } 1841 }
1723 if (_json.containsKey("expirationMonth")) { 1842 if (_json.containsKey("expirationMonth")) {
1724 expirationMonth = _json["expirationMonth"]; 1843 expirationMonth = _json["expirationMonth"];
1725 } 1844 }
1726 if (_json.containsKey("expirationYear")) { 1845 if (_json.containsKey("expirationYear")) {
1727 expirationYear = _json["expirationYear"]; 1846 expirationYear = _json["expirationYear"];
1728 } 1847 }
1729 if (_json.containsKey("lastFourDigits")) { 1848 if (_json.containsKey("lastFourDigits")) {
1730 lastFourDigits = _json["lastFourDigits"]; 1849 lastFourDigits = _json["lastFourDigits"];
1731 } 1850 }
1732 if (_json.containsKey("phoneNumber")) { 1851 if (_json.containsKey("phoneNumber")) {
1733 phoneNumber = _json["phoneNumber"]; 1852 phoneNumber = _json["phoneNumber"];
1734 } 1853 }
1735 if (_json.containsKey("type")) { 1854 if (_json.containsKey("type")) {
1736 type = _json["type"]; 1855 type = _json["type"];
1737 } 1856 }
1738 } 1857 }
1739 1858
1740 core.Map<core.String, core.Object> toJson() { 1859 core.Map<core.String, core.Object> toJson() {
1741 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1860 final core.Map<core.String, core.Object> _json =
1861 new core.Map<core.String, core.Object>();
1742 if (billingAddress != null) { 1862 if (billingAddress != null) {
1743 _json["billingAddress"] = (billingAddress).toJson(); 1863 _json["billingAddress"] = (billingAddress).toJson();
1744 } 1864 }
1745 if (expirationMonth != null) { 1865 if (expirationMonth != null) {
1746 _json["expirationMonth"] = expirationMonth; 1866 _json["expirationMonth"] = expirationMonth;
1747 } 1867 }
1748 if (expirationYear != null) { 1868 if (expirationYear != null) {
1749 _json["expirationYear"] = expirationYear; 1869 _json["expirationYear"] = expirationYear;
1750 } 1870 }
1751 if (lastFourDigits != null) { 1871 if (lastFourDigits != null) {
1752 _json["lastFourDigits"] = lastFourDigits; 1872 _json["lastFourDigits"] = lastFourDigits;
1753 } 1873 }
1754 if (phoneNumber != null) { 1874 if (phoneNumber != null) {
1755 _json["phoneNumber"] = phoneNumber; 1875 _json["phoneNumber"] = phoneNumber;
1756 } 1876 }
1757 if (type != null) { 1877 if (type != null) {
1758 _json["type"] = type; 1878 _json["type"] = type;
1759 } 1879 }
1760 return _json; 1880 return _json;
1761 } 1881 }
1762 } 1882 }
1763 1883
1764 class OrderPromotion { 1884 class OrderPromotion {
1765 core.List<OrderPromotionBenefit> benefits; 1885 core.List<OrderPromotionBenefit> benefits;
1766 /** 1886
1767 * The date and time frame when the promotion is active and ready for 1887 /// The date and time frame when the promotion is active and ready for
1768 * validation review. Note that the promotion live time may be delayed for a 1888 /// validation review. Note that the promotion live time may be delayed for a
1769 * few hours due to the validation review. 1889 /// few hours due to the validation review.
1770 * Start date and end date are separated by a forward slash (/). The start 1890 /// Start date and end date are separated by a forward slash (/). The start
1771 * date is specified by the format (YYYY-MM-DD), followed by the letter ?T?, 1891 /// date is specified by the format (YYYY-MM-DD), followed by the letter ?T?,
1772 * the time of the day when the sale starts (in Greenwich Mean Time, GMT), 1892 /// the time of the day when the sale starts (in Greenwich Mean Time, GMT),
1773 * followed by an expression of the time zone for the sale. The end date is in 1893 /// followed by an expression of the time zone for the sale. The end date is
1774 * the same format. 1894 /// in the same format.
1775 */
1776 core.String effectiveDates; 1895 core.String effectiveDates;
1777 /** 1896
1778 * Optional. The text code that corresponds to the promotion when applied on 1897 /// Optional. The text code that corresponds to the promotion when applied on
1779 * the retailer?s website. 1898 /// the retailer?s website.
1780 */
1781 core.String genericRedemptionCode; 1899 core.String genericRedemptionCode;
1782 /** The unique ID of the promotion. */ 1900
1901 /// The unique ID of the promotion.
1783 core.String id; 1902 core.String id;
1784 /** The full title of the promotion. */ 1903
1904 /// The full title of the promotion.
1785 core.String longTitle; 1905 core.String longTitle;
1786 /** 1906
1787 * Whether the promotion is applicable to all products or only specific 1907 /// Whether the promotion is applicable to all products or only specific
1788 * products. 1908 /// products.
1789 */
1790 core.String productApplicability; 1909 core.String productApplicability;
1791 /** Indicates that the promotion is valid online. */ 1910
1911 /// Indicates that the promotion is valid online.
1792 core.String redemptionChannel; 1912 core.String redemptionChannel;
1793 1913
1794 OrderPromotion(); 1914 OrderPromotion();
1795 1915
1796 OrderPromotion.fromJson(core.Map _json) { 1916 OrderPromotion.fromJson(core.Map _json) {
1797 if (_json.containsKey("benefits")) { 1917 if (_json.containsKey("benefits")) {
1798 benefits = _json["benefits"].map((value) => new OrderPromotionBenefit.from Json(value)).toList(); 1918 benefits = _json["benefits"]
1919 .map((value) => new OrderPromotionBenefit.fromJson(value))
1920 .toList();
1799 } 1921 }
1800 if (_json.containsKey("effectiveDates")) { 1922 if (_json.containsKey("effectiveDates")) {
1801 effectiveDates = _json["effectiveDates"]; 1923 effectiveDates = _json["effectiveDates"];
1802 } 1924 }
1803 if (_json.containsKey("genericRedemptionCode")) { 1925 if (_json.containsKey("genericRedemptionCode")) {
1804 genericRedemptionCode = _json["genericRedemptionCode"]; 1926 genericRedemptionCode = _json["genericRedemptionCode"];
1805 } 1927 }
1806 if (_json.containsKey("id")) { 1928 if (_json.containsKey("id")) {
1807 id = _json["id"]; 1929 id = _json["id"];
1808 } 1930 }
1809 if (_json.containsKey("longTitle")) { 1931 if (_json.containsKey("longTitle")) {
1810 longTitle = _json["longTitle"]; 1932 longTitle = _json["longTitle"];
1811 } 1933 }
1812 if (_json.containsKey("productApplicability")) { 1934 if (_json.containsKey("productApplicability")) {
1813 productApplicability = _json["productApplicability"]; 1935 productApplicability = _json["productApplicability"];
1814 } 1936 }
1815 if (_json.containsKey("redemptionChannel")) { 1937 if (_json.containsKey("redemptionChannel")) {
1816 redemptionChannel = _json["redemptionChannel"]; 1938 redemptionChannel = _json["redemptionChannel"];
1817 } 1939 }
1818 } 1940 }
1819 1941
1820 core.Map<core.String, core.Object> toJson() { 1942 core.Map<core.String, core.Object> toJson() {
1821 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1943 final core.Map<core.String, core.Object> _json =
1944 new core.Map<core.String, core.Object>();
1822 if (benefits != null) { 1945 if (benefits != null) {
1823 _json["benefits"] = benefits.map((value) => (value).toJson()).toList(); 1946 _json["benefits"] = benefits.map((value) => (value).toJson()).toList();
1824 } 1947 }
1825 if (effectiveDates != null) { 1948 if (effectiveDates != null) {
1826 _json["effectiveDates"] = effectiveDates; 1949 _json["effectiveDates"] = effectiveDates;
1827 } 1950 }
1828 if (genericRedemptionCode != null) { 1951 if (genericRedemptionCode != null) {
1829 _json["genericRedemptionCode"] = genericRedemptionCode; 1952 _json["genericRedemptionCode"] = genericRedemptionCode;
1830 } 1953 }
1831 if (id != null) { 1954 if (id != null) {
1832 _json["id"] = id; 1955 _json["id"] = id;
1833 } 1956 }
1834 if (longTitle != null) { 1957 if (longTitle != null) {
1835 _json["longTitle"] = longTitle; 1958 _json["longTitle"] = longTitle;
1836 } 1959 }
1837 if (productApplicability != null) { 1960 if (productApplicability != null) {
1838 _json["productApplicability"] = productApplicability; 1961 _json["productApplicability"] = productApplicability;
1839 } 1962 }
1840 if (redemptionChannel != null) { 1963 if (redemptionChannel != null) {
1841 _json["redemptionChannel"] = redemptionChannel; 1964 _json["redemptionChannel"] = redemptionChannel;
1842 } 1965 }
1843 return _json; 1966 return _json;
1844 } 1967 }
1845 } 1968 }
1846 1969
1847 class OrderPromotionBenefit { 1970 class OrderPromotionBenefit {
1848 /** The discount in the order price when the promotion is applied. */ 1971 /// The discount in the order price when the promotion is applied.
1849 Price discount; 1972 Price discount;
1850 /** 1973
1851 * The OfferId(s) that were purchased in this order and map to this specific 1974 /// The OfferId(s) that were purchased in this order and map to this specific
1852 * benefit of the promotion. 1975 /// benefit of the promotion.
1853 */
1854 core.List<core.String> offerIds; 1976 core.List<core.String> offerIds;
1855 /** 1977
1856 * Further describes the benefit of the promotion. Note that we will expand on 1978 /// Further describes the benefit of the promotion. Note that we will expand
1857 * this enumeration as we support new promotion sub-types. 1979 /// on this enumeration as we support new promotion sub-types.
1858 */
1859 core.String subType; 1980 core.String subType;
1860 /** The impact on tax when the promotion is applied. */ 1981
1982 /// The impact on tax when the promotion is applied.
1861 Price taxImpact; 1983 Price taxImpact;
1862 /** 1984
1863 * Describes whether the promotion applies to products (e.g. 20% off) or to 1985 /// Describes whether the promotion applies to products (e.g. 20% off) or to
1864 * shipping (e.g. Free Shipping). 1986 /// shipping (e.g. Free Shipping).
1865 */
1866 core.String type; 1987 core.String type;
1867 1988
1868 OrderPromotionBenefit(); 1989 OrderPromotionBenefit();
1869 1990
1870 OrderPromotionBenefit.fromJson(core.Map _json) { 1991 OrderPromotionBenefit.fromJson(core.Map _json) {
1871 if (_json.containsKey("discount")) { 1992 if (_json.containsKey("discount")) {
1872 discount = new Price.fromJson(_json["discount"]); 1993 discount = new Price.fromJson(_json["discount"]);
1873 } 1994 }
1874 if (_json.containsKey("offerIds")) { 1995 if (_json.containsKey("offerIds")) {
1875 offerIds = _json["offerIds"]; 1996 offerIds = _json["offerIds"];
1876 } 1997 }
1877 if (_json.containsKey("subType")) { 1998 if (_json.containsKey("subType")) {
1878 subType = _json["subType"]; 1999 subType = _json["subType"];
1879 } 2000 }
1880 if (_json.containsKey("taxImpact")) { 2001 if (_json.containsKey("taxImpact")) {
1881 taxImpact = new Price.fromJson(_json["taxImpact"]); 2002 taxImpact = new Price.fromJson(_json["taxImpact"]);
1882 } 2003 }
1883 if (_json.containsKey("type")) { 2004 if (_json.containsKey("type")) {
1884 type = _json["type"]; 2005 type = _json["type"];
1885 } 2006 }
1886 } 2007 }
1887 2008
1888 core.Map<core.String, core.Object> toJson() { 2009 core.Map<core.String, core.Object> toJson() {
1889 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2010 final core.Map<core.String, core.Object> _json =
2011 new core.Map<core.String, core.Object>();
1890 if (discount != null) { 2012 if (discount != null) {
1891 _json["discount"] = (discount).toJson(); 2013 _json["discount"] = (discount).toJson();
1892 } 2014 }
1893 if (offerIds != null) { 2015 if (offerIds != null) {
1894 _json["offerIds"] = offerIds; 2016 _json["offerIds"] = offerIds;
1895 } 2017 }
1896 if (subType != null) { 2018 if (subType != null) {
1897 _json["subType"] = subType; 2019 _json["subType"] = subType;
1898 } 2020 }
1899 if (taxImpact != null) { 2021 if (taxImpact != null) {
1900 _json["taxImpact"] = (taxImpact).toJson(); 2022 _json["taxImpact"] = (taxImpact).toJson();
1901 } 2023 }
1902 if (type != null) { 2024 if (type != null) {
1903 _json["type"] = type; 2025 _json["type"] = type;
1904 } 2026 }
1905 return _json; 2027 return _json;
1906 } 2028 }
1907 } 2029 }
1908 2030
1909 class OrderRefund { 2031 class OrderRefund {
1910 /** The actor that created the refund. */ 2032 /// The actor that created the refund.
1911 core.String actor; 2033 core.String actor;
1912 /** The amount that is refunded. */ 2034
2035 /// The amount that is refunded.
1913 Price amount; 2036 Price amount;
1914 /** Date on which the item has been created, in ISO 8601 format. */ 2037
2038 /// Date on which the item has been created, in ISO 8601 format.
1915 core.String creationDate; 2039 core.String creationDate;
1916 /** The reason for the refund. */ 2040
2041 /// The reason for the refund.
1917 core.String reason; 2042 core.String reason;
1918 /** The explanation of the reason. */ 2043
2044 /// The explanation of the reason.
1919 core.String reasonText; 2045 core.String reasonText;
1920 2046
1921 OrderRefund(); 2047 OrderRefund();
1922 2048
1923 OrderRefund.fromJson(core.Map _json) { 2049 OrderRefund.fromJson(core.Map _json) {
1924 if (_json.containsKey("actor")) { 2050 if (_json.containsKey("actor")) {
1925 actor = _json["actor"]; 2051 actor = _json["actor"];
1926 } 2052 }
1927 if (_json.containsKey("amount")) { 2053 if (_json.containsKey("amount")) {
1928 amount = new Price.fromJson(_json["amount"]); 2054 amount = new Price.fromJson(_json["amount"]);
1929 } 2055 }
1930 if (_json.containsKey("creationDate")) { 2056 if (_json.containsKey("creationDate")) {
1931 creationDate = _json["creationDate"]; 2057 creationDate = _json["creationDate"];
1932 } 2058 }
1933 if (_json.containsKey("reason")) { 2059 if (_json.containsKey("reason")) {
1934 reason = _json["reason"]; 2060 reason = _json["reason"];
1935 } 2061 }
1936 if (_json.containsKey("reasonText")) { 2062 if (_json.containsKey("reasonText")) {
1937 reasonText = _json["reasonText"]; 2063 reasonText = _json["reasonText"];
1938 } 2064 }
1939 } 2065 }
1940 2066
1941 core.Map<core.String, core.Object> toJson() { 2067 core.Map<core.String, core.Object> toJson() {
1942 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2068 final core.Map<core.String, core.Object> _json =
2069 new core.Map<core.String, core.Object>();
1943 if (actor != null) { 2070 if (actor != null) {
1944 _json["actor"] = actor; 2071 _json["actor"] = actor;
1945 } 2072 }
1946 if (amount != null) { 2073 if (amount != null) {
1947 _json["amount"] = (amount).toJson(); 2074 _json["amount"] = (amount).toJson();
1948 } 2075 }
1949 if (creationDate != null) { 2076 if (creationDate != null) {
1950 _json["creationDate"] = creationDate; 2077 _json["creationDate"] = creationDate;
1951 } 2078 }
1952 if (reason != null) { 2079 if (reason != null) {
1953 _json["reason"] = reason; 2080 _json["reason"] = reason;
1954 } 2081 }
1955 if (reasonText != null) { 2082 if (reasonText != null) {
1956 _json["reasonText"] = reasonText; 2083 _json["reasonText"] = reasonText;
1957 } 2084 }
1958 return _json; 2085 return _json;
1959 } 2086 }
1960 } 2087 }
1961 2088
1962 class OrderReturn { 2089 class OrderReturn {
1963 /** The actor that created the refund. */ 2090 /// The actor that created the refund.
1964 core.String actor; 2091 core.String actor;
1965 /** Date on which the item has been created, in ISO 8601 format. */ 2092
2093 /// Date on which the item has been created, in ISO 8601 format.
1966 core.String creationDate; 2094 core.String creationDate;
1967 /** Quantity that is returned. */ 2095
2096 /// Quantity that is returned.
1968 core.int quantity; 2097 core.int quantity;
1969 /** The reason for the return. */ 2098
2099 /// The reason for the return.
1970 core.String reason; 2100 core.String reason;
1971 /** The explanation of the reason. */ 2101
2102 /// The explanation of the reason.
1972 core.String reasonText; 2103 core.String reasonText;
1973 2104
1974 OrderReturn(); 2105 OrderReturn();
1975 2106
1976 OrderReturn.fromJson(core.Map _json) { 2107 OrderReturn.fromJson(core.Map _json) {
1977 if (_json.containsKey("actor")) { 2108 if (_json.containsKey("actor")) {
1978 actor = _json["actor"]; 2109 actor = _json["actor"];
1979 } 2110 }
1980 if (_json.containsKey("creationDate")) { 2111 if (_json.containsKey("creationDate")) {
1981 creationDate = _json["creationDate"]; 2112 creationDate = _json["creationDate"];
1982 } 2113 }
1983 if (_json.containsKey("quantity")) { 2114 if (_json.containsKey("quantity")) {
1984 quantity = _json["quantity"]; 2115 quantity = _json["quantity"];
1985 } 2116 }
1986 if (_json.containsKey("reason")) { 2117 if (_json.containsKey("reason")) {
1987 reason = _json["reason"]; 2118 reason = _json["reason"];
1988 } 2119 }
1989 if (_json.containsKey("reasonText")) { 2120 if (_json.containsKey("reasonText")) {
1990 reasonText = _json["reasonText"]; 2121 reasonText = _json["reasonText"];
1991 } 2122 }
1992 } 2123 }
1993 2124
1994 core.Map<core.String, core.Object> toJson() { 2125 core.Map<core.String, core.Object> toJson() {
1995 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2126 final core.Map<core.String, core.Object> _json =
2127 new core.Map<core.String, core.Object>();
1996 if (actor != null) { 2128 if (actor != null) {
1997 _json["actor"] = actor; 2129 _json["actor"] = actor;
1998 } 2130 }
1999 if (creationDate != null) { 2131 if (creationDate != null) {
2000 _json["creationDate"] = creationDate; 2132 _json["creationDate"] = creationDate;
2001 } 2133 }
2002 if (quantity != null) { 2134 if (quantity != null) {
2003 _json["quantity"] = quantity; 2135 _json["quantity"] = quantity;
2004 } 2136 }
2005 if (reason != null) { 2137 if (reason != null) {
2006 _json["reason"] = reason; 2138 _json["reason"] = reason;
2007 } 2139 }
2008 if (reasonText != null) { 2140 if (reasonText != null) {
2009 _json["reasonText"] = reasonText; 2141 _json["reasonText"] = reasonText;
2010 } 2142 }
2011 return _json; 2143 return _json;
2012 } 2144 }
2013 } 2145 }
2014 2146
2015 class OrderShipment { 2147 class OrderShipment {
2016 /** The carrier handling the shipment. */ 2148 /// The carrier handling the shipment.
2017 core.String carrier; 2149 core.String carrier;
2018 /** Date on which the shipment has been created, in ISO 8601 format. */ 2150
2151 /// Date on which the shipment has been created, in ISO 8601 format.
2019 core.String creationDate; 2152 core.String creationDate;
2020 /** 2153
2021 * Date on which the shipment has been delivered, in ISO 8601 format. Present 2154 /// Date on which the shipment has been delivered, in ISO 8601 format.
2022 * only if status is delievered 2155 /// Present only if status is delievered
2023 */
2024 core.String deliveryDate; 2156 core.String deliveryDate;
2025 /** The id of the shipment. */ 2157
2158 /// The id of the shipment.
2026 core.String id; 2159 core.String id;
2027 /** The line items that are shipped. */ 2160
2161 /// The line items that are shipped.
2028 core.List<OrderShipmentLineItemShipment> lineItems; 2162 core.List<OrderShipmentLineItemShipment> lineItems;
2029 /** The status of the shipment. */ 2163
2164 /// The status of the shipment.
2030 core.String status; 2165 core.String status;
2031 /** The tracking id for the shipment. */ 2166
2167 /// The tracking id for the shipment.
2032 core.String trackingId; 2168 core.String trackingId;
2033 2169
2034 OrderShipment(); 2170 OrderShipment();
2035 2171
2036 OrderShipment.fromJson(core.Map _json) { 2172 OrderShipment.fromJson(core.Map _json) {
2037 if (_json.containsKey("carrier")) { 2173 if (_json.containsKey("carrier")) {
2038 carrier = _json["carrier"]; 2174 carrier = _json["carrier"];
2039 } 2175 }
2040 if (_json.containsKey("creationDate")) { 2176 if (_json.containsKey("creationDate")) {
2041 creationDate = _json["creationDate"]; 2177 creationDate = _json["creationDate"];
2042 } 2178 }
2043 if (_json.containsKey("deliveryDate")) { 2179 if (_json.containsKey("deliveryDate")) {
2044 deliveryDate = _json["deliveryDate"]; 2180 deliveryDate = _json["deliveryDate"];
2045 } 2181 }
2046 if (_json.containsKey("id")) { 2182 if (_json.containsKey("id")) {
2047 id = _json["id"]; 2183 id = _json["id"];
2048 } 2184 }
2049 if (_json.containsKey("lineItems")) { 2185 if (_json.containsKey("lineItems")) {
2050 lineItems = _json["lineItems"].map((value) => new OrderShipmentLineItemShi pment.fromJson(value)).toList(); 2186 lineItems = _json["lineItems"]
2187 .map((value) => new OrderShipmentLineItemShipment.fromJson(value))
2188 .toList();
2051 } 2189 }
2052 if (_json.containsKey("status")) { 2190 if (_json.containsKey("status")) {
2053 status = _json["status"]; 2191 status = _json["status"];
2054 } 2192 }
2055 if (_json.containsKey("trackingId")) { 2193 if (_json.containsKey("trackingId")) {
2056 trackingId = _json["trackingId"]; 2194 trackingId = _json["trackingId"];
2057 } 2195 }
2058 } 2196 }
2059 2197
2060 core.Map<core.String, core.Object> toJson() { 2198 core.Map<core.String, core.Object> toJson() {
2061 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2199 final core.Map<core.String, core.Object> _json =
2200 new core.Map<core.String, core.Object>();
2062 if (carrier != null) { 2201 if (carrier != null) {
2063 _json["carrier"] = carrier; 2202 _json["carrier"] = carrier;
2064 } 2203 }
2065 if (creationDate != null) { 2204 if (creationDate != null) {
2066 _json["creationDate"] = creationDate; 2205 _json["creationDate"] = creationDate;
2067 } 2206 }
2068 if (deliveryDate != null) { 2207 if (deliveryDate != null) {
2069 _json["deliveryDate"] = deliveryDate; 2208 _json["deliveryDate"] = deliveryDate;
2070 } 2209 }
2071 if (id != null) { 2210 if (id != null) {
2072 _json["id"] = id; 2211 _json["id"] = id;
2073 } 2212 }
2074 if (lineItems != null) { 2213 if (lineItems != null) {
2075 _json["lineItems"] = lineItems.map((value) => (value).toJson()).toList(); 2214 _json["lineItems"] = lineItems.map((value) => (value).toJson()).toList();
2076 } 2215 }
2077 if (status != null) { 2216 if (status != null) {
2078 _json["status"] = status; 2217 _json["status"] = status;
2079 } 2218 }
2080 if (trackingId != null) { 2219 if (trackingId != null) {
2081 _json["trackingId"] = trackingId; 2220 _json["trackingId"] = trackingId;
2082 } 2221 }
2083 return _json; 2222 return _json;
2084 } 2223 }
2085 } 2224 }
2086 2225
2087 class OrderShipmentLineItemShipment { 2226 class OrderShipmentLineItemShipment {
2088 /** The id of the line item that is shipped. */ 2227 /// The id of the line item that is shipped.
2089 core.String lineItemId; 2228 core.String lineItemId;
2090 /** The quantity that is shipped. */ 2229
2230 /// The quantity that is shipped.
2091 core.int quantity; 2231 core.int quantity;
2092 2232
2093 OrderShipmentLineItemShipment(); 2233 OrderShipmentLineItemShipment();
2094 2234
2095 OrderShipmentLineItemShipment.fromJson(core.Map _json) { 2235 OrderShipmentLineItemShipment.fromJson(core.Map _json) {
2096 if (_json.containsKey("lineItemId")) { 2236 if (_json.containsKey("lineItemId")) {
2097 lineItemId = _json["lineItemId"]; 2237 lineItemId = _json["lineItemId"];
2098 } 2238 }
2099 if (_json.containsKey("quantity")) { 2239 if (_json.containsKey("quantity")) {
2100 quantity = _json["quantity"]; 2240 quantity = _json["quantity"];
2101 } 2241 }
2102 } 2242 }
2103 2243
2104 core.Map<core.String, core.Object> toJson() { 2244 core.Map<core.String, core.Object> toJson() {
2105 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2245 final core.Map<core.String, core.Object> _json =
2246 new core.Map<core.String, core.Object>();
2106 if (lineItemId != null) { 2247 if (lineItemId != null) {
2107 _json["lineItemId"] = lineItemId; 2248 _json["lineItemId"] = lineItemId;
2108 } 2249 }
2109 if (quantity != null) { 2250 if (quantity != null) {
2110 _json["quantity"] = quantity; 2251 _json["quantity"] = quantity;
2111 } 2252 }
2112 return _json; 2253 return _json;
2113 } 2254 }
2114 } 2255 }
2115 2256
2116 class OrdersAcknowledgeRequest { 2257 class OrdersAcknowledgeRequest {
2117 /** 2258 /// The ID of the operation. Unique across all operations for a given order.
2118 * The ID of the operation. Unique across all operations for a given order.
2119 */
2120 core.String operationId; 2259 core.String operationId;
2121 2260
2122 OrdersAcknowledgeRequest(); 2261 OrdersAcknowledgeRequest();
2123 2262
2124 OrdersAcknowledgeRequest.fromJson(core.Map _json) { 2263 OrdersAcknowledgeRequest.fromJson(core.Map _json) {
2125 if (_json.containsKey("operationId")) { 2264 if (_json.containsKey("operationId")) {
2126 operationId = _json["operationId"]; 2265 operationId = _json["operationId"];
2127 } 2266 }
2128 } 2267 }
2129 2268
2130 core.Map<core.String, core.Object> toJson() { 2269 core.Map<core.String, core.Object> toJson() {
2131 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2270 final core.Map<core.String, core.Object> _json =
2271 new core.Map<core.String, core.Object>();
2132 if (operationId != null) { 2272 if (operationId != null) {
2133 _json["operationId"] = operationId; 2273 _json["operationId"] = operationId;
2134 } 2274 }
2135 return _json; 2275 return _json;
2136 } 2276 }
2137 } 2277 }
2138 2278
2139 class OrdersAcknowledgeResponse { 2279 class OrdersAcknowledgeResponse {
2140 /** The status of the execution. */ 2280 /// The status of the execution.
2141 core.String executionStatus; 2281 core.String executionStatus;
2142 /** 2282
2143 * Identifies what kind of resource this is. Value: the fixed string 2283 /// Identifies what kind of resource this is. Value: the fixed string
2144 * "content#ordersAcknowledgeResponse". 2284 /// "content#ordersAcknowledgeResponse".
2145 */
2146 core.String kind; 2285 core.String kind;
2147 2286
2148 OrdersAcknowledgeResponse(); 2287 OrdersAcknowledgeResponse();
2149 2288
2150 OrdersAcknowledgeResponse.fromJson(core.Map _json) { 2289 OrdersAcknowledgeResponse.fromJson(core.Map _json) {
2151 if (_json.containsKey("executionStatus")) { 2290 if (_json.containsKey("executionStatus")) {
2152 executionStatus = _json["executionStatus"]; 2291 executionStatus = _json["executionStatus"];
2153 } 2292 }
2154 if (_json.containsKey("kind")) { 2293 if (_json.containsKey("kind")) {
2155 kind = _json["kind"]; 2294 kind = _json["kind"];
2156 } 2295 }
2157 } 2296 }
2158 2297
2159 core.Map<core.String, core.Object> toJson() { 2298 core.Map<core.String, core.Object> toJson() {
2160 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2299 final core.Map<core.String, core.Object> _json =
2300 new core.Map<core.String, core.Object>();
2161 if (executionStatus != null) { 2301 if (executionStatus != null) {
2162 _json["executionStatus"] = executionStatus; 2302 _json["executionStatus"] = executionStatus;
2163 } 2303 }
2164 if (kind != null) { 2304 if (kind != null) {
2165 _json["kind"] = kind; 2305 _json["kind"] = kind;
2166 } 2306 }
2167 return _json; 2307 return _json;
2168 } 2308 }
2169 } 2309 }
2170 2310
2171 class OrdersAdvanceTestOrderResponse { 2311 class OrdersAdvanceTestOrderResponse {
2172 /** 2312 /// Identifies what kind of resource this is. Value: the fixed string
2173 * Identifies what kind of resource this is. Value: the fixed string 2313 /// "content#ordersAdvanceTestOrderResponse".
2174 * "content#ordersAdvanceTestOrderResponse".
2175 */
2176 core.String kind; 2314 core.String kind;
2177 2315
2178 OrdersAdvanceTestOrderResponse(); 2316 OrdersAdvanceTestOrderResponse();
2179 2317
2180 OrdersAdvanceTestOrderResponse.fromJson(core.Map _json) { 2318 OrdersAdvanceTestOrderResponse.fromJson(core.Map _json) {
2181 if (_json.containsKey("kind")) { 2319 if (_json.containsKey("kind")) {
2182 kind = _json["kind"]; 2320 kind = _json["kind"];
2183 } 2321 }
2184 } 2322 }
2185 2323
2186 core.Map<core.String, core.Object> toJson() { 2324 core.Map<core.String, core.Object> toJson() {
2187 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2325 final core.Map<core.String, core.Object> _json =
2326 new core.Map<core.String, core.Object>();
2188 if (kind != null) { 2327 if (kind != null) {
2189 _json["kind"] = kind; 2328 _json["kind"] = kind;
2190 } 2329 }
2191 return _json; 2330 return _json;
2192 } 2331 }
2193 } 2332 }
2194 2333
2195 class OrdersCancelLineItemRequest { 2334 class OrdersCancelLineItemRequest {
2196 /** 2335 /// Amount to refund for the cancelation. Optional. If not set, Google will
2197 * Amount to refund for the cancelation. Optional. If not set, Google will 2336 /// calculate the default based on the price and tax of the items involved.
2198 * calculate the default based on the price and tax of the items involved. The 2337 /// The amount must not be larger than the net amount left on the order.
2199 * amount must not be larger than the net amount left on the order.
2200 */
2201 Price amount; 2338 Price amount;
2202 /** The ID of the line item to cancel. */ 2339
2340 /// The ID of the line item to cancel.
2203 core.String lineItemId; 2341 core.String lineItemId;
2204 /** 2342
2205 * The ID of the operation. Unique across all operations for a given order. 2343 /// The ID of the operation. Unique across all operations for a given order.
2206 */
2207 core.String operationId; 2344 core.String operationId;
2208 /** The quantity to cancel. */ 2345
2346 /// The quantity to cancel.
2209 core.int quantity; 2347 core.int quantity;
2210 /** The reason for the cancellation. */ 2348
2349 /// The reason for the cancellation.
2211 core.String reason; 2350 core.String reason;
2212 /** The explanation of the reason. */ 2351
2352 /// The explanation of the reason.
2213 core.String reasonText; 2353 core.String reasonText;
2214 2354
2215 OrdersCancelLineItemRequest(); 2355 OrdersCancelLineItemRequest();
2216 2356
2217 OrdersCancelLineItemRequest.fromJson(core.Map _json) { 2357 OrdersCancelLineItemRequest.fromJson(core.Map _json) {
2218 if (_json.containsKey("amount")) { 2358 if (_json.containsKey("amount")) {
2219 amount = new Price.fromJson(_json["amount"]); 2359 amount = new Price.fromJson(_json["amount"]);
2220 } 2360 }
2221 if (_json.containsKey("lineItemId")) { 2361 if (_json.containsKey("lineItemId")) {
2222 lineItemId = _json["lineItemId"]; 2362 lineItemId = _json["lineItemId"];
2223 } 2363 }
2224 if (_json.containsKey("operationId")) { 2364 if (_json.containsKey("operationId")) {
2225 operationId = _json["operationId"]; 2365 operationId = _json["operationId"];
2226 } 2366 }
2227 if (_json.containsKey("quantity")) { 2367 if (_json.containsKey("quantity")) {
2228 quantity = _json["quantity"]; 2368 quantity = _json["quantity"];
2229 } 2369 }
2230 if (_json.containsKey("reason")) { 2370 if (_json.containsKey("reason")) {
2231 reason = _json["reason"]; 2371 reason = _json["reason"];
2232 } 2372 }
2233 if (_json.containsKey("reasonText")) { 2373 if (_json.containsKey("reasonText")) {
2234 reasonText = _json["reasonText"]; 2374 reasonText = _json["reasonText"];
2235 } 2375 }
2236 } 2376 }
2237 2377
2238 core.Map<core.String, core.Object> toJson() { 2378 core.Map<core.String, core.Object> toJson() {
2239 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2379 final core.Map<core.String, core.Object> _json =
2380 new core.Map<core.String, core.Object>();
2240 if (amount != null) { 2381 if (amount != null) {
2241 _json["amount"] = (amount).toJson(); 2382 _json["amount"] = (amount).toJson();
2242 } 2383 }
2243 if (lineItemId != null) { 2384 if (lineItemId != null) {
2244 _json["lineItemId"] = lineItemId; 2385 _json["lineItemId"] = lineItemId;
2245 } 2386 }
2246 if (operationId != null) { 2387 if (operationId != null) {
2247 _json["operationId"] = operationId; 2388 _json["operationId"] = operationId;
2248 } 2389 }
2249 if (quantity != null) { 2390 if (quantity != null) {
2250 _json["quantity"] = quantity; 2391 _json["quantity"] = quantity;
2251 } 2392 }
2252 if (reason != null) { 2393 if (reason != null) {
2253 _json["reason"] = reason; 2394 _json["reason"] = reason;
2254 } 2395 }
2255 if (reasonText != null) { 2396 if (reasonText != null) {
2256 _json["reasonText"] = reasonText; 2397 _json["reasonText"] = reasonText;
2257 } 2398 }
2258 return _json; 2399 return _json;
2259 } 2400 }
2260 } 2401 }
2261 2402
2262 class OrdersCancelLineItemResponse { 2403 class OrdersCancelLineItemResponse {
2263 /** The status of the execution. */ 2404 /// The status of the execution.
2264 core.String executionStatus; 2405 core.String executionStatus;
2265 /** 2406
2266 * Identifies what kind of resource this is. Value: the fixed string 2407 /// Identifies what kind of resource this is. Value: the fixed string
2267 * "content#ordersCancelLineItemResponse". 2408 /// "content#ordersCancelLineItemResponse".
2268 */
2269 core.String kind; 2409 core.String kind;
2270 2410
2271 OrdersCancelLineItemResponse(); 2411 OrdersCancelLineItemResponse();
2272 2412
2273 OrdersCancelLineItemResponse.fromJson(core.Map _json) { 2413 OrdersCancelLineItemResponse.fromJson(core.Map _json) {
2274 if (_json.containsKey("executionStatus")) { 2414 if (_json.containsKey("executionStatus")) {
2275 executionStatus = _json["executionStatus"]; 2415 executionStatus = _json["executionStatus"];
2276 } 2416 }
2277 if (_json.containsKey("kind")) { 2417 if (_json.containsKey("kind")) {
2278 kind = _json["kind"]; 2418 kind = _json["kind"];
2279 } 2419 }
2280 } 2420 }
2281 2421
2282 core.Map<core.String, core.Object> toJson() { 2422 core.Map<core.String, core.Object> toJson() {
2283 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2423 final core.Map<core.String, core.Object> _json =
2424 new core.Map<core.String, core.Object>();
2284 if (executionStatus != null) { 2425 if (executionStatus != null) {
2285 _json["executionStatus"] = executionStatus; 2426 _json["executionStatus"] = executionStatus;
2286 } 2427 }
2287 if (kind != null) { 2428 if (kind != null) {
2288 _json["kind"] = kind; 2429 _json["kind"] = kind;
2289 } 2430 }
2290 return _json; 2431 return _json;
2291 } 2432 }
2292 } 2433 }
2293 2434
2294 class OrdersCancelRequest { 2435 class OrdersCancelRequest {
2295 /** 2436 /// The ID of the operation. Unique across all operations for a given order.
2296 * The ID of the operation. Unique across all operations for a given order.
2297 */
2298 core.String operationId; 2437 core.String operationId;
2299 /** The reason for the cancellation. */ 2438
2439 /// The reason for the cancellation.
2300 core.String reason; 2440 core.String reason;
2301 /** The explanation of the reason. */ 2441
2442 /// The explanation of the reason.
2302 core.String reasonText; 2443 core.String reasonText;
2303 2444
2304 OrdersCancelRequest(); 2445 OrdersCancelRequest();
2305 2446
2306 OrdersCancelRequest.fromJson(core.Map _json) { 2447 OrdersCancelRequest.fromJson(core.Map _json) {
2307 if (_json.containsKey("operationId")) { 2448 if (_json.containsKey("operationId")) {
2308 operationId = _json["operationId"]; 2449 operationId = _json["operationId"];
2309 } 2450 }
2310 if (_json.containsKey("reason")) { 2451 if (_json.containsKey("reason")) {
2311 reason = _json["reason"]; 2452 reason = _json["reason"];
2312 } 2453 }
2313 if (_json.containsKey("reasonText")) { 2454 if (_json.containsKey("reasonText")) {
2314 reasonText = _json["reasonText"]; 2455 reasonText = _json["reasonText"];
2315 } 2456 }
2316 } 2457 }
2317 2458
2318 core.Map<core.String, core.Object> toJson() { 2459 core.Map<core.String, core.Object> toJson() {
2319 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2460 final core.Map<core.String, core.Object> _json =
2461 new core.Map<core.String, core.Object>();
2320 if (operationId != null) { 2462 if (operationId != null) {
2321 _json["operationId"] = operationId; 2463 _json["operationId"] = operationId;
2322 } 2464 }
2323 if (reason != null) { 2465 if (reason != null) {
2324 _json["reason"] = reason; 2466 _json["reason"] = reason;
2325 } 2467 }
2326 if (reasonText != null) { 2468 if (reasonText != null) {
2327 _json["reasonText"] = reasonText; 2469 _json["reasonText"] = reasonText;
2328 } 2470 }
2329 return _json; 2471 return _json;
2330 } 2472 }
2331 } 2473 }
2332 2474
2333 class OrdersCancelResponse { 2475 class OrdersCancelResponse {
2334 /** The status of the execution. */ 2476 /// The status of the execution.
2335 core.String executionStatus; 2477 core.String executionStatus;
2336 /** 2478
2337 * Identifies what kind of resource this is. Value: the fixed string 2479 /// Identifies what kind of resource this is. Value: the fixed string
2338 * "content#ordersCancelResponse". 2480 /// "content#ordersCancelResponse".
2339 */
2340 core.String kind; 2481 core.String kind;
2341 2482
2342 OrdersCancelResponse(); 2483 OrdersCancelResponse();
2343 2484
2344 OrdersCancelResponse.fromJson(core.Map _json) { 2485 OrdersCancelResponse.fromJson(core.Map _json) {
2345 if (_json.containsKey("executionStatus")) { 2486 if (_json.containsKey("executionStatus")) {
2346 executionStatus = _json["executionStatus"]; 2487 executionStatus = _json["executionStatus"];
2347 } 2488 }
2348 if (_json.containsKey("kind")) { 2489 if (_json.containsKey("kind")) {
2349 kind = _json["kind"]; 2490 kind = _json["kind"];
2350 } 2491 }
2351 } 2492 }
2352 2493
2353 core.Map<core.String, core.Object> toJson() { 2494 core.Map<core.String, core.Object> toJson() {
2354 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2495 final core.Map<core.String, core.Object> _json =
2496 new core.Map<core.String, core.Object>();
2355 if (executionStatus != null) { 2497 if (executionStatus != null) {
2356 _json["executionStatus"] = executionStatus; 2498 _json["executionStatus"] = executionStatus;
2357 } 2499 }
2358 if (kind != null) { 2500 if (kind != null) {
2359 _json["kind"] = kind; 2501 _json["kind"] = kind;
2360 } 2502 }
2361 return _json; 2503 return _json;
2362 } 2504 }
2363 } 2505 }
2364 2506
2365 class OrdersCreateTestOrderRequest { 2507 class OrdersCreateTestOrderRequest {
2366 /** 2508 /// The test order template to use. Specify as an alternative to testOrder as
2367 * The test order template to use. Specify as an alternative to testOrder as a 2509 /// a shortcut for retrieving a template and then creating an order using
2368 * shortcut for retrieving a template and then creating an order using that 2510 /// that template.
2369 * template.
2370 */
2371 core.String templateName; 2511 core.String templateName;
2372 /** The test order to create. */ 2512
2513 /// The test order to create.
2373 TestOrder testOrder; 2514 TestOrder testOrder;
2374 2515
2375 OrdersCreateTestOrderRequest(); 2516 OrdersCreateTestOrderRequest();
2376 2517
2377 OrdersCreateTestOrderRequest.fromJson(core.Map _json) { 2518 OrdersCreateTestOrderRequest.fromJson(core.Map _json) {
2378 if (_json.containsKey("templateName")) { 2519 if (_json.containsKey("templateName")) {
2379 templateName = _json["templateName"]; 2520 templateName = _json["templateName"];
2380 } 2521 }
2381 if (_json.containsKey("testOrder")) { 2522 if (_json.containsKey("testOrder")) {
2382 testOrder = new TestOrder.fromJson(_json["testOrder"]); 2523 testOrder = new TestOrder.fromJson(_json["testOrder"]);
2383 } 2524 }
2384 } 2525 }
2385 2526
2386 core.Map<core.String, core.Object> toJson() { 2527 core.Map<core.String, core.Object> toJson() {
2387 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2528 final core.Map<core.String, core.Object> _json =
2529 new core.Map<core.String, core.Object>();
2388 if (templateName != null) { 2530 if (templateName != null) {
2389 _json["templateName"] = templateName; 2531 _json["templateName"] = templateName;
2390 } 2532 }
2391 if (testOrder != null) { 2533 if (testOrder != null) {
2392 _json["testOrder"] = (testOrder).toJson(); 2534 _json["testOrder"] = (testOrder).toJson();
2393 } 2535 }
2394 return _json; 2536 return _json;
2395 } 2537 }
2396 } 2538 }
2397 2539
2398 class OrdersCreateTestOrderResponse { 2540 class OrdersCreateTestOrderResponse {
2399 /** 2541 /// Identifies what kind of resource this is. Value: the fixed string
2400 * Identifies what kind of resource this is. Value: the fixed string 2542 /// "content#ordersCreateTestOrderResponse".
2401 * "content#ordersCreateTestOrderResponse".
2402 */
2403 core.String kind; 2543 core.String kind;
2404 /** The ID of the newly created test order. */ 2544
2545 /// The ID of the newly created test order.
2405 core.String orderId; 2546 core.String orderId;
2406 2547
2407 OrdersCreateTestOrderResponse(); 2548 OrdersCreateTestOrderResponse();
2408 2549
2409 OrdersCreateTestOrderResponse.fromJson(core.Map _json) { 2550 OrdersCreateTestOrderResponse.fromJson(core.Map _json) {
2410 if (_json.containsKey("kind")) { 2551 if (_json.containsKey("kind")) {
2411 kind = _json["kind"]; 2552 kind = _json["kind"];
2412 } 2553 }
2413 if (_json.containsKey("orderId")) { 2554 if (_json.containsKey("orderId")) {
2414 orderId = _json["orderId"]; 2555 orderId = _json["orderId"];
2415 } 2556 }
2416 } 2557 }
2417 2558
2418 core.Map<core.String, core.Object> toJson() { 2559 core.Map<core.String, core.Object> toJson() {
2419 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2560 final core.Map<core.String, core.Object> _json =
2561 new core.Map<core.String, core.Object>();
2420 if (kind != null) { 2562 if (kind != null) {
2421 _json["kind"] = kind; 2563 _json["kind"] = kind;
2422 } 2564 }
2423 if (orderId != null) { 2565 if (orderId != null) {
2424 _json["orderId"] = orderId; 2566 _json["orderId"] = orderId;
2425 } 2567 }
2426 return _json; 2568 return _json;
2427 } 2569 }
2428 } 2570 }
2429 2571
2430 class OrdersCustomBatchRequest { 2572 class OrdersCustomBatchRequest {
2431 /** The request entries to be processed in the batch. */ 2573 /// The request entries to be processed in the batch.
2432 core.List<OrdersCustomBatchRequestEntry> entries; 2574 core.List<OrdersCustomBatchRequestEntry> entries;
2433 2575
2434 OrdersCustomBatchRequest(); 2576 OrdersCustomBatchRequest();
2435 2577
2436 OrdersCustomBatchRequest.fromJson(core.Map _json) { 2578 OrdersCustomBatchRequest.fromJson(core.Map _json) {
2437 if (_json.containsKey("entries")) { 2579 if (_json.containsKey("entries")) {
2438 entries = _json["entries"].map((value) => new OrdersCustomBatchRequestEntr y.fromJson(value)).toList(); 2580 entries = _json["entries"]
2581 .map((value) => new OrdersCustomBatchRequestEntry.fromJson(value))
2582 .toList();
2439 } 2583 }
2440 } 2584 }
2441 2585
2442 core.Map<core.String, core.Object> toJson() { 2586 core.Map<core.String, core.Object> toJson() {
2443 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2587 final core.Map<core.String, core.Object> _json =
2588 new core.Map<core.String, core.Object>();
2444 if (entries != null) { 2589 if (entries != null) {
2445 _json["entries"] = entries.map((value) => (value).toJson()).toList(); 2590 _json["entries"] = entries.map((value) => (value).toJson()).toList();
2446 } 2591 }
2447 return _json; 2592 return _json;
2448 } 2593 }
2449 } 2594 }
2450 2595
2451 class OrdersCustomBatchRequestEntry { 2596 class OrdersCustomBatchRequestEntry {
2452 /** An entry ID, unique within the batch request. */ 2597 /// An entry ID, unique within the batch request.
2453 core.int batchId; 2598 core.int batchId;
2454 /** Required for cancel method. */ 2599
2600 /// Required for cancel method.
2455 OrdersCustomBatchRequestEntryCancel cancel; 2601 OrdersCustomBatchRequestEntryCancel cancel;
2456 /** Required for cancelLineItem method. */ 2602
2603 /// Required for cancelLineItem method.
2457 OrdersCustomBatchRequestEntryCancelLineItem cancelLineItem; 2604 OrdersCustomBatchRequestEntryCancelLineItem cancelLineItem;
2458 /** The ID of the managing account. */ 2605
2606 /// The ID of the managing account.
2459 core.String merchantId; 2607 core.String merchantId;
2460 /** 2608
2461 * The merchant order id. Required for updateMerchantOrderId and 2609 /// The merchant order id. Required for updateMerchantOrderId and
2462 * getByMerchantOrderId methods. 2610 /// getByMerchantOrderId methods.
2463 */
2464 core.String merchantOrderId; 2611 core.String merchantOrderId;
2465 /** The method to apply. */ 2612
2613 /// The method to apply.
2466 core.String method; 2614 core.String method;
2467 /** 2615
2468 * The ID of the operation. Unique across all operations for a given order. 2616 /// The ID of the operation. Unique across all operations for a given order.
2469 * Required for all methods beside get and getByMerchantOrderId. 2617 /// Required for all methods beside get and getByMerchantOrderId.
2470 */
2471 core.String operationId; 2618 core.String operationId;
2472 /** 2619
2473 * The ID of the order. Required for all methods beside getByMerchantOrderId. 2620 /// The ID of the order. Required for all methods beside
2474 */ 2621 /// getByMerchantOrderId.
2475 core.String orderId; 2622 core.String orderId;
2476 /** Required for refund method. */ 2623
2624 /// Required for refund method.
2477 OrdersCustomBatchRequestEntryRefund refund; 2625 OrdersCustomBatchRequestEntryRefund refund;
2478 /** Required for returnLineItem method. */ 2626
2627 /// Required for returnLineItem method.
2479 OrdersCustomBatchRequestEntryReturnLineItem returnLineItem; 2628 OrdersCustomBatchRequestEntryReturnLineItem returnLineItem;
2480 /** Required for shipLineItems method. */ 2629
2630 /// Required for shipLineItems method.
2481 OrdersCustomBatchRequestEntryShipLineItems shipLineItems; 2631 OrdersCustomBatchRequestEntryShipLineItems shipLineItems;
2482 /** Required for updateShipment method. */ 2632
2633 /// Required for updateShipment method.
2483 OrdersCustomBatchRequestEntryUpdateShipment updateShipment; 2634 OrdersCustomBatchRequestEntryUpdateShipment updateShipment;
2484 2635
2485 OrdersCustomBatchRequestEntry(); 2636 OrdersCustomBatchRequestEntry();
2486 2637
2487 OrdersCustomBatchRequestEntry.fromJson(core.Map _json) { 2638 OrdersCustomBatchRequestEntry.fromJson(core.Map _json) {
2488 if (_json.containsKey("batchId")) { 2639 if (_json.containsKey("batchId")) {
2489 batchId = _json["batchId"]; 2640 batchId = _json["batchId"];
2490 } 2641 }
2491 if (_json.containsKey("cancel")) { 2642 if (_json.containsKey("cancel")) {
2492 cancel = new OrdersCustomBatchRequestEntryCancel.fromJson(_json["cancel"]) ; 2643 cancel =
2644 new OrdersCustomBatchRequestEntryCancel.fromJson(_json["cancel"]);
2493 } 2645 }
2494 if (_json.containsKey("cancelLineItem")) { 2646 if (_json.containsKey("cancelLineItem")) {
2495 cancelLineItem = new OrdersCustomBatchRequestEntryCancelLineItem.fromJson( _json["cancelLineItem"]); 2647 cancelLineItem = new OrdersCustomBatchRequestEntryCancelLineItem.fromJson(
2648 _json["cancelLineItem"]);
2496 } 2649 }
2497 if (_json.containsKey("merchantId")) { 2650 if (_json.containsKey("merchantId")) {
2498 merchantId = _json["merchantId"]; 2651 merchantId = _json["merchantId"];
2499 } 2652 }
2500 if (_json.containsKey("merchantOrderId")) { 2653 if (_json.containsKey("merchantOrderId")) {
2501 merchantOrderId = _json["merchantOrderId"]; 2654 merchantOrderId = _json["merchantOrderId"];
2502 } 2655 }
2503 if (_json.containsKey("method")) { 2656 if (_json.containsKey("method")) {
2504 method = _json["method"]; 2657 method = _json["method"];
2505 } 2658 }
2506 if (_json.containsKey("operationId")) { 2659 if (_json.containsKey("operationId")) {
2507 operationId = _json["operationId"]; 2660 operationId = _json["operationId"];
2508 } 2661 }
2509 if (_json.containsKey("orderId")) { 2662 if (_json.containsKey("orderId")) {
2510 orderId = _json["orderId"]; 2663 orderId = _json["orderId"];
2511 } 2664 }
2512 if (_json.containsKey("refund")) { 2665 if (_json.containsKey("refund")) {
2513 refund = new OrdersCustomBatchRequestEntryRefund.fromJson(_json["refund"]) ; 2666 refund =
2667 new OrdersCustomBatchRequestEntryRefund.fromJson(_json["refund"]);
2514 } 2668 }
2515 if (_json.containsKey("returnLineItem")) { 2669 if (_json.containsKey("returnLineItem")) {
2516 returnLineItem = new OrdersCustomBatchRequestEntryReturnLineItem.fromJson( _json["returnLineItem"]); 2670 returnLineItem = new OrdersCustomBatchRequestEntryReturnLineItem.fromJson(
2671 _json["returnLineItem"]);
2517 } 2672 }
2518 if (_json.containsKey("shipLineItems")) { 2673 if (_json.containsKey("shipLineItems")) {
2519 shipLineItems = new OrdersCustomBatchRequestEntryShipLineItems.fromJson(_j son["shipLineItems"]); 2674 shipLineItems = new OrdersCustomBatchRequestEntryShipLineItems.fromJson(
2675 _json["shipLineItems"]);
2520 } 2676 }
2521 if (_json.containsKey("updateShipment")) { 2677 if (_json.containsKey("updateShipment")) {
2522 updateShipment = new OrdersCustomBatchRequestEntryUpdateShipment.fromJson( _json["updateShipment"]); 2678 updateShipment = new OrdersCustomBatchRequestEntryUpdateShipment.fromJson(
2679 _json["updateShipment"]);
2523 } 2680 }
2524 } 2681 }
2525 2682
2526 core.Map<core.String, core.Object> toJson() { 2683 core.Map<core.String, core.Object> toJson() {
2527 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2684 final core.Map<core.String, core.Object> _json =
2685 new core.Map<core.String, core.Object>();
2528 if (batchId != null) { 2686 if (batchId != null) {
2529 _json["batchId"] = batchId; 2687 _json["batchId"] = batchId;
2530 } 2688 }
2531 if (cancel != null) { 2689 if (cancel != null) {
2532 _json["cancel"] = (cancel).toJson(); 2690 _json["cancel"] = (cancel).toJson();
2533 } 2691 }
2534 if (cancelLineItem != null) { 2692 if (cancelLineItem != null) {
2535 _json["cancelLineItem"] = (cancelLineItem).toJson(); 2693 _json["cancelLineItem"] = (cancelLineItem).toJson();
2536 } 2694 }
2537 if (merchantId != null) { 2695 if (merchantId != null) {
(...skipping 21 matching lines...) Expand all
2559 _json["shipLineItems"] = (shipLineItems).toJson(); 2717 _json["shipLineItems"] = (shipLineItems).toJson();
2560 } 2718 }
2561 if (updateShipment != null) { 2719 if (updateShipment != null) {
2562 _json["updateShipment"] = (updateShipment).toJson(); 2720 _json["updateShipment"] = (updateShipment).toJson();
2563 } 2721 }
2564 return _json; 2722 return _json;
2565 } 2723 }
2566 } 2724 }
2567 2725
2568 class OrdersCustomBatchRequestEntryCancel { 2726 class OrdersCustomBatchRequestEntryCancel {
2569 /** The reason for the cancellation. */ 2727 /// The reason for the cancellation.
2570 core.String reason; 2728 core.String reason;
2571 /** The explanation of the reason. */ 2729
2730 /// The explanation of the reason.
2572 core.String reasonText; 2731 core.String reasonText;
2573 2732
2574 OrdersCustomBatchRequestEntryCancel(); 2733 OrdersCustomBatchRequestEntryCancel();
2575 2734
2576 OrdersCustomBatchRequestEntryCancel.fromJson(core.Map _json) { 2735 OrdersCustomBatchRequestEntryCancel.fromJson(core.Map _json) {
2577 if (_json.containsKey("reason")) { 2736 if (_json.containsKey("reason")) {
2578 reason = _json["reason"]; 2737 reason = _json["reason"];
2579 } 2738 }
2580 if (_json.containsKey("reasonText")) { 2739 if (_json.containsKey("reasonText")) {
2581 reasonText = _json["reasonText"]; 2740 reasonText = _json["reasonText"];
2582 } 2741 }
2583 } 2742 }
2584 2743
2585 core.Map<core.String, core.Object> toJson() { 2744 core.Map<core.String, core.Object> toJson() {
2586 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2745 final core.Map<core.String, core.Object> _json =
2746 new core.Map<core.String, core.Object>();
2587 if (reason != null) { 2747 if (reason != null) {
2588 _json["reason"] = reason; 2748 _json["reason"] = reason;
2589 } 2749 }
2590 if (reasonText != null) { 2750 if (reasonText != null) {
2591 _json["reasonText"] = reasonText; 2751 _json["reasonText"] = reasonText;
2592 } 2752 }
2593 return _json; 2753 return _json;
2594 } 2754 }
2595 } 2755 }
2596 2756
2597 class OrdersCustomBatchRequestEntryCancelLineItem { 2757 class OrdersCustomBatchRequestEntryCancelLineItem {
2598 /** 2758 /// Amount to refund for the cancelation. Optional. If not set, Google will
2599 * Amount to refund for the cancelation. Optional. If not set, Google will 2759 /// calculate the default based on the price and tax of the items involved.
2600 * calculate the default based on the price and tax of the items involved. The 2760 /// The amount must not be larger than the net amount left on the order.
2601 * amount must not be larger than the net amount left on the order.
2602 */
2603 Price amount; 2761 Price amount;
2604 /** The ID of the line item to cancel. */ 2762
2763 /// The ID of the line item to cancel.
2605 core.String lineItemId; 2764 core.String lineItemId;
2606 /** The quantity to cancel. */ 2765
2766 /// The quantity to cancel.
2607 core.int quantity; 2767 core.int quantity;
2608 /** The reason for the cancellation. */ 2768
2769 /// The reason for the cancellation.
2609 core.String reason; 2770 core.String reason;
2610 /** The explanation of the reason. */ 2771
2772 /// The explanation of the reason.
2611 core.String reasonText; 2773 core.String reasonText;
2612 2774
2613 OrdersCustomBatchRequestEntryCancelLineItem(); 2775 OrdersCustomBatchRequestEntryCancelLineItem();
2614 2776
2615 OrdersCustomBatchRequestEntryCancelLineItem.fromJson(core.Map _json) { 2777 OrdersCustomBatchRequestEntryCancelLineItem.fromJson(core.Map _json) {
2616 if (_json.containsKey("amount")) { 2778 if (_json.containsKey("amount")) {
2617 amount = new Price.fromJson(_json["amount"]); 2779 amount = new Price.fromJson(_json["amount"]);
2618 } 2780 }
2619 if (_json.containsKey("lineItemId")) { 2781 if (_json.containsKey("lineItemId")) {
2620 lineItemId = _json["lineItemId"]; 2782 lineItemId = _json["lineItemId"];
2621 } 2783 }
2622 if (_json.containsKey("quantity")) { 2784 if (_json.containsKey("quantity")) {
2623 quantity = _json["quantity"]; 2785 quantity = _json["quantity"];
2624 } 2786 }
2625 if (_json.containsKey("reason")) { 2787 if (_json.containsKey("reason")) {
2626 reason = _json["reason"]; 2788 reason = _json["reason"];
2627 } 2789 }
2628 if (_json.containsKey("reasonText")) { 2790 if (_json.containsKey("reasonText")) {
2629 reasonText = _json["reasonText"]; 2791 reasonText = _json["reasonText"];
2630 } 2792 }
2631 } 2793 }
2632 2794
2633 core.Map<core.String, core.Object> toJson() { 2795 core.Map<core.String, core.Object> toJson() {
2634 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2796 final core.Map<core.String, core.Object> _json =
2797 new core.Map<core.String, core.Object>();
2635 if (amount != null) { 2798 if (amount != null) {
2636 _json["amount"] = (amount).toJson(); 2799 _json["amount"] = (amount).toJson();
2637 } 2800 }
2638 if (lineItemId != null) { 2801 if (lineItemId != null) {
2639 _json["lineItemId"] = lineItemId; 2802 _json["lineItemId"] = lineItemId;
2640 } 2803 }
2641 if (quantity != null) { 2804 if (quantity != null) {
2642 _json["quantity"] = quantity; 2805 _json["quantity"] = quantity;
2643 } 2806 }
2644 if (reason != null) { 2807 if (reason != null) {
2645 _json["reason"] = reason; 2808 _json["reason"] = reason;
2646 } 2809 }
2647 if (reasonText != null) { 2810 if (reasonText != null) {
2648 _json["reasonText"] = reasonText; 2811 _json["reasonText"] = reasonText;
2649 } 2812 }
2650 return _json; 2813 return _json;
2651 } 2814 }
2652 } 2815 }
2653 2816
2654 class OrdersCustomBatchRequestEntryRefund { 2817 class OrdersCustomBatchRequestEntryRefund {
2655 /** The amount that is refunded. */ 2818 /// The amount that is refunded.
2656 Price amount; 2819 Price amount;
2657 /** The reason for the refund. */ 2820
2821 /// The reason for the refund.
2658 core.String reason; 2822 core.String reason;
2659 /** The explanation of the reason. */ 2823
2824 /// The explanation of the reason.
2660 core.String reasonText; 2825 core.String reasonText;
2661 2826
2662 OrdersCustomBatchRequestEntryRefund(); 2827 OrdersCustomBatchRequestEntryRefund();
2663 2828
2664 OrdersCustomBatchRequestEntryRefund.fromJson(core.Map _json) { 2829 OrdersCustomBatchRequestEntryRefund.fromJson(core.Map _json) {
2665 if (_json.containsKey("amount")) { 2830 if (_json.containsKey("amount")) {
2666 amount = new Price.fromJson(_json["amount"]); 2831 amount = new Price.fromJson(_json["amount"]);
2667 } 2832 }
2668 if (_json.containsKey("reason")) { 2833 if (_json.containsKey("reason")) {
2669 reason = _json["reason"]; 2834 reason = _json["reason"];
2670 } 2835 }
2671 if (_json.containsKey("reasonText")) { 2836 if (_json.containsKey("reasonText")) {
2672 reasonText = _json["reasonText"]; 2837 reasonText = _json["reasonText"];
2673 } 2838 }
2674 } 2839 }
2675 2840
2676 core.Map<core.String, core.Object> toJson() { 2841 core.Map<core.String, core.Object> toJson() {
2677 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2842 final core.Map<core.String, core.Object> _json =
2843 new core.Map<core.String, core.Object>();
2678 if (amount != null) { 2844 if (amount != null) {
2679 _json["amount"] = (amount).toJson(); 2845 _json["amount"] = (amount).toJson();
2680 } 2846 }
2681 if (reason != null) { 2847 if (reason != null) {
2682 _json["reason"] = reason; 2848 _json["reason"] = reason;
2683 } 2849 }
2684 if (reasonText != null) { 2850 if (reasonText != null) {
2685 _json["reasonText"] = reasonText; 2851 _json["reasonText"] = reasonText;
2686 } 2852 }
2687 return _json; 2853 return _json;
2688 } 2854 }
2689 } 2855 }
2690 2856
2691 class OrdersCustomBatchRequestEntryReturnLineItem { 2857 class OrdersCustomBatchRequestEntryReturnLineItem {
2692 /** The ID of the line item to return. */ 2858 /// The ID of the line item to return.
2693 core.String lineItemId; 2859 core.String lineItemId;
2694 /** The quantity to return. */ 2860
2861 /// The quantity to return.
2695 core.int quantity; 2862 core.int quantity;
2696 /** The reason for the return. */ 2863
2864 /// The reason for the return.
2697 core.String reason; 2865 core.String reason;
2698 /** The explanation of the reason. */ 2866
2867 /// The explanation of the reason.
2699 core.String reasonText; 2868 core.String reasonText;
2700 2869
2701 OrdersCustomBatchRequestEntryReturnLineItem(); 2870 OrdersCustomBatchRequestEntryReturnLineItem();
2702 2871
2703 OrdersCustomBatchRequestEntryReturnLineItem.fromJson(core.Map _json) { 2872 OrdersCustomBatchRequestEntryReturnLineItem.fromJson(core.Map _json) {
2704 if (_json.containsKey("lineItemId")) { 2873 if (_json.containsKey("lineItemId")) {
2705 lineItemId = _json["lineItemId"]; 2874 lineItemId = _json["lineItemId"];
2706 } 2875 }
2707 if (_json.containsKey("quantity")) { 2876 if (_json.containsKey("quantity")) {
2708 quantity = _json["quantity"]; 2877 quantity = _json["quantity"];
2709 } 2878 }
2710 if (_json.containsKey("reason")) { 2879 if (_json.containsKey("reason")) {
2711 reason = _json["reason"]; 2880 reason = _json["reason"];
2712 } 2881 }
2713 if (_json.containsKey("reasonText")) { 2882 if (_json.containsKey("reasonText")) {
2714 reasonText = _json["reasonText"]; 2883 reasonText = _json["reasonText"];
2715 } 2884 }
2716 } 2885 }
2717 2886
2718 core.Map<core.String, core.Object> toJson() { 2887 core.Map<core.String, core.Object> toJson() {
2719 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2888 final core.Map<core.String, core.Object> _json =
2889 new core.Map<core.String, core.Object>();
2720 if (lineItemId != null) { 2890 if (lineItemId != null) {
2721 _json["lineItemId"] = lineItemId; 2891 _json["lineItemId"] = lineItemId;
2722 } 2892 }
2723 if (quantity != null) { 2893 if (quantity != null) {
2724 _json["quantity"] = quantity; 2894 _json["quantity"] = quantity;
2725 } 2895 }
2726 if (reason != null) { 2896 if (reason != null) {
2727 _json["reason"] = reason; 2897 _json["reason"] = reason;
2728 } 2898 }
2729 if (reasonText != null) { 2899 if (reasonText != null) {
2730 _json["reasonText"] = reasonText; 2900 _json["reasonText"] = reasonText;
2731 } 2901 }
2732 return _json; 2902 return _json;
2733 } 2903 }
2734 } 2904 }
2735 2905
2736 class OrdersCustomBatchRequestEntryShipLineItems { 2906 class OrdersCustomBatchRequestEntryShipLineItems {
2737 /** The carrier handling the shipment. */ 2907 /// The carrier handling the shipment.
2738 core.String carrier; 2908 core.String carrier;
2739 /** Line items to ship. */ 2909
2910 /// Line items to ship.
2740 core.List<OrderShipmentLineItemShipment> lineItems; 2911 core.List<OrderShipmentLineItemShipment> lineItems;
2741 /** The ID of the shipment. */ 2912
2913 /// The ID of the shipment.
2742 core.String shipmentId; 2914 core.String shipmentId;
2743 /** The tracking id for the shipment. */ 2915
2916 /// The tracking id for the shipment.
2744 core.String trackingId; 2917 core.String trackingId;
2745 2918
2746 OrdersCustomBatchRequestEntryShipLineItems(); 2919 OrdersCustomBatchRequestEntryShipLineItems();
2747 2920
2748 OrdersCustomBatchRequestEntryShipLineItems.fromJson(core.Map _json) { 2921 OrdersCustomBatchRequestEntryShipLineItems.fromJson(core.Map _json) {
2749 if (_json.containsKey("carrier")) { 2922 if (_json.containsKey("carrier")) {
2750 carrier = _json["carrier"]; 2923 carrier = _json["carrier"];
2751 } 2924 }
2752 if (_json.containsKey("lineItems")) { 2925 if (_json.containsKey("lineItems")) {
2753 lineItems = _json["lineItems"].map((value) => new OrderShipmentLineItemShi pment.fromJson(value)).toList(); 2926 lineItems = _json["lineItems"]
2927 .map((value) => new OrderShipmentLineItemShipment.fromJson(value))
2928 .toList();
2754 } 2929 }
2755 if (_json.containsKey("shipmentId")) { 2930 if (_json.containsKey("shipmentId")) {
2756 shipmentId = _json["shipmentId"]; 2931 shipmentId = _json["shipmentId"];
2757 } 2932 }
2758 if (_json.containsKey("trackingId")) { 2933 if (_json.containsKey("trackingId")) {
2759 trackingId = _json["trackingId"]; 2934 trackingId = _json["trackingId"];
2760 } 2935 }
2761 } 2936 }
2762 2937
2763 core.Map<core.String, core.Object> toJson() { 2938 core.Map<core.String, core.Object> toJson() {
2764 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2939 final core.Map<core.String, core.Object> _json =
2940 new core.Map<core.String, core.Object>();
2765 if (carrier != null) { 2941 if (carrier != null) {
2766 _json["carrier"] = carrier; 2942 _json["carrier"] = carrier;
2767 } 2943 }
2768 if (lineItems != null) { 2944 if (lineItems != null) {
2769 _json["lineItems"] = lineItems.map((value) => (value).toJson()).toList(); 2945 _json["lineItems"] = lineItems.map((value) => (value).toJson()).toList();
2770 } 2946 }
2771 if (shipmentId != null) { 2947 if (shipmentId != null) {
2772 _json["shipmentId"] = shipmentId; 2948 _json["shipmentId"] = shipmentId;
2773 } 2949 }
2774 if (trackingId != null) { 2950 if (trackingId != null) {
2775 _json["trackingId"] = trackingId; 2951 _json["trackingId"] = trackingId;
2776 } 2952 }
2777 return _json; 2953 return _json;
2778 } 2954 }
2779 } 2955 }
2780 2956
2781 class OrdersCustomBatchRequestEntryUpdateShipment { 2957 class OrdersCustomBatchRequestEntryUpdateShipment {
2782 /** The carrier handling the shipment. Not updated if missing. */ 2958 /// The carrier handling the shipment. Not updated if missing.
2783 core.String carrier; 2959 core.String carrier;
2784 /** The ID of the shipment. */ 2960
2961 /// The ID of the shipment.
2785 core.String shipmentId; 2962 core.String shipmentId;
2786 /** New status for the shipment. Not updated if missing. */ 2963
2964 /// New status for the shipment. Not updated if missing.
2787 core.String status; 2965 core.String status;
2788 /** The tracking id for the shipment. Not updated if missing. */ 2966
2967 /// The tracking id for the shipment. Not updated if missing.
2789 core.String trackingId; 2968 core.String trackingId;
2790 2969
2791 OrdersCustomBatchRequestEntryUpdateShipment(); 2970 OrdersCustomBatchRequestEntryUpdateShipment();
2792 2971
2793 OrdersCustomBatchRequestEntryUpdateShipment.fromJson(core.Map _json) { 2972 OrdersCustomBatchRequestEntryUpdateShipment.fromJson(core.Map _json) {
2794 if (_json.containsKey("carrier")) { 2973 if (_json.containsKey("carrier")) {
2795 carrier = _json["carrier"]; 2974 carrier = _json["carrier"];
2796 } 2975 }
2797 if (_json.containsKey("shipmentId")) { 2976 if (_json.containsKey("shipmentId")) {
2798 shipmentId = _json["shipmentId"]; 2977 shipmentId = _json["shipmentId"];
2799 } 2978 }
2800 if (_json.containsKey("status")) { 2979 if (_json.containsKey("status")) {
2801 status = _json["status"]; 2980 status = _json["status"];
2802 } 2981 }
2803 if (_json.containsKey("trackingId")) { 2982 if (_json.containsKey("trackingId")) {
2804 trackingId = _json["trackingId"]; 2983 trackingId = _json["trackingId"];
2805 } 2984 }
2806 } 2985 }
2807 2986
2808 core.Map<core.String, core.Object> toJson() { 2987 core.Map<core.String, core.Object> toJson() {
2809 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2988 final core.Map<core.String, core.Object> _json =
2989 new core.Map<core.String, core.Object>();
2810 if (carrier != null) { 2990 if (carrier != null) {
2811 _json["carrier"] = carrier; 2991 _json["carrier"] = carrier;
2812 } 2992 }
2813 if (shipmentId != null) { 2993 if (shipmentId != null) {
2814 _json["shipmentId"] = shipmentId; 2994 _json["shipmentId"] = shipmentId;
2815 } 2995 }
2816 if (status != null) { 2996 if (status != null) {
2817 _json["status"] = status; 2997 _json["status"] = status;
2818 } 2998 }
2819 if (trackingId != null) { 2999 if (trackingId != null) {
2820 _json["trackingId"] = trackingId; 3000 _json["trackingId"] = trackingId;
2821 } 3001 }
2822 return _json; 3002 return _json;
2823 } 3003 }
2824 } 3004 }
2825 3005
2826 class OrdersCustomBatchResponse { 3006 class OrdersCustomBatchResponse {
2827 /** The result of the execution of the batch requests. */ 3007 /// The result of the execution of the batch requests.
2828 core.List<OrdersCustomBatchResponseEntry> entries; 3008 core.List<OrdersCustomBatchResponseEntry> entries;
2829 /** 3009
2830 * Identifies what kind of resource this is. Value: the fixed string 3010 /// Identifies what kind of resource this is. Value: the fixed string
2831 * "content#ordersCustomBatchResponse". 3011 /// "content#ordersCustomBatchResponse".
2832 */
2833 core.String kind; 3012 core.String kind;
2834 3013
2835 OrdersCustomBatchResponse(); 3014 OrdersCustomBatchResponse();
2836 3015
2837 OrdersCustomBatchResponse.fromJson(core.Map _json) { 3016 OrdersCustomBatchResponse.fromJson(core.Map _json) {
2838 if (_json.containsKey("entries")) { 3017 if (_json.containsKey("entries")) {
2839 entries = _json["entries"].map((value) => new OrdersCustomBatchResponseEnt ry.fromJson(value)).toList(); 3018 entries = _json["entries"]
3019 .map((value) => new OrdersCustomBatchResponseEntry.fromJson(value))
3020 .toList();
2840 } 3021 }
2841 if (_json.containsKey("kind")) { 3022 if (_json.containsKey("kind")) {
2842 kind = _json["kind"]; 3023 kind = _json["kind"];
2843 } 3024 }
2844 } 3025 }
2845 3026
2846 core.Map<core.String, core.Object> toJson() { 3027 core.Map<core.String, core.Object> toJson() {
2847 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3028 final core.Map<core.String, core.Object> _json =
3029 new core.Map<core.String, core.Object>();
2848 if (entries != null) { 3030 if (entries != null) {
2849 _json["entries"] = entries.map((value) => (value).toJson()).toList(); 3031 _json["entries"] = entries.map((value) => (value).toJson()).toList();
2850 } 3032 }
2851 if (kind != null) { 3033 if (kind != null) {
2852 _json["kind"] = kind; 3034 _json["kind"] = kind;
2853 } 3035 }
2854 return _json; 3036 return _json;
2855 } 3037 }
2856 } 3038 }
2857 3039
2858 class OrdersCustomBatchResponseEntry { 3040 class OrdersCustomBatchResponseEntry {
2859 /** The ID of the request entry this entry responds to. */ 3041 /// The ID of the request entry this entry responds to.
2860 core.int batchId; 3042 core.int batchId;
2861 /** A list of errors defined if and only if the request failed. */ 3043
3044 /// A list of errors defined if and only if the request failed.
2862 Errors errors; 3045 Errors errors;
2863 /** 3046
2864 * The status of the execution. Only defined if the method is not get or 3047 /// The status of the execution. Only defined if the method is not get or
2865 * getByMerchantOrderId and if the request was successful. 3048 /// getByMerchantOrderId and if the request was successful.
2866 */
2867 core.String executionStatus; 3049 core.String executionStatus;
2868 /** 3050
2869 * Identifies what kind of resource this is. Value: the fixed string 3051 /// Identifies what kind of resource this is. Value: the fixed string
2870 * "content#ordersCustomBatchResponseEntry". 3052 /// "content#ordersCustomBatchResponseEntry".
2871 */
2872 core.String kind; 3053 core.String kind;
2873 /** 3054
2874 * The retrieved order. Only defined if the method is get and if the request 3055 /// The retrieved order. Only defined if the method is get and if the request
2875 * was successful. 3056 /// was successful.
2876 */
2877 Order order; 3057 Order order;
2878 3058
2879 OrdersCustomBatchResponseEntry(); 3059 OrdersCustomBatchResponseEntry();
2880 3060
2881 OrdersCustomBatchResponseEntry.fromJson(core.Map _json) { 3061 OrdersCustomBatchResponseEntry.fromJson(core.Map _json) {
2882 if (_json.containsKey("batchId")) { 3062 if (_json.containsKey("batchId")) {
2883 batchId = _json["batchId"]; 3063 batchId = _json["batchId"];
2884 } 3064 }
2885 if (_json.containsKey("errors")) { 3065 if (_json.containsKey("errors")) {
2886 errors = new Errors.fromJson(_json["errors"]); 3066 errors = new Errors.fromJson(_json["errors"]);
2887 } 3067 }
2888 if (_json.containsKey("executionStatus")) { 3068 if (_json.containsKey("executionStatus")) {
2889 executionStatus = _json["executionStatus"]; 3069 executionStatus = _json["executionStatus"];
2890 } 3070 }
2891 if (_json.containsKey("kind")) { 3071 if (_json.containsKey("kind")) {
2892 kind = _json["kind"]; 3072 kind = _json["kind"];
2893 } 3073 }
2894 if (_json.containsKey("order")) { 3074 if (_json.containsKey("order")) {
2895 order = new Order.fromJson(_json["order"]); 3075 order = new Order.fromJson(_json["order"]);
2896 } 3076 }
2897 } 3077 }
2898 3078
2899 core.Map<core.String, core.Object> toJson() { 3079 core.Map<core.String, core.Object> toJson() {
2900 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3080 final core.Map<core.String, core.Object> _json =
3081 new core.Map<core.String, core.Object>();
2901 if (batchId != null) { 3082 if (batchId != null) {
2902 _json["batchId"] = batchId; 3083 _json["batchId"] = batchId;
2903 } 3084 }
2904 if (errors != null) { 3085 if (errors != null) {
2905 _json["errors"] = (errors).toJson(); 3086 _json["errors"] = (errors).toJson();
2906 } 3087 }
2907 if (executionStatus != null) { 3088 if (executionStatus != null) {
2908 _json["executionStatus"] = executionStatus; 3089 _json["executionStatus"] = executionStatus;
2909 } 3090 }
2910 if (kind != null) { 3091 if (kind != null) {
2911 _json["kind"] = kind; 3092 _json["kind"] = kind;
2912 } 3093 }
2913 if (order != null) { 3094 if (order != null) {
2914 _json["order"] = (order).toJson(); 3095 _json["order"] = (order).toJson();
2915 } 3096 }
2916 return _json; 3097 return _json;
2917 } 3098 }
2918 } 3099 }
2919 3100
2920 class OrdersGetByMerchantOrderIdResponse { 3101 class OrdersGetByMerchantOrderIdResponse {
2921 /** 3102 /// Identifies what kind of resource this is. Value: the fixed string
2922 * Identifies what kind of resource this is. Value: the fixed string 3103 /// "content#ordersGetByMerchantOrderIdResponse".
2923 * "content#ordersGetByMerchantOrderIdResponse".
2924 */
2925 core.String kind; 3104 core.String kind;
2926 /** The requested order. */ 3105
3106 /// The requested order.
2927 Order order; 3107 Order order;
2928 3108
2929 OrdersGetByMerchantOrderIdResponse(); 3109 OrdersGetByMerchantOrderIdResponse();
2930 3110
2931 OrdersGetByMerchantOrderIdResponse.fromJson(core.Map _json) { 3111 OrdersGetByMerchantOrderIdResponse.fromJson(core.Map _json) {
2932 if (_json.containsKey("kind")) { 3112 if (_json.containsKey("kind")) {
2933 kind = _json["kind"]; 3113 kind = _json["kind"];
2934 } 3114 }
2935 if (_json.containsKey("order")) { 3115 if (_json.containsKey("order")) {
2936 order = new Order.fromJson(_json["order"]); 3116 order = new Order.fromJson(_json["order"]);
2937 } 3117 }
2938 } 3118 }
2939 3119
2940 core.Map<core.String, core.Object> toJson() { 3120 core.Map<core.String, core.Object> toJson() {
2941 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3121 final core.Map<core.String, core.Object> _json =
3122 new core.Map<core.String, core.Object>();
2942 if (kind != null) { 3123 if (kind != null) {
2943 _json["kind"] = kind; 3124 _json["kind"] = kind;
2944 } 3125 }
2945 if (order != null) { 3126 if (order != null) {
2946 _json["order"] = (order).toJson(); 3127 _json["order"] = (order).toJson();
2947 } 3128 }
2948 return _json; 3129 return _json;
2949 } 3130 }
2950 } 3131 }
2951 3132
2952 class OrdersGetTestOrderTemplateResponse { 3133 class OrdersGetTestOrderTemplateResponse {
2953 /** 3134 /// Identifies what kind of resource this is. Value: the fixed string
2954 * Identifies what kind of resource this is. Value: the fixed string 3135 /// "content#ordersGetTestOrderTemplateResponse".
2955 * "content#ordersGetTestOrderTemplateResponse".
2956 */
2957 core.String kind; 3136 core.String kind;
2958 /** The requested test order template. */ 3137
3138 /// The requested test order template.
2959 TestOrder template; 3139 TestOrder template;
2960 3140
2961 OrdersGetTestOrderTemplateResponse(); 3141 OrdersGetTestOrderTemplateResponse();
2962 3142
2963 OrdersGetTestOrderTemplateResponse.fromJson(core.Map _json) { 3143 OrdersGetTestOrderTemplateResponse.fromJson(core.Map _json) {
2964 if (_json.containsKey("kind")) { 3144 if (_json.containsKey("kind")) {
2965 kind = _json["kind"]; 3145 kind = _json["kind"];
2966 } 3146 }
2967 if (_json.containsKey("template")) { 3147 if (_json.containsKey("template")) {
2968 template = new TestOrder.fromJson(_json["template"]); 3148 template = new TestOrder.fromJson(_json["template"]);
2969 } 3149 }
2970 } 3150 }
2971 3151
2972 core.Map<core.String, core.Object> toJson() { 3152 core.Map<core.String, core.Object> toJson() {
2973 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3153 final core.Map<core.String, core.Object> _json =
3154 new core.Map<core.String, core.Object>();
2974 if (kind != null) { 3155 if (kind != null) {
2975 _json["kind"] = kind; 3156 _json["kind"] = kind;
2976 } 3157 }
2977 if (template != null) { 3158 if (template != null) {
2978 _json["template"] = (template).toJson(); 3159 _json["template"] = (template).toJson();
2979 } 3160 }
2980 return _json; 3161 return _json;
2981 } 3162 }
2982 } 3163 }
2983 3164
2984 class OrdersListResponse { 3165 class OrdersListResponse {
2985 /** 3166 /// Identifies what kind of resource this is. Value: the fixed string
2986 * Identifies what kind of resource this is. Value: the fixed string 3167 /// "content#ordersListResponse".
2987 * "content#ordersListResponse".
2988 */
2989 core.String kind; 3168 core.String kind;
2990 /** The token for the retrieval of the next page of orders. */ 3169
3170 /// The token for the retrieval of the next page of orders.
2991 core.String nextPageToken; 3171 core.String nextPageToken;
2992 core.List<Order> resources; 3172 core.List<Order> resources;
2993 3173
2994 OrdersListResponse(); 3174 OrdersListResponse();
2995 3175
2996 OrdersListResponse.fromJson(core.Map _json) { 3176 OrdersListResponse.fromJson(core.Map _json) {
2997 if (_json.containsKey("kind")) { 3177 if (_json.containsKey("kind")) {
2998 kind = _json["kind"]; 3178 kind = _json["kind"];
2999 } 3179 }
3000 if (_json.containsKey("nextPageToken")) { 3180 if (_json.containsKey("nextPageToken")) {
3001 nextPageToken = _json["nextPageToken"]; 3181 nextPageToken = _json["nextPageToken"];
3002 } 3182 }
3003 if (_json.containsKey("resources")) { 3183 if (_json.containsKey("resources")) {
3004 resources = _json["resources"].map((value) => new Order.fromJson(value)).t oList(); 3184 resources =
3185 _json["resources"].map((value) => new Order.fromJson(value)).toList();
3005 } 3186 }
3006 } 3187 }
3007 3188
3008 core.Map<core.String, core.Object> toJson() { 3189 core.Map<core.String, core.Object> toJson() {
3009 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3190 final core.Map<core.String, core.Object> _json =
3191 new core.Map<core.String, core.Object>();
3010 if (kind != null) { 3192 if (kind != null) {
3011 _json["kind"] = kind; 3193 _json["kind"] = kind;
3012 } 3194 }
3013 if (nextPageToken != null) { 3195 if (nextPageToken != null) {
3014 _json["nextPageToken"] = nextPageToken; 3196 _json["nextPageToken"] = nextPageToken;
3015 } 3197 }
3016 if (resources != null) { 3198 if (resources != null) {
3017 _json["resources"] = resources.map((value) => (value).toJson()).toList(); 3199 _json["resources"] = resources.map((value) => (value).toJson()).toList();
3018 } 3200 }
3019 return _json; 3201 return _json;
3020 } 3202 }
3021 } 3203 }
3022 3204
3023 class OrdersRefundRequest { 3205 class OrdersRefundRequest {
3024 /** The amount that is refunded. */ 3206 /// The amount that is refunded.
3025 Price amount; 3207 Price amount;
3026 /** 3208
3027 * The ID of the operation. Unique across all operations for a given order. 3209 /// The ID of the operation. Unique across all operations for a given order.
3028 */
3029 core.String operationId; 3210 core.String operationId;
3030 /** The reason for the refund. */ 3211
3212 /// The reason for the refund.
3031 core.String reason; 3213 core.String reason;
3032 /** The explanation of the reason. */ 3214
3215 /// The explanation of the reason.
3033 core.String reasonText; 3216 core.String reasonText;
3034 3217
3035 OrdersRefundRequest(); 3218 OrdersRefundRequest();
3036 3219
3037 OrdersRefundRequest.fromJson(core.Map _json) { 3220 OrdersRefundRequest.fromJson(core.Map _json) {
3038 if (_json.containsKey("amount")) { 3221 if (_json.containsKey("amount")) {
3039 amount = new Price.fromJson(_json["amount"]); 3222 amount = new Price.fromJson(_json["amount"]);
3040 } 3223 }
3041 if (_json.containsKey("operationId")) { 3224 if (_json.containsKey("operationId")) {
3042 operationId = _json["operationId"]; 3225 operationId = _json["operationId"];
3043 } 3226 }
3044 if (_json.containsKey("reason")) { 3227 if (_json.containsKey("reason")) {
3045 reason = _json["reason"]; 3228 reason = _json["reason"];
3046 } 3229 }
3047 if (_json.containsKey("reasonText")) { 3230 if (_json.containsKey("reasonText")) {
3048 reasonText = _json["reasonText"]; 3231 reasonText = _json["reasonText"];
3049 } 3232 }
3050 } 3233 }
3051 3234
3052 core.Map<core.String, core.Object> toJson() { 3235 core.Map<core.String, core.Object> toJson() {
3053 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3236 final core.Map<core.String, core.Object> _json =
3237 new core.Map<core.String, core.Object>();
3054 if (amount != null) { 3238 if (amount != null) {
3055 _json["amount"] = (amount).toJson(); 3239 _json["amount"] = (amount).toJson();
3056 } 3240 }
3057 if (operationId != null) { 3241 if (operationId != null) {
3058 _json["operationId"] = operationId; 3242 _json["operationId"] = operationId;
3059 } 3243 }
3060 if (reason != null) { 3244 if (reason != null) {
3061 _json["reason"] = reason; 3245 _json["reason"] = reason;
3062 } 3246 }
3063 if (reasonText != null) { 3247 if (reasonText != null) {
3064 _json["reasonText"] = reasonText; 3248 _json["reasonText"] = reasonText;
3065 } 3249 }
3066 return _json; 3250 return _json;
3067 } 3251 }
3068 } 3252 }
3069 3253
3070 class OrdersRefundResponse { 3254 class OrdersRefundResponse {
3071 /** The status of the execution. */ 3255 /// The status of the execution.
3072 core.String executionStatus; 3256 core.String executionStatus;
3073 /** 3257
3074 * Identifies what kind of resource this is. Value: the fixed string 3258 /// Identifies what kind of resource this is. Value: the fixed string
3075 * "content#ordersRefundResponse". 3259 /// "content#ordersRefundResponse".
3076 */
3077 core.String kind; 3260 core.String kind;
3078 3261
3079 OrdersRefundResponse(); 3262 OrdersRefundResponse();
3080 3263
3081 OrdersRefundResponse.fromJson(core.Map _json) { 3264 OrdersRefundResponse.fromJson(core.Map _json) {
3082 if (_json.containsKey("executionStatus")) { 3265 if (_json.containsKey("executionStatus")) {
3083 executionStatus = _json["executionStatus"]; 3266 executionStatus = _json["executionStatus"];
3084 } 3267 }
3085 if (_json.containsKey("kind")) { 3268 if (_json.containsKey("kind")) {
3086 kind = _json["kind"]; 3269 kind = _json["kind"];
3087 } 3270 }
3088 } 3271 }
3089 3272
3090 core.Map<core.String, core.Object> toJson() { 3273 core.Map<core.String, core.Object> toJson() {
3091 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3274 final core.Map<core.String, core.Object> _json =
3275 new core.Map<core.String, core.Object>();
3092 if (executionStatus != null) { 3276 if (executionStatus != null) {
3093 _json["executionStatus"] = executionStatus; 3277 _json["executionStatus"] = executionStatus;
3094 } 3278 }
3095 if (kind != null) { 3279 if (kind != null) {
3096 _json["kind"] = kind; 3280 _json["kind"] = kind;
3097 } 3281 }
3098 return _json; 3282 return _json;
3099 } 3283 }
3100 } 3284 }
3101 3285
3102 class OrdersReturnLineItemRequest { 3286 class OrdersReturnLineItemRequest {
3103 /** The ID of the line item to return. */ 3287 /// The ID of the line item to return.
3104 core.String lineItemId; 3288 core.String lineItemId;
3105 /** 3289
3106 * The ID of the operation. Unique across all operations for a given order. 3290 /// The ID of the operation. Unique across all operations for a given order.
3107 */
3108 core.String operationId; 3291 core.String operationId;
3109 /** The quantity to return. */ 3292
3293 /// The quantity to return.
3110 core.int quantity; 3294 core.int quantity;
3111 /** The reason for the return. */ 3295
3296 /// The reason for the return.
3112 core.String reason; 3297 core.String reason;
3113 /** The explanation of the reason. */ 3298
3299 /// The explanation of the reason.
3114 core.String reasonText; 3300 core.String reasonText;
3115 3301
3116 OrdersReturnLineItemRequest(); 3302 OrdersReturnLineItemRequest();
3117 3303
3118 OrdersReturnLineItemRequest.fromJson(core.Map _json) { 3304 OrdersReturnLineItemRequest.fromJson(core.Map _json) {
3119 if (_json.containsKey("lineItemId")) { 3305 if (_json.containsKey("lineItemId")) {
3120 lineItemId = _json["lineItemId"]; 3306 lineItemId = _json["lineItemId"];
3121 } 3307 }
3122 if (_json.containsKey("operationId")) { 3308 if (_json.containsKey("operationId")) {
3123 operationId = _json["operationId"]; 3309 operationId = _json["operationId"];
3124 } 3310 }
3125 if (_json.containsKey("quantity")) { 3311 if (_json.containsKey("quantity")) {
3126 quantity = _json["quantity"]; 3312 quantity = _json["quantity"];
3127 } 3313 }
3128 if (_json.containsKey("reason")) { 3314 if (_json.containsKey("reason")) {
3129 reason = _json["reason"]; 3315 reason = _json["reason"];
3130 } 3316 }
3131 if (_json.containsKey("reasonText")) { 3317 if (_json.containsKey("reasonText")) {
3132 reasonText = _json["reasonText"]; 3318 reasonText = _json["reasonText"];
3133 } 3319 }
3134 } 3320 }
3135 3321
3136 core.Map<core.String, core.Object> toJson() { 3322 core.Map<core.String, core.Object> toJson() {
3137 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3323 final core.Map<core.String, core.Object> _json =
3324 new core.Map<core.String, core.Object>();
3138 if (lineItemId != null) { 3325 if (lineItemId != null) {
3139 _json["lineItemId"] = lineItemId; 3326 _json["lineItemId"] = lineItemId;
3140 } 3327 }
3141 if (operationId != null) { 3328 if (operationId != null) {
3142 _json["operationId"] = operationId; 3329 _json["operationId"] = operationId;
3143 } 3330 }
3144 if (quantity != null) { 3331 if (quantity != null) {
3145 _json["quantity"] = quantity; 3332 _json["quantity"] = quantity;
3146 } 3333 }
3147 if (reason != null) { 3334 if (reason != null) {
3148 _json["reason"] = reason; 3335 _json["reason"] = reason;
3149 } 3336 }
3150 if (reasonText != null) { 3337 if (reasonText != null) {
3151 _json["reasonText"] = reasonText; 3338 _json["reasonText"] = reasonText;
3152 } 3339 }
3153 return _json; 3340 return _json;
3154 } 3341 }
3155 } 3342 }
3156 3343
3157 class OrdersReturnLineItemResponse { 3344 class OrdersReturnLineItemResponse {
3158 /** The status of the execution. */ 3345 /// The status of the execution.
3159 core.String executionStatus; 3346 core.String executionStatus;
3160 /** 3347
3161 * Identifies what kind of resource this is. Value: the fixed string 3348 /// Identifies what kind of resource this is. Value: the fixed string
3162 * "content#ordersReturnLineItemResponse". 3349 /// "content#ordersReturnLineItemResponse".
3163 */
3164 core.String kind; 3350 core.String kind;
3165 3351
3166 OrdersReturnLineItemResponse(); 3352 OrdersReturnLineItemResponse();
3167 3353
3168 OrdersReturnLineItemResponse.fromJson(core.Map _json) { 3354 OrdersReturnLineItemResponse.fromJson(core.Map _json) {
3169 if (_json.containsKey("executionStatus")) { 3355 if (_json.containsKey("executionStatus")) {
3170 executionStatus = _json["executionStatus"]; 3356 executionStatus = _json["executionStatus"];
3171 } 3357 }
3172 if (_json.containsKey("kind")) { 3358 if (_json.containsKey("kind")) {
3173 kind = _json["kind"]; 3359 kind = _json["kind"];
3174 } 3360 }
3175 } 3361 }
3176 3362
3177 core.Map<core.String, core.Object> toJson() { 3363 core.Map<core.String, core.Object> toJson() {
3178 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3364 final core.Map<core.String, core.Object> _json =
3365 new core.Map<core.String, core.Object>();
3179 if (executionStatus != null) { 3366 if (executionStatus != null) {
3180 _json["executionStatus"] = executionStatus; 3367 _json["executionStatus"] = executionStatus;
3181 } 3368 }
3182 if (kind != null) { 3369 if (kind != null) {
3183 _json["kind"] = kind; 3370 _json["kind"] = kind;
3184 } 3371 }
3185 return _json; 3372 return _json;
3186 } 3373 }
3187 } 3374 }
3188 3375
3189 class OrdersShipLineItemsRequest { 3376 class OrdersShipLineItemsRequest {
3190 /** The carrier handling the shipment. */ 3377 /// The carrier handling the shipment.
3191 core.String carrier; 3378 core.String carrier;
3192 /** Line items to ship. */ 3379
3380 /// Line items to ship.
3193 core.List<OrderShipmentLineItemShipment> lineItems; 3381 core.List<OrderShipmentLineItemShipment> lineItems;
3194 /** 3382
3195 * The ID of the operation. Unique across all operations for a given order. 3383 /// The ID of the operation. Unique across all operations for a given order.
3196 */
3197 core.String operationId; 3384 core.String operationId;
3198 /** The ID of the shipment. */ 3385
3386 /// The ID of the shipment.
3199 core.String shipmentId; 3387 core.String shipmentId;
3200 /** The tracking id for the shipment. */ 3388
3389 /// The tracking id for the shipment.
3201 core.String trackingId; 3390 core.String trackingId;
3202 3391
3203 OrdersShipLineItemsRequest(); 3392 OrdersShipLineItemsRequest();
3204 3393
3205 OrdersShipLineItemsRequest.fromJson(core.Map _json) { 3394 OrdersShipLineItemsRequest.fromJson(core.Map _json) {
3206 if (_json.containsKey("carrier")) { 3395 if (_json.containsKey("carrier")) {
3207 carrier = _json["carrier"]; 3396 carrier = _json["carrier"];
3208 } 3397 }
3209 if (_json.containsKey("lineItems")) { 3398 if (_json.containsKey("lineItems")) {
3210 lineItems = _json["lineItems"].map((value) => new OrderShipmentLineItemShi pment.fromJson(value)).toList(); 3399 lineItems = _json["lineItems"]
3400 .map((value) => new OrderShipmentLineItemShipment.fromJson(value))
3401 .toList();
3211 } 3402 }
3212 if (_json.containsKey("operationId")) { 3403 if (_json.containsKey("operationId")) {
3213 operationId = _json["operationId"]; 3404 operationId = _json["operationId"];
3214 } 3405 }
3215 if (_json.containsKey("shipmentId")) { 3406 if (_json.containsKey("shipmentId")) {
3216 shipmentId = _json["shipmentId"]; 3407 shipmentId = _json["shipmentId"];
3217 } 3408 }
3218 if (_json.containsKey("trackingId")) { 3409 if (_json.containsKey("trackingId")) {
3219 trackingId = _json["trackingId"]; 3410 trackingId = _json["trackingId"];
3220 } 3411 }
3221 } 3412 }
3222 3413
3223 core.Map<core.String, core.Object> toJson() { 3414 core.Map<core.String, core.Object> toJson() {
3224 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3415 final core.Map<core.String, core.Object> _json =
3416 new core.Map<core.String, core.Object>();
3225 if (carrier != null) { 3417 if (carrier != null) {
3226 _json["carrier"] = carrier; 3418 _json["carrier"] = carrier;
3227 } 3419 }
3228 if (lineItems != null) { 3420 if (lineItems != null) {
3229 _json["lineItems"] = lineItems.map((value) => (value).toJson()).toList(); 3421 _json["lineItems"] = lineItems.map((value) => (value).toJson()).toList();
3230 } 3422 }
3231 if (operationId != null) { 3423 if (operationId != null) {
3232 _json["operationId"] = operationId; 3424 _json["operationId"] = operationId;
3233 } 3425 }
3234 if (shipmentId != null) { 3426 if (shipmentId != null) {
3235 _json["shipmentId"] = shipmentId; 3427 _json["shipmentId"] = shipmentId;
3236 } 3428 }
3237 if (trackingId != null) { 3429 if (trackingId != null) {
3238 _json["trackingId"] = trackingId; 3430 _json["trackingId"] = trackingId;
3239 } 3431 }
3240 return _json; 3432 return _json;
3241 } 3433 }
3242 } 3434 }
3243 3435
3244 class OrdersShipLineItemsResponse { 3436 class OrdersShipLineItemsResponse {
3245 /** The status of the execution. */ 3437 /// The status of the execution.
3246 core.String executionStatus; 3438 core.String executionStatus;
3247 /** 3439
3248 * Identifies what kind of resource this is. Value: the fixed string 3440 /// Identifies what kind of resource this is. Value: the fixed string
3249 * "content#ordersShipLineItemsResponse". 3441 /// "content#ordersShipLineItemsResponse".
3250 */
3251 core.String kind; 3442 core.String kind;
3252 3443
3253 OrdersShipLineItemsResponse(); 3444 OrdersShipLineItemsResponse();
3254 3445
3255 OrdersShipLineItemsResponse.fromJson(core.Map _json) { 3446 OrdersShipLineItemsResponse.fromJson(core.Map _json) {
3256 if (_json.containsKey("executionStatus")) { 3447 if (_json.containsKey("executionStatus")) {
3257 executionStatus = _json["executionStatus"]; 3448 executionStatus = _json["executionStatus"];
3258 } 3449 }
3259 if (_json.containsKey("kind")) { 3450 if (_json.containsKey("kind")) {
3260 kind = _json["kind"]; 3451 kind = _json["kind"];
3261 } 3452 }
3262 } 3453 }
3263 3454
3264 core.Map<core.String, core.Object> toJson() { 3455 core.Map<core.String, core.Object> toJson() {
3265 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3456 final core.Map<core.String, core.Object> _json =
3457 new core.Map<core.String, core.Object>();
3266 if (executionStatus != null) { 3458 if (executionStatus != null) {
3267 _json["executionStatus"] = executionStatus; 3459 _json["executionStatus"] = executionStatus;
3268 } 3460 }
3269 if (kind != null) { 3461 if (kind != null) {
3270 _json["kind"] = kind; 3462 _json["kind"] = kind;
3271 } 3463 }
3272 return _json; 3464 return _json;
3273 } 3465 }
3274 } 3466 }
3275 3467
3276 class OrdersUpdateMerchantOrderIdRequest { 3468 class OrdersUpdateMerchantOrderIdRequest {
3277 /** 3469 /// The merchant order id to be assigned to the order. Must be unique per
3278 * The merchant order id to be assigned to the order. Must be unique per 3470 /// merchant.
3279 * merchant.
3280 */
3281 core.String merchantOrderId; 3471 core.String merchantOrderId;
3282 /** 3472
3283 * The ID of the operation. Unique across all operations for a given order. 3473 /// The ID of the operation. Unique across all operations for a given order.
3284 */
3285 core.String operationId; 3474 core.String operationId;
3286 3475
3287 OrdersUpdateMerchantOrderIdRequest(); 3476 OrdersUpdateMerchantOrderIdRequest();
3288 3477
3289 OrdersUpdateMerchantOrderIdRequest.fromJson(core.Map _json) { 3478 OrdersUpdateMerchantOrderIdRequest.fromJson(core.Map _json) {
3290 if (_json.containsKey("merchantOrderId")) { 3479 if (_json.containsKey("merchantOrderId")) {
3291 merchantOrderId = _json["merchantOrderId"]; 3480 merchantOrderId = _json["merchantOrderId"];
3292 } 3481 }
3293 if (_json.containsKey("operationId")) { 3482 if (_json.containsKey("operationId")) {
3294 operationId = _json["operationId"]; 3483 operationId = _json["operationId"];
3295 } 3484 }
3296 } 3485 }
3297 3486
3298 core.Map<core.String, core.Object> toJson() { 3487 core.Map<core.String, core.Object> toJson() {
3299 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3488 final core.Map<core.String, core.Object> _json =
3489 new core.Map<core.String, core.Object>();
3300 if (merchantOrderId != null) { 3490 if (merchantOrderId != null) {
3301 _json["merchantOrderId"] = merchantOrderId; 3491 _json["merchantOrderId"] = merchantOrderId;
3302 } 3492 }
3303 if (operationId != null) { 3493 if (operationId != null) {
3304 _json["operationId"] = operationId; 3494 _json["operationId"] = operationId;
3305 } 3495 }
3306 return _json; 3496 return _json;
3307 } 3497 }
3308 } 3498 }
3309 3499
3310 class OrdersUpdateMerchantOrderIdResponse { 3500 class OrdersUpdateMerchantOrderIdResponse {
3311 /** The status of the execution. */ 3501 /// The status of the execution.
3312 core.String executionStatus; 3502 core.String executionStatus;
3313 /** 3503
3314 * Identifies what kind of resource this is. Value: the fixed string 3504 /// Identifies what kind of resource this is. Value: the fixed string
3315 * "content#ordersUpdateMerchantOrderIdResponse". 3505 /// "content#ordersUpdateMerchantOrderIdResponse".
3316 */
3317 core.String kind; 3506 core.String kind;
3318 3507
3319 OrdersUpdateMerchantOrderIdResponse(); 3508 OrdersUpdateMerchantOrderIdResponse();
3320 3509
3321 OrdersUpdateMerchantOrderIdResponse.fromJson(core.Map _json) { 3510 OrdersUpdateMerchantOrderIdResponse.fromJson(core.Map _json) {
3322 if (_json.containsKey("executionStatus")) { 3511 if (_json.containsKey("executionStatus")) {
3323 executionStatus = _json["executionStatus"]; 3512 executionStatus = _json["executionStatus"];
3324 } 3513 }
3325 if (_json.containsKey("kind")) { 3514 if (_json.containsKey("kind")) {
3326 kind = _json["kind"]; 3515 kind = _json["kind"];
3327 } 3516 }
3328 } 3517 }
3329 3518
3330 core.Map<core.String, core.Object> toJson() { 3519 core.Map<core.String, core.Object> toJson() {
3331 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3520 final core.Map<core.String, core.Object> _json =
3521 new core.Map<core.String, core.Object>();
3332 if (executionStatus != null) { 3522 if (executionStatus != null) {
3333 _json["executionStatus"] = executionStatus; 3523 _json["executionStatus"] = executionStatus;
3334 } 3524 }
3335 if (kind != null) { 3525 if (kind != null) {
3336 _json["kind"] = kind; 3526 _json["kind"] = kind;
3337 } 3527 }
3338 return _json; 3528 return _json;
3339 } 3529 }
3340 } 3530 }
3341 3531
3342 class OrdersUpdateShipmentRequest { 3532 class OrdersUpdateShipmentRequest {
3343 /** The carrier handling the shipment. Not updated if missing. */ 3533 /// The carrier handling the shipment. Not updated if missing.
3344 core.String carrier; 3534 core.String carrier;
3345 /** 3535
3346 * The ID of the operation. Unique across all operations for a given order. 3536 /// The ID of the operation. Unique across all operations for a given order.
3347 */
3348 core.String operationId; 3537 core.String operationId;
3349 /** The ID of the shipment. */ 3538
3539 /// The ID of the shipment.
3350 core.String shipmentId; 3540 core.String shipmentId;
3351 /** New status for the shipment. Not updated if missing. */ 3541
3542 /// New status for the shipment. Not updated if missing.
3352 core.String status; 3543 core.String status;
3353 /** The tracking id for the shipment. Not updated if missing. */ 3544
3545 /// The tracking id for the shipment. Not updated if missing.
3354 core.String trackingId; 3546 core.String trackingId;
3355 3547
3356 OrdersUpdateShipmentRequest(); 3548 OrdersUpdateShipmentRequest();
3357 3549
3358 OrdersUpdateShipmentRequest.fromJson(core.Map _json) { 3550 OrdersUpdateShipmentRequest.fromJson(core.Map _json) {
3359 if (_json.containsKey("carrier")) { 3551 if (_json.containsKey("carrier")) {
3360 carrier = _json["carrier"]; 3552 carrier = _json["carrier"];
3361 } 3553 }
3362 if (_json.containsKey("operationId")) { 3554 if (_json.containsKey("operationId")) {
3363 operationId = _json["operationId"]; 3555 operationId = _json["operationId"];
3364 } 3556 }
3365 if (_json.containsKey("shipmentId")) { 3557 if (_json.containsKey("shipmentId")) {
3366 shipmentId = _json["shipmentId"]; 3558 shipmentId = _json["shipmentId"];
3367 } 3559 }
3368 if (_json.containsKey("status")) { 3560 if (_json.containsKey("status")) {
3369 status = _json["status"]; 3561 status = _json["status"];
3370 } 3562 }
3371 if (_json.containsKey("trackingId")) { 3563 if (_json.containsKey("trackingId")) {
3372 trackingId = _json["trackingId"]; 3564 trackingId = _json["trackingId"];
3373 } 3565 }
3374 } 3566 }
3375 3567
3376 core.Map<core.String, core.Object> toJson() { 3568 core.Map<core.String, core.Object> toJson() {
3377 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3569 final core.Map<core.String, core.Object> _json =
3570 new core.Map<core.String, core.Object>();
3378 if (carrier != null) { 3571 if (carrier != null) {
3379 _json["carrier"] = carrier; 3572 _json["carrier"] = carrier;
3380 } 3573 }
3381 if (operationId != null) { 3574 if (operationId != null) {
3382 _json["operationId"] = operationId; 3575 _json["operationId"] = operationId;
3383 } 3576 }
3384 if (shipmentId != null) { 3577 if (shipmentId != null) {
3385 _json["shipmentId"] = shipmentId; 3578 _json["shipmentId"] = shipmentId;
3386 } 3579 }
3387 if (status != null) { 3580 if (status != null) {
3388 _json["status"] = status; 3581 _json["status"] = status;
3389 } 3582 }
3390 if (trackingId != null) { 3583 if (trackingId != null) {
3391 _json["trackingId"] = trackingId; 3584 _json["trackingId"] = trackingId;
3392 } 3585 }
3393 return _json; 3586 return _json;
3394 } 3587 }
3395 } 3588 }
3396 3589
3397 class OrdersUpdateShipmentResponse { 3590 class OrdersUpdateShipmentResponse {
3398 /** The status of the execution. */ 3591 /// The status of the execution.
3399 core.String executionStatus; 3592 core.String executionStatus;
3400 /** 3593
3401 * Identifies what kind of resource this is. Value: the fixed string 3594 /// Identifies what kind of resource this is. Value: the fixed string
3402 * "content#ordersUpdateShipmentResponse". 3595 /// "content#ordersUpdateShipmentResponse".
3403 */
3404 core.String kind; 3596 core.String kind;
3405 3597
3406 OrdersUpdateShipmentResponse(); 3598 OrdersUpdateShipmentResponse();
3407 3599
3408 OrdersUpdateShipmentResponse.fromJson(core.Map _json) { 3600 OrdersUpdateShipmentResponse.fromJson(core.Map _json) {
3409 if (_json.containsKey("executionStatus")) { 3601 if (_json.containsKey("executionStatus")) {
3410 executionStatus = _json["executionStatus"]; 3602 executionStatus = _json["executionStatus"];
3411 } 3603 }
3412 if (_json.containsKey("kind")) { 3604 if (_json.containsKey("kind")) {
3413 kind = _json["kind"]; 3605 kind = _json["kind"];
3414 } 3606 }
3415 } 3607 }
3416 3608
3417 core.Map<core.String, core.Object> toJson() { 3609 core.Map<core.String, core.Object> toJson() {
3418 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3610 final core.Map<core.String, core.Object> _json =
3611 new core.Map<core.String, core.Object>();
3419 if (executionStatus != null) { 3612 if (executionStatus != null) {
3420 _json["executionStatus"] = executionStatus; 3613 _json["executionStatus"] = executionStatus;
3421 } 3614 }
3422 if (kind != null) { 3615 if (kind != null) {
3423 _json["kind"] = kind; 3616 _json["kind"] = kind;
3424 } 3617 }
3425 return _json; 3618 return _json;
3426 } 3619 }
3427 } 3620 }
3428 3621
3429 class Price { 3622 class Price {
3430 /** The currency of the price. */ 3623 /// The currency of the price.
3431 core.String currency; 3624 core.String currency;
3432 /** The price represented as a number. */ 3625
3626 /// The price represented as a number.
3433 core.String value; 3627 core.String value;
3434 3628
3435 Price(); 3629 Price();
3436 3630
3437 Price.fromJson(core.Map _json) { 3631 Price.fromJson(core.Map _json) {
3438 if (_json.containsKey("currency")) { 3632 if (_json.containsKey("currency")) {
3439 currency = _json["currency"]; 3633 currency = _json["currency"];
3440 } 3634 }
3441 if (_json.containsKey("value")) { 3635 if (_json.containsKey("value")) {
3442 value = _json["value"]; 3636 value = _json["value"];
3443 } 3637 }
3444 } 3638 }
3445 3639
3446 core.Map<core.String, core.Object> toJson() { 3640 core.Map<core.String, core.Object> toJson() {
3447 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3641 final core.Map<core.String, core.Object> _json =
3642 new core.Map<core.String, core.Object>();
3448 if (currency != null) { 3643 if (currency != null) {
3449 _json["currency"] = currency; 3644 _json["currency"] = currency;
3450 } 3645 }
3451 if (value != null) { 3646 if (value != null) {
3452 _json["value"] = value; 3647 _json["value"] = value;
3453 } 3648 }
3454 return _json; 3649 return _json;
3455 } 3650 }
3456 } 3651 }
3457 3652
3458 class TestOrder { 3653 class TestOrder {
3459 /** The details of the customer who placed the order. */ 3654 /// The details of the customer who placed the order.
3460 TestOrderCustomer customer; 3655 TestOrderCustomer customer;
3461 /** 3656
3462 * Identifies what kind of resource this is. Value: the fixed string 3657 /// Identifies what kind of resource this is. Value: the fixed string
3463 * "content#testOrder". 3658 /// "content#testOrder".
3464 */
3465 core.String kind; 3659 core.String kind;
3466 /** Line items that are ordered. At least one line item must be provided. */ 3660
3661 /// Line items that are ordered. At least one line item must be provided.
3467 core.List<TestOrderLineItem> lineItems; 3662 core.List<TestOrderLineItem> lineItems;
3468 /** The details of the payment method. */ 3663
3664 /// The details of the payment method.
3469 TestOrderPaymentMethod paymentMethod; 3665 TestOrderPaymentMethod paymentMethod;
3470 /** 3666
3471 * Identifier of one of the predefined delivery addresses for the delivery. 3667 /// Identifier of one of the predefined delivery addresses for the delivery.
3472 */
3473 core.String predefinedDeliveryAddress; 3668 core.String predefinedDeliveryAddress;
3474 /** 3669
3475 * The details of the merchant provided promotions applied to the order. More 3670 /// The details of the merchant provided promotions applied to the order.
3476 * details about the program are here. 3671 /// More details about the program are here.
3477 */
3478 core.List<OrderPromotion> promotions; 3672 core.List<OrderPromotion> promotions;
3479 /** The total cost of shipping for all items. */ 3673
3674 /// The total cost of shipping for all items.
3480 Price shippingCost; 3675 Price shippingCost;
3481 /** The tax for the total shipping cost. */ 3676
3677 /// The tax for the total shipping cost.
3482 Price shippingCostTax; 3678 Price shippingCostTax;
3483 /** The requested shipping option. */ 3679
3680 /// The requested shipping option.
3484 core.String shippingOption; 3681 core.String shippingOption;
3485 3682
3486 TestOrder(); 3683 TestOrder();
3487 3684
3488 TestOrder.fromJson(core.Map _json) { 3685 TestOrder.fromJson(core.Map _json) {
3489 if (_json.containsKey("customer")) { 3686 if (_json.containsKey("customer")) {
3490 customer = new TestOrderCustomer.fromJson(_json["customer"]); 3687 customer = new TestOrderCustomer.fromJson(_json["customer"]);
3491 } 3688 }
3492 if (_json.containsKey("kind")) { 3689 if (_json.containsKey("kind")) {
3493 kind = _json["kind"]; 3690 kind = _json["kind"];
3494 } 3691 }
3495 if (_json.containsKey("lineItems")) { 3692 if (_json.containsKey("lineItems")) {
3496 lineItems = _json["lineItems"].map((value) => new TestOrderLineItem.fromJs on(value)).toList(); 3693 lineItems = _json["lineItems"]
3694 .map((value) => new TestOrderLineItem.fromJson(value))
3695 .toList();
3497 } 3696 }
3498 if (_json.containsKey("paymentMethod")) { 3697 if (_json.containsKey("paymentMethod")) {
3499 paymentMethod = new TestOrderPaymentMethod.fromJson(_json["paymentMethod"] ); 3698 paymentMethod =
3699 new TestOrderPaymentMethod.fromJson(_json["paymentMethod"]);
3500 } 3700 }
3501 if (_json.containsKey("predefinedDeliveryAddress")) { 3701 if (_json.containsKey("predefinedDeliveryAddress")) {
3502 predefinedDeliveryAddress = _json["predefinedDeliveryAddress"]; 3702 predefinedDeliveryAddress = _json["predefinedDeliveryAddress"];
3503 } 3703 }
3504 if (_json.containsKey("promotions")) { 3704 if (_json.containsKey("promotions")) {
3505 promotions = _json["promotions"].map((value) => new OrderPromotion.fromJso n(value)).toList(); 3705 promotions = _json["promotions"]
3706 .map((value) => new OrderPromotion.fromJson(value))
3707 .toList();
3506 } 3708 }
3507 if (_json.containsKey("shippingCost")) { 3709 if (_json.containsKey("shippingCost")) {
3508 shippingCost = new Price.fromJson(_json["shippingCost"]); 3710 shippingCost = new Price.fromJson(_json["shippingCost"]);
3509 } 3711 }
3510 if (_json.containsKey("shippingCostTax")) { 3712 if (_json.containsKey("shippingCostTax")) {
3511 shippingCostTax = new Price.fromJson(_json["shippingCostTax"]); 3713 shippingCostTax = new Price.fromJson(_json["shippingCostTax"]);
3512 } 3714 }
3513 if (_json.containsKey("shippingOption")) { 3715 if (_json.containsKey("shippingOption")) {
3514 shippingOption = _json["shippingOption"]; 3716 shippingOption = _json["shippingOption"];
3515 } 3717 }
3516 } 3718 }
3517 3719
3518 core.Map<core.String, core.Object> toJson() { 3720 core.Map<core.String, core.Object> toJson() {
3519 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3721 final core.Map<core.String, core.Object> _json =
3722 new core.Map<core.String, core.Object>();
3520 if (customer != null) { 3723 if (customer != null) {
3521 _json["customer"] = (customer).toJson(); 3724 _json["customer"] = (customer).toJson();
3522 } 3725 }
3523 if (kind != null) { 3726 if (kind != null) {
3524 _json["kind"] = kind; 3727 _json["kind"] = kind;
3525 } 3728 }
3526 if (lineItems != null) { 3729 if (lineItems != null) {
3527 _json["lineItems"] = lineItems.map((value) => (value).toJson()).toList(); 3730 _json["lineItems"] = lineItems.map((value) => (value).toJson()).toList();
3528 } 3731 }
3529 if (paymentMethod != null) { 3732 if (paymentMethod != null) {
3530 _json["paymentMethod"] = (paymentMethod).toJson(); 3733 _json["paymentMethod"] = (paymentMethod).toJson();
3531 } 3734 }
3532 if (predefinedDeliveryAddress != null) { 3735 if (predefinedDeliveryAddress != null) {
3533 _json["predefinedDeliveryAddress"] = predefinedDeliveryAddress; 3736 _json["predefinedDeliveryAddress"] = predefinedDeliveryAddress;
3534 } 3737 }
3535 if (promotions != null) { 3738 if (promotions != null) {
3536 _json["promotions"] = promotions.map((value) => (value).toJson()).toList() ; 3739 _json["promotions"] =
3740 promotions.map((value) => (value).toJson()).toList();
3537 } 3741 }
3538 if (shippingCost != null) { 3742 if (shippingCost != null) {
3539 _json["shippingCost"] = (shippingCost).toJson(); 3743 _json["shippingCost"] = (shippingCost).toJson();
3540 } 3744 }
3541 if (shippingCostTax != null) { 3745 if (shippingCostTax != null) {
3542 _json["shippingCostTax"] = (shippingCostTax).toJson(); 3746 _json["shippingCostTax"] = (shippingCostTax).toJson();
3543 } 3747 }
3544 if (shippingOption != null) { 3748 if (shippingOption != null) {
3545 _json["shippingOption"] = shippingOption; 3749 _json["shippingOption"] = shippingOption;
3546 } 3750 }
3547 return _json; 3751 return _json;
3548 } 3752 }
3549 } 3753 }
3550 3754
3551 class TestOrderCustomer { 3755 class TestOrderCustomer {
3552 /** Email address of the customer. */ 3756 /// Email address of the customer.
3553 core.String email; 3757 core.String email;
3554 /** 3758
3555 * If set, this indicates the user explicitly chose to opt in or out of 3759 /// If set, this indicates the user explicitly chose to opt in or out of
3556 * providing marketing rights to the merchant. If unset, this indicates the 3760 /// providing marketing rights to the merchant. If unset, this indicates the
3557 * user has already made this choice in a previous purchase, and was thus not 3761 /// user has already made this choice in a previous purchase, and was thus
3558 * shown the marketing right opt in/out checkbox during the checkout flow. 3762 /// not shown the marketing right opt in/out checkbox during the checkout
3559 * Optional. 3763 /// flow. Optional.
3560 */
3561 core.bool explicitMarketingPreference; 3764 core.bool explicitMarketingPreference;
3562 /** Full name of the customer. */ 3765
3766 /// Full name of the customer.
3563 core.String fullName; 3767 core.String fullName;
3564 3768
3565 TestOrderCustomer(); 3769 TestOrderCustomer();
3566 3770
3567 TestOrderCustomer.fromJson(core.Map _json) { 3771 TestOrderCustomer.fromJson(core.Map _json) {
3568 if (_json.containsKey("email")) { 3772 if (_json.containsKey("email")) {
3569 email = _json["email"]; 3773 email = _json["email"];
3570 } 3774 }
3571 if (_json.containsKey("explicitMarketingPreference")) { 3775 if (_json.containsKey("explicitMarketingPreference")) {
3572 explicitMarketingPreference = _json["explicitMarketingPreference"]; 3776 explicitMarketingPreference = _json["explicitMarketingPreference"];
3573 } 3777 }
3574 if (_json.containsKey("fullName")) { 3778 if (_json.containsKey("fullName")) {
3575 fullName = _json["fullName"]; 3779 fullName = _json["fullName"];
3576 } 3780 }
3577 } 3781 }
3578 3782
3579 core.Map<core.String, core.Object> toJson() { 3783 core.Map<core.String, core.Object> toJson() {
3580 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3784 final core.Map<core.String, core.Object> _json =
3785 new core.Map<core.String, core.Object>();
3581 if (email != null) { 3786 if (email != null) {
3582 _json["email"] = email; 3787 _json["email"] = email;
3583 } 3788 }
3584 if (explicitMarketingPreference != null) { 3789 if (explicitMarketingPreference != null) {
3585 _json["explicitMarketingPreference"] = explicitMarketingPreference; 3790 _json["explicitMarketingPreference"] = explicitMarketingPreference;
3586 } 3791 }
3587 if (fullName != null) { 3792 if (fullName != null) {
3588 _json["fullName"] = fullName; 3793 _json["fullName"] = fullName;
3589 } 3794 }
3590 return _json; 3795 return _json;
3591 } 3796 }
3592 } 3797 }
3593 3798
3594 class TestOrderLineItem { 3799 class TestOrderLineItem {
3595 /** Product data from the time of the order placement. */ 3800 /// Product data from the time of the order placement.
3596 TestOrderLineItemProduct product; 3801 TestOrderLineItemProduct product;
3597 /** Number of items ordered. */ 3802
3803 /// Number of items ordered.
3598 core.int quantityOrdered; 3804 core.int quantityOrdered;
3599 /** Details of the return policy for the line item. */ 3805
3806 /// Details of the return policy for the line item.
3600 OrderLineItemReturnInfo returnInfo; 3807 OrderLineItemReturnInfo returnInfo;
3601 /** Details of the requested shipping for the line item. */ 3808
3809 /// Details of the requested shipping for the line item.
3602 OrderLineItemShippingDetails shippingDetails; 3810 OrderLineItemShippingDetails shippingDetails;
3603 /** Unit tax for the line item. */ 3811
3812 /// Unit tax for the line item.
3604 Price unitTax; 3813 Price unitTax;
3605 3814
3606 TestOrderLineItem(); 3815 TestOrderLineItem();
3607 3816
3608 TestOrderLineItem.fromJson(core.Map _json) { 3817 TestOrderLineItem.fromJson(core.Map _json) {
3609 if (_json.containsKey("product")) { 3818 if (_json.containsKey("product")) {
3610 product = new TestOrderLineItemProduct.fromJson(_json["product"]); 3819 product = new TestOrderLineItemProduct.fromJson(_json["product"]);
3611 } 3820 }
3612 if (_json.containsKey("quantityOrdered")) { 3821 if (_json.containsKey("quantityOrdered")) {
3613 quantityOrdered = _json["quantityOrdered"]; 3822 quantityOrdered = _json["quantityOrdered"];
3614 } 3823 }
3615 if (_json.containsKey("returnInfo")) { 3824 if (_json.containsKey("returnInfo")) {
3616 returnInfo = new OrderLineItemReturnInfo.fromJson(_json["returnInfo"]); 3825 returnInfo = new OrderLineItemReturnInfo.fromJson(_json["returnInfo"]);
3617 } 3826 }
3618 if (_json.containsKey("shippingDetails")) { 3827 if (_json.containsKey("shippingDetails")) {
3619 shippingDetails = new OrderLineItemShippingDetails.fromJson(_json["shippin gDetails"]); 3828 shippingDetails =
3829 new OrderLineItemShippingDetails.fromJson(_json["shippingDetails"]);
3620 } 3830 }
3621 if (_json.containsKey("unitTax")) { 3831 if (_json.containsKey("unitTax")) {
3622 unitTax = new Price.fromJson(_json["unitTax"]); 3832 unitTax = new Price.fromJson(_json["unitTax"]);
3623 } 3833 }
3624 } 3834 }
3625 3835
3626 core.Map<core.String, core.Object> toJson() { 3836 core.Map<core.String, core.Object> toJson() {
3627 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3837 final core.Map<core.String, core.Object> _json =
3838 new core.Map<core.String, core.Object>();
3628 if (product != null) { 3839 if (product != null) {
3629 _json["product"] = (product).toJson(); 3840 _json["product"] = (product).toJson();
3630 } 3841 }
3631 if (quantityOrdered != null) { 3842 if (quantityOrdered != null) {
3632 _json["quantityOrdered"] = quantityOrdered; 3843 _json["quantityOrdered"] = quantityOrdered;
3633 } 3844 }
3634 if (returnInfo != null) { 3845 if (returnInfo != null) {
3635 _json["returnInfo"] = (returnInfo).toJson(); 3846 _json["returnInfo"] = (returnInfo).toJson();
3636 } 3847 }
3637 if (shippingDetails != null) { 3848 if (shippingDetails != null) {
3638 _json["shippingDetails"] = (shippingDetails).toJson(); 3849 _json["shippingDetails"] = (shippingDetails).toJson();
3639 } 3850 }
3640 if (unitTax != null) { 3851 if (unitTax != null) {
3641 _json["unitTax"] = (unitTax).toJson(); 3852 _json["unitTax"] = (unitTax).toJson();
3642 } 3853 }
3643 return _json; 3854 return _json;
3644 } 3855 }
3645 } 3856 }
3646 3857
3647 class TestOrderLineItemProduct { 3858 class TestOrderLineItemProduct {
3648 /** Brand of the item. */ 3859 /// Brand of the item.
3649 core.String brand; 3860 core.String brand;
3650 /** The item's channel. */ 3861
3862 /// The item's channel.
3651 core.String channel; 3863 core.String channel;
3652 /** Condition or state of the item. */ 3864
3865 /// Condition or state of the item.
3653 core.String condition; 3866 core.String condition;
3654 /** The two-letter ISO 639-1 language code for the item. */ 3867
3868 /// The two-letter ISO 639-1 language code for the item.
3655 core.String contentLanguage; 3869 core.String contentLanguage;
3656 /** Global Trade Item Number (GTIN) of the item. Optional. */ 3870
3871 /// Global Trade Item Number (GTIN) of the item. Optional.
3657 core.String gtin; 3872 core.String gtin;
3658 /** URL of an image of the item. */ 3873
3874 /// URL of an image of the item.
3659 core.String imageLink; 3875 core.String imageLink;
3660 /** Shared identifier for all variants of the same product. Optional. */ 3876
3877 /// Shared identifier for all variants of the same product. Optional.
3661 core.String itemGroupId; 3878 core.String itemGroupId;
3662 /** Manufacturer Part Number (MPN) of the item. Optional. */ 3879
3880 /// Manufacturer Part Number (MPN) of the item. Optional.
3663 core.String mpn; 3881 core.String mpn;
3664 /** An identifier of the item. */ 3882
3883 /// An identifier of the item.
3665 core.String offerId; 3884 core.String offerId;
3666 /** The price for the product. */ 3885
3886 /// The price for the product.
3667 Price price; 3887 Price price;
3668 /** The CLDR territory code of the target country of the product. */ 3888
3889 /// The CLDR territory code of the target country of the product.
3669 core.String targetCountry; 3890 core.String targetCountry;
3670 /** The title of the product. */ 3891
3892 /// The title of the product.
3671 core.String title; 3893 core.String title;
3672 /** Variant attributes for the item. Optional. */ 3894
3895 /// Variant attributes for the item. Optional.
3673 core.List<OrderLineItemProductVariantAttribute> variantAttributes; 3896 core.List<OrderLineItemProductVariantAttribute> variantAttributes;
3674 3897
3675 TestOrderLineItemProduct(); 3898 TestOrderLineItemProduct();
3676 3899
3677 TestOrderLineItemProduct.fromJson(core.Map _json) { 3900 TestOrderLineItemProduct.fromJson(core.Map _json) {
3678 if (_json.containsKey("brand")) { 3901 if (_json.containsKey("brand")) {
3679 brand = _json["brand"]; 3902 brand = _json["brand"];
3680 } 3903 }
3681 if (_json.containsKey("channel")) { 3904 if (_json.containsKey("channel")) {
3682 channel = _json["channel"]; 3905 channel = _json["channel"];
(...skipping 22 matching lines...) Expand all
3705 if (_json.containsKey("price")) { 3928 if (_json.containsKey("price")) {
3706 price = new Price.fromJson(_json["price"]); 3929 price = new Price.fromJson(_json["price"]);
3707 } 3930 }
3708 if (_json.containsKey("targetCountry")) { 3931 if (_json.containsKey("targetCountry")) {
3709 targetCountry = _json["targetCountry"]; 3932 targetCountry = _json["targetCountry"];
3710 } 3933 }
3711 if (_json.containsKey("title")) { 3934 if (_json.containsKey("title")) {
3712 title = _json["title"]; 3935 title = _json["title"];
3713 } 3936 }
3714 if (_json.containsKey("variantAttributes")) { 3937 if (_json.containsKey("variantAttributes")) {
3715 variantAttributes = _json["variantAttributes"].map((value) => new OrderLin eItemProductVariantAttribute.fromJson(value)).toList(); 3938 variantAttributes = _json["variantAttributes"]
3939 .map((value) =>
3940 new OrderLineItemProductVariantAttribute.fromJson(value))
3941 .toList();
3716 } 3942 }
3717 } 3943 }
3718 3944
3719 core.Map<core.String, core.Object> toJson() { 3945 core.Map<core.String, core.Object> toJson() {
3720 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3946 final core.Map<core.String, core.Object> _json =
3947 new core.Map<core.String, core.Object>();
3721 if (brand != null) { 3948 if (brand != null) {
3722 _json["brand"] = brand; 3949 _json["brand"] = brand;
3723 } 3950 }
3724 if (channel != null) { 3951 if (channel != null) {
3725 _json["channel"] = channel; 3952 _json["channel"] = channel;
3726 } 3953 }
3727 if (condition != null) { 3954 if (condition != null) {
3728 _json["condition"] = condition; 3955 _json["condition"] = condition;
3729 } 3956 }
3730 if (contentLanguage != null) { 3957 if (contentLanguage != null) {
(...skipping 17 matching lines...) Expand all
3748 if (price != null) { 3975 if (price != null) {
3749 _json["price"] = (price).toJson(); 3976 _json["price"] = (price).toJson();
3750 } 3977 }
3751 if (targetCountry != null) { 3978 if (targetCountry != null) {
3752 _json["targetCountry"] = targetCountry; 3979 _json["targetCountry"] = targetCountry;
3753 } 3980 }
3754 if (title != null) { 3981 if (title != null) {
3755 _json["title"] = title; 3982 _json["title"] = title;
3756 } 3983 }
3757 if (variantAttributes != null) { 3984 if (variantAttributes != null) {
3758 _json["variantAttributes"] = variantAttributes.map((value) => (value).toJs on()).toList(); 3985 _json["variantAttributes"] =
3986 variantAttributes.map((value) => (value).toJson()).toList();
3759 } 3987 }
3760 return _json; 3988 return _json;
3761 } 3989 }
3762 } 3990 }
3763 3991
3764 class TestOrderPaymentMethod { 3992 class TestOrderPaymentMethod {
3765 /** The card expiration month (January = 1, February = 2 etc.). */ 3993 /// The card expiration month (January = 1, February = 2 etc.).
3766 core.int expirationMonth; 3994 core.int expirationMonth;
3767 /** The card expiration year (4-digit, e.g. 2015). */ 3995
3996 /// The card expiration year (4-digit, e.g. 2015).
3768 core.int expirationYear; 3997 core.int expirationYear;
3769 /** The last four digits of the card number. */ 3998
3999 /// The last four digits of the card number.
3770 core.String lastFourDigits; 4000 core.String lastFourDigits;
3771 /** The billing address. */ 4001
4002 /// The billing address.
3772 core.String predefinedBillingAddress; 4003 core.String predefinedBillingAddress;
3773 /** 4004
3774 * The type of instrument. Note that real orders might have different values 4005 /// The type of instrument. Note that real orders might have different values
3775 * than the four values accepted by createTestOrder. 4006 /// than the four values accepted by createTestOrder.
3776 */
3777 core.String type; 4007 core.String type;
3778 4008
3779 TestOrderPaymentMethod(); 4009 TestOrderPaymentMethod();
3780 4010
3781 TestOrderPaymentMethod.fromJson(core.Map _json) { 4011 TestOrderPaymentMethod.fromJson(core.Map _json) {
3782 if (_json.containsKey("expirationMonth")) { 4012 if (_json.containsKey("expirationMonth")) {
3783 expirationMonth = _json["expirationMonth"]; 4013 expirationMonth = _json["expirationMonth"];
3784 } 4014 }
3785 if (_json.containsKey("expirationYear")) { 4015 if (_json.containsKey("expirationYear")) {
3786 expirationYear = _json["expirationYear"]; 4016 expirationYear = _json["expirationYear"];
3787 } 4017 }
3788 if (_json.containsKey("lastFourDigits")) { 4018 if (_json.containsKey("lastFourDigits")) {
3789 lastFourDigits = _json["lastFourDigits"]; 4019 lastFourDigits = _json["lastFourDigits"];
3790 } 4020 }
3791 if (_json.containsKey("predefinedBillingAddress")) { 4021 if (_json.containsKey("predefinedBillingAddress")) {
3792 predefinedBillingAddress = _json["predefinedBillingAddress"]; 4022 predefinedBillingAddress = _json["predefinedBillingAddress"];
3793 } 4023 }
3794 if (_json.containsKey("type")) { 4024 if (_json.containsKey("type")) {
3795 type = _json["type"]; 4025 type = _json["type"];
3796 } 4026 }
3797 } 4027 }
3798 4028
3799 core.Map<core.String, core.Object> toJson() { 4029 core.Map<core.String, core.Object> toJson() {
3800 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4030 final core.Map<core.String, core.Object> _json =
4031 new core.Map<core.String, core.Object>();
3801 if (expirationMonth != null) { 4032 if (expirationMonth != null) {
3802 _json["expirationMonth"] = expirationMonth; 4033 _json["expirationMonth"] = expirationMonth;
3803 } 4034 }
3804 if (expirationYear != null) { 4035 if (expirationYear != null) {
3805 _json["expirationYear"] = expirationYear; 4036 _json["expirationYear"] = expirationYear;
3806 } 4037 }
3807 if (lastFourDigits != null) { 4038 if (lastFourDigits != null) {
3808 _json["lastFourDigits"] = lastFourDigits; 4039 _json["lastFourDigits"] = lastFourDigits;
3809 } 4040 }
3810 if (predefinedBillingAddress != null) { 4041 if (predefinedBillingAddress != null) {
3811 _json["predefinedBillingAddress"] = predefinedBillingAddress; 4042 _json["predefinedBillingAddress"] = predefinedBillingAddress;
3812 } 4043 }
3813 if (type != null) { 4044 if (type != null) {
3814 _json["type"] = type; 4045 _json["type"] = type;
3815 } 4046 }
3816 return _json; 4047 return _json;
3817 } 4048 }
3818 } 4049 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/content/v2.dart ('k') | generated/googleapis/lib/customsearch/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698