File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace RahulGodiyal \PhpUpsApiWrapper \Entity ;
4+
5+ class ReferenceNumber
6+ {
7+ private string $ code = "" ;
8+ private string $ value = "" ;
9+
10+ public function exists ()
11+ {
12+ if (!empty ($ this ->value )) {
13+ return true ;
14+ }
15+
16+ return false ;
17+ }
18+
19+ public function setCode (string $ code ): self
20+ {
21+ $ this ->code = $ code ;
22+ return $ this ;
23+ }
24+
25+ public function getCode (): string
26+ {
27+ return $ this ->code ;
28+ }
29+
30+ public function setValue (string $ value ): self
31+ {
32+ $ this ->value = $ value ;
33+ return $ this ;
34+ }
35+
36+ public function getValue (): string
37+ {
38+ return $ this ->value ;
39+ }
40+
41+ public function toArray (): array
42+ {
43+ $ referenceNumber = [
44+ "Value " => $ this ->value
45+ ];
46+
47+ if ($ this ->code ) {
48+ $ referenceNumber ["Code " ] = $ this ->code ;
49+ }
50+
51+ return $ referenceNumber ;
52+ }
53+ }
You can’t perform that action at this time.
0 commit comments