Remove subscription levels; license valid = subscribed
This commit is contained in:
@@ -79,19 +79,9 @@ bool fetchColorPalettes(std::vector<ColorPalette>& out, const std::string& apiKe
|
||||
|
||||
// ─── POST /license ─────────────────────────────────────────────────────
|
||||
|
||||
// A subscription level as described by the portal's `SubscriptionLevel`
|
||||
// table. `name` is always populated; `id`/`description` may be 0/empty when
|
||||
// the API only reported the level name.
|
||||
struct SubscriptionLevel {
|
||||
int id = 0;
|
||||
std::string name;
|
||||
std::string description;
|
||||
};
|
||||
|
||||
struct LicenseInfo {
|
||||
std::string key;
|
||||
std::string email_address;
|
||||
SubscriptionLevel subscription_level;
|
||||
};
|
||||
|
||||
// Parse the 200 JSON payload returned by the license endpoint.
|
||||
@@ -107,6 +97,7 @@ struct LicenseResult {
|
||||
|
||||
// Validate a license key / email pair against the portal. Never throws; failures
|
||||
// (network, HTTP error status) are reported through the returned LicenseResult.
|
||||
// A 2xx response means the license is valid and the subscription is active.
|
||||
LicenseResult validateLicense(const std::string& key, const std::string& email,
|
||||
const std::string& apiKey = "");
|
||||
|
||||
@@ -131,7 +122,7 @@ struct AccountResult {
|
||||
|
||||
// Creates (or reuses) a user account and issues a license key. The key is emailed
|
||||
// to the user and is NOT part of the response. `name` may be empty.
|
||||
AccountResult createAccount(const std::string& email, const std::string& subscription_level,
|
||||
const std::string& name = "", const std::string& apiKey = "");
|
||||
AccountResult createAccount(const std::string& email, const std::string& name = "",
|
||||
const std::string& apiKey = "");
|
||||
|
||||
} // namespace radiantwave::api
|
||||
|
||||
Reference in New Issue
Block a user