UpdateParticipant

Attributes

ObjectId
See ‘object-id’ in object-type: participant.
Username
See ‘username’ in object-type: participant.
FirmId

See ‘firm-id’ in object-type: participant.

Optional

JSON Example

{
    "UpdateType": "CreateParticipant",
    "ObjectId": "OBJECT_ID",
    "Username": "tjsmith",
    "FirmId": "OBJECT_ID"
}

check_valid()

Participants may only be modified by their creator, which can be verified by comparing the key-id to the key used to sign the transaction.

The following checks are performed:

  • Authorization, as described above.
  • Check that all required attributes have been provided.
  • Check that all provided unique attributes do not exist in the store.
  • Check that FirmId, if specified, is a valid organization in the store.

apply()

If FirmId was present and it is being modified or removed, then decrement the ref-count for that organization.

If FirmId is being modified or added, then increment the ref-count for the new organization being referenced.

Update the object with the fields provided, removing any optional fields if they were not specified.