@ricado/api-client 2.3.20 → 2.3.22

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.
@@ -20,6 +20,8 @@ import CompacSizerOutletTypeChangeController from './CompacSizerOutletTypeChange
20
20
  import CompacSizerOutletTypeController from './CompacSizerOutletTypeController';
21
21
  import CompacSizerPackrunSummaryController from './CompacSizerPackrunSummaryController';
22
22
  import DowntimeEventController from './DowntimeEventController';
23
+ import FreshPackBinLotController from './FreshPackBinLotController';
24
+ import FreshPackFruitTemperatureController from './FreshPackFruitTemperatureController';
23
25
  import FreshPackPackrunSummaryController from './FreshPackPackrunSummaryController';
24
26
  import FreshQualityPackrunSummaryController from './FreshQualityPackrunSummaryController';
25
27
  import GrowingMethodController from './GrowingMethodController';
@@ -57,6 +59,8 @@ const Site = {
57
59
  CompacSizerOutletTypeController,
58
60
  CompacSizerPackrunSummaryController,
59
61
  DowntimeEventController,
62
+ FreshPackBinLotController,
63
+ FreshPackFruitTemperatureController,
60
64
  FreshPackPackrunSummaryController,
61
65
  FreshQualityPackrunSummaryController,
62
66
  GrowingMethodController,
@@ -58,12 +58,12 @@ class BinTipBarcodeScannerResultModel extends BaseModel
58
58
  this.createdTimestamp = new Date();
59
59
 
60
60
  /**
61
- * The Type of this Barcode Scanner Result
61
+ * The Mode of the Barcode Scanner when creating this Barcode Scanner Result
62
62
  *
63
63
  * @type {string}
64
64
  * @public
65
65
  */
66
- this.type = "";
66
+ this.scanMode = "";
67
67
 
68
68
  /**
69
69
  * The Packrun ID associated with this Barcode Scanner Result
@@ -199,15 +199,15 @@ class BinTipBarcodeScannerResultModel extends BaseModel
199
199
  }());
200
200
  }
201
201
 
202
- if('type' in jsonObject)
202
+ if('scanMode' in jsonObject)
203
203
  {
204
- model.type = (function(){
205
- if(typeof jsonObject['type'] !== 'string')
204
+ model.scanMode = (function(){
205
+ if(typeof jsonObject['scanMode'] !== 'string')
206
206
  {
207
- return String(jsonObject['type']);
207
+ return String(jsonObject['scanMode']);
208
208
  }
209
209
 
210
- return jsonObject['type'];
210
+ return jsonObject['scanMode'];
211
211
  }());
212
212
  }
213
213
 
@@ -0,0 +1,248 @@
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 FreshPack Bin Lot
11
+ *
12
+ * @class
13
+ * @hideconstructor
14
+ * @extends BaseModel
15
+ */
16
+ class FreshPackBinLotModel extends BaseModel
17
+ {
18
+ /**
19
+ * FreshPackBinLotModel Constructor
20
+ *
21
+ * @protected
22
+ * @param {number} siteId The Site ID associated with this FreshPack Bin Lot
23
+ */
24
+ constructor(siteId)
25
+ {
26
+ super();
27
+
28
+ /**
29
+ * The FreshPack Bin Lot ID
30
+ *
31
+ * @type {string}
32
+ * @public
33
+ */
34
+ this.id = "";
35
+
36
+ /**
37
+ * The Bin Tip ID this Bin Lot is associated with
38
+ *
39
+ * @type {string}
40
+ * @public
41
+ */
42
+ this.binTipId = "";
43
+
44
+ /**
45
+ * The Bin Lot Code
46
+ *
47
+ * @type {string}
48
+ * @public
49
+ */
50
+ this.binLotCode = "";
51
+
52
+ /**
53
+ * When this Bin Lot was Created
54
+ *
55
+ * @type {Date}
56
+ * @public
57
+ */
58
+ this.createdTimestamp = new Date();
59
+
60
+ /**
61
+ * An Array of Packrun IDs associated with this Bin Lot
62
+ *
63
+ * @type {string[]}
64
+ * @public
65
+ */
66
+ this.packrunIds = [];
67
+
68
+ /**
69
+ * An Array of Bin Numbers for this Bin Lot
70
+ *
71
+ * @type {string[]}
72
+ * @public
73
+ */
74
+ this.binNumbers = [];
75
+
76
+ /**
77
+ * Whether the FreshPack Bin Lot has been deleted
78
+ *
79
+ * @type {boolean}
80
+ * @public
81
+ */
82
+ this.deleted = false;
83
+
84
+ /**
85
+ * When the FreshPack Bin Lot was last updated
86
+ *
87
+ * @type {Date}
88
+ * @public
89
+ */
90
+ this.updateTimestamp = new Date();
91
+
92
+ /**
93
+ * The Site ID associated with this FreshPack Bin Lot
94
+ *
95
+ * @type {number}
96
+ * @public
97
+ */
98
+ this.siteId = siteId;
99
+ }
100
+
101
+ /**
102
+ * Create a new **FreshPackBinLotModel** from a JSON Object or JSON String
103
+ *
104
+ * @static
105
+ * @public
106
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
107
+ * @param {number} siteId The Site ID associated with this FreshPack Bin Lot
108
+ * @return {FreshPackBinLotModel}
109
+ */
110
+ static fromJSON(json, siteId)
111
+ {
112
+ let model = new FreshPackBinLotModel(siteId);
113
+
114
+ /**
115
+ * The JSON Object
116
+ *
117
+ * @type {Object<string, any>}
118
+ */
119
+ let jsonObject = {};
120
+
121
+ if(typeof json === 'string')
122
+ {
123
+ jsonObject = JSON.parse(json);
124
+ }
125
+ else if(typeof json === 'object')
126
+ {
127
+ jsonObject = json;
128
+ }
129
+
130
+ if('id' in jsonObject)
131
+ {
132
+ model.id = (function(){
133
+ if(typeof jsonObject['id'] !== 'string')
134
+ {
135
+ return String(jsonObject['id']);
136
+ }
137
+
138
+ return jsonObject['id'];
139
+ }());
140
+ }
141
+
142
+ if('binTipId' in jsonObject)
143
+ {
144
+ model.binTipId = (function(){
145
+ if(typeof jsonObject['binTipId'] !== 'string')
146
+ {
147
+ return String(jsonObject['binTipId']);
148
+ }
149
+
150
+ return jsonObject['binTipId'];
151
+ }());
152
+ }
153
+
154
+ if('binLotCode' in jsonObject)
155
+ {
156
+ model.binLotCode = (function(){
157
+ if(typeof jsonObject['binLotCode'] !== 'string')
158
+ {
159
+ return String(jsonObject['binLotCode']);
160
+ }
161
+
162
+ return jsonObject['binLotCode'];
163
+ }());
164
+ }
165
+
166
+ if('createdTimestamp' in jsonObject)
167
+ {
168
+ model.createdTimestamp = (function(){
169
+ if(typeof jsonObject['createdTimestamp'] !== 'string')
170
+ {
171
+ return new Date(String(jsonObject['createdTimestamp']));
172
+ }
173
+
174
+ return new Date(jsonObject['createdTimestamp']);
175
+ }());
176
+ }
177
+
178
+ if('packrunIds' in jsonObject)
179
+ {
180
+ model.packrunIds = (function(){
181
+ if(Array.isArray(jsonObject['packrunIds']) !== true)
182
+ {
183
+ return [];
184
+ }
185
+
186
+ return jsonObject['packrunIds'].map((packrunIdsItem) => {
187
+ return (function(){
188
+ if(typeof packrunIdsItem !== 'string')
189
+ {
190
+ return String(packrunIdsItem);
191
+ }
192
+
193
+ return packrunIdsItem;
194
+ }());
195
+ });
196
+ }());
197
+ }
198
+
199
+ if('binNumbers' in jsonObject)
200
+ {
201
+ model.binNumbers = (function(){
202
+ if(Array.isArray(jsonObject['binNumbers']) !== true)
203
+ {
204
+ return [];
205
+ }
206
+
207
+ return jsonObject['binNumbers'].map((binNumbersItem) => {
208
+ return (function(){
209
+ if(typeof binNumbersItem !== 'string')
210
+ {
211
+ return String(binNumbersItem);
212
+ }
213
+
214
+ return binNumbersItem;
215
+ }());
216
+ });
217
+ }());
218
+ }
219
+
220
+ if('deleted' in jsonObject)
221
+ {
222
+ model.deleted = (function(){
223
+ if(typeof jsonObject['deleted'] !== 'boolean')
224
+ {
225
+ return Boolean(jsonObject['deleted']);
226
+ }
227
+
228
+ return jsonObject['deleted'];
229
+ }());
230
+ }
231
+
232
+ if('updateTimestamp' in jsonObject)
233
+ {
234
+ model.updateTimestamp = (function(){
235
+ if(typeof jsonObject['updateTimestamp'] !== 'string')
236
+ {
237
+ return new Date(String(jsonObject['updateTimestamp']));
238
+ }
239
+
240
+ return new Date(jsonObject['updateTimestamp']);
241
+ }());
242
+ }
243
+
244
+ return model;
245
+ }
246
+ }
247
+
248
+ export default FreshPackBinLotModel;
@@ -0,0 +1,347 @@
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 FreshPack Fruit Temperature
11
+ *
12
+ * @class
13
+ * @hideconstructor
14
+ * @extends BaseModel
15
+ */
16
+ class FreshPackFruitTemperatureModel extends BaseModel
17
+ {
18
+ /**
19
+ * FreshPackFruitTemperatureModel Constructor
20
+ *
21
+ * @protected
22
+ * @param {number} siteId The Site ID associated with this FreshPack Fruit Temperature
23
+ */
24
+ constructor(siteId)
25
+ {
26
+ super();
27
+
28
+ /**
29
+ * The FreshPack Fruit Temperature ID
30
+ *
31
+ * @type {string}
32
+ * @public
33
+ */
34
+ this.id = "";
35
+
36
+ /**
37
+ * The Bin Tip ID this Fruit Temperature is associated with
38
+ *
39
+ * @type {string}
40
+ * @public
41
+ */
42
+ this.binTipId = "";
43
+
44
+ /**
45
+ * The Fresh Pack Bin Lot ID this Fruit Temperature is associated with
46
+ *
47
+ * @type {string}
48
+ * @public
49
+ */
50
+ this.freshPackBinLotId = "";
51
+
52
+ /**
53
+ * When this Fruit Temperature was Created
54
+ *
55
+ * @type {Date}
56
+ * @public
57
+ */
58
+ this.createdTimestamp = new Date();
59
+
60
+ /**
61
+ * The Temperature of the Fruit
62
+ *
63
+ * @type {number}
64
+ * @public
65
+ */
66
+ this.temperature = 0;
67
+
68
+ /**
69
+ * The Packrun ID associated with this Fruit Temperature
70
+ *
71
+ * @type {string}
72
+ * @public
73
+ */
74
+ this.packrunId = "";
75
+
76
+ /**
77
+ * Result from Interacting with the FreshPack API to Send this Fruit Temperature
78
+ *
79
+ * @type {?{requestCount: number, requestTimestamp: ?Date, responseCode: ?number, responseMessage: ?string, completed: boolean}}
80
+ * @public
81
+ */
82
+ this.freshPackFruitTemperatureApi = null;
83
+
84
+ /**
85
+ * Whether the FreshPack Fruit Temperature has been deleted
86
+ *
87
+ * @type {boolean}
88
+ * @public
89
+ */
90
+ this.deleted = false;
91
+
92
+ /**
93
+ * When the FreshPack Fruit Temperature was last updated
94
+ *
95
+ * @type {Date}
96
+ * @public
97
+ */
98
+ this.updateTimestamp = new Date();
99
+
100
+ /**
101
+ * The Site ID associated with this FreshPack Fruit Temperature
102
+ *
103
+ * @type {number}
104
+ * @public
105
+ */
106
+ this.siteId = siteId;
107
+ }
108
+
109
+ /**
110
+ * Create a new **FreshPackFruitTemperatureModel** from a JSON Object or JSON String
111
+ *
112
+ * @static
113
+ * @public
114
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
115
+ * @param {number} siteId The Site ID associated with this FreshPack Fruit Temperature
116
+ * @return {FreshPackFruitTemperatureModel}
117
+ */
118
+ static fromJSON(json, siteId)
119
+ {
120
+ let model = new FreshPackFruitTemperatureModel(siteId);
121
+
122
+ /**
123
+ * The JSON Object
124
+ *
125
+ * @type {Object<string, any>}
126
+ */
127
+ let jsonObject = {};
128
+
129
+ if(typeof json === 'string')
130
+ {
131
+ jsonObject = JSON.parse(json);
132
+ }
133
+ else if(typeof json === 'object')
134
+ {
135
+ jsonObject = json;
136
+ }
137
+
138
+ if('id' in jsonObject)
139
+ {
140
+ model.id = (function(){
141
+ if(typeof jsonObject['id'] !== 'string')
142
+ {
143
+ return String(jsonObject['id']);
144
+ }
145
+
146
+ return jsonObject['id'];
147
+ }());
148
+ }
149
+
150
+ if('binTipId' in jsonObject)
151
+ {
152
+ model.binTipId = (function(){
153
+ if(typeof jsonObject['binTipId'] !== 'string')
154
+ {
155
+ return String(jsonObject['binTipId']);
156
+ }
157
+
158
+ return jsonObject['binTipId'];
159
+ }());
160
+ }
161
+
162
+ if('freshPackBinLotId' in jsonObject)
163
+ {
164
+ model.freshPackBinLotId = (function(){
165
+ if(typeof jsonObject['freshPackBinLotId'] !== 'string')
166
+ {
167
+ return String(jsonObject['freshPackBinLotId']);
168
+ }
169
+
170
+ return jsonObject['freshPackBinLotId'];
171
+ }());
172
+ }
173
+
174
+ if('createdTimestamp' in jsonObject)
175
+ {
176
+ model.createdTimestamp = (function(){
177
+ if(typeof jsonObject['createdTimestamp'] !== 'string')
178
+ {
179
+ return new Date(String(jsonObject['createdTimestamp']));
180
+ }
181
+
182
+ return new Date(jsonObject['createdTimestamp']);
183
+ }());
184
+ }
185
+
186
+ if('temperature' in jsonObject)
187
+ {
188
+ model.temperature = (function(){
189
+ if(typeof jsonObject['temperature'] !== 'number')
190
+ {
191
+ return Number(jsonObject['temperature']);
192
+ }
193
+
194
+ return jsonObject['temperature'];
195
+ }());
196
+ }
197
+
198
+ if('packrunId' in jsonObject)
199
+ {
200
+ model.packrunId = (function(){
201
+ if(typeof jsonObject['packrunId'] !== 'string')
202
+ {
203
+ return String(jsonObject['packrunId']);
204
+ }
205
+
206
+ return jsonObject['packrunId'];
207
+ }());
208
+ }
209
+
210
+ if('freshPackFruitTemperatureApi' in jsonObject)
211
+ {
212
+ model.freshPackFruitTemperatureApi = (function(){
213
+ if(jsonObject['freshPackFruitTemperatureApi'] === null)
214
+ {
215
+ return null;
216
+ }
217
+
218
+ let freshPackFruitTemperatureApiObject = {};
219
+
220
+ if(typeof jsonObject['freshPackFruitTemperatureApi'] === 'object' && 'requestCount' in jsonObject['freshPackFruitTemperatureApi'])
221
+ {
222
+ freshPackFruitTemperatureApiObject.requestCount = (function(){
223
+ if(typeof jsonObject['freshPackFruitTemperatureApi'].requestCount !== 'number')
224
+ {
225
+ return Number.isInteger(Number(jsonObject['freshPackFruitTemperatureApi'].requestCount)) ? Number(jsonObject['freshPackFruitTemperatureApi'].requestCount) : Math.floor(Number(jsonObject['freshPackFruitTemperatureApi'].requestCount));
226
+ }
227
+
228
+ return Number.isInteger(jsonObject['freshPackFruitTemperatureApi'].requestCount) ? jsonObject['freshPackFruitTemperatureApi'].requestCount : Math.floor(jsonObject['freshPackFruitTemperatureApi'].requestCount);
229
+ }());
230
+ }
231
+ else
232
+ {
233
+ freshPackFruitTemperatureApiObject.requestCount = 0;
234
+ }
235
+
236
+ if(typeof jsonObject['freshPackFruitTemperatureApi'] === 'object' && 'requestTimestamp' in jsonObject['freshPackFruitTemperatureApi'])
237
+ {
238
+ freshPackFruitTemperatureApiObject.requestTimestamp = (function(){
239
+ if(jsonObject['freshPackFruitTemperatureApi'].requestTimestamp === null)
240
+ {
241
+ return null;
242
+ }
243
+
244
+ if(typeof jsonObject['freshPackFruitTemperatureApi'].requestTimestamp !== 'string')
245
+ {
246
+ return new Date(String(jsonObject['freshPackFruitTemperatureApi'].requestTimestamp));
247
+ }
248
+
249
+ return new Date(jsonObject['freshPackFruitTemperatureApi'].requestTimestamp);
250
+ }());
251
+ }
252
+ else
253
+ {
254
+ freshPackFruitTemperatureApiObject.requestTimestamp = null;
255
+ }
256
+
257
+ if(typeof jsonObject['freshPackFruitTemperatureApi'] === 'object' && 'responseCode' in jsonObject['freshPackFruitTemperatureApi'])
258
+ {
259
+ freshPackFruitTemperatureApiObject.responseCode = (function(){
260
+ if(jsonObject['freshPackFruitTemperatureApi'].responseCode === null)
261
+ {
262
+ return null;
263
+ }
264
+
265
+ if(typeof jsonObject['freshPackFruitTemperatureApi'].responseCode !== 'number')
266
+ {
267
+ return Number.isInteger(Number(jsonObject['freshPackFruitTemperatureApi'].responseCode)) ? Number(jsonObject['freshPackFruitTemperatureApi'].responseCode) : Math.floor(Number(jsonObject['freshPackFruitTemperatureApi'].responseCode));
268
+ }
269
+
270
+ return Number.isInteger(jsonObject['freshPackFruitTemperatureApi'].responseCode) ? jsonObject['freshPackFruitTemperatureApi'].responseCode : Math.floor(jsonObject['freshPackFruitTemperatureApi'].responseCode);
271
+ }());
272
+ }
273
+ else
274
+ {
275
+ freshPackFruitTemperatureApiObject.responseCode = null;
276
+ }
277
+
278
+ if(typeof jsonObject['freshPackFruitTemperatureApi'] === 'object' && 'responseMessage' in jsonObject['freshPackFruitTemperatureApi'])
279
+ {
280
+ freshPackFruitTemperatureApiObject.responseMessage = (function(){
281
+ if(jsonObject['freshPackFruitTemperatureApi'].responseMessage === null)
282
+ {
283
+ return null;
284
+ }
285
+
286
+ if(typeof jsonObject['freshPackFruitTemperatureApi'].responseMessage !== 'string')
287
+ {
288
+ return String(jsonObject['freshPackFruitTemperatureApi'].responseMessage);
289
+ }
290
+
291
+ return jsonObject['freshPackFruitTemperatureApi'].responseMessage;
292
+ }());
293
+ }
294
+ else
295
+ {
296
+ freshPackFruitTemperatureApiObject.responseMessage = null;
297
+ }
298
+
299
+ if(typeof jsonObject['freshPackFruitTemperatureApi'] === 'object' && 'completed' in jsonObject['freshPackFruitTemperatureApi'])
300
+ {
301
+ freshPackFruitTemperatureApiObject.completed = (function(){
302
+ if(typeof jsonObject['freshPackFruitTemperatureApi'].completed !== 'boolean')
303
+ {
304
+ return Boolean(jsonObject['freshPackFruitTemperatureApi'].completed);
305
+ }
306
+
307
+ return jsonObject['freshPackFruitTemperatureApi'].completed;
308
+ }());
309
+ }
310
+ else
311
+ {
312
+ freshPackFruitTemperatureApiObject.completed = false;
313
+ }
314
+
315
+ return freshPackFruitTemperatureApiObject;
316
+ }());
317
+ }
318
+
319
+ if('deleted' in jsonObject)
320
+ {
321
+ model.deleted = (function(){
322
+ if(typeof jsonObject['deleted'] !== 'boolean')
323
+ {
324
+ return Boolean(jsonObject['deleted']);
325
+ }
326
+
327
+ return jsonObject['deleted'];
328
+ }());
329
+ }
330
+
331
+ if('updateTimestamp' in jsonObject)
332
+ {
333
+ model.updateTimestamp = (function(){
334
+ if(typeof jsonObject['updateTimestamp'] !== 'string')
335
+ {
336
+ return new Date(String(jsonObject['updateTimestamp']));
337
+ }
338
+
339
+ return new Date(jsonObject['updateTimestamp']);
340
+ }());
341
+ }
342
+
343
+ return model;
344
+ }
345
+ }
346
+
347
+ export default FreshPackFruitTemperatureModel;
@@ -20,6 +20,8 @@ import CompacSizerOutletTypeChangeModel from './CompacSizerOutletTypeChangeModel
20
20
  import CompacSizerOutletTypeModel from './CompacSizerOutletTypeModel';
21
21
  import CompacSizerPackrunSummaryModel from './CompacSizerPackrunSummaryModel';
22
22
  import DowntimeEventModel from './DowntimeEventModel';
23
+ import FreshPackBinLotModel from './FreshPackBinLotModel';
24
+ import FreshPackFruitTemperatureModel from './FreshPackFruitTemperatureModel';
23
25
  import FreshPackPackrunSummaryModel from './FreshPackPackrunSummaryModel';
24
26
  import FreshQualityPackrunSummaryModel from './FreshQualityPackrunSummaryModel';
25
27
  import GrowingMethodModel from './GrowingMethodModel';
@@ -57,6 +59,8 @@ const Site = {
57
59
  CompacSizerOutletTypeModel,
58
60
  CompacSizerPackrunSummaryModel,
59
61
  DowntimeEventModel,
62
+ FreshPackBinLotModel,
63
+ FreshPackFruitTemperatureModel,
60
64
  FreshPackPackrunSummaryModel,
61
65
  FreshQualityPackrunSummaryModel,
62
66
  GrowingMethodModel,
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '2.3.20';
2
+ export const version = '2.3.22';