-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathInvoice.h
63 lines (49 loc) · 1.58 KB
/
Invoice.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*******************************************************************************
*
* Copyright (c) {2003-2019} Murex S.A.S. and its affiliates.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the MIT License
* which accompanies this distribution, and is available at
* https://opensource.org/licenses/MIT
*
*******************************************************************************/
#ifndef TESTBUILDERS_WORKSHOP_PURCHASE_INVOICE_H_INCLUDED
#define TESTBUILDERS_WORKSHOP_PURCHASE_INVOICE_H_INCLUDED
#include "domain/country/Country.h"
#include <memory>
#include <string>
#include <vector>
namespace purchase
{
class PurchasedBook;
class Invoice
{
const int id_;
const std::string clientName_;
std::vector<std::shared_ptr<const PurchasedBook>> purchasedBooks_;
const domain::country::Country country_;
public:
Invoice(const std::string& clientName, const domain::country::Country& country);
Invoice(int id, const std::string& clientName, const domain::country::Country& country);
int getId() const
{
return id_;
}
std::string getClientName() const
{
return clientName_;
}
domain::country::Country getCountry() const
{
return country_;
}
void addPurchasedBooks(std::vector<std::shared_ptr<const PurchasedBook>> books);
void addPurchasedBook(const std::shared_ptr <const PurchasedBook>& book);
double computeTotalAmount() const;
std::vector<std::shared_ptr<const PurchasedBook>> getPurchasedBooks() const
{
return purchasedBooks_;
}
};
}
#endif // TESTBUILDERS_WORKSHOP_PURCHASE_INVOICE_H_INCLUDED