1#ifndef TENDUKE_SE_LICENSING_FLUENTCONSUMPTIONBUILDER_H
2#define TENDUKE_SE_LICENSING_FLUENTCONSUMPTIONBUILDER_H
4#include "./LicenseCheckoutArguments.h"
5#include "./LicenseCheckoutParameters.h"
6#include "../../License.h"
18template <
typename Builder>
28 , licenseKey(std::move(licenseKey))
40 Builder &
seats(
const std::string &pProductName, std::int64_t numSeats)
43 startArgument(::tenduke::se::licensing::License::SEATS, pProductName, numSeats);
44 return static_cast<Builder&
>(*this);
52 Builder &
seat(
const std::string &pProductName)
54 return seats(pProductName, 1);
63 Builder &
count(
const std::string &pProductName, std::int64_t useCount)
66 startArgument(::tenduke::se::licensing::License::USE_COUNT, pProductName, useCount);
67 return static_cast<Builder&
>(*this);
75 Builder &
count(
const std::string &pProductName)
77 return count(pProductName, 1);
86 Builder &
time(
const std::string &pProductName, std::int64_t useTime)
89 startArgument(::tenduke::se::licensing::License::USE_TIME, pProductName, useTime);
90 return static_cast<Builder&
>(*this);
113 Builder &
version(
const std::string &pClientVersion)
116 this->clientVersion = pClientVersion;
119 defaultVersion = pClientVersion;
121 return static_cast<Builder&
>(*this);
139 Builder & licenseId(
const std::string &pLicenseId)
141 this->
id = pLicenseId;
142 return static_cast<Builder&
>(*this);
155 arguments.emplace_back(
162 buildingItem =
false;
174 const std::string &pProductName,
178 this->buildingItem =
true;
179 this->qtyDimension = pQtyDimension;
180 this->productName = pProductName;
184 this->clientVersion = defaultVersion;
189 const std::string licenseKey;
192 std::vector<::tenduke::se::licensing::LicenseCheckoutArguments> arguments;
196 std::string defaultVersion;
199 std::string clientVersion;
201 std::string productName;
FluentConsumptionBuilder(std::string licenseKey)
Constructs new instance.
Definition FluentConsumptionBuilder.h:26
Builder & seats(const std::string &pProductName, std::int64_t numSeats)
Start building a license-consumption for seats.
Definition FluentConsumptionBuilder.h:40
FluentConsumptionBuilder(std::string licenseKey)
Constructs new instance.
Definition FluentConsumptionBuilder.h:26
Builder & count(const std::string &pProductName, std::int64_t useCount)
Start building a license consumption for use count.
Definition FluentConsumptionBuilder.h:63
Builder & time(const std::string &pProductName, std::int64_t useTime)
Starts building a license consumption of use time.
Definition FluentConsumptionBuilder.h:86
Builder & seat(const std::string &pProductName)
Start building a license-consumption for one seat.
Definition FluentConsumptionBuilder.h:52
Builder & version(const std::string &pClientVersion)
Set the client version.
Definition FluentConsumptionBuilder.h:113
Builder & count(const std::string &pProductName)
Starts building a license consumption for one use count.
Definition FluentConsumptionBuilder.h:75
10Duke Scale license.
Definition License.h:27
QuantityDimension
Quantity dimensions.
Definition License.h:33
Licensing operations for 10Duke Scale.
Definition LicenseConsumerClientBindingStatus.h:8
Classes, functions and globals of 10Duke Scale C++ Client.
Definition AbstractClientFactory.h:16
Root for classes, functions and globals of 10Duke C++ Client.
Definition AbstractClientFactory.h:16