1<?php
2
3declare(strict_types=1);
4
5namespace JMS\Serializer\Tests\Fixtures;
6
7use JMS\Serializer\Annotation as Serializer;
8
9/** @Serializer\XmlRoot("price") */
10class CurrencyAwarePrice
11{
12    /**
13     * @Serializer\XmlAttribute
14     * @Serializer\Type("string")
15     */
16    private $currency;
17
18    /**
19     * @Serializer\XmlValue
20     * @Serializer\Type("double")
21     */
22    private $amount;
23
24    public function __construct($amount, $currency = 'EUR')
25    {
26        $this->currency = $currency;
27        $this->amount = $amount;
28    }
29}
30