Cryptolens Client API for C++
Customer.hpp
1 #pragma once
2 
3 namespace cryptolens_io {
4 
5 namespace v20190401 {
6 
7 // This immutable class represents a customer
8 class Customer {
9 private:
10  int id_;
11  std::string name_;
12  std::string email_;
13  std::string company_name_;
14  std::uint64_t created_;
15 public:
16  Customer
17  ( int id
18  , std::string name
19  , std::string email
20  , std::string company_name
21  , std::uint64_t created
22  )
23  : id_(id)
24  , name_(std::move(name))
25  , email_(std::move(email))
26  , company_name_(std::move(company_name))
27  , created_(created)
28  {
29  // TODO: Check length requirements (does not matter when we are just reading things from the web api)
30  }
31 
32  // Returns the customer id
33  int get_id() const { return id_; }
34 
35  // Returns the customer name
36  std::string const& get_name() const { return name_; }
37 
38  // Returns the customer's email
39  std::string const& get_email() const { return email_; }
40 
41  // Returns the customer's company name
42  std::string const& get_company_name() const { return company_name_; }
43 
44  // Returns when the customer's account was created
45  std::uint64_t get_created() const { return created_; }
46 };
47 
48 } // namespace v20190401
49 
50 namespace v20180502 {
51 
53 
54 } // namespace v20180502
55 
56 namespace latest {
57 
59 
60 } // namespace latest
61 
62 } // namespace cryptolens_io
Definition: ActivateError.hpp:5
Definition: Customer.hpp:8