LicenseSpring C++ SDK 7.31.0
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 {
20 public:
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(),
42 uint64_t licenseId = 0, uint64_t orderId = 0,
43 const std::string& orderStoreId = std::string() );
44
47 bool isActive() const;
48
51 bool isInitialPassword() const;
52
55 uint64_t id() const;
56
59 const std::string& email() const;
60
63 const std::string& firstName() const;
64
67 const std::string& lastName() const;
68
71 const std::string& phoneNumber() const;
72
76 const std::string& initialPassword() const;
77
81 uint64_t licenseId() const;
82
85 uint64_t orderId() const;
86
89 const std::string& orderStoreId() const;
90
91 private:
92 bool m_isActive;
93 bool m_isInitialPassword;
94 uint64_t m_id;
95 std::string m_email;
96 std::string m_firstName;
97 std::string m_lastName;
98 std::string m_phoneNumber;
99 std::string m_initialPassword;
100 uint64_t m_licenseId;
101 uint64_t m_orderId;
102 std::string m_orderStoreId;
103 };
104}
105
106#ifdef _MSC_VER
107#pragma warning( pop )
108#endif
109
110#endif // LS_LICENSE_USER_H
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
Definition: APIDef.h:22
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.