diff --git a/include/netlicensing/converters.h b/include/netlicensing/converters.h index 3947d8e..628e918 100644 --- a/include/netlicensing/converters.h +++ b/include/netlicensing/converters.h @@ -109,7 +109,12 @@ namespace netlicensing { inline parameters_type toParametersList(Token value) { parameters_type params = toParametersList(value); params.push_back(std::make_pair(VENDOR_NUMBER, value.getVendorNumber())); - params.push_back(std::make_pair(EXPIRATION_TIME, value.getExpirationTime().toString())); + + const std::string expirationTime = value.getExpirationTime().toString(); + if (!expirationTime.empty()) { + params.push_back(std::make_pair(EXPIRATION_TIME, expirationTime)); + } + params.push_back(std::make_pair(TOKEN_TYPE, tokenTypeToString(value.getTokenType()))); return params; } diff --git a/include/netlicensing/country.h b/include/netlicensing/country.h index 5f08336..d2d02e8 100644 --- a/include/netlicensing/country.h +++ b/include/netlicensing/country.h @@ -63,6 +63,11 @@ namespace netlicensing { ss << "isEu: " << isEu << ", "; ss << "code: " << code << ", "; ss << "vatPercent: " << vatPercent; + + for (const auto& pair : getProperties()) { + ss << ", " << pair.first << ": " << pair.second.toString(); + } + ss << "]"; return ss.str(); } diff --git a/include/netlicensing/license.h b/include/netlicensing/license.h index 29a87f5..ea06524 100644 --- a/include/netlicensing/license.h +++ b/include/netlicensing/license.h @@ -90,6 +90,11 @@ namespace netlicensing { ss << HIDDEN << ": " << hidden.toString() << ", "; ss << LICENSEE_NUMBER << ": " << licenseeNumber << ", "; ss << LICENSE_TEMPLATE_NUMBER << ": " << licenseTemplateNumber; + + for (const auto& pair : getProperties()) { + ss << ", " << pair.first << ": " << pair.second.toString(); + } + ss << "]"; return ss.str(); } diff --git a/include/netlicensing/license_template.h b/include/netlicensing/license_template.h index e5472de..775029e 100644 --- a/include/netlicensing/license_template.h +++ b/include/netlicensing/license_template.h @@ -111,6 +111,11 @@ namespace netlicensing { ss << AUTOMATIC << ": " << automatic.toString() << ", "; ss << HIDDEN << ": " << hidden.toString() << ", "; ss << HIDE_LICENSES << ": " << hideLicenses.toString(); + + for (const auto& pair : getProperties()) { + ss << ", " << pair.first << ": " << pair.second.toString(); + } + ss << "]"; return ss.str(); } diff --git a/include/netlicensing/licensee.h b/include/netlicensing/licensee.h index 8395a78..dff04e1 100644 --- a/include/netlicensing/licensee.h +++ b/include/netlicensing/licensee.h @@ -41,6 +41,11 @@ namespace netlicensing { ss << NUMBER << ": " << number << ", "; ss << ACTIVE << ": " << active.toString() << ", "; ss << PRODUCT_NUMBER << ": " << productNumber; + + for (const auto& pair : getProperties()) { + ss << ", " << pair.first << ": " << pair.second.toString(); + } + ss << "]"; return ss.str(); } diff --git a/include/netlicensing/mapper.h b/include/netlicensing/mapper.h index ca355d8..6e90066 100644 --- a/include/netlicensing/mapper.h +++ b/include/netlicensing/mapper.h @@ -103,6 +103,8 @@ namespace netlicensing { item_i.setDescription(value); } else if (key == LICENSING_INFO) { item_i.setLicensingInfo(value); + } else { + item_i.addProperty(key, value); } } @@ -138,6 +140,8 @@ namespace netlicensing { item_i.setLicensingModel(value); } else if (key == PRODUCT_NUMBER) { item_i.setProductNumber(value); + } else { + item_i.addProperty(key, value); } } }; @@ -171,6 +175,8 @@ namespace netlicensing { item_i.setHidden((value == "true"?true:false)); } else if (key == HIDE_LICENSES) { item_i.setHideLicenses((value == "true"?true:false)); + } else { + item_i.addProperty(key, value); } } }; @@ -192,6 +198,8 @@ namespace netlicensing { item_i.setName(value); } else if (key == PRODUCT_NUMBER) { item_i.setProductNumber(value); + } else { + item_i.addProperty(key, value); } } }; @@ -221,6 +229,8 @@ namespace netlicensing { item_i.setLicenseeNumber(value); } else if (key == LICENSE_TEMPLATE_NUMBER) { item_i.setLicenseTemplateNumber(value); + } else { + item_i.addProperty(key, value); } } }; @@ -242,6 +252,8 @@ namespace netlicensing { item_i.setName(value); } else if (key == "vatPercent") { item_i.setVatPercent(value); + } else { + item_i.addProperty(key, value); } } }; @@ -312,6 +324,8 @@ namespace netlicensing { item_i.setExpirationTime(value); } else if (key == TOKEN_TYPE) { item_i.setTokenType(stringToTokenType(value)); + } else { + item_i.addProperty(key, value); } } }; @@ -343,6 +357,8 @@ namespace netlicensing { item_i.setDateCreated(value); } else if (key == DATE_CLOSED) { item_i.setDateClosed(value); + } else { + item_i.addProperty(key, value); } } }; diff --git a/include/netlicensing/product.h b/include/netlicensing/product.h index 2fda65f..7f0b284 100644 --- a/include/netlicensing/product.h +++ b/include/netlicensing/product.h @@ -171,6 +171,11 @@ namespace netlicensing { ss << LICENSEE_AUTO_CREATE << ": " << licenseeAutoCreate << ", "; ss << DESCRIPTION << ": " << description << ", "; ss << LICENSING_INFO << ": " << licensingInfo; + + for (const auto& pair : getProperties()) { + ss << ", " << pair.first << ": " << pair.second.toString(); + } + ss << "]"; return ss.str(); } diff --git a/include/netlicensing/product_module.h b/include/netlicensing/product_module.h index 388d215..4af53fb 100644 --- a/include/netlicensing/product_module.h +++ b/include/netlicensing/product_module.h @@ -55,6 +55,11 @@ namespace netlicensing { ss << ACTIVE << ": " << active.toString() << ", "; ss << LICENSING_MODEL << ": " << licensingModel << ", "; ss << PRODUCT_NUMBER << ": " << productNumber; + + for (const auto& pair : getProperties()) { + ss << ", " << pair.first << ": " << pair.second.toString(); + } + ss << "]"; return ss.str(); } diff --git a/include/netlicensing/token.h b/include/netlicensing/token.h index e3100d1..e1c9420 100644 --- a/include/netlicensing/token.h +++ b/include/netlicensing/token.h @@ -55,6 +55,11 @@ namespace netlicensing { ss << VENDOR_NUMBER << ": " << vendorNumber << ", "; ss << EXPIRATION_TIME << ": " << expirationTime << ", "; ss << TOKEN_TYPE << ": " << tokenType; + + for (const auto& pair : getProperties()) { + ss << ", " << pair.first << ": " << pair.second.toString(); + } + ss << "]"; return ss.str(); } diff --git a/include/netlicensing/transaction.h b/include/netlicensing/transaction.h index c5f411d..66e61aa 100644 --- a/include/netlicensing/transaction.h +++ b/include/netlicensing/transaction.h @@ -100,6 +100,11 @@ namespace netlicensing { ss << CURRENCY << ": " << currency << ", "; ss << DATE_CREATED << ": " << dateCreated << ", "; ss << DATE_CLOSED << ": " << dateClosed; + + for (const auto& pair : getProperties()) { + ss << ", " << pair.first << ": " << pair.second.toString(); + } + ss << "]"; return ss.str(); }