10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::se::licensing::rest::DefaultLicenseReleaseRequest Class Reference

#include <DefaultLicenseReleaseRequest.h>

Detailed Description

Inheritance diagram for tenduke::se::licensing::rest::DefaultLicenseReleaseRequest:
tenduke::se::APIRequest< T > tenduke::se::licensing::rest::AbstractLicenseRequest

Public Member Functions

 DefaultLicenseReleaseRequest (::tenduke::se::licensing::LicenseReleaseParameters parameters, const std::shared_ptr< const ::tenduke::se::ClientProperties > &clientProperties, const std::shared_ptr< const ::tenduke::se::BackendConfiguration > &configuration, const std::shared_ptr< const ::tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &httpRequestAuthenticator, const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const ::tenduke::json::JSONParser > &jsonParser, const std::string &licenseKey=::tenduke::se::licensing::rest::AbstractLicenseRequest::NO_LICENSE_KEY, bool metered=::tenduke::se::licensing::rest::AbstractLicenseRequest::NON_METERED)
 Constructs new instance.
 
::tenduke::se::licensing::LicenseReleaseResponse execute () override
 Execute the request synchronously.
 
- Public Member Functions inherited from tenduke::se::licensing::rest::AbstractLicenseRequest
 AbstractLicenseRequest (std::string licenseKey, bool metered, const std::shared_ptr< const ::tenduke::se::ClientProperties > &clientProperties, const std::shared_ptr< const ::tenduke::se::BackendConfiguration > &configuration, const std::shared_ptr< const ::tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &httpRequestAuthenticator, const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const ::tenduke::json::JSONParser > &jsonParser)
 Constructs new instance.
 

Protected Member Functions

::tenduke::se::licensing::LicenseReleaseResponse fromJSON (const std::string &jsonDocument) const
 Parses the response entity from JSON message body.
 
- Protected Member Functions inherited from tenduke::se::licensing::rest::AbstractLicenseRequest
std::string getLicenseKey () const
 Returns license key.
 
bool hasLicenseKey () const
 Checks if this is license-key request.
 
bool isMetered () const
 Checks if this metered-request.
 

Additional Inherited Members

- Static Public Attributes inherited from tenduke::se::licensing::rest::AbstractLicenseRequest
static const std::string NO_LICENSE_KEY
 Magic value to indicate that this is not a license key request.
 
static const bool METERED = true
 Magic value to indicate that this is metered license request.
 
static const bool NON_METERED = false
 Magic value to indicate that this is normal (not metered) license request.
 
- Protected Attributes inherited from tenduke::se::licensing::rest::AbstractLicenseRequest
const std::shared_ptr< const ::tenduke::se::ClientPropertiesclientProperties
 Client properties.
 
const std::shared_ptr< const ::tenduke::se::BackendConfigurationconfiguration
 Config.
 
const std::shared_ptr< const ::tenduke::http::HTTPClienthttp
 HTTP-client.
 
const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticatorhttpRequestAuthenticator
 HTTP-request authenticator.
 
const std::shared_ptr< const ::tenduke::http::HTTPResponseToExceptionthrowException
 Throw-exception.
 
const std::shared_ptr< const ::tenduke::json::JSONParserparseJSON
 Parses JSON.
 

Constructor & Destructor Documentation

◆ DefaultLicenseReleaseRequest()

tenduke::se::licensing::rest::DefaultLicenseReleaseRequest::DefaultLicenseReleaseRequest ( ::tenduke::se::licensing::LicenseReleaseParameters  parameters,
const std::shared_ptr< const ::tenduke::se::ClientProperties > &  clientProperties,
const std::shared_ptr< const ::tenduke::se::BackendConfiguration > &  configuration,
const std::shared_ptr< const ::tenduke::http::HTTPClient > &  httpClient,
const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &  httpRequestAuthenticator,
const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &  throwException,
const std::shared_ptr< const ::tenduke::json::JSONParser > &  jsonParser,
const std::string &  licenseKey = ::tenduke::se::licensing::rest::AbstractLicenseRequest::NO_LICENSE_KEY,
bool  metered = ::tenduke::se::licensing::rest::AbstractLicenseRequest::NON_METERED 
)

Constructs new instance.

Parameters
parameters-
clientProperties-
configuration-
httpClient-
httpRequestAuthenticator-
throwException-
jsonParser-
licenseKey-
metered-

Member Function Documentation

◆ execute()

LicenseReleaseResponse tenduke::se::licensing::rest::DefaultLicenseReleaseRequest::execute ( )
overridevirtual

Execute the request synchronously.

Returns
the response.
Exceptions
tenduke::http::HTTPExceptione.g. internal server errors, invalid configuration (e.g. HTTP 404 not found) et al.
tenduke::net::NetworkingExceptione.g. timeouts, networking communication problems
tenduke::TimedOutgeneric time outs
tenduke::TendukeExceptiondepending on business logic problems (invalid json, cryptography issues, unexpected response etc.) These are usually subclasses of tenduke::TendukeException

Implements tenduke::se::APIRequest< T >.

◆ fromJSON()

LicenseReleaseResponse tenduke::se::licensing::rest::DefaultLicenseReleaseRequest::fromJSON ( const std::string &  jsonDocument) const
protected

Parses the response entity from JSON message body.

Parameters
jsonDocument-
Returns
-

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