Passed
Push — master ( e6b5d5...e7a28f )
by
unknown
40s
created

Shipment::getInvoiceLineTotal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Ups\Entity;
4
5
class Shipment
6
{
7
    /**
8
     * @var PaymentInformation
9
     */
10
    private $paymentInformation;
11
12
    /**
13
     * @var ItemizedPaymentInformation
14
     */
15
    private $itemizedPaymentInformation;
16
17
    /**
18
     * @var RateInformation
19
     */
20
    private $rateInformation;
21
22
    /**
23
     * @var string
24
     */
25
    private $description;
26
27
    /**
28
     * @var Shipper
29
     */
30
    private $shipper;
31
32
    /**
33
     * @var ShipTo;
34
     */
35
    private $shipTo;
36
37
    /**
38
     * @var SoldTo
39
     */
40
    private $soldTo;
41
42
    /**
43
     * @var ShipFrom
44
     */
45
    private $shipFrom;
46
47
    /**
48
     * @var AlternateDeliveryAddress
49
     */
50
    private $alternateDeliveryAddress;
51
52
    /**
53
     * @var ShipmentIndicationType
54
     */
55
    private $shipmentIndicationType;
56
57
    /**
58
     * @var Service
59
     */
60
    private $service;
61
62
    /**
63
     * @var ReturnService
64
     */
65
    private $returnService;
66
67
    /**
68
     * @var bool
69
     */
70
    private $documentsOnly;
71
72
    /**
73
     * @var Package[]
74
     */
75
    private $packages = [];
76
77
    /**
78
     * @var ReferenceNumber
79
     */
80
    private $referenceNumber;
81
    
82
    /**
83
     * @var ReferenceNumber
84
     */
85
    private $referenceNumber2;
86
87
    /**
88
     * @var ShipmentServiceOptions
89
     */
90
    private $shipmentServiceOptions;
91
92
    /**
93
     * @var bool
94
     */
95
    private $goodsNotInFreeCirculationIndicator;
96
97
    /**
98
     * @var string
99
     */
100
    private $movementReferenceNumber;
101
102
    /**
103
     * @var InvoiceLineTotal
104
     */
105
    private $invoiceLineTotal;
106
    
107
    /**
108
     * @var ShipmentTotalWeight
109
     */
110
    private $shipmentTotalWeight;
111
112
    /**
113
     * @var string
114
     */
115
    private $numOfPiecesInShipment;
116
117
    /**
118
     * @var DeliveryTimeInformation
119
     */
120
    private $deliveryTimeInformation;
121
122 3
    public function __construct()
123
    {
124 3
        $this->setShipper(new Shipper());
125 3
        $this->setShipTo(new ShipTo());
126 3
        $this->setShipmentServiceOptions(new ShipmentServiceOptions());
127 3
        $this->setService(new Service());
128 3
        $this->rateInformation = null;
129 3
    }
130
131
    /**
132
     * @return ShipmentIndicationType
133
     */
134
    public function getShipmentIndicationType()
135
    {
136
        return $this->shipmentIndicationType;
137
    }
138
139
    /**
140
     * @param ShipmentIndicationType $shipmentIndicationType
141
     */
142
    public function setShipmentIndicationType(ShipmentIndicationType $shipmentIndicationType)
143
    {
144
        $this->shipmentIndicationType = $shipmentIndicationType;
145
    }
146
147
    /**
148
     * @return AlternateDeliveryAddress
149
     */
150
    public function getAlternateDeliveryAddress()
151
    {
152
        return $this->alternateDeliveryAddress;
153
    }
154
155
    /**
156
     * @param AlternateDeliveryAddress $alternateDeliveryAddress
157
     */
158
    public function setAlternateDeliveryAddress(AlternateDeliveryAddress $alternateDeliveryAddress)
159
    {
160
        $this->alternateDeliveryAddress = $alternateDeliveryAddress;
161
    }
162
163
    /**
164
     * @param Package $package
165
     *
166
     * @return Shipment
167
     */
168
    public function addPackage(Package $package)
169
    {
170
        $packages = $this->getPackages();
171
        $packages[] = $package;
172
        $this->setPackages($packages);
173
174
        return $this;
175
    }
176
177
    /**
178
     * @return string
179
     */
180
    public function getDescription()
181
    {
182
        return $this->description;
183
    }
184
185
    /**
186
     * @param string $description
187
     *
188
     * @return Shipment
189
     */
190
    public function setDescription($description)
191
    {
192
        $this->description = $description;
193
194
        return $this;
195
    }
196
197
    /**
198
     * @param ReferenceNumber $referenceNumber
199
     *
200
     * @return Shipment
201
     */
202
    public function setReferenceNumber(ReferenceNumber $referenceNumber)
203
    {
204
        $this->referenceNumber = $referenceNumber;
205
206
        return $this;
207
    }
208
    
209
    /**
210
     * @param ReferenceNumber $referenceNumber
211
     *
212
     * @return Shipment
213
     */
214
    public function setReferenceNumber2(ReferenceNumber $referenceNumber)
215
    {
216
        $this->referenceNumber2 = $referenceNumber;
217
218
        return $this;
219
    }
220
221
    /**
222
     * @return ReferenceNumber
223
     */
224
    public function getReferenceNumber()
225
    {
226
        return $this->referenceNumber;
227
    }
228
    
229
    /**
230
     * @return ReferenceNumber
231
     */
232
    public function getReferenceNumber2()
233
    {
234
        return $this->referenceNumber2;
235
    }
236
237
    /**
238
     * @return bool
239
     */
240
    public function getDocumentsOnly()
241
    {
242
        return $this->documentsOnly;
243
    }
244
245
    /**
246
     * @param bool $documentsOnly
247
     *
248
     * @return Shipment
249
     */
250
    public function setDocumentsOnly($documentsOnly)
251
    {
252
        $this->documentsOnly = $documentsOnly;
253
254
        return $this;
255
    }
256
257
    /**
258
     * @return Package[]
259
     */
260
    public function getPackages()
261
    {
262
        return $this->packages;
263
    }
264
265
    /**
266
     * @param Package[] $packages
267
     *
268
     * @return Shipment
269
     */
270
    public function setPackages(array $packages)
271
    {
272
        $this->packages = $packages;
273
274
        return $this;
275
    }
276
277
    /**
278
     * @return Service
279
     */
280
    public function getService()
281
    {
282
        return $this->service;
283
    }
284
285
    /**
286
     * @param Service $service
287
     *
288
     * @return Shipment
289
     */
290 3
    public function setService(Service $service)
291
    {
292 3
        $this->service = $service;
293
294 3
        return $this;
295
    }
296
297
    /**
298
     * @return ReturnService
299
     */
300
    public function getReturnService()
301
    {
302
        return $this->returnService;
303
    }
304
305
    /**
306
     * @param ReturnService $returnService
307
     *
308
     * @return Shipment
309
     */
310
    public function setReturnService(ReturnService $returnService)
311
    {
312
        $this->returnService = $returnService;
313
314
        return $this;
315
    }
316
317
    /**
318
     * @return ShipFrom
319
     */
320
    public function getShipFrom()
321
    {
322
        return $this->shipFrom;
323
    }
324
325
    /**
326
     * @param ShipFrom $shipFrom
327
     *
328
     * @return Shipment
329
     */
330
    public function setShipFrom(ShipFrom $shipFrom)
331
    {
332
        $this->shipFrom = $shipFrom;
333
334
        return $this;
335
    }
336
337
    /**
338
     * @return ShipTo
339
     */
340
    public function getShipTo()
341
    {
342
        return $this->shipTo;
343
    }
344
345
    /**
346
     * @param ShipTo $shipTo
347
     *
348
     * @return Shipment
349
     */
350 3
    public function setShipTo(ShipTo $shipTo)
351
    {
352 3
        $this->shipTo = $shipTo;
353
354 3
        return $this;
355
    }
356
357
    /**
358
     * @return SoldTo
359
     */
360
    public function getSoldTo()
361
    {
362
        return $this->soldTo;
363
    }
364
365
    /**
366
     * @param SoldTo $soldTo
367
     *
368
     * @return Shipment
369
     */
370
    public function setSoldTo(SoldTo $soldTo)
371
    {
372
        $this->soldTo = $soldTo;
373
374
        return $this;
375
    }
376
377
    /**
378
     * @return ShipmentServiceOptions
379
     */
380
    public function getShipmentServiceOptions()
381
    {
382
        return $this->shipmentServiceOptions;
383
    }
384
385
    /**
386
     * @param ShipmentServiceOptions $shipmentServiceOptions
387
     *
388
     * @return Shipment
389
     */
390 3
    public function setShipmentServiceOptions(ShipmentServiceOptions $shipmentServiceOptions)
391
    {
392 3
        $this->shipmentServiceOptions = $shipmentServiceOptions;
393
394 3
        return $this;
395
    }
396
397
    /**
398
     * @return Shipper
399
     */
400
    public function getShipper()
401
    {
402
        return $this->shipper;
403
    }
404
405
    /**
406
     * @param Shipper $shipper
407
     *
408
     * @return Shipment
409
     */
410 3
    public function setShipper(Shipper $shipper)
411
    {
412 3
        $this->shipper = $shipper;
413
414 3
        return $this;
415
    }
416
417
    /**
418
     * @return PaymentInformation
419
     */
420
    public function getPaymentInformation()
421
    {
422
        return $this->paymentInformation;
423
    }
424
425
    /**
426
     * @param PaymentInformation $paymentInformation
427
     *
428
     * @return Shipment
429
     */
430
    public function setPaymentInformation(PaymentInformation $paymentInformation)
431
    {
432
        $this->paymentInformation = $paymentInformation;
433
434
        return $this;
435
    }
436
437
    /**
438
     * @return ItemizedPaymentInformation
439
     */
440
    public function getItemizedPaymentInformation()
441
    {
442
        return $this->itemizedPaymentInformation;
443
    }
444
445
    /**
446
     * @param ItemizedPaymentInformation $itemizedPaymentInformation
447
     *
448
     * @return Shipment
449
     */
450
    public function setItemizedPaymentInformation(ItemizedPaymentInformation $itemizedPaymentInformation)
451
    {
452
        $this->itemizedPaymentInformation = $itemizedPaymentInformation;
453
454
        return $this;
455
    }
456
457
    /**
458
     * If called, returned prices will include negotiated rates (discounts will be applied).
459
     */
460
    public function showNegotiatedRates()
461
    {
462
        $this->rateInformation = new RateInformation();
463
        $this->rateInformation->setNegotiatedRatesIndicator(true);
464
    }
465
466
    /**
467
     * @return null|RateInformation
468
     */
469
    public function getRateInformation()
470
    {
471
        return $this->rateInformation;
472
    }
473
474
    /**
475
     * @param RateInformation $rateInformation
476
     *
477
     * @return Shipment
478
     */
479
    public function setRateInformation(RateInformation $rateInformation)
480
    {
481
        $this->rateInformation = $rateInformation;
482
483
        return $this;
484
    }
485
486
    /**
487
     * @return boolean
488
     */
489
    public function getGoodsNotInFreeCirculationIndicator()
490
    {
491
        return $this->goodsNotInFreeCirculationIndicator;
492
    }
493
494
    /**
495
     * @param boolean $goodsNotInFreeCirculationIndicator
496
     * @return Shipment
497
     */
498
    public function setGoodsNotInFreeCirculationIndicator($goodsNotInFreeCirculationIndicator)
499
    {
500
        $this->goodsNotInFreeCirculationIndicator = $goodsNotInFreeCirculationIndicator;
501
502
        return $this;
503
    }
504
505
    /**
506
     * @return string
507
     */
508
    public function getMovementReferenceNumber()
509
    {
510
        return $this->movementReferenceNumber;
511
    }
512
513
    /**
514
     * @param string $movementReferenceNumber
515
     * @return Shipment
516
     */
517
    public function setMovementReferenceNumber($movementReferenceNumber)
518
    {
519
        $this->movementReferenceNumber = $movementReferenceNumber;
520
521
        return $this;
522
    }
523
524
    /**
525
     * @return InvoiceLineTotal
526
     */
527
    public function getInvoiceLineTotal()
528
    {
529
        return $this->invoiceLineTotal;
530
    }
531
532
    /**
533
     * @param InvoiceLineTotal $invoiceLineTotal
534
     * @return Shipment
535
     */
536
    public function setInvoiceLineTotal(InvoiceLineTotal $invoiceLineTotal)
537
    {
538
        $this->invoiceLineTotal = $invoiceLineTotal;
539
540
        return $this;
541
    }
542
543
    /**
544
     * @return string
545
     */
546
    public function getNumOfPiecesInShipment()
547
    {
548
        return $this->numOfPiecesInShipment;
549
    }
550
551
    /**
552
     * @param string $numOfPiecesInShipment
553
     * @return Shipment
554
     */
555
    public function setNumOfPiecesInShipment($numOfPiecesInShipment)
556
    {
557
        $this->numOfPiecesInShipment = $numOfPiecesInShipment;
558
559
        return $this;
560
    }
561
562
    /**
563
     * @return DeliveryTimeInformation
564
     */
565
    public function getDeliveryTimeInformation()
566
    {
567
        return $this->deliveryTimeInformation;
568
    }
569
570
    /**
571
     * @param DeliveryTimeInformation $deliveryTimeInformation
572
     */
573
    public function setDeliveryTimeInformation(DeliveryTimeInformation $deliveryTimeInformation)
574
    {
575
        $this->deliveryTimeInformation = $deliveryTimeInformation;
576
    }
577
    
578
    /**
579
     * @return ShipmentTotalWeight
580
     */
581
    public function getShipmentTotalWeight()
582
    {
583
        return $this->shipmentTotalWeight;
584
    }
585
586
    /**
587
     * @param ShipmentTotalWeight $shipmentTotalWeight
588
     */
589
    public function setShipmentTotalWeight(ShipmentTotalWeight $shipmentTotalWeight)
590
    {
591
        $this->shipmentTotalWeight = $shipmentTotalWeight;
592
    }
593
}
594