public function build(array $data)
    {
        $this->validateArrayKeys(
            array('currency', 'total'),
            $data
        );

        $details = array();
        if (isset($data['details'])) {
            $details = $data['details'];
        }

        $amount = new Amount(
            $data['currency'],
            $data['total'],
            $details
        );

        return $amount;
    }