CreateOrganization

Attributes

ObjectId

See ‘object-id’ in object-type: organization.

Optional

Name
See ‘name’ in object-type: organization.
Industry

See ‘industry’ in object-type: organization.

Optional

Ticker

See ‘ticker’ in object-type: organization.

Optional

PricingSource

See ‘pricing-source’ in object-type: organization.

Optional

Authorization

See ‘authorization’ in object-type: organization.

The keys for the hashes contained in the list are ‘ParticipantId’ and ‘Role’, which are mapped to ‘participant-id’ and ‘role’ when creating the object.

Optional

JSON Examples

Example 1:

{
    "UpdateType": "CreateOrganization",
    "Name": "United States Treasury",
    "Industry": "Government",
    "Ticker": "T"
}

Example 2:

{
    "UpdateType": "CreateOrganization",
    "ObjectId": "OBJECT_ID",
    "Name": "Bank of Terra Incognita",
    "PricingSource": "AVCD",
    "Authorization": [ {
        "ParticipantId": "OBJECT_ID",
        "Role": "marketmaker"
    } ]
}

check_valid()

The following checks are performed:

  • Check that all required attributes have been provided.
  • Check that all provided unique attributes do not exist in the store.
  • Check that Authorization list contains a list of dict() objects containing only the keys ParticipantId and Role. Both keys must exist.
  • Check that all ParticipantIds given in the Authorization list exist in the store.
  • Check that PricingSource, if provided, is a four-character string.
  • Check that all Roles given in the Authorization list are one of the valid strings allowed.

Anyone is allowed to create organizations, so no checks are done for authorization.

apply()

Create a new object in the store with object-type of ‘organization’.

For each Authorization item, increment the ref-count of the corresponding participant.