LicenseSpring C++ SDK
Easily add Software Licensing to your application
LicenseUser.h
Go to the documentation of this file.
1#ifndef LS_LICENSE_USER_H
2#define LS_LICENSE_USER_H
3
4#ifdef _MSC_VER
5#pragma once
6#pragma warning(push)
7#pragma warning(disable : 4251)
8#endif
9
10#include <memory>
11#include <string>
12#include "APIDef.h"
13
14namespace LicenseSpring
15{
19{
20public:
21 using ptr_t = std::shared_ptr<LicenseUser>;
22
25
38 LicenseUser(bool isActive, bool isInitialPassword, uint64_t id, const std::string &email,
39 const std::string &firstName, const std::string &lastName,
40 const std::string &phoneNumber = std::string(),
41 const std::string &initialPassword = std::string(), uint64_t licenseId = 0,
42 uint64_t orderId = 0, const std::string &orderStoreId = std::string());
43
46 bool isActive() const;
47
50 bool isInitialPassword() const;
51
54 uint64_t id() const;
55
58 const std::string &email() const;
59
62 const std::string &firstName() const;
63
66 const std::string &lastName() const;
67
70 const std::string &phoneNumber() const;
71
75 const std::string &initialPassword() const;
76
80 uint64_t licenseId() const;
81
84 uint64_t orderId() const;
85
88 const std::string &orderStoreId() const;
89
90private:
91 bool m_isActive;
92 bool m_isInitialPassword;
93 uint64_t m_id;
94 std::string m_email;
95 std::string m_firstName;
96 std::string m_lastName;
97 std::string m_phoneNumber;
98 std::string m_initialPassword;
99 uint64_t m_licenseId;
100 uint64_t m_orderId;
101 std::string m_orderStoreId;
102};
103} // namespace LicenseSpring
104
105#ifdef _MSC_VER
106#pragma warning(pop)
107#endif
108
109#endif // LS_LICENSE_USER_H
#define LS_API
Definition: APIDef.h:23
Class that encapsulates information about a license user.
Definition: LicenseUser.h:19
uint64_t licenseId() const
Getter method for license internal identifier.
const std::string & initialPassword() const
Getter method for user initial password.
bool isActive() const
Getter method for user status (active/inactive).
bool isInitialPassword() const
Getter method for password status, has it been changed by user or not.
uint64_t orderId() const
Getter method for order internal identifier.
LicenseUser(bool isActive, bool isInitialPassword, uint64_t id, const std::string &email, const std::string &firstName, const std::string &lastName, const std::string &phoneNumber=std::string(), const std::string &initialPassword=std::string(), uint64_t licenseId=0, uint64_t orderId=0, const std::string &orderStoreId=std::string())
Constructs a license user with given information.
const std::string & orderStoreId() const
Getter method for order store id.
const std::string & firstName() const
Getter method for user first name.
const std::string & phoneNumber() const
Getter method for user phone number.
LicenseUser()
Constructs a license user with no information.
const std::string & email() const
Getter method for user email.
const std::string & lastName() const
Getter method for user last name.
std::shared_ptr< LicenseUser > ptr_t
Definition: LicenseUser.h:21
uint64_t id() const
Getter method for user id.