Objective: Add Entity struct to the Swift library. Reference javascript/classes/api/entity/entity.js for an example existing implementation. Do not worry about .setPermissions() and .retrieveList() at this time, just focus on getting the basic struct defined with all properties. You will need to implement EntityIdentifier (reference javascript/classes/api/entity/identifier.js) in order to complete Entity properties.
Note that in JavaScript, the publicId property is annotated as a string. In fact, the Procuret API returns an integer for this property. The reason for this discrepancy is a bit complex, and is to do with the fact that JavaScript does not have a native 64-bit integer type. For now, don't worry too much about it, just be sure to use Int instead of String for the publicId property in Swift.
added create to Identifier file.
added (currently blank) file for EntityIdType, b/c idType inside create is supposed to be an enumeration of EntityIdType.
Objective: Add
Entity
struct to the Swift library. Referencejavascript/classes/api/entity/entity.js
for an example existing implementation. Do not worry about.setPermissions()
and.retrieveList()
at this time, just focus on getting the basic struct defined with all properties. You will need to implementEntityIdentifier
(referencejavascript/classes/api/entity/identifier.js
) in order to complete Entity properties.Note that in JavaScript, the
publicId
property is annotated as a string. In fact, the Procuret API returns an integer for this property. The reason for this discrepancy is a bit complex, and is to do with the fact that JavaScript does not have a native 64-bit integer type. For now, don't worry too much about it, just be sure to useInt
instead ofString
for thepublicId
property in Swift.