10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
tenduke::ee::licensing::FluentLicenseCheckout Class Reference

#include <FluentLicenseCheckout.h>

Detailed Description

Utility for fluently building tenduke::ee::licensing::LicenseCheckoutRequest.

Build the license-checkout request with the methods, and then call execute().

Example of use:

auto tendukeClient = ::tenduke::ee::createClientUsingAutoDiscovery(...);
auto licenseCheckoutResponse = tendukeClient.licensing->checkoutLicenses()
.version("1.0.0) // default version: all items share this version
.seat("product-1") // checkout one seat of "product-1" (version 1.0.0)
.seat("product-2") // checkout one seat of "product-2" (version 1.0.0)
.seat("product-3", "2.0.0") // checkout one seat of "product-3", version 2.0.0
.seat("product-4", "", "dc88fc15-b37b-45de-81b1-285e1c40cc19") // checkout one seat of "product-4" (version 1.0.0) from license with id dc88fc15-b37b-45de-81b1-285e1c40cc19
.execute();
Inheritance diagram for tenduke::ee::licensing::FluentLicenseCheckout:
tenduke::ee::licensing::FluentLicenseCheckoutBuilder< FluentLicenseCheckout >

Public Member Functions

 FluentLicenseCheckout (const tenduke::ee::licensing::LicensingClient &client, const ::tenduke::ee::ClientProperties clientProperties)
 Constructs new instance.
 
virtual tenduke::ee::licensing::LicenseCheckoutResponse execute ()
 Executes the request.
 
- Public Member Functions inherited from tenduke::ee::licensing::FluentLicenseCheckoutBuilder< FluentLicenseCheckout >
 FluentLicenseCheckoutBuilder (::tenduke::ee::ClientProperties clientProperties)
 Constructs new instance.
 
FluentLicenseCheckoutseat (const std::string &productName, const std::string &requestedVersion="", const std::string &licenseId="")
 Adds "checkout one seat for product" to the request.
 
FluentLicenseCheckoutitem (const std::string &itemName, const std::string &requestedVersion="", const std::string &licenseId="")
 Adds an item to checkout.
 
FluentLicenseCheckoutcount (std::uint64_t pConsumeCount)
 Sets "The requested number of units to be consumed from the license’s use count.".
 
FluentLicenseCheckoutduration (std::uint64_t pConsumeDuration)
 Sets "The requested duration of the license token (and the lease) in milliseconds.".
 
FluentLicenseCheckoutfromEntitlement (const std::string &pEntitlementId)
 Sets id of the Entitlement, from which the licenses will be checked from.
 
FluentLicenseCheckoutfromOrganization (const std::string &pOrganizationId)
 Sets id of the Organization, from which the licenses will be checked from.
 
FluentLicenseCheckoutmode (enum tenduke::ee::licensing::LicenseCheckoutParameters::ConsumptionMode pConsumptionMode)
 Sets "The license consumption mode requested." (See the enumeration for the documentation of the values)
 
FluentLicenseCheckoutversion (const std::string &pGlobalVersion)
 Sets default version to checkout.
 

Additional Inherited Members

- Protected Member Functions inherited from tenduke::ee::licensing::FluentLicenseCheckoutBuilder< FluentLicenseCheckout >
virtual tenduke::ee::licensing::LicenseCheckoutParameters buildParameters ()
 Builds the parameters.
 

Constructor & Destructor Documentation

◆ FluentLicenseCheckout()

tenduke::ee::licensing::FluentLicenseCheckout::FluentLicenseCheckout ( const tenduke::ee::licensing::LicensingClient client,
const ::tenduke::ee::ClientProperties  clientProperties 
)

Constructs new instance.

Parameters
client-
clientPropertiesclient properties

Member Function Documentation

◆ execute()

LicenseCheckoutResponse tenduke::ee::licensing::FluentLicenseCheckout::execute ( )
virtual

Executes the request.

This method calls tenduke::ee::licensing::LicensingClient#checkoutLicenses(const tenduke::ee::licensing::LicenseCheckoutParameters).

Returns
the license checkout response
Exceptions
tenduke::TendukeExceptionand subclasses, documented in tenduke::ee::licensing::LicensingClient

The documentation for this class was generated from the following files: