@apigames/sdk-core 23.2.4 → 23.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -252,8 +252,19 @@ class ResourceObject {
|
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
254
|
toJSON() {
|
|
255
|
-
const
|
|
256
|
-
|
|
255
|
+
const obj = {
|
|
256
|
+
type: this.type,
|
|
257
|
+
};
|
|
258
|
+
if ((0, json_1.isDefined)(this.id))
|
|
259
|
+
obj.id = this.id;
|
|
260
|
+
if ((0, json_1.isDefined)(this.attributes)) {
|
|
261
|
+
obj.attributes = this.SerializeAttributesPayload(undefined, this.attributes);
|
|
262
|
+
}
|
|
263
|
+
if ((0, json_1.isDefined)(this.relationships)) {
|
|
264
|
+
obj.data.relationships = this.SerializeRelationshipsPayload(undefined, this.relationships);
|
|
265
|
+
}
|
|
266
|
+
(0, json_1.redactUndefinedValues)(obj);
|
|
267
|
+
return obj;
|
|
257
268
|
}
|
|
258
269
|
get type() {
|
|
259
270
|
throw new Error('Method or Property not implemented.');
|