Passed
Push — master ( 2026a0...51608e )
by Pierre
02:48
created

Shipment::getTaxInformationIndicator()   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
     * @var bool
123
     */
124
    private $taxInformationIndicator;
125
126
    public function __construct()
127
    {
128
        $this->setShipper(new Shipper());
129
        $this->setShipTo(new ShipTo());
130
        $this->setShipmentServiceOptions(new ShipmentServiceOptions());
131
        $this->setService(new Service());
132
        $this->rateInformation = null;
133
        $this->taxInformationIndicator = false;
134
    }
135
136
    /**
137
     * @return ShipmentIndicationType
138
     */
139
    public function getShipmentIndicationType()
140
    {
141
        return $this->shipmentIndicationType;
142
    }
143
144
    /**
145
     * @param ShipmentIndicationType $shipmentIndicationType
146
     */
147
    public function setShipmentIndicationType(ShipmentIndicationType $shipmentIndicationType)
148
    {
149
        $this->shipmentIndicationType = $shipmentIndicationType;
150
    }
151
152
    /**
153
     * @return AlternateDeliveryAddress
154
     */
155
    public function getAlternateDeliveryAddress()
156
    {
157
        return $this->alternateDeliveryAddress;
158
    }
159
160
    /**
161
     * @param AlternateDeliveryAddress $alternateDeliveryAddress
162
     */
163
    public function setAlternateDeliveryAddress(AlternateDeliveryAddress $alternateDeliveryAddress)
164
    {
165
        $this->alternateDeliveryAddress = $alternateDeliveryAddress;
166
    }
167
168
    /**
169
     * @param Package $package
170
     *
171
     * @return Shipment
172
     */
173
    public function addPackage(Package $package)
174
    {
175
        $packages = $this->getPackages();
176
        $packages[] = $package;
177
        $this->setPackages($packages);
178
179
        return $this;
180
    }
181
182
    /**
183
     * @return string
184
     */
185
    public function getDescription()
186
    {
187
        return $this->description;
188
    }
189
190
    /**
191
     * @param string $description
192
     *
193
     * @return Shipment
194
     */
195
    public function setDescription($description)
196
    {
197
        $this->description = $description;
198
199
        return $this;
200
    }
201
202
    /**
203
     * @param ReferenceNumber $referenceNumber
204
     *
205
     * @return Shipment
206
     */
207
    public function setReferenceNumber(ReferenceNumber $referenceNumber)
208
    {
209
        $this->referenceNumber = $referenceNumber;
210
211
        return $this;
212
    }
213
214
    /**
215
     * @param ReferenceNumber $referenceNumber
216
     *
217
     * @return Shipment
218
     */
219
    public function setReferenceNumber2(ReferenceNumber $referenceNumber)
220
    {
221
        $this->referenceNumber2 = $referenceNumber;
222
223
        return $this;
224
    }
225
226
    /**
227
     * @return ReferenceNumber
228
     */
229
    public function getReferenceNumber()
230
    {
231
        return $this->referenceNumber;
232
    }
233
234
    /**
235
     * @return ReferenceNumber
236
     */
237
    public function getReferenceNumber2()
238
    {
239
        return $this->referenceNumber2;
240
    }
241
242
    /**
243
     * @return bool
244
     */
245
    public function getDocumentsOnly()
246
    {
247
        return $this->documentsOnly;
248
    }
249
250
    /**
251
     * @param bool $documentsOnly
252
     *
253
     * @return Shipment
254
     */
255
    public function setDocumentsOnly($documentsOnly)
256
    {
257
        $this->documentsOnly = $documentsOnly;
258
259
        return $this;
260
    }
261
262
    /**
263
     * @return Package[]
264
     */
265
    public function getPackages()
266
    {
267
        return $this->packages;
268
    }
269
270
    /**
271
     * @param Package[] $packages
272
     *
273
     * @return Shipment
274
     */
275
    public function setPackages(array $packages)
276
    {
277
        $this->packages = $packages;
278
279
        return $this;
280
    }
281
282
    /**
283
     * @return Service
284
     */
285
    public function getService()
286
    {
287
        return $this->service;
288
    }
289
290
    /**
291
     * @param Service $service
292
     *
293
     * @return Shipment
294
     */
295
    public function setService(Service $service)
296
    {
297
        $this->service = $service;
298
299
        return $this;
300
    }
301
302
    /**
303
     * @return ReturnService
304
     */
305
    public function getReturnService()
306
    {
307
        return $this->returnService;
308
    }
309
310
    /**
311
     * @param ReturnService $returnService
312
     *
313
     * @return Shipment
314
     */
315
    public function setReturnService(ReturnService $returnService)
316
    {
317
        $this->returnService = $returnService;
318
319
        return $this;
320
    }
321
322
    /**
323
     * @return ShipFrom
324
     */
325
    public function getShipFrom()
326
    {
327
        return $this->shipFrom;
328
    }
329
330
    /**
331
     * @param ShipFrom $shipFrom
332
     *
333
     * @return Shipment
334
     */
335
    public function setShipFrom(ShipFrom $shipFrom)
336
    {
337
        $this->shipFrom = $shipFrom;
338
339
        return $this;
340
    }
341
342
    /**
343
     * @return ShipTo
344
     */
345
    public function getShipTo()
346
    {
347
        return $this->shipTo;
348
    }
349
350
    /**
351
     * @param ShipTo $shipTo
352
     *
353
     * @return Shipment
354
     */
355
    public function setShipTo(ShipTo $shipTo)
356
    {
357
        $this->shipTo = $shipTo;
358
359
        return $this;
360
    }
361
362
    /**
363
     * @return SoldTo
364
     */
365
    public function getSoldTo()
366
    {
367
        return $this->soldTo;
368
    }
369
370
    /**
371
     * @param SoldTo $soldTo
372
     *
373
     * @return Shipment
374
     */
375
    public function setSoldTo(SoldTo $soldTo)
376
    {
377
        $this->soldTo = $soldTo;
378
379
        return $this;
380
    }
381
382
    /**
383
     * @return ShipmentServiceOptions
384
     */
385
    public function getShipmentServiceOptions()
386
    {
387
        return $this->shipmentServiceOptions;
388
    }
389
390
    /**
391
     * @param ShipmentServiceOptions $shipmentServiceOptions
392
     *
393
     * @return Shipment
394
     */
395
    public function setShipmentServiceOptions(ShipmentServiceOptions $shipmentServiceOptions)
396
    {
397
        $this->shipmentServiceOptions = $shipmentServiceOptions;
398
399
        return $this;
400
    }
401
402
    /**
403
     * @return Shipper
404
     */
405
    public function getShipper()
406
    {
407
        return $this->shipper;
408
    }
409
410
    /**
411
     * @param Shipper $shipper
412
     *
413
     * @return Shipment
414
     */
415
    public function setShipper(Shipper $shipper)
416
    {
417
        $this->shipper = $shipper;
418
419
        return $this;
420
    }
421
422
    /**
423
     * @return PaymentInformation
424
     */
425
    public function getPaymentInformation()
426
    {
427
        return $this->paymentInformation;
428
    }
429
430
    /**
431
     * @param PaymentInformation $paymentInformation
432
     *
433
     * @return Shipment
434
     */
435
    public function setPaymentInformation(PaymentInformation $paymentInformation)
436
    {
437
        $this->paymentInformation = $paymentInformation;
438
439
        return $this;
440
    }
441
442
    /**
443
     * @return ItemizedPaymentInformation
444
     */
445
    public function getItemizedPaymentInformation()
446
    {
447
        return $this->itemizedPaymentInformation;
448
    }
449
450
    /**
451
     * @param ItemizedPaymentInformation $itemizedPaymentInformation
452
     *
453
     * @return Shipment
454
     */
455
    public function setItemizedPaymentInformation(ItemizedPaymentInformation $itemizedPaymentInformation)
456
    {
457
        $this->itemizedPaymentInformation = $itemizedPaymentInformation;
458
459
        return $this;
460
    }
461
462
    /**
463
     * If called, returned prices will include negotiated rates (discounts will be applied).
464
     */
465
    public function showNegotiatedRates()
466
    {
467
        $this->rateInformation = new RateInformation();
468
        $this->rateInformation->setNegotiatedRatesIndicator(true);
469
    }
470
471
    /**
472
     * @return null|RateInformation
473
     */
474
    public function getRateInformation()
475
    {
476
        return $this->rateInformation;
477
    }
478
479
    /**
480
     * @param RateInformation $rateInformation
481
     *
482
     * @return Shipment
483
     */
484
    public function setRateInformation(RateInformation $rateInformation)
485
    {
486
        $this->rateInformation = $rateInformation;
487
488
        return $this;
489
    }
490
491
    /**
492
     * @return boolean
493
     */
494
    public function getGoodsNotInFreeCirculationIndicator()
495
    {
496
        return $this->goodsNotInFreeCirculationIndicator;
497
    }
498
499
    /**
500
     * @param boolean $goodsNotInFreeCirculationIndicator
501
     * @return Shipment
502
     */
503
    public function setGoodsNotInFreeCirculationIndicator($goodsNotInFreeCirculationIndicator)
504
    {
505
        $this->goodsNotInFreeCirculationIndicator = $goodsNotInFreeCirculationIndicator;
506
507
        return $this;
508
    }
509
510
    /**
511
     * @return string
512
     */
513
    public function getMovementReferenceNumber()
514
    {
515
        return $this->movementReferenceNumber;
516
    }
517
518
    /**
519
     * @param string $movementReferenceNumber
520
     * @return Shipment
521
     */
522
    public function setMovementReferenceNumber($movementReferenceNumber)
523
    {
524
        $this->movementReferenceNumber = $movementReferenceNumber;
525
526
        return $this;
527
    }
528
529
    /**
530
     * @return InvoiceLineTotal
531
     */
532
    public function getInvoiceLineTotal()
533
    {
534
        return $this->invoiceLineTotal;
535
    }
536
537
    /**
538
     * @param InvoiceLineTotal $invoiceLineTotal
539
     * @return Shipment
540
     */
541
    public function setInvoiceLineTotal(InvoiceLineTotal $invoiceLineTotal)
542
    {
543
        $this->invoiceLineTotal = $invoiceLineTotal;
544
545
        return $this;
546
    }
547
548
    /**
549
     * @return string
550
     */
551
    public function getNumOfPiecesInShipment()
552
    {
553
        return $this->numOfPiecesInShipment;
554
    }
555
556
    /**
557
     * @param string $numOfPiecesInShipment
558
     * @return Shipment
559
     */
560
    public function setNumOfPiecesInShipment($numOfPiecesInShipment)
561
    {
562
        $this->numOfPiecesInShipment = $numOfPiecesInShipment;
563
564
        return $this;
565
    }
566
567
    /**
568
     * @return DeliveryTimeInformation
569
     */
570
    public function getDeliveryTimeInformation()
571
    {
572
        return $this->deliveryTimeInformation;
573
    }
574
575
    /**
576
     * @param DeliveryTimeInformation $deliveryTimeInformation
577
     */
578
    public function setDeliveryTimeInformation(DeliveryTimeInformation $deliveryTimeInformation)
579
    {
580
        $this->deliveryTimeInformation = $deliveryTimeInformation;
581
    }
582
583
    /**
584
     * @return ShipmentTotalWeight
585
     */
586
    public function getShipmentTotalWeight()
587
    {
588
        return $this->shipmentTotalWeight;
589
    }
590
591
    /**
592
     * @param ShipmentTotalWeight $shipmentTotalWeight
593
     */
594
    public function setShipmentTotalWeight(ShipmentTotalWeight $shipmentTotalWeight)
595
    {
596
        $this->shipmentTotalWeight = $shipmentTotalWeight;
597
    }
598
599
    public function getTaxInformationIndicator(): bool
600
    {
601
        return $this->taxInformationIndicator;
602
    }
603
604
    /**
605
     * If called, returned prices will include Tax Information
606
     */
607
    public function setTaxInformationIndicator(bool $taxInformationIndicator): self
608
    {
609
        $this->taxInformationIndicator = $taxInformationIndicator;
610
        
611
        return $this;
612
    }
613
}
614