DeleteHolding

Attributes

ObjectId
See ‘object-id’ in object-type: holding.

JSON Examples

{
    "UpdateType": "DeleteHolding",
    "ObjectId": "OBJECT_ID"
}

check_valid()

Only a participant who has an admin role for the organization referenced by the owner-id on the holding may delete a holding.

Also, the holding must have ref-count of 0, indicating that no other items are using the holding.

The following checks are performed:

  • Authorization, as specified above.
  • Verify that ref-count is 0.

apply()

Remove the holding from the store.

Decrement the owner’s ref count and the asset’s ref count (if the AssetType of this holding is “Bond”).