1 | <?php |
||
17 | class Order |
||
18 | { |
||
19 | use SerializerTrait; |
||
20 | |||
21 | /** |
||
22 | * @Serializer\XmlElement(cdata=false) |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | private $currency; |
||
27 | |||
28 | /** |
||
29 | * @Serializer\SerializedName("items") |
||
30 | * @Serializer\Type("ArrayCollection<PHPSC\PagSeguro\Items\Item>") |
||
31 | * @Serializer\XmlList(entry="item") |
||
32 | * |
||
33 | * @var ItemCollection |
||
34 | */ |
||
35 | private $items; |
||
36 | |||
37 | /** |
||
38 | * @Serializer\XmlElement(cdata=false) |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | private $reference; |
||
43 | |||
44 | /** |
||
45 | * @Serializer\XmlElement(cdata=true) |
||
46 | * @Serializer\Type("boolean") |
||
47 | * |
||
48 | * @var bool |
||
49 | */ |
||
50 | private $shippingAddressRequired; |
||
51 | |||
52 | /** |
||
53 | * @Serializer\Type("PHPSC\PagSeguro\Shipping\Shipping") |
||
54 | * |
||
55 | * @var Shipping |
||
56 | */ |
||
57 | private $shipping; |
||
58 | |||
59 | /** |
||
60 | * @Serializer\XmlElement(cdata=false) |
||
61 | * |
||
62 | * @var float |
||
63 | */ |
||
64 | private $extraAmount; |
||
65 | |||
66 | /** |
||
67 | * @param ItemCollection $items |
||
68 | */ |
||
69 | 39 | public function __construct(ItemCollection $items = null) |
|
75 | |||
76 | /** |
||
77 | * @return string |
||
78 | */ |
||
79 | 5 | public function getCurrency() |
|
83 | |||
84 | /** |
||
85 | * @return ItemCollection |
||
86 | */ |
||
87 | 6 | public function getItems() |
|
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | */ |
||
95 | 5 | public function getReference() |
|
99 | |||
100 | /** |
||
101 | * @param string $reference |
||
102 | */ |
||
103 | 4 | public function setReference($reference) |
|
107 | |||
108 | /** |
||
109 | * @return bool |
||
110 | */ |
||
111 | 6 | public function isShippingAddressRequired() |
|
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | 2 | public function withoutShippingAddress() |
|
123 | |||
124 | /** |
||
125 | * @return Shipping |
||
126 | */ |
||
127 | 5 | public function getShipping() |
|
131 | |||
132 | /** |
||
133 | * @param Shipping $shipping |
||
134 | */ |
||
135 | 4 | public function setShipping(Shipping $shipping) |
|
139 | |||
140 | /** |
||
141 | * @return float |
||
142 | */ |
||
143 | 5 | public function getExtraAmount() |
|
147 | |||
148 | /** |
||
149 | * @param float $extraAmount |
||
150 | */ |
||
151 | 3 | public function setExtraAmount($extraAmount) |
|
155 | } |
||
156 |