@ricado/api-client 2.3.21 → 2.3.23

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.
@@ -0,0 +1,325 @@
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 Shift Grower Change Meeting
11
+ *
12
+ * @class
13
+ * @hideconstructor
14
+ * @extends BaseModel
15
+ */
16
+ class ShiftGrowerChangeMeetingModel extends BaseModel
17
+ {
18
+ /**
19
+ * ShiftGrowerChangeMeetingModel Constructor
20
+ *
21
+ * @protected
22
+ * @param {number} siteId The Site ID associated with this Shift Grower Change Meeting
23
+ */
24
+ constructor(siteId)
25
+ {
26
+ super();
27
+
28
+ /**
29
+ * The Shift Grower Change Meeting ID
30
+ *
31
+ * @type {string}
32
+ * @public
33
+ */
34
+ this.id = "";
35
+
36
+ /**
37
+ * The Packing Line ID this Grower Change Meeting is associated with
38
+ *
39
+ * @type {string}
40
+ * @public
41
+ */
42
+ this.packingLineId = "";
43
+
44
+ /**
45
+ * The Shift ID this Grower Change Meeting is asssociated with
46
+ *
47
+ * @type {string}
48
+ * @public
49
+ */
50
+ this.shiftId = "";
51
+
52
+ /**
53
+ * When this Grower Change Meeting was Created
54
+ *
55
+ * @type {Date}
56
+ * @public
57
+ */
58
+ this.createdTimestamp = new Date();
59
+
60
+ /**
61
+ * When this Grower Change Meeting is Scheduled to Begin
62
+ *
63
+ * @type {Date}
64
+ * @public
65
+ */
66
+ this.scheduledTimestamp = new Date();
67
+
68
+ /**
69
+ * When this Grower Change Meeting was Started
70
+ *
71
+ * @type {?Date}
72
+ * @public
73
+ */
74
+ this.startTimestamp = null;
75
+
76
+ /**
77
+ * When this Grower Change Meeting was Completed
78
+ *
79
+ * @type {?Date}
80
+ * @public
81
+ */
82
+ this.finishTimestamp = null;
83
+
84
+ /**
85
+ * The Packrun ID this Grower Change Meeting relates to
86
+ *
87
+ * @type {string}
88
+ * @public
89
+ */
90
+ this.packrunId = "";
91
+
92
+ /**
93
+ * An Optional Rating between 1 and 10 on how Useful the Grower Change Meeting was
94
+ *
95
+ * @type {?number}
96
+ * @public
97
+ */
98
+ this.usefulRating = null;
99
+
100
+ /**
101
+ * The Status of this Grower Change Meeting
102
+ *
103
+ * @type {string}
104
+ * @public
105
+ */
106
+ this.status = "";
107
+
108
+ /**
109
+ * Whether the Shift Grower Change Meeting has been deleted
110
+ *
111
+ * @type {boolean}
112
+ * @public
113
+ */
114
+ this.deleted = false;
115
+
116
+ /**
117
+ * When the Shift Grower Change Meeting was last updated
118
+ *
119
+ * @type {Date}
120
+ * @public
121
+ */
122
+ this.updateTimestamp = new Date();
123
+
124
+ /**
125
+ * The Site ID associated with this Shift Grower Change Meeting
126
+ *
127
+ * @type {number}
128
+ * @public
129
+ */
130
+ this.siteId = siteId;
131
+ }
132
+
133
+ /**
134
+ * Create a new **ShiftGrowerChangeMeetingModel** from a JSON Object or JSON String
135
+ *
136
+ * @static
137
+ * @public
138
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
139
+ * @param {number} siteId The Site ID associated with this Shift Grower Change Meeting
140
+ * @return {ShiftGrowerChangeMeetingModel}
141
+ */
142
+ static fromJSON(json, siteId)
143
+ {
144
+ let model = new ShiftGrowerChangeMeetingModel(siteId);
145
+
146
+ /**
147
+ * The JSON Object
148
+ *
149
+ * @type {Object<string, any>}
150
+ */
151
+ let jsonObject = {};
152
+
153
+ if(typeof json === 'string')
154
+ {
155
+ jsonObject = JSON.parse(json);
156
+ }
157
+ else if(typeof json === 'object')
158
+ {
159
+ jsonObject = json;
160
+ }
161
+
162
+ if('id' in jsonObject)
163
+ {
164
+ model.id = (function(){
165
+ if(typeof jsonObject['id'] !== 'string')
166
+ {
167
+ return String(jsonObject['id']);
168
+ }
169
+
170
+ return jsonObject['id'];
171
+ }());
172
+ }
173
+
174
+ if('packingLineId' in jsonObject)
175
+ {
176
+ model.packingLineId = (function(){
177
+ if(typeof jsonObject['packingLineId'] !== 'string')
178
+ {
179
+ return String(jsonObject['packingLineId']);
180
+ }
181
+
182
+ return jsonObject['packingLineId'];
183
+ }());
184
+ }
185
+
186
+ if('shiftId' in jsonObject)
187
+ {
188
+ model.shiftId = (function(){
189
+ if(typeof jsonObject['shiftId'] !== 'string')
190
+ {
191
+ return String(jsonObject['shiftId']);
192
+ }
193
+
194
+ return jsonObject['shiftId'];
195
+ }());
196
+ }
197
+
198
+ if('createdTimestamp' in jsonObject)
199
+ {
200
+ model.createdTimestamp = (function(){
201
+ if(typeof jsonObject['createdTimestamp'] !== 'string')
202
+ {
203
+ return new Date(String(jsonObject['createdTimestamp']));
204
+ }
205
+
206
+ return new Date(jsonObject['createdTimestamp']);
207
+ }());
208
+ }
209
+
210
+ if('scheduledTimestamp' in jsonObject)
211
+ {
212
+ model.scheduledTimestamp = (function(){
213
+ if(typeof jsonObject['scheduledTimestamp'] !== 'string')
214
+ {
215
+ return new Date(String(jsonObject['scheduledTimestamp']));
216
+ }
217
+
218
+ return new Date(jsonObject['scheduledTimestamp']);
219
+ }());
220
+ }
221
+
222
+ if('startTimestamp' in jsonObject)
223
+ {
224
+ model.startTimestamp = (function(){
225
+ if(jsonObject['startTimestamp'] === null)
226
+ {
227
+ return null;
228
+ }
229
+
230
+ if(typeof jsonObject['startTimestamp'] !== 'string')
231
+ {
232
+ return new Date(String(jsonObject['startTimestamp']));
233
+ }
234
+
235
+ return new Date(jsonObject['startTimestamp']);
236
+ }());
237
+ }
238
+
239
+ if('finishTimestamp' in jsonObject)
240
+ {
241
+ model.finishTimestamp = (function(){
242
+ if(jsonObject['finishTimestamp'] === null)
243
+ {
244
+ return null;
245
+ }
246
+
247
+ if(typeof jsonObject['finishTimestamp'] !== 'string')
248
+ {
249
+ return new Date(String(jsonObject['finishTimestamp']));
250
+ }
251
+
252
+ return new Date(jsonObject['finishTimestamp']);
253
+ }());
254
+ }
255
+
256
+ if('packrunId' in jsonObject)
257
+ {
258
+ model.packrunId = (function(){
259
+ if(typeof jsonObject['packrunId'] !== 'string')
260
+ {
261
+ return String(jsonObject['packrunId']);
262
+ }
263
+
264
+ return jsonObject['packrunId'];
265
+ }());
266
+ }
267
+
268
+ if('usefulRating' in jsonObject)
269
+ {
270
+ model.usefulRating = (function(){
271
+ if(jsonObject['usefulRating'] === null)
272
+ {
273
+ return null;
274
+ }
275
+
276
+ if(typeof jsonObject['usefulRating'] !== 'number')
277
+ {
278
+ return Number.isInteger(Number(jsonObject['usefulRating'])) ? Number(jsonObject['usefulRating']) : Math.floor(Number(jsonObject['usefulRating']));
279
+ }
280
+
281
+ return Number.isInteger(jsonObject['usefulRating']) ? jsonObject['usefulRating'] : Math.floor(jsonObject['usefulRating']);
282
+ }());
283
+ }
284
+
285
+ if('status' in jsonObject)
286
+ {
287
+ model.status = (function(){
288
+ if(typeof jsonObject['status'] !== 'string')
289
+ {
290
+ return String(jsonObject['status']);
291
+ }
292
+
293
+ return jsonObject['status'];
294
+ }());
295
+ }
296
+
297
+ if('deleted' in jsonObject)
298
+ {
299
+ model.deleted = (function(){
300
+ if(typeof jsonObject['deleted'] !== 'boolean')
301
+ {
302
+ return Boolean(jsonObject['deleted']);
303
+ }
304
+
305
+ return jsonObject['deleted'];
306
+ }());
307
+ }
308
+
309
+ if('updateTimestamp' in jsonObject)
310
+ {
311
+ model.updateTimestamp = (function(){
312
+ if(typeof jsonObject['updateTimestamp'] !== 'string')
313
+ {
314
+ return new Date(String(jsonObject['updateTimestamp']));
315
+ }
316
+
317
+ return new Date(jsonObject['updateTimestamp']);
318
+ }());
319
+ }
320
+
321
+ return model;
322
+ }
323
+ }
324
+
325
+ export default ShiftGrowerChangeMeetingModel;
@@ -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';
@@ -34,6 +36,7 @@ import RejectBinModel from './RejectBinModel';
34
36
  import RejectBinScaleModel from './RejectBinScaleModel';
35
37
  import RejectBinWeightModel from './RejectBinWeightModel';
36
38
  import ShiftFocusMeetingModel from './ShiftFocusMeetingModel';
39
+ import ShiftGrowerChangeMeetingModel from './ShiftGrowerChangeMeetingModel';
37
40
  import ShiftHourlyEntryModel from './ShiftHourlyEntryModel';
38
41
  import ShiftModel from './ShiftModel';
39
42
  import ShiftQualitySummaryModel from './ShiftQualitySummaryModel';
@@ -57,6 +60,8 @@ const Site = {
57
60
  CompacSizerOutletTypeModel,
58
61
  CompacSizerPackrunSummaryModel,
59
62
  DowntimeEventModel,
63
+ FreshPackBinLotModel,
64
+ FreshPackFruitTemperatureModel,
60
65
  FreshPackPackrunSummaryModel,
61
66
  FreshQualityPackrunSummaryModel,
62
67
  GrowingMethodModel,
@@ -71,6 +76,7 @@ const Site = {
71
76
  RejectBinScaleModel,
72
77
  RejectBinWeightModel,
73
78
  ShiftFocusMeetingModel,
79
+ ShiftGrowerChangeMeetingModel,
74
80
  ShiftHourlyEntryModel,
75
81
  ShiftModel,
76
82
  ShiftQualitySummaryModel,
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '2.3.21';
2
+ export const version = '2.3.23';