@ricado/api-client 2.3.17 → 2.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipBarcodeScannerController.js +198 -0
- package/lib/Controllers/Packhouse/Site/BinTipBinController.js +14 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +186 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerBinWeightController.js +959 -0
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +89 -15
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +1 -1
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +35 -4
- package/lib/Controllers/Packhouse/Site/MAFSizerController.js +101 -19
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +435 -23
- package/lib/Controllers/Packhouse/Site/PackrunController.js +11 -2
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +38 -2
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +52 -6
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +70 -4
- package/lib/Controllers/Packhouse/Site/ShiftController.js +1 -1
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
- package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +2 -2
- package/lib/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +14 -2
- package/lib/Controllers/Packhouse/Site/index.js +6 -0
- package/lib/Models/Packhouse/Site/BinTipBarcodeScannerModel.js +263 -0
- package/lib/Models/Packhouse/Site/BinTipBinModel.js +75 -5
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +1276 -5
- package/lib/Models/Packhouse/Site/CompacSizerBinWeightModel.js +627 -0
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +966 -72
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +260 -8
- package/lib/Models/Packhouse/Site/MAFSizerModel.js +660 -85
- package/lib/Models/Packhouse/Site/PackingLineModel.js +3860 -551
- package/lib/Models/Packhouse/Site/PackrunModel.js +26 -4
- package/lib/Models/Packhouse/Site/RejectBinModel.js +214 -4
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +576 -14
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +113 -9
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +98 -0
- package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +50 -5
- package/lib/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +75 -5
- package/lib/Models/Packhouse/Site/index.js +6 -0
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +6132 -2165
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/BinTipBarcodeScannerController.js +175 -0
- package/src/Controllers/Packhouse/Site/BinTipBinController.js +14 -2
- package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +186 -2
- package/src/Controllers/Packhouse/Site/CompacSizerBinWeightController.js +1090 -0
- package/src/Controllers/Packhouse/Site/CompacSizerController.js +89 -15
- package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +1 -1
- package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +35 -4
- package/src/Controllers/Packhouse/Site/MAFSizerController.js +101 -19
- package/src/Controllers/Packhouse/Site/PackingLineController.js +435 -23
- package/src/Controllers/Packhouse/Site/PackrunController.js +11 -2
- package/src/Controllers/Packhouse/Site/RejectBinController.js +38 -2
- package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +52 -6
- package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +70 -4
- package/src/Controllers/Packhouse/Site/ShiftController.js +1 -1
- package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
- package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +2 -2
- package/src/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +14 -2
- package/src/Controllers/Packhouse/Site/index.js +4 -0
- package/src/Models/Packhouse/Site/BinTipBarcodeScannerModel.js +252 -0
- package/src/Models/Packhouse/Site/BinTipBinModel.js +97 -5
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +1682 -5
- package/src/Models/Packhouse/Site/CompacSizerBinWeightModel.js +715 -0
- package/src/Models/Packhouse/Site/CompacSizerModel.js +1319 -109
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +339 -8
- package/src/Models/Packhouse/Site/MAFSizerModel.js +869 -92
- package/src/Models/Packhouse/Site/PackingLineModel.js +5086 -671
- package/src/Models/Packhouse/Site/PackrunModel.js +33 -4
- package/src/Models/Packhouse/Site/RejectBinModel.js +280 -4
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +775 -15
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +147 -10
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +120 -0
- package/src/Models/Packhouse/Site/SoftSortBeltModel.js +65 -5
- package/src/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +97 -5
- package/src/Models/Packhouse/Site/index.js +4 -0
- package/src/PackageVersion.js +1 -1
|
@@ -0,0 +1,715 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Auto-Generated by the RICADO Gen 4 PHP API Project
|
|
3
|
+
*
|
|
4
|
+
* Do Not Edit this File Manually!
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import BaseModel from '../../../Models/BaseModel';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Model Class for a Compac Sizer Bin Weight
|
|
11
|
+
*
|
|
12
|
+
* @class
|
|
13
|
+
* @hideconstructor
|
|
14
|
+
* @extends BaseModel
|
|
15
|
+
*/
|
|
16
|
+
class CompacSizerBinWeightModel extends BaseModel
|
|
17
|
+
{
|
|
18
|
+
/**
|
|
19
|
+
* CompacSizerBinWeightModel Constructor
|
|
20
|
+
*
|
|
21
|
+
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Compac Sizer Bin Weight
|
|
23
|
+
*/
|
|
24
|
+
constructor(siteId)
|
|
25
|
+
{
|
|
26
|
+
super();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The Compac Sizer Bin Weight ID
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
this.id = "";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The Compac Sizer ID this Bin Weight is associated with
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
this.compacSizerId = "";
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The Packrun ID associated with this Bin Weight
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
this.packrunId = "";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* When this Bin Weight was Created
|
|
54
|
+
*
|
|
55
|
+
* @type {Date}
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
this.createdTimestamp = new Date();
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The Time Batch ID associated with this Bin Weight
|
|
62
|
+
*
|
|
63
|
+
* @type {?string}
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
this.timeBatchId = null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The Sources and Weights that make up this Bin Weight
|
|
70
|
+
*
|
|
71
|
+
* @type {{type: string, outletNumber: number, outletName: ?string, weights: Array<{classType: string, weight: number, fruitCount: ?number}>}|{type: string, weights: Array<{classType: string, weight: number, fruitCount: ?number}>}[]}
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
this.sources = [];
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The Multi-Grower Bin Weights that will be submitted to FreshPack
|
|
78
|
+
*
|
|
79
|
+
* @type {Array<{classType: string, weight: number, weightApi: ?{requestCount: number, requestTimestamp: ?Date, responseCode: ?number, responseMessage: ?string, completed: boolean}}>}
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
this.freshPackMultiGrowerBinWeights = [];
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The Multi-Grower Bins that will be submitted to FreshPack
|
|
86
|
+
*
|
|
87
|
+
* @type {Array<{classType: string, binNumber: ?string, printBinCard: boolean, binNumberApi: ?{requestCount: number, requestTimestamp: ?Date, responseCode: ?number, responseMessage: ?string, completed: boolean}, binCardApi: ?{requestCount: number, requestTimestamp: ?Date, responseCode: ?number, responseMessage: ?string, completed: boolean}}>}
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
this.freshPackMultiGrowerBins = [];
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Whether the Compac Sizer Bin Weight has been deleted
|
|
94
|
+
*
|
|
95
|
+
* @type {boolean}
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
this.deleted = false;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* When the Compac Sizer Bin Weight was last updated
|
|
102
|
+
*
|
|
103
|
+
* @type {Date}
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
this.updateTimestamp = new Date();
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The Site ID associated with this Compac Sizer Bin Weight
|
|
110
|
+
*
|
|
111
|
+
* @type {number}
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
this.siteId = siteId;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Create a new **CompacSizerBinWeightModel** from a JSON Object or JSON String
|
|
119
|
+
*
|
|
120
|
+
* @static
|
|
121
|
+
* @public
|
|
122
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
123
|
+
* @param {number} siteId The Site ID associated with this Compac Sizer Bin Weight
|
|
124
|
+
* @return {CompacSizerBinWeightModel}
|
|
125
|
+
*/
|
|
126
|
+
static fromJSON(json, siteId)
|
|
127
|
+
{
|
|
128
|
+
let model = new CompacSizerBinWeightModel(siteId);
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The JSON Object
|
|
132
|
+
*
|
|
133
|
+
* @type {Object<string, any>}
|
|
134
|
+
*/
|
|
135
|
+
let jsonObject = {};
|
|
136
|
+
|
|
137
|
+
if(typeof json === 'string')
|
|
138
|
+
{
|
|
139
|
+
jsonObject = JSON.parse(json);
|
|
140
|
+
}
|
|
141
|
+
else if(typeof json === 'object')
|
|
142
|
+
{
|
|
143
|
+
jsonObject = json;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if('id' in jsonObject)
|
|
147
|
+
{
|
|
148
|
+
model.id = (function(){
|
|
149
|
+
if(typeof jsonObject['id'] !== 'string')
|
|
150
|
+
{
|
|
151
|
+
return String(jsonObject['id']);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return jsonObject['id'];
|
|
155
|
+
}());
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if('compacSizerId' in jsonObject)
|
|
159
|
+
{
|
|
160
|
+
model.compacSizerId = (function(){
|
|
161
|
+
if(typeof jsonObject['compacSizerId'] !== 'string')
|
|
162
|
+
{
|
|
163
|
+
return String(jsonObject['compacSizerId']);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return jsonObject['compacSizerId'];
|
|
167
|
+
}());
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if('packrunId' in jsonObject)
|
|
171
|
+
{
|
|
172
|
+
model.packrunId = (function(){
|
|
173
|
+
if(typeof jsonObject['packrunId'] !== 'string')
|
|
174
|
+
{
|
|
175
|
+
return String(jsonObject['packrunId']);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return jsonObject['packrunId'];
|
|
179
|
+
}());
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if('createdTimestamp' in jsonObject)
|
|
183
|
+
{
|
|
184
|
+
model.createdTimestamp = (function(){
|
|
185
|
+
if(typeof jsonObject['createdTimestamp'] !== 'string')
|
|
186
|
+
{
|
|
187
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
191
|
+
}());
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if('timeBatchId' in jsonObject)
|
|
195
|
+
{
|
|
196
|
+
model.timeBatchId = (function(){
|
|
197
|
+
if(jsonObject['timeBatchId'] === null)
|
|
198
|
+
{
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if(typeof jsonObject['timeBatchId'] !== 'string')
|
|
203
|
+
{
|
|
204
|
+
return String(jsonObject['timeBatchId']);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return jsonObject['timeBatchId'];
|
|
208
|
+
}());
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if('sources' in jsonObject)
|
|
212
|
+
{
|
|
213
|
+
model.sources = (function(){
|
|
214
|
+
if(Array.isArray(jsonObject['sources']) !== true)
|
|
215
|
+
{
|
|
216
|
+
return [];
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return jsonObject['sources'].map((sourcesItem) => {
|
|
220
|
+
return (function(){
|
|
221
|
+
return sourcesItem;
|
|
222
|
+
}());
|
|
223
|
+
});
|
|
224
|
+
}());
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if('freshPackMultiGrowerBinWeights' in jsonObject)
|
|
228
|
+
{
|
|
229
|
+
model.freshPackMultiGrowerBinWeights = (function(){
|
|
230
|
+
if(Array.isArray(jsonObject['freshPackMultiGrowerBinWeights']) !== true)
|
|
231
|
+
{
|
|
232
|
+
return [];
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return jsonObject['freshPackMultiGrowerBinWeights'].map((freshPackMultiGrowerBinWeightsItem) => {
|
|
236
|
+
return (function(){
|
|
237
|
+
let freshPackMultiGrowerBinWeightsItemObject = {};
|
|
238
|
+
|
|
239
|
+
if(typeof freshPackMultiGrowerBinWeightsItem === 'object' && 'classType' in freshPackMultiGrowerBinWeightsItem)
|
|
240
|
+
{
|
|
241
|
+
freshPackMultiGrowerBinWeightsItemObject.classType = (function(){
|
|
242
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.classType !== 'string')
|
|
243
|
+
{
|
|
244
|
+
return String(freshPackMultiGrowerBinWeightsItem.classType);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return freshPackMultiGrowerBinWeightsItem.classType;
|
|
248
|
+
}());
|
|
249
|
+
}
|
|
250
|
+
else
|
|
251
|
+
{
|
|
252
|
+
freshPackMultiGrowerBinWeightsItemObject.classType = "";
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if(typeof freshPackMultiGrowerBinWeightsItem === 'object' && 'weight' in freshPackMultiGrowerBinWeightsItem)
|
|
256
|
+
{
|
|
257
|
+
freshPackMultiGrowerBinWeightsItemObject.weight = (function(){
|
|
258
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.weight !== 'number')
|
|
259
|
+
{
|
|
260
|
+
return Number(freshPackMultiGrowerBinWeightsItem.weight);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return freshPackMultiGrowerBinWeightsItem.weight;
|
|
264
|
+
}());
|
|
265
|
+
}
|
|
266
|
+
else
|
|
267
|
+
{
|
|
268
|
+
freshPackMultiGrowerBinWeightsItemObject.weight = 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if(typeof freshPackMultiGrowerBinWeightsItem === 'object' && 'weightApi' in freshPackMultiGrowerBinWeightsItem)
|
|
272
|
+
{
|
|
273
|
+
freshPackMultiGrowerBinWeightsItemObject.weightApi = (function(){
|
|
274
|
+
if(freshPackMultiGrowerBinWeightsItem.weightApi === null)
|
|
275
|
+
{
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
let weightApiObject = {};
|
|
280
|
+
|
|
281
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.weightApi === 'object' && 'requestCount' in freshPackMultiGrowerBinWeightsItem.weightApi)
|
|
282
|
+
{
|
|
283
|
+
weightApiObject.requestCount = (function(){
|
|
284
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.weightApi.requestCount !== 'number')
|
|
285
|
+
{
|
|
286
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinWeightsItem.weightApi.requestCount)) ? Number(freshPackMultiGrowerBinWeightsItem.weightApi.requestCount) : Math.floor(Number(freshPackMultiGrowerBinWeightsItem.weightApi.requestCount));
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
return Number.isInteger(freshPackMultiGrowerBinWeightsItem.weightApi.requestCount) ? freshPackMultiGrowerBinWeightsItem.weightApi.requestCount : Math.floor(freshPackMultiGrowerBinWeightsItem.weightApi.requestCount);
|
|
290
|
+
}());
|
|
291
|
+
}
|
|
292
|
+
else
|
|
293
|
+
{
|
|
294
|
+
weightApiObject.requestCount = 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.weightApi === 'object' && 'requestTimestamp' in freshPackMultiGrowerBinWeightsItem.weightApi)
|
|
298
|
+
{
|
|
299
|
+
weightApiObject.requestTimestamp = (function(){
|
|
300
|
+
if(freshPackMultiGrowerBinWeightsItem.weightApi.requestTimestamp === null)
|
|
301
|
+
{
|
|
302
|
+
return null;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.weightApi.requestTimestamp !== 'string')
|
|
306
|
+
{
|
|
307
|
+
return new Date(String(freshPackMultiGrowerBinWeightsItem.weightApi.requestTimestamp));
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return new Date(freshPackMultiGrowerBinWeightsItem.weightApi.requestTimestamp);
|
|
311
|
+
}());
|
|
312
|
+
}
|
|
313
|
+
else
|
|
314
|
+
{
|
|
315
|
+
weightApiObject.requestTimestamp = null;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.weightApi === 'object' && 'responseCode' in freshPackMultiGrowerBinWeightsItem.weightApi)
|
|
319
|
+
{
|
|
320
|
+
weightApiObject.responseCode = (function(){
|
|
321
|
+
if(freshPackMultiGrowerBinWeightsItem.weightApi.responseCode === null)
|
|
322
|
+
{
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.weightApi.responseCode !== 'number')
|
|
327
|
+
{
|
|
328
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinWeightsItem.weightApi.responseCode)) ? Number(freshPackMultiGrowerBinWeightsItem.weightApi.responseCode) : Math.floor(Number(freshPackMultiGrowerBinWeightsItem.weightApi.responseCode));
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return Number.isInteger(freshPackMultiGrowerBinWeightsItem.weightApi.responseCode) ? freshPackMultiGrowerBinWeightsItem.weightApi.responseCode : Math.floor(freshPackMultiGrowerBinWeightsItem.weightApi.responseCode);
|
|
332
|
+
}());
|
|
333
|
+
}
|
|
334
|
+
else
|
|
335
|
+
{
|
|
336
|
+
weightApiObject.responseCode = null;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.weightApi === 'object' && 'responseMessage' in freshPackMultiGrowerBinWeightsItem.weightApi)
|
|
340
|
+
{
|
|
341
|
+
weightApiObject.responseMessage = (function(){
|
|
342
|
+
if(freshPackMultiGrowerBinWeightsItem.weightApi.responseMessage === null)
|
|
343
|
+
{
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.weightApi.responseMessage !== 'string')
|
|
348
|
+
{
|
|
349
|
+
return String(freshPackMultiGrowerBinWeightsItem.weightApi.responseMessage);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
return freshPackMultiGrowerBinWeightsItem.weightApi.responseMessage;
|
|
353
|
+
}());
|
|
354
|
+
}
|
|
355
|
+
else
|
|
356
|
+
{
|
|
357
|
+
weightApiObject.responseMessage = null;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.weightApi === 'object' && 'completed' in freshPackMultiGrowerBinWeightsItem.weightApi)
|
|
361
|
+
{
|
|
362
|
+
weightApiObject.completed = (function(){
|
|
363
|
+
if(typeof freshPackMultiGrowerBinWeightsItem.weightApi.completed !== 'boolean')
|
|
364
|
+
{
|
|
365
|
+
return Boolean(freshPackMultiGrowerBinWeightsItem.weightApi.completed);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
return freshPackMultiGrowerBinWeightsItem.weightApi.completed;
|
|
369
|
+
}());
|
|
370
|
+
}
|
|
371
|
+
else
|
|
372
|
+
{
|
|
373
|
+
weightApiObject.completed = false;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return weightApiObject;
|
|
377
|
+
}());
|
|
378
|
+
}
|
|
379
|
+
else
|
|
380
|
+
{
|
|
381
|
+
freshPackMultiGrowerBinWeightsItemObject.weightApi = null;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
return freshPackMultiGrowerBinWeightsItemObject;
|
|
385
|
+
}());
|
|
386
|
+
});
|
|
387
|
+
}());
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
if('freshPackMultiGrowerBins' in jsonObject)
|
|
391
|
+
{
|
|
392
|
+
model.freshPackMultiGrowerBins = (function(){
|
|
393
|
+
if(Array.isArray(jsonObject['freshPackMultiGrowerBins']) !== true)
|
|
394
|
+
{
|
|
395
|
+
return [];
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return jsonObject['freshPackMultiGrowerBins'].map((freshPackMultiGrowerBinsItem) => {
|
|
399
|
+
return (function(){
|
|
400
|
+
let freshPackMultiGrowerBinsItemObject = {};
|
|
401
|
+
|
|
402
|
+
if(typeof freshPackMultiGrowerBinsItem === 'object' && 'classType' in freshPackMultiGrowerBinsItem)
|
|
403
|
+
{
|
|
404
|
+
freshPackMultiGrowerBinsItemObject.classType = (function(){
|
|
405
|
+
if(typeof freshPackMultiGrowerBinsItem.classType !== 'string')
|
|
406
|
+
{
|
|
407
|
+
return String(freshPackMultiGrowerBinsItem.classType);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
return freshPackMultiGrowerBinsItem.classType;
|
|
411
|
+
}());
|
|
412
|
+
}
|
|
413
|
+
else
|
|
414
|
+
{
|
|
415
|
+
freshPackMultiGrowerBinsItemObject.classType = "";
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
if(typeof freshPackMultiGrowerBinsItem === 'object' && 'binNumber' in freshPackMultiGrowerBinsItem)
|
|
419
|
+
{
|
|
420
|
+
freshPackMultiGrowerBinsItemObject.binNumber = (function(){
|
|
421
|
+
if(freshPackMultiGrowerBinsItem.binNumber === null)
|
|
422
|
+
{
|
|
423
|
+
return null;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
if(typeof freshPackMultiGrowerBinsItem.binNumber !== 'string')
|
|
427
|
+
{
|
|
428
|
+
return String(freshPackMultiGrowerBinsItem.binNumber);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
return freshPackMultiGrowerBinsItem.binNumber;
|
|
432
|
+
}());
|
|
433
|
+
}
|
|
434
|
+
else
|
|
435
|
+
{
|
|
436
|
+
freshPackMultiGrowerBinsItemObject.binNumber = null;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
if(typeof freshPackMultiGrowerBinsItem === 'object' && 'printBinCard' in freshPackMultiGrowerBinsItem)
|
|
440
|
+
{
|
|
441
|
+
freshPackMultiGrowerBinsItemObject.printBinCard = (function(){
|
|
442
|
+
if(typeof freshPackMultiGrowerBinsItem.printBinCard !== 'boolean')
|
|
443
|
+
{
|
|
444
|
+
return Boolean(freshPackMultiGrowerBinsItem.printBinCard);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return freshPackMultiGrowerBinsItem.printBinCard;
|
|
448
|
+
}());
|
|
449
|
+
}
|
|
450
|
+
else
|
|
451
|
+
{
|
|
452
|
+
freshPackMultiGrowerBinsItemObject.printBinCard = false;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
if(typeof freshPackMultiGrowerBinsItem === 'object' && 'binNumberApi' in freshPackMultiGrowerBinsItem)
|
|
456
|
+
{
|
|
457
|
+
freshPackMultiGrowerBinsItemObject.binNumberApi = (function(){
|
|
458
|
+
if(freshPackMultiGrowerBinsItem.binNumberApi === null)
|
|
459
|
+
{
|
|
460
|
+
return null;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
let binNumberApiObject = {};
|
|
464
|
+
|
|
465
|
+
if(typeof freshPackMultiGrowerBinsItem.binNumberApi === 'object' && 'requestCount' in freshPackMultiGrowerBinsItem.binNumberApi)
|
|
466
|
+
{
|
|
467
|
+
binNumberApiObject.requestCount = (function(){
|
|
468
|
+
if(typeof freshPackMultiGrowerBinsItem.binNumberApi.requestCount !== 'number')
|
|
469
|
+
{
|
|
470
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinsItem.binNumberApi.requestCount)) ? Number(freshPackMultiGrowerBinsItem.binNumberApi.requestCount) : Math.floor(Number(freshPackMultiGrowerBinsItem.binNumberApi.requestCount));
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
return Number.isInteger(freshPackMultiGrowerBinsItem.binNumberApi.requestCount) ? freshPackMultiGrowerBinsItem.binNumberApi.requestCount : Math.floor(freshPackMultiGrowerBinsItem.binNumberApi.requestCount);
|
|
474
|
+
}());
|
|
475
|
+
}
|
|
476
|
+
else
|
|
477
|
+
{
|
|
478
|
+
binNumberApiObject.requestCount = 0;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
if(typeof freshPackMultiGrowerBinsItem.binNumberApi === 'object' && 'requestTimestamp' in freshPackMultiGrowerBinsItem.binNumberApi)
|
|
482
|
+
{
|
|
483
|
+
binNumberApiObject.requestTimestamp = (function(){
|
|
484
|
+
if(freshPackMultiGrowerBinsItem.binNumberApi.requestTimestamp === null)
|
|
485
|
+
{
|
|
486
|
+
return null;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
if(typeof freshPackMultiGrowerBinsItem.binNumberApi.requestTimestamp !== 'string')
|
|
490
|
+
{
|
|
491
|
+
return new Date(String(freshPackMultiGrowerBinsItem.binNumberApi.requestTimestamp));
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
return new Date(freshPackMultiGrowerBinsItem.binNumberApi.requestTimestamp);
|
|
495
|
+
}());
|
|
496
|
+
}
|
|
497
|
+
else
|
|
498
|
+
{
|
|
499
|
+
binNumberApiObject.requestTimestamp = null;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
if(typeof freshPackMultiGrowerBinsItem.binNumberApi === 'object' && 'responseCode' in freshPackMultiGrowerBinsItem.binNumberApi)
|
|
503
|
+
{
|
|
504
|
+
binNumberApiObject.responseCode = (function(){
|
|
505
|
+
if(freshPackMultiGrowerBinsItem.binNumberApi.responseCode === null)
|
|
506
|
+
{
|
|
507
|
+
return null;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
if(typeof freshPackMultiGrowerBinsItem.binNumberApi.responseCode !== 'number')
|
|
511
|
+
{
|
|
512
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinsItem.binNumberApi.responseCode)) ? Number(freshPackMultiGrowerBinsItem.binNumberApi.responseCode) : Math.floor(Number(freshPackMultiGrowerBinsItem.binNumberApi.responseCode));
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
return Number.isInteger(freshPackMultiGrowerBinsItem.binNumberApi.responseCode) ? freshPackMultiGrowerBinsItem.binNumberApi.responseCode : Math.floor(freshPackMultiGrowerBinsItem.binNumberApi.responseCode);
|
|
516
|
+
}());
|
|
517
|
+
}
|
|
518
|
+
else
|
|
519
|
+
{
|
|
520
|
+
binNumberApiObject.responseCode = null;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
if(typeof freshPackMultiGrowerBinsItem.binNumberApi === 'object' && 'responseMessage' in freshPackMultiGrowerBinsItem.binNumberApi)
|
|
524
|
+
{
|
|
525
|
+
binNumberApiObject.responseMessage = (function(){
|
|
526
|
+
if(freshPackMultiGrowerBinsItem.binNumberApi.responseMessage === null)
|
|
527
|
+
{
|
|
528
|
+
return null;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
if(typeof freshPackMultiGrowerBinsItem.binNumberApi.responseMessage !== 'string')
|
|
532
|
+
{
|
|
533
|
+
return String(freshPackMultiGrowerBinsItem.binNumberApi.responseMessage);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
return freshPackMultiGrowerBinsItem.binNumberApi.responseMessage;
|
|
537
|
+
}());
|
|
538
|
+
}
|
|
539
|
+
else
|
|
540
|
+
{
|
|
541
|
+
binNumberApiObject.responseMessage = null;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
if(typeof freshPackMultiGrowerBinsItem.binNumberApi === 'object' && 'completed' in freshPackMultiGrowerBinsItem.binNumberApi)
|
|
545
|
+
{
|
|
546
|
+
binNumberApiObject.completed = (function(){
|
|
547
|
+
if(typeof freshPackMultiGrowerBinsItem.binNumberApi.completed !== 'boolean')
|
|
548
|
+
{
|
|
549
|
+
return Boolean(freshPackMultiGrowerBinsItem.binNumberApi.completed);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
return freshPackMultiGrowerBinsItem.binNumberApi.completed;
|
|
553
|
+
}());
|
|
554
|
+
}
|
|
555
|
+
else
|
|
556
|
+
{
|
|
557
|
+
binNumberApiObject.completed = false;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
return binNumberApiObject;
|
|
561
|
+
}());
|
|
562
|
+
}
|
|
563
|
+
else
|
|
564
|
+
{
|
|
565
|
+
freshPackMultiGrowerBinsItemObject.binNumberApi = null;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
if(typeof freshPackMultiGrowerBinsItem === 'object' && 'binCardApi' in freshPackMultiGrowerBinsItem)
|
|
569
|
+
{
|
|
570
|
+
freshPackMultiGrowerBinsItemObject.binCardApi = (function(){
|
|
571
|
+
if(freshPackMultiGrowerBinsItem.binCardApi === null)
|
|
572
|
+
{
|
|
573
|
+
return null;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
let binCardApiObject = {};
|
|
577
|
+
|
|
578
|
+
if(typeof freshPackMultiGrowerBinsItem.binCardApi === 'object' && 'requestCount' in freshPackMultiGrowerBinsItem.binCardApi)
|
|
579
|
+
{
|
|
580
|
+
binCardApiObject.requestCount = (function(){
|
|
581
|
+
if(typeof freshPackMultiGrowerBinsItem.binCardApi.requestCount !== 'number')
|
|
582
|
+
{
|
|
583
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinsItem.binCardApi.requestCount)) ? Number(freshPackMultiGrowerBinsItem.binCardApi.requestCount) : Math.floor(Number(freshPackMultiGrowerBinsItem.binCardApi.requestCount));
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
return Number.isInteger(freshPackMultiGrowerBinsItem.binCardApi.requestCount) ? freshPackMultiGrowerBinsItem.binCardApi.requestCount : Math.floor(freshPackMultiGrowerBinsItem.binCardApi.requestCount);
|
|
587
|
+
}());
|
|
588
|
+
}
|
|
589
|
+
else
|
|
590
|
+
{
|
|
591
|
+
binCardApiObject.requestCount = 0;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
if(typeof freshPackMultiGrowerBinsItem.binCardApi === 'object' && 'requestTimestamp' in freshPackMultiGrowerBinsItem.binCardApi)
|
|
595
|
+
{
|
|
596
|
+
binCardApiObject.requestTimestamp = (function(){
|
|
597
|
+
if(freshPackMultiGrowerBinsItem.binCardApi.requestTimestamp === null)
|
|
598
|
+
{
|
|
599
|
+
return null;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
if(typeof freshPackMultiGrowerBinsItem.binCardApi.requestTimestamp !== 'string')
|
|
603
|
+
{
|
|
604
|
+
return new Date(String(freshPackMultiGrowerBinsItem.binCardApi.requestTimestamp));
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
return new Date(freshPackMultiGrowerBinsItem.binCardApi.requestTimestamp);
|
|
608
|
+
}());
|
|
609
|
+
}
|
|
610
|
+
else
|
|
611
|
+
{
|
|
612
|
+
binCardApiObject.requestTimestamp = null;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
if(typeof freshPackMultiGrowerBinsItem.binCardApi === 'object' && 'responseCode' in freshPackMultiGrowerBinsItem.binCardApi)
|
|
616
|
+
{
|
|
617
|
+
binCardApiObject.responseCode = (function(){
|
|
618
|
+
if(freshPackMultiGrowerBinsItem.binCardApi.responseCode === null)
|
|
619
|
+
{
|
|
620
|
+
return null;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
if(typeof freshPackMultiGrowerBinsItem.binCardApi.responseCode !== 'number')
|
|
624
|
+
{
|
|
625
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinsItem.binCardApi.responseCode)) ? Number(freshPackMultiGrowerBinsItem.binCardApi.responseCode) : Math.floor(Number(freshPackMultiGrowerBinsItem.binCardApi.responseCode));
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
return Number.isInteger(freshPackMultiGrowerBinsItem.binCardApi.responseCode) ? freshPackMultiGrowerBinsItem.binCardApi.responseCode : Math.floor(freshPackMultiGrowerBinsItem.binCardApi.responseCode);
|
|
629
|
+
}());
|
|
630
|
+
}
|
|
631
|
+
else
|
|
632
|
+
{
|
|
633
|
+
binCardApiObject.responseCode = null;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
if(typeof freshPackMultiGrowerBinsItem.binCardApi === 'object' && 'responseMessage' in freshPackMultiGrowerBinsItem.binCardApi)
|
|
637
|
+
{
|
|
638
|
+
binCardApiObject.responseMessage = (function(){
|
|
639
|
+
if(freshPackMultiGrowerBinsItem.binCardApi.responseMessage === null)
|
|
640
|
+
{
|
|
641
|
+
return null;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
if(typeof freshPackMultiGrowerBinsItem.binCardApi.responseMessage !== 'string')
|
|
645
|
+
{
|
|
646
|
+
return String(freshPackMultiGrowerBinsItem.binCardApi.responseMessage);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
return freshPackMultiGrowerBinsItem.binCardApi.responseMessage;
|
|
650
|
+
}());
|
|
651
|
+
}
|
|
652
|
+
else
|
|
653
|
+
{
|
|
654
|
+
binCardApiObject.responseMessage = null;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
if(typeof freshPackMultiGrowerBinsItem.binCardApi === 'object' && 'completed' in freshPackMultiGrowerBinsItem.binCardApi)
|
|
658
|
+
{
|
|
659
|
+
binCardApiObject.completed = (function(){
|
|
660
|
+
if(typeof freshPackMultiGrowerBinsItem.binCardApi.completed !== 'boolean')
|
|
661
|
+
{
|
|
662
|
+
return Boolean(freshPackMultiGrowerBinsItem.binCardApi.completed);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
return freshPackMultiGrowerBinsItem.binCardApi.completed;
|
|
666
|
+
}());
|
|
667
|
+
}
|
|
668
|
+
else
|
|
669
|
+
{
|
|
670
|
+
binCardApiObject.completed = false;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
return binCardApiObject;
|
|
674
|
+
}());
|
|
675
|
+
}
|
|
676
|
+
else
|
|
677
|
+
{
|
|
678
|
+
freshPackMultiGrowerBinsItemObject.binCardApi = null;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
return freshPackMultiGrowerBinsItemObject;
|
|
682
|
+
}());
|
|
683
|
+
});
|
|
684
|
+
}());
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
if('deleted' in jsonObject)
|
|
688
|
+
{
|
|
689
|
+
model.deleted = (function(){
|
|
690
|
+
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
691
|
+
{
|
|
692
|
+
return Boolean(jsonObject['deleted']);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
return jsonObject['deleted'];
|
|
696
|
+
}());
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
if('updateTimestamp' in jsonObject)
|
|
700
|
+
{
|
|
701
|
+
model.updateTimestamp = (function(){
|
|
702
|
+
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
703
|
+
{
|
|
704
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
708
|
+
}());
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
return model;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export default CompacSizerBinWeightModel;
|