Completed
Push — master ( bd3e6a...5291d1 )
by Dragos
05:26
created

Invoice::preSerializer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Model;
4
5
use JMS\Serializer\Annotation as JMS;
6
7
/**
8
 * Invoice model.
9
 */
10
class Invoice
11
{
12
    const INVOICE_TYPE_OUTGOING = 'outgoing';
13
    const INVOICE_TYPE_DRAFT = 'draft';
14
    const INVOICE_TYPE_CREDIT = 'credit';
15
16
    const INVOICE_SALUTATION_NONE = '';
17
    const INVOICE_SALUTATION_MR = 'mr';
18
    const INVOICE_SALUTATION_MRS = 'mrs';
19
    const INVOICE_SALUTATION_FAMILY = 'family';
20
21
    const INVOICE_PAYMENT_TYPE_TRANSFER = 1;
22
    const INVOICE_PAYMENT_TYPE_DIRECT_DEBIT = 2;
23
    const INVOICE_PAYMENT_TYPE_CASH = 3;
24
    const INVOICE_PAYMENT_TYPE_PAYPAL = 4;
25
    const INVOICE_PAYMENT_TYPE_ADVANCED_PAYMENT = 5;
26
    const INVOICE_PAYMENT_TYPE_CREDIT_CARD = 6;
27
28
    /**
29
     * The invoice id.
30
     *
31
     * @var integer
32
     *
33
     * @JMS\Type("integer")
34
     * @JMS\SerializedName("INVOICE_ID")
35
     */
36
    protected $invoiceId;
37
38
    /**
39
     * The invoice external id.
40
     *
41
     * @var string
42
     *
43
     * @JMS\Type("string")
44
     * @JMS\SerializedName("INVOICE_EXT_UID")
45
     */
46
    protected $invoiceExternalId;
47
48
    /**
49
     * The status.
50
     *
51
     * @var string
52
     *
53
     * @JMS\Type("string")
54
     * @JMS\SerializedName("STATUS")
55
     */
56
    protected $status;
57
58
    /**
59
     * The type.
60
     *
61
     * @var string
62
     *
63
     * @JMS\Type("string")
64
     * @JMS\SerializedName("TYPE")
65
     */
66
    protected $type;
67
68
    /**
69
     * The customer ID.
70
     *
71
     * @var integer
72
     *
73
     * @JMS\Type("integer")
74
     * @JMS\SerializedName("CUSTOMER_ID")
75
     */
76
    protected $customerId;
77
78
    /**
79
     * The own customer number.
80
     *
81
     * @var integer
82
     *
83
     * @JMS\Type("integer")
84
     * @JMS\SerializedName("CUSTOMER_NUMBER")
85
     */
86
    protected $customerNumber;
87
88
    /**
89
     * The customer cost center ID.
90
     *
91
     * @var integer
92
     *
93
     * @JMS\Type("integer")
94
     * @JMS\SerializedName("CUSTOMER_COSTCENTER_ID")
95
     */
96
    protected $customerCostCenterId;
97
98
    /**
99
     * The name of the organization.
100
     *
101
     * @var string
102
     *
103
     * @JMS\Type("string")
104
     * @JMS\SerializedName("ORGANIZATION")
105
     */
106
    protected $organization;
107
108
    /**
109
     * Salutation.
110
     *
111
     * @var string
112
     *
113
     * @JMS\Type("string")
114
     * @JMS\SerializedName("SALUTATION")
115
     */
116
    protected $salutation;
117
118
    /**
119
     * The first name.
120
     *
121
     * @var string
122
     *
123
     * @JMS\Type("string")
124
     * @JMS\SerializedName("FIRST_NAME")
125
     */
126
    protected $firstName;
127
128
    /**
129
     * The last name.
130
     *
131
     * @var string
132
     *
133
     * @JMS\Type("string")
134
     * @JMS\SerializedName("LAST_NAME")
135
     */
136
    protected $lastName;
137
138
    /**
139
     * The address.
140
     *
141
     * @var string
142
     *
143
     * @JMS\Type("string")
144
     * @JMS\SerializedName("ADDRESS")
145
     */
146
    protected $address;
147
148
    /**
149
     * The address2.
150
     *
151
     * @var string
152
     *
153
     * @JMS\Type("string")
154
     * @JMS\SerializedName("ADDRESS_2")
155
     */
156
    protected $address2;
157
158
    /**
159
     * The zip code.
160
     *
161
     * @var string
162
     *
163
     * @JMS\Type("string")
164
     * @JMS\SerializedName("ZIPCODE")
165
     */
166
    protected $zipCode;
167
168
    /**
169
     * The city.
170
     *
171
     * @var string
172
     *
173
     * @JMS\Type("string")
174
     * @JMS\SerializedName("CITY")
175
     */
176
    protected $city;
177
178
    /**
179
     * Some comments about the invoice.
180
     *
181
     * @var string
182
     *
183
     * @JMS\Type("string")
184
     * @JMS\SerializedName("COMMENT")
185
     */
186
    protected $comment;
187
188
    /**
189
     * Payment type.
190
     *
191
     * @var integer
192
     *
193
     * @JMS\Type("integer")
194
     * @JMS\SerializedName("PAYMENT_TYPE")
195
     */
196
    protected $paymentType;
197
198
    /**
199
     * Days until date of payment.
200
     *
201
     * @var integer
202
     *
203
     * @JMS\Type("integer")
204
     * @JMS\SerializedName("DAYS_FOR_PAYMENT")
205
     */
206
    protected $paymentDays;
207
208
    /**
209
     * The bank name.
210
     *
211
     * @var string
212
     *
213
     * @JMS\Type("string")
214
     * @JMS\SerializedName("BANK_NAME")
215
     */
216
    protected $bankName;
217
218
    /**
219
     * The bank account number.
220
     *
221
     * @var string
222
     *
223
     * @JMS\Type("string")
224
     * @JMS\SerializedName("BANK_ACCOUNT_NUMBER")
225
     */
226
    protected $bankAccountNumber;
227
228
    /**
229
     * The bank code.
230
     *
231
     * @var string
232
     *
233
     * @JMS\Type("string")
234
     * @JMS\SerializedName("BANK_CODE")
235
     */
236
    protected $bankCode;
237
238
    /**
239
     * The bank account owner.
240
     *
241
     * @var string
242
     *
243
     * @JMS\Type("string")
244
     * @JMS\SerializedName("BANK_ACCOUNT_OWNER")
245
     */
246
    protected $bankAccountOwner;
247
248
    /**
249
     * The bank IBAN.
250
     *
251
     * @var string
252
     *
253
     * @JMS\Type("string")
254
     * @JMS\SerializedName("BANK_IBAN")
255
     */
256
    protected $bankIBAN;
257
258
    /**
259
     * The bank BIC.
260
     *
261
     * @var string
262
     *
263
     * @JMS\Type("string")
264
     * @JMS\SerializedName("BANK_BIC")
265
     */
266
    protected $bankBIC;
267
268
    /**
269
     * The invoice affiliate.
270
     *
271
     * @var string
272
     *
273
     * @JMS\Type("string")
274
     * @JMS\SerializedName("AFFILIATE")
275
     */
276
    protected $affiliate;
277
278
    /**
279
     * The invoice country code (ISO 3166 ALPHA-2).
280
     *
281
     * @var string
282
     *
283
     * @JMS\Type("string")
284
     * @JMS\SerializedName("COUNTRY_CODE")
285
     */
286
    protected $countryCode;
287
288
    /**
289
     * The VAT identification number of the invoice.
290
     *
291
     * @var string
292
     *
293
     * @JMS\Type("string")
294
     * @JMS\SerializedName("VAT_ID")
295
     */
296
    protected $vatId;
297
298
    /**
299
     * The currency code of the invoice.
300
     *
301
     * @var string
302
     *
303
     * @JMS\Type("string")
304
     * @JMS\SerializedName("CURRENCY_CODE")
305
     */
306
    protected $currencyCode;
307
308
    /**
309
     * The template id.
310
     *
311
     * @var integer
312
     *
313
     * @JMS\Type("integer")
314
     * @JMS\SerializedName("TEMPLATE_ID")
315
     */
316
    protected $templateId;
317
318
    /**
319
     * The subscription id.
320
     *
321
     * @var integer
322
     *
323
     * @JMS\Type("integer")
324
     * @JMS\SerializedName("SUBSCRIPTION_ID")
325
     */
326
    protected $subscriptionId;
327
328
    /**
329
     * The subscription invoice counter.
330
     *
331
     * @var integer
332
     *
333
     * @JMS\Type("integer")
334
     * @JMS\SerializedName("SUBSCRIPTION_INVOICE_COUNTER")
335
     */
336
    protected $subscriptionInvoiceCounter;
337
338
    /**
339
     * The invoice number.
340
     *
341
     * @var string
342
     *
343
     * @JMS\Type("string")
344
     * @JMS\SerializedName("INVOICE_NUMBER")
345
     */
346
    protected $invoiceNumber;
347
348
    /**
349
     * The invoice title.
350
     *
351
     * @var string
352
     *
353
     * @JMS\Type("string")
354
     * @JMS\SerializedName("INVOICE_TITLE")
355
     */
356
    protected $invoiceTitle;
357
358
    /**
359
     * The intro text.
360
     *
361
     * @var string
362
     *
363
     * @JMS\Type("string")
364
     * @JMS\SerializedName("INTROTEXT")
365
     */
366
    protected $introText;
367
368
    /**
369
     * The date of received payment.
370
     *
371
     * @var \DateTime
372
     *
373
     * @JMS\Type("DateTime<'Y-m-d H:i:s', 'UTC'>")
374
     * @JMS\SerializedName("PAID_DATE")
375
     */
376
    protected $paidDate;
377
378
    /**
379
     * The outstanding amount.
380
     *
381
     * @var string
382
     *
383
     * @JMS\Type("string")
384
     * @JMS\SerializedName("OUTSTANDING_AMOUNT")
385
     */
386
    protected $outstandingAmount;
387
388
    /**
389
     * The Flag for canceled status: 0 = no | 1 = yes.
390
     *
391
     * @var integer
392
     *
393
     * @JMS\Type("integer")
394
     * @JMS\SerializedName("IS_CANCELED")
395
     */
396
    protected $isCanceled;
397
398
    /**
399
     * The invoice date.
400
     *
401
     * @var \DateTime
402
     *
403
     * @JMS\Type("DateTime<'Y-m-d', 'UTC'>")
404
     * @JMS\SerializedName("INVOICE_DATE")
405
     *
406
     */
407
    protected $invoiceDate;
408
409
    /**
410
     * The due date.
411
     *
412
     * We serialize it as string because of inconsistencies in the Fastbill API response.
413
     * Depending on the customer, the due date may or may not hve a time component in the response.
414
     *
415
     * @var \DateTime
416
     *
417
     * @JMS\Type("string")
418
     * @JMS\SerializedName("DUE_DATE")
419
     */
420
    protected $dueDate;
421
422
    /**
423
     * The delivery date.
424
     *
425
     * @var string
426
     *
427
     * @JMS\Type("string")
428
     * @JMS\SerializedName("DELIVERY_DATE")
429
     */
430
    protected $deliveryDate;
431
432
    /**
433
     * The cash discount percent.
434
     *
435
     * @var string
436
     *
437
     * @JMS\Type("string")
438
     * @JMS\SerializedName("CASH_DISCOUNT_PERCENT")
439
     */
440
    protected $cashDiscountPercent;
441
442
    /**
443
     * The cash discount days.
444
     *
445
     * @var string
446
     *
447
     * @JMS\Type("string")
448
     * @JMS\SerializedName("CASH_DISCOUNT_DAYS")
449
     */
450
    protected $cashDiscountDays;
451
452
    /**
453
     * The cash discount percent.
454
     *
455
     * @var float
456
     *
457
     * @JMS\Type("float")
458
     * @JMS\SerializedName("SUB_TOTAL")
459
     */
460
    protected $subTotal;
461
462
    /**
463
     * The cash discount percent.
464
     *
465
     * @var float
466
     *
467
     * @JMS\Type("float")
468
     * @JMS\SerializedName("VAT_TOTAL")
469
     */
470
    protected $vatTotal;
471
472
    /**
473
     * List of all articles for one entity.
474
     *
475
     * @var array
476
     *
477
     * @JMS\Type("array<Speicher210\Fastbill\Api\Model\InvoiceVatItem>")
478
     * @JMS\SerializedName("VAT_ITEMS")
479
     */
480
    protected $vatItems = array();
481
482
    /**
483
     * List of the items
484
     *
485
     * @var array
486
     *
487
     * @JMS\Type("array<Speicher210\Fastbill\Api\Model\InvoiceItem>")
488
     * @JMS\SerializedName("ITEMS")
489
     */
490
    protected $items = array();
491
492
    /**
493
     * The total.
494
     *
495
     * @var float
496
     *
497
     * @JMS\Type("float")
498
     * @JMS\SerializedName("TOTAL")
499
     */
500
    protected $total;
501
502
    /**
503
     * The payment info.
504
     *
505
     * @var string
506
     *
507
     * @JMS\Type("string")
508
     * @JMS\SerializedName("PAYMENT_INFO")
509
     */
510
    protected $paymentInfo;
511
512
    /**
513
     * The document url.
514
     *
515
     * @var string
516
     *
517
     * @JMS\Type("string")
518
     * @JMS\SerializedName("DOCUMENT_URL")
519
     */
520
    protected $documentUrl;
521
522
    /**
523
     * List of shipment-events belonging to the invoice.
524
     *
525
     * @var array
526
     *
527
     * @JMS\Type("array")
528
     * @JMS\SerializedName("SHIPMENTS")
529
     */
530
    protected $shipments = array();
531
532
    /**
533
     * The PayPal url.
534
     *
535
     * @var string
536
     *
537
     * @JMS\Type("string")
538
     * @JMS\SerializedName("PAYPAL_URL")
539
     */
540
    protected $payPalUrl;
541
542
    /**
543
     * Get the invoice ID.
544
     *
545
     * @return int
546
     */
547
    public function getInvoiceId()
548
    {
549
        return $this->invoiceId;
550
    }
551
552
    /**
553
     * Set the invoice ID.
554
     *
555
     * @param int $invoiceId
556
     * @return Invoice
557
     */
558 6
    public function setInvoiceId($invoiceId)
559
    {
560 6
        $this->invoiceId = $invoiceId;
561
562 6
        return $this;
563
    }
564
565
    /**
566
     * Get the invoice external ID.
567
     *
568
     * @return string
569
     */
570
    public function getInvoiceExternalId()
571
    {
572
        return $this->invoiceExternalId;
573
    }
574
575
    /**
576
     * Set the invoice external ID.
577
     *
578
     * @param string $invoiceExternalId
579
     * @return Invoice
580
     */
581 6
    public function setInvoiceExternalId($invoiceExternalId)
582
    {
583 6
        $this->invoiceExternalId = $invoiceExternalId;
584
585 6
        return $this;
586
    }
587
588
    /**
589
     * Get the status.
590
     *
591
     * @return string
592
     */
593
    public function getStatus()
594
    {
595
        return $this->status;
596
    }
597
598
    /**
599
     * Set the status.
600
     *
601
     * @param string $status
602
     * @return Invoice
603
     */
604 6
    public function setStatus($status)
605
    {
606 6
        $this->status = $status;
607
608 6
        return $this;
609
    }
610
611
    /**
612
     * Get the type of the invoice.
613
     *
614
     * @return string
615
     */
616
    public function getType()
617
    {
618
        return $this->type;
619
    }
620
621
    /**
622
     * Set the type of the invoice.
623
     *
624
     * @param string $type
625
     * @return Invoice
626
     */
627 6
    public function setType($type)
628
    {
629 6
        $this->type = $type;
630
631 6
        return $this;
632
    }
633
634
    /**
635
     * Get the customer ID.
636
     *
637
     * @return int
638
     */
639
    public function getCustomerId()
640
    {
641
        return $this->customerId;
642
    }
643
644
    /**
645
     * Set the customer ID.
646
     *
647
     * @param int $customerId
648
     * @return Invoice
649
     */
650 6
    public function setCustomerId($customerId)
651
    {
652 6
        $this->customerId = $customerId;
653
654 6
        return $this;
655
    }
656
657
    /**
658
     * Get the customer number.
659
     *
660
     * @return int
661
     */
662
    public function getCustomerNumber()
663
    {
664
        return $this->customerNumber;
665
    }
666
667
    /**
668
     * Set the customer number.
669
     *
670
     * @param int $customerNumber
671
     * @return Invoice
672
     */
673 6
    public function setCustomerNumber($customerNumber)
674
    {
675 6
        $this->customerNumber = $customerNumber;
676
677 6
        return $this;
678
    }
679
680
    /**
681
     * Get the customer cost center ID.
682
     *
683
     * @return int
684
     */
685
    public function getCustomerCostCenterId()
686
    {
687
        return $this->customerCostCenterId;
688
    }
689
690
    /**
691
     * Set the customer cost center ID.
692
     *
693
     * @param int $customerCostCenterId
694
     * @return Invoice
695
     */
696 6
    public function setCustomerCostCenterId($customerCostCenterId)
697
    {
698 6
        $this->customerCostCenterId = $customerCostCenterId;
699
700 6
        return $this;
701
    }
702
703
    /**
704
     * Get the organization.
705
     *
706
     * @return string
707
     */
708
    public function getOrganization()
709
    {
710
        return $this->organization;
711
    }
712
713
    /**
714
     * Set the organization.
715
     *
716
     * @param string $organization
717
     * @return Invoice
718
     */
719 6
    public function setOrganization($organization)
720
    {
721 6
        $this->organization = $organization;
722
723 6
        return $this;
724
    }
725
726
    /**
727
     * Get the salutation.
728
     *
729
     * @return string
730
     */
731
    public function getSalutation()
732
    {
733
        return $this->salutation;
734
    }
735
736
    /**
737
     * Set the salutation.
738
     *
739
     * @param string $salutation
740
     * @return Invoice
741
     */
742 6
    public function setSalutation($salutation)
743
    {
744 6
        $this->salutation = $salutation;
745
746 6
        return $this;
747
    }
748
749
    /**
750
     * Set the first name.
751
     *
752
     * @param string $firstName The name.
753
     * @return Invoice
754
     */
755 6
    public function setFirstName($firstName)
756
    {
757 6
        $this->firstName = $firstName;
758
759 6
        return $this;
760
    }
761
762
    /**
763
     * Get the last name.
764
     *
765
     * @return string
766
     */
767
    public function getLastName()
768
    {
769
        return $this->lastName;
770
    }
771
772
    /**
773
     * Set the last name.
774
     *
775
     * @param string $lastName The last name.
776
     * @return Invoice
777
     */
778 6
    public function setLastName($lastName)
779
    {
780 6
        $this->lastName = $lastName;
781
782 6
        return $this;
783
    }
784
785
    /**
786
     * Get the address.
787
     *
788
     * @return string
789
     */
790
    public function getAddress()
791
    {
792
        return $this->address;
793
    }
794
795
    /**
796
     * Set the address.
797
     *
798
     * @param string $address The address.
799
     * @return Invoice
800
     */
801 6
    public function setAddress($address)
802
    {
803 6
        $this->address = $address;
804
805 6
        return $this;
806
    }
807
808
    /**
809
     * Get the address 2.
810
     *
811
     * @return string
812
     */
813
    public function getAddress2()
814
    {
815
        return $this->address2;
816
    }
817
818
    /**
819
     * Set the address 2.
820
     *
821
     * @param string $address2 The address.
822
     * @return Invoice
823
     */
824 6
    public function setAddress2($address2)
825
    {
826 6
        $this->address2 = $address2;
827
828 6
        return $this;
829
    }
830
831
    /**
832
     * Get the zip code.
833
     *
834
     * @return string
835
     */
836
    public function getZipCode()
837
    {
838
        return $this->zipCode;
839
    }
840
841
    /**
842
     * Set the zip code.
843
     *
844
     * @param string $zipCode The zip code.
845
     * @return Invoice
846
     */
847 6
    public function setZipCode($zipCode)
848
    {
849 6
        $this->zipCode = $zipCode;
850
851 6
        return $this;
852
    }
853
854
    /**
855
     * Get the city.
856
     *
857
     * @return string
858
     */
859
    public function getCity()
860
    {
861
        return $this->city;
862
    }
863
864
    /**
865
     * Set the city.
866
     *
867
     * @param string $city The city.
868
     * @return Invoice
869
     */
870 6
    public function setCity($city)
871
    {
872 6
        $this->city = $city;
873
874 6
        return $this;
875
    }
876
877
    /**
878
     * Get the comment.
879
     *
880
     * @return string
881
     */
882
    public function getComment()
883
    {
884
        return $this->comment;
885
    }
886
887
    /**
888
     * Set the comment.
889
     *
890
     * @param string $comment
891
     * @return Invoice
892
     */
893 6
    public function setComment($comment)
894
    {
895 6
        $this->comment = $comment;
896
897 6
        return $this;
898
    }
899
900
    /**
901
     * Get the payment type.
902
     *
903
     * @return int
904
     */
905
    public function getPaymentType()
906
    {
907
        return $this->paymentType;
908
    }
909
910
    /**
911
     * Set the payment type.
912
     *
913
     * @param int $paymentType
914
     * @return Invoice
915
     */
916 6
    public function setPaymentType($paymentType)
917
    {
918 6
        $this->paymentType = $paymentType;
919
920 6
        return $this;
921
    }
922
923
    /**
924
     * Get the payment days.
925
     *
926
     * @return int
927
     */
928
    public function getPaymentDays()
929
    {
930
        return $this->paymentDays;
931
    }
932
933
    /**
934
     * Set the payment days.
935
     *
936
     * @param int $paymentDays
937
     * @return Invoice
938
     */
939 6
    public function setPaymentDays($paymentDays)
940
    {
941 6
        $this->paymentDays = $paymentDays;
942
943 6
        return $this;
944
    }
945
946
    /**
947
     * Get the bank name.
948
     *
949
     * @return string
950
     */
951
    public function getBankName()
952
    {
953
        return $this->bankName;
954
    }
955
956
    /**
957
     * Get the bank name.
958
     *
959
     * @param string $bankName The name of the back.
960
     * @return Invoice
961
     */
962
    public function setBankName($bankName)
963
    {
964
        $this->bankName = $bankName;
965
966
        return $this;
967
    }
968
969
    /**
970
     * Get the bank account number.
971
     *
972
     * @return string
973
     */
974
    public function getBankAccountNumber()
975
    {
976
        return $this->bankAccountNumber;
977
    }
978
979
    /**
980
     * Set the bank account number.
981
     *
982
     * @param string $bankAccountNumber
983
     * @return Invoice
984
     */
985
    public function setBankAccountNumber($bankAccountNumber)
986
    {
987
        $this->bankAccountNumber = $bankAccountNumber;
988
989
        return $this;
990
    }
991
992
    /**
993
     * Get the bank code.
994
     *
995
     * @return string
996
     */
997
    public function getBankCode()
998
    {
999
        return $this->bankCode;
1000
    }
1001
1002
    /**
1003
     * Set the bank code.
1004
     *
1005
     * @param string $bankCode The code.
1006
     * @return Invoice
1007
     */
1008
    public function setBankCode($bankCode)
1009
    {
1010
        $this->bankCode = $bankCode;
1011
1012
        return $this;
1013
    }
1014
1015
    /**
1016
     * Get the bank account owner.
1017
     *
1018
     * @return string
1019
     */
1020
    public function getBankAccountOwner()
1021
    {
1022
        return $this->bankAccountOwner;
1023
    }
1024
1025
    /**
1026
     * Set the bank account owner.
1027
     *
1028
     * @param string $bankAccountOwner The owner.
1029
     * @return Invoice
1030
     */
1031
    public function setBankAccountOwner($bankAccountOwner)
1032
    {
1033
        $this->bankAccountOwner = $bankAccountOwner;
1034
1035
        return $this;
1036
    }
1037
1038
    /**
1039
     * Get the bank IBAN.
1040
     *
1041
     * @return string
1042
     */
1043
    public function getBankIBAN()
1044
    {
1045
        return $this->bankIBAN;
1046
    }
1047
1048
    /**
1049
     * Set the bank IBAN.
1050
     *
1051
     * @param string $bankIBAN The IBAN code.
1052
     * @return Invoice
1053
     */
1054
    public function setBankIBAN($bankIBAN)
1055
    {
1056
        $this->bankIBAN = $bankIBAN;
1057
1058
        return $this;
1059
    }
1060
1061
    /**
1062
     * Get the bank BIC.
1063
     *
1064
     * @return string
1065
     */
1066
    public function getBankBIC()
1067
    {
1068
        return $this->bankBIC;
1069
    }
1070
1071
    /**
1072
     * Set the bank BIC.
1073
     *
1074
     * @param string $bankBIC The BIC.
1075
     * @return Invoice
1076
     */
1077
    public function setBankBIC($bankBIC)
1078
    {
1079
        $this->bankBIC = $bankBIC;
1080
1081
        return $this;
1082
    }
1083
1084
    /**
1085
     * Get the affiliate.
1086
     *
1087
     * @return string
1088
     */
1089
    public function getAffiliate()
1090
    {
1091
        return $this->affiliate;
1092
    }
1093
1094
    /**
1095
     * Set the affiliate.
1096
     *
1097
     * @param string $affiliate
1098
     * @return Invoice
1099
     */
1100
    public function setAffiliate($affiliate)
1101
    {
1102
        $this->affiliate = $affiliate;
1103
1104
        return $this;
1105
    }
1106
1107
    /**
1108
     * Get the country code.
1109
     *
1110
     * @return string
1111
     */
1112
    public function getCountryCode()
1113
    {
1114
        return $this->countryCode;
1115
    }
1116
1117
    /**
1118
     * Set the country code (ISO 3166 ALPHA-2).
1119
     *
1120
     * @param string $countryCode
1121
     * @return Invoice
1122
     */
1123 6
    public function setCountryCode($countryCode)
1124
    {
1125 6
        $this->countryCode = $countryCode;
1126
1127 6
        return $this;
1128
    }
1129
1130
    /**
1131
     * Get the vat ID.
1132
     *
1133
     * @return string
1134
     */
1135
    public function getVatId()
1136
    {
1137
        return $this->vatId;
1138
    }
1139
1140
    /**
1141
     * Set the vat ID.
1142
     *
1143
     * @param string $vatId
1144
     * @return Invoice
1145
     */
1146 6
    public function setVatId($vatId)
1147
    {
1148 6
        $this->vatId = $vatId;
1149
1150 6
        return $this;
1151
    }
1152
1153
    /**
1154
     * Get the currency code.
1155
     *
1156
     * @return string
1157
     */
1158
    public function getCurrencyCode()
1159
    {
1160
        return $this->currencyCode;
1161
    }
1162
1163
    /**
1164
     * Set the currency code.
1165
     *
1166
     * @param string $currencyCode
1167
     * @return Invoice
1168
     */
1169 6
    public function setCurrencyCode($currencyCode)
1170
    {
1171 6
        $this->currencyCode = $currencyCode;
1172
1173 6
        return $this;
1174
    }
1175
1176
    /**
1177
     * Get the template ID.
1178
     *
1179
     * @return int
1180
     */
1181
    public function getTemplateId()
1182
    {
1183
        return $this->templateId;
1184
    }
1185
1186
    /**
1187
     * Set the template ID.
1188
     *
1189
     * @param int $templateId
1190
     * @return Invoice
1191
     */
1192 6
    public function setTemplateId($templateId)
1193
    {
1194 6
        $this->templateId = $templateId;
1195
1196 6
        return $this;
1197
    }
1198
1199
    /**
1200
     * Get the subscription ID.
1201
     *
1202
     * @return int
1203
     */
1204
    public function getSubscriptionId()
1205
    {
1206
        return $this->subscriptionId;
1207
    }
1208
1209
    /**
1210
     * Set the subscription ID.
1211
     *
1212
     * @param int $subscriptionId
1213
     * @return Invoice
1214
     */
1215 6
    public function setSubscriptionId($subscriptionId)
1216
    {
1217 6
        $this->subscriptionId = $subscriptionId;
1218
1219 6
        return $this;
1220
    }
1221
1222
    /**
1223
     * Get the invoice number.
1224
     *
1225
     * @return string
1226
     */
1227
    public function getInvoiceNumber()
1228
    {
1229
        return $this->invoiceNumber;
1230
    }
1231
1232
    /**
1233
     * Set the invoice number.
1234
     *
1235
     * @param string $invoiceNumber
1236
     * @return Invoice
1237
     */
1238 6
    public function setInvoiceNumber($invoiceNumber)
1239
    {
1240 6
        $this->invoiceNumber = $invoiceNumber;
1241
1242 6
        return $this;
1243
    }
1244
1245
    /**
1246
     * Get the invoice title.
1247
     *
1248
     * @return string
1249
     */
1250
    public function getInvoiceTitle()
1251
    {
1252
        return $this->invoiceTitle;
1253
    }
1254
1255
    /**
1256
     * Set the invoice title.
1257
     *
1258
     * @param string $invoiceTitle
1259
     * @return Invoice
1260
     */
1261 6
    public function setInvoiceTitle($invoiceTitle)
1262
    {
1263 6
        $this->invoiceTitle = $invoiceTitle;
1264
1265 6
        return $this;
1266
    }
1267
1268
    /**
1269
     * Get the intro text.
1270
     *
1271
     * @return string
1272
     */
1273
    public function getIntroText()
1274
    {
1275
        return $this->introText;
1276
    }
1277
1278
    /**
1279
     * Set the intro text.
1280
     *
1281
     * @param string $introText
1282
     * @return Invoice
1283
     */
1284 6
    public function setIntroText($introText)
1285
    {
1286 6
        $this->introText = $introText;
1287
1288 6
        return $this;
1289
    }
1290
1291
    /**
1292
     * Get paid date.
1293
     *
1294
     * @return \DateTime
1295
     */
1296
    public function getPaidDate()
1297
    {
1298
        return $this->paidDate;
1299
    }
1300
1301
    /**
1302
     * Set paid date.
1303
     *
1304
     * @param \DateTime $paidDate
1305
     * @return Invoice
1306
     */
1307 6
    public function setPaidDate($paidDate)
1308
    {
1309 6
        $this->paidDate = $paidDate;
1310
1311 6
        return $this;
1312
    }
1313
1314
    /**
1315
     * Get if the invoice is canceled.
1316
     *
1317
     * @return int
1318
     */
1319
    public function getIsCanceled()
1320
    {
1321
        return $this->isCanceled;
1322
    }
1323
1324
    /**
1325
     * Set if the invoice is canceled.
1326
     *
1327
     * @param int $isCanceled
1328
     * @return Invoice
1329
     */
1330 6
    public function setIsCanceled($isCanceled)
1331
    {
1332 6
        $this->isCanceled = $isCanceled;
1333
1334 6
        return $this;
1335
    }
1336
1337
    /**
1338
     * Get the invoice date.
1339
     *
1340
     * @return \DateTime
1341
     */
1342 6
    public function getInvoiceDate()
1343
    {
1344 6
        return $this->invoiceDate;
1345
    }
1346
1347
    /**
1348
     * Set the invoice date.
1349
     *
1350
     * @param \DateTime $invoiceDate
1351
     * @return Invoice
1352
     */
1353 6
    public function setInvoiceDate($invoiceDate)
1354
    {
1355 6
        $this->invoiceDate = $invoiceDate;
1356
1357 6
        return $this;
1358
    }
1359
1360
    /**
1361
     * Get the due date.
1362
     *
1363
     * @return \DateTime
1364
     */
1365 6
    public function getDueDate()
1366
    {
1367 6
        return $this->dueDate;
1368
    }
1369
1370
    /**
1371
     * Set the due date.
1372
     *
1373
     * @param \DateTime $dueDate
1374
     * @return Invoice
1375
     */
1376 6
    public function setDueDate($dueDate)
1377
    {
1378 6
        $this->dueDate = $dueDate;
1379
1380 6
        return $this;
1381
    }
1382
1383
    /**
1384
     * Get delivery date.
1385
     *
1386
     * @return string
1387
     */
1388
    public function getDeliveryDate()
1389
    {
1390
        return $this->deliveryDate;
1391
    }
1392
1393
    /**
1394
     * Set the delivery date.
1395
     *
1396
     * @param string $deliveryDate
1397
     * @return Invoice
1398
     */
1399 6
    public function setDeliveryDate($deliveryDate)
1400
    {
1401 6
        $this->deliveryDate = $deliveryDate;
1402
1403 6
        return $this;
1404
    }
1405
1406
    /**
1407
     * Get the cash discount percent.
1408
     *
1409
     * @return string
1410
     */
1411
    public function getCashDiscountPercent()
1412
    {
1413
        return $this->cashDiscountPercent;
1414
    }
1415
1416
    /**
1417
     * Set the cash discount percent.
1418
     *
1419
     * @param string $cashDiscountPercent
1420
     * @return Invoice
1421
     */
1422 6
    public function setCashDiscountPercent($cashDiscountPercent)
1423
    {
1424 6
        $this->cashDiscountPercent = $cashDiscountPercent;
1425
1426 6
        return $this;
1427
    }
1428
1429
    /**
1430
     * Get the cash discount days.
1431
     *
1432
     * @return string
1433
     */
1434
    public function getCashDiscountDays()
1435
    {
1436
        return $this->cashDiscountDays;
1437
    }
1438
1439
    /**
1440
     * Set the cash discount days.
1441
     *
1442
     * @param string $cashDiscountDays
1443
     * @return Invoice
1444
     */
1445 6
    public function setCashDiscountDays($cashDiscountDays)
1446
    {
1447 6
        $this->cashDiscountDays = $cashDiscountDays;
1448
1449 6
        return $this;
1450
    }
1451
1452
    /**
1453
     * Get the sub total.
1454
     *
1455
     * @return float
1456
     */
1457
    public function getSubTotal()
1458
    {
1459
        return $this->subTotal;
1460
    }
1461
1462
    /**
1463
     * Set the sub total.
1464
     *
1465
     * @param float $subTotal
1466
     * @return Invoice
1467
     */
1468 6
    public function setSubTotal($subTotal)
1469
    {
1470 6
        $this->subTotal = $subTotal;
1471
1472 6
        return $this;
1473
    }
1474
1475
    /**
1476
     * Get the vat total.
1477
     *
1478
     * @return float
1479
     */
1480
    public function getVatTotal()
1481
    {
1482
        return $this->vatTotal;
1483
    }
1484
1485
    /**
1486
     * Set the vat total.
1487
     *
1488
     * @param float $vatTotal
1489
     * @return Invoice
1490
     */
1491 6
    public function setVatTotal($vatTotal)
1492
    {
1493 6
        $this->vatTotal = $vatTotal;
1494
1495 6
        return $this;
1496
    }
1497
1498
    /**
1499
     * Get the vat items.
1500
     *
1501
     * @return array
1502
     */
1503
    public function getVatItems()
1504
    {
1505
        return $this->vatItems;
1506
    }
1507
1508
    /**
1509
     * Set the vat items.
1510
     *
1511
     * @param InvoiceVatItem[] $vatItems
1512
     * @return Invoice
1513
     */
1514
    public function setVatItems(array $vatItems)
1515
    {
1516
        $this->vatItems = $vatItems;
1517
1518
        return $this;
1519
    }
1520
1521
    /**
1522
     * Add a vat item.
1523
     *
1524
     * @param InvoiceVatItem $vatItem The vat item to add.
1525
     */
1526 6
    public function addVatItem(InvoiceVatItem $vatItem)
1527
    {
1528 6
        $this->vatItems[] = $vatItem;
1529 6
    }
1530
1531
    /**
1532
     * Get the items.
1533
     *
1534
     * @return array
1535
     */
1536
    public function getItems()
1537
    {
1538
        return $this->items;
1539
    }
1540
1541
    /**
1542
     * Set the items.
1543
     *
1544
     * @param InvoiceItem[] $items The items.
1545
     * @return Invoice
1546
     */
1547
    public function setItems(array $items)
1548
    {
1549
        $this->items = $items;
1550
1551
        return $this;
1552
    }
1553
1554
    /**
1555
     * Add an item.
1556
     *
1557
     * @param InvoiceItem $item The item to add.
1558
     */
1559 6
    public function addItem(InvoiceItem $item)
1560
    {
1561 6
        $this->items[] = $item;
1562 6
    }
1563
1564
    /**
1565
     * Get the total.
1566
     *
1567
     * @return float
1568
     */
1569
    public function getTotal()
1570
    {
1571
        return $this->total;
1572
    }
1573
1574
    /**
1575
     * Set the total.
1576
     *
1577
     * @param float $total
1578
     * @return Invoice
1579
     */
1580 6
    public function setTotal($total)
1581
    {
1582 6
        $this->total = $total;
1583
1584 6
        return $this;
1585
    }
1586
1587
    /**
1588
     * Get the payment info.
1589
     *
1590
     * @return string
1591
     */
1592
    public function getPaymentInfo()
1593
    {
1594
        return $this->paymentInfo;
1595
    }
1596
1597
    /**
1598
     * Set the payment info.
1599
     *
1600
     * @param string $paymentInfo
1601
     * @return Invoice
1602
     */
1603 6
    public function setPaymentInfo($paymentInfo)
1604
    {
1605 6
        $this->paymentInfo = $paymentInfo;
1606
1607 6
        return $this;
1608
    }
1609
1610
    /**
1611
     * Get the document url.
1612
     *
1613
     * @return string
1614
     */
1615
    public function getDocumentUrl()
1616
    {
1617
        return $this->documentUrl;
1618
    }
1619
1620
    /**
1621
     * Set the document url.
1622
     *
1623
     * @param string $documentUrl
1624
     * @return Invoice
1625
     */
1626 6
    public function setDocumentUrl($documentUrl)
1627
    {
1628 6
        $this->documentUrl = $documentUrl;
1629
1630 6
        return $this;
1631
    }
1632
1633
    /**
1634
     * Get the shipments.
1635
     *
1636
     * @return array
1637
     */
1638
    public function getShipments()
1639
    {
1640
        return $this->shipments;
1641
    }
1642
1643
    /**
1644
     * Set the shipments.
1645
     *
1646
     * @param array $shipments
1647
     * @return Invoice
1648
     */
1649
    public function setShipments(array $shipments)
1650
    {
1651
        $this->shipments = $shipments;
1652
1653
        return $this;
1654
    }
1655
1656
    /**
1657
     * Get the PayPal url.
1658
     *
1659
     * @return string
1660
     */
1661
    public function getPayPalUrl()
1662
    {
1663
        return $this->payPalUrl;
1664
    }
1665
1666
    /**
1667
     * Set the PayPal url.
1668
     *
1669
     * @param string $payPalUrl The PayPal url.
1670
     * @return Invoice
1671
     */
1672 6
    public function setPayPalUrl($payPalUrl)
1673
    {
1674 6
        $this->payPalUrl = $payPalUrl;
1675
1676 6
        return $this;
1677
    }
1678
1679
    /**
1680
     * Get the subscription invoice counter.
1681
     *
1682
     * @return int
1683
     */
1684
    public function getSubscriptionInvoiceCounter()
1685
    {
1686
        return $this->subscriptionInvoiceCounter;
1687
    }
1688
1689
    /**
1690
     * Set the subscription invoice counter.
1691
     *
1692
     * @param int $subscriptionInvoiceCounter
1693
     * @return Invoice
1694
     */
1695 6
    public function setSubscriptionInvoiceCounter($subscriptionInvoiceCounter)
1696
    {
1697 6
        $this->subscriptionInvoiceCounter = $subscriptionInvoiceCounter;
1698
1699 6
        return $this;
1700
    }
1701
1702
    /**
1703
     * Get the outstanding amount.
1704
     *
1705
     * @return string
1706
     */
1707
    public function getOutstandingAmount()
1708
    {
1709
        return $this->outstandingAmount;
1710
    }
1711
1712
    /**
1713
     * Set the outstanding amount.
1714
     *
1715
     * @param string $outstandingAmount
1716
     * @return Invoice
1717
     */
1718 6
    public function setOutstandingAmount($outstandingAmount)
1719
    {
1720 6
        $this->outstandingAmount = $outstandingAmount;
1721
1722 6
        return $this;
1723
    }
1724
1725
    /**
1726
     * @JMS\PreSerialize()
1727
     */
1728
    protected function preSerializer()
1729
    {
1730
        $this->dueDate = $this->dueDate->format('Y-m-d H:i:s');
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->dueDate->format('Y-m-d H:i:s') of type string is incompatible with the declared type object<DateTime> of property $dueDate.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
1731
    }
1732
}
1733