Skip to content

Commit 955ce97

Browse files
v-rudkovskiyr-brown
authored andcommitted
map custom properties
1 parent 5ba3189 commit 955ce97

9 files changed

Lines changed: 56 additions & 0 deletions

File tree

include/netlicensing/country.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ namespace netlicensing {
6363
ss << "isEu: " << isEu << ", ";
6464
ss << "code: " << code << ", ";
6565
ss << "vatPercent: " << vatPercent;
66+
67+
for (const auto& pair : getProperties()) {
68+
ss << ", " << pair.first << ": " << pair.second.toString();
69+
}
70+
6671
ss << "]";
6772
return ss.str();
6873
}

include/netlicensing/license.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ namespace netlicensing {
9090
ss << HIDDEN << ": " << hidden.toString() << ", ";
9191
ss << LICENSEE_NUMBER << ": " << licenseeNumber << ", ";
9292
ss << LICENSE_TEMPLATE_NUMBER << ": " << licenseTemplateNumber;
93+
94+
for (const auto& pair : getProperties()) {
95+
ss << ", " << pair.first << ": " << pair.second.toString();
96+
}
97+
9398
ss << "]";
9499
return ss.str();
95100
}

include/netlicensing/license_template.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ namespace netlicensing {
111111
ss << AUTOMATIC << ": " << automatic.toString() << ", ";
112112
ss << HIDDEN << ": " << hidden.toString() << ", ";
113113
ss << HIDE_LICENSES << ": " << hideLicenses.toString();
114+
115+
for (const auto& pair : getProperties()) {
116+
ss << ", " << pair.first << ": " << pair.second.toString();
117+
}
118+
114119
ss << "]";
115120
return ss.str();
116121
}

include/netlicensing/licensee.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ namespace netlicensing {
4141
ss << NUMBER << ": " << number << ", ";
4242
ss << ACTIVE << ": " << active.toString() << ", ";
4343
ss << PRODUCT_NUMBER << ": " << productNumber;
44+
45+
for (const auto& pair : getProperties()) {
46+
ss << ", " << pair.first << ": " << pair.second.toString();
47+
}
48+
4449
ss << "]";
4550
return ss.str();
4651
}

include/netlicensing/mapper.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ namespace netlicensing {
103103
item_i.setDescription(value);
104104
} else if (key == LICENSING_INFO) {
105105
item_i.setLicensingInfo(value);
106+
} else {
107+
item_i.addProperty(key, value);
106108
}
107109
}
108110

@@ -138,6 +140,8 @@ namespace netlicensing {
138140
item_i.setLicensingModel(value);
139141
} else if (key == PRODUCT_NUMBER) {
140142
item_i.setProductNumber(value);
143+
} else {
144+
item_i.addProperty(key, value);
141145
}
142146
}
143147
};
@@ -171,6 +175,8 @@ namespace netlicensing {
171175
item_i.setHidden((value == "true"?true:false));
172176
} else if (key == HIDE_LICENSES) {
173177
item_i.setHideLicenses((value == "true"?true:false));
178+
} else {
179+
item_i.addProperty(key, value);
174180
}
175181
}
176182
};
@@ -192,6 +198,8 @@ namespace netlicensing {
192198
item_i.setName(value);
193199
} else if (key == PRODUCT_NUMBER) {
194200
item_i.setProductNumber(value);
201+
} else {
202+
item_i.addProperty(key, value);
195203
}
196204
}
197205
};
@@ -221,6 +229,8 @@ namespace netlicensing {
221229
item_i.setLicenseeNumber(value);
222230
} else if (key == LICENSE_TEMPLATE_NUMBER) {
223231
item_i.setLicenseTemplateNumber(value);
232+
} else {
233+
item_i.addProperty(key, value);
224234
}
225235
}
226236
};
@@ -242,6 +252,8 @@ namespace netlicensing {
242252
item_i.setName(value);
243253
} else if (key == "vatPercent") {
244254
item_i.setVatPercent(value);
255+
} else {
256+
item_i.addProperty(key, value);
245257
}
246258
}
247259
};
@@ -312,6 +324,8 @@ namespace netlicensing {
312324
item_i.setExpirationTime(value);
313325
} else if (key == TOKEN_TYPE) {
314326
item_i.setTokenType(stringToTokenType(value));
327+
} else {
328+
item_i.addProperty(key, value);
315329
}
316330
}
317331
};
@@ -343,6 +357,8 @@ namespace netlicensing {
343357
item_i.setDateCreated(value);
344358
} else if (key == DATE_CLOSED) {
345359
item_i.setDateClosed(value);
360+
} else {
361+
item_i.addProperty(key, value);
346362
}
347363
}
348364
};

include/netlicensing/product.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ namespace netlicensing {
171171
ss << LICENSEE_AUTO_CREATE << ": " << licenseeAutoCreate << ", ";
172172
ss << DESCRIPTION << ": " << description << ", ";
173173
ss << LICENSING_INFO << ": " << licensingInfo;
174+
175+
for (const auto& pair : getProperties()) {
176+
ss << ", " << pair.first << ": " << pair.second.toString();
177+
}
178+
174179
ss << "]";
175180
return ss.str();
176181
}

include/netlicensing/product_module.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ namespace netlicensing {
5555
ss << ACTIVE << ": " << active.toString() << ", ";
5656
ss << LICENSING_MODEL << ": " << licensingModel << ", ";
5757
ss << PRODUCT_NUMBER << ": " << productNumber;
58+
59+
for (const auto& pair : getProperties()) {
60+
ss << ", " << pair.first << ": " << pair.second.toString();
61+
}
62+
5863
ss << "]";
5964
return ss.str();
6065
}

include/netlicensing/token.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ namespace netlicensing {
5555
ss << VENDOR_NUMBER << ": " << vendorNumber << ", ";
5656
ss << EXPIRATION_TIME << ": " << expirationTime << ", ";
5757
ss << TOKEN_TYPE << ": " << tokenType;
58+
59+
for (const auto& pair : getProperties()) {
60+
ss << ", " << pair.first << ": " << pair.second.toString();
61+
}
62+
5863
ss << "]";
5964
return ss.str();
6065
}

include/netlicensing/transaction.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ namespace netlicensing {
100100
ss << CURRENCY << ": " << currency << ", ";
101101
ss << DATE_CREATED << ": " << dateCreated << ", ";
102102
ss << DATE_CLOSED << ": " << dateClosed;
103+
104+
for (const auto& pair : getProperties()) {
105+
ss << ", " << pair.first << ": " << pair.second.toString();
106+
}
107+
103108
ss << "]";
104109
return ss.str();
105110
}

0 commit comments

Comments
 (0)