Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional check: if interestedParty is a string, the interested party MAY be an entity or a person. #129

Open
kathryn-ods opened this issue Aug 20, 2024 · 1 comment

Comments

@kathryn-ods
Copy link

kathryn-ods commented Aug 20, 2024

Interpretation of this wording - "The interested party MUST be one of: the recordId for an entity, the recordId for a person, or an Unspecified Record object"

Check 1: If interestedParty is a string check interestedParty refers to a recordId

On fail:
Error message: interested party must be a recordId for a statement in the data set or an UnspecifiedRecord object.
Info message: subject: [VALUE]

Check 2: The recordId in subject refers to an entity statement or person statement

On fail
Error message: Interested party is the recordId of a relationship statement. Interested party can only refer to an entity statement or person statement.
Info message: subject: [VALUE]

@kathryn-ods
Copy link
Author

Valid data 1 - generic test set

[
  {
    "statementId": "1dc0e987-5c57-4a1c-b3ad-61353b66a9b7",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "c359f58d2977",
    "recordType": "entity",
    "recordDetails": {
      "isComponent": false,
      "entityType": {
        "type": "registeredEntity"
      }
    }
  },
  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "person",
    "recordDetails": {
      "isComponent": false,
      "personType": "knownPerson"
    }
  },
  {
    "statementId": "fbfd0547-d0c6-4a00-b559-5c5e91c34f5c",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "93b53022ae6a",
    "recordType": "relationship",
    "recordDetails": {
      "isComponent": false,
      "subject": "c359f58d2977",
      "interestedParty": "10478c6cf6de",
      "interests":[
        {
          "beneficialOwnershipOrControl": true
        }
      ]
    }
  }
]

Valid data 2 - interestedParty is an entity

[
  {
    "statementId": "1dc0e987-5c57-4a1c-b3ad-61353b66a9b7",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "c359f58d2977",
    "recordType": "entity",
    "recordDetails": {
      "isComponent": false,
      "entityType": {
        "type": "registeredEntity"
      }
    }
  },
  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "entity",
    "recordDetails": {
      "isComponent": false,
      "entityType": {
        "type": "registeredEntity"
      }
    }
  },
  {
    "statementId": "fbfd0547-d0c6-4a00-b559-5c5e91c34f5c",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "93b53022ae6a",
    "recordType": "relationship",
    "recordDetails": {
      "isComponent": false,
      "subject": "c359f58d2977",
      "interestedParty": "10478c6cf6de",
      "interests":[
        {
          "beneficialOwnershipOrControl": false
        }
      ]
    }
  }
]

Invalid data 1 - interestedParty is a string that is not a recordId

[
  {
    "statementId": "1dc0e987-5c57-4a1c-b3ad-61353b66a9b7",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "c359f58d2977",
    "recordType": "entity",
    "recordDetails": {
      "isComponent": false,
      "entityType": {
        "type": "registeredEntity"
      }
    }
  },
  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "entity",
    "recordDetails": {
      "isComponent": false,
      "entityType": {
        "type": "registeredEntity"
      }
    }
  },
  {
    "statementId": "fbfd0547-d0c6-4a00-b559-5c5e91c34f5c",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "93b53022ae6a",
    "recordType": "relationship",
    "recordDetails": {
      "isComponent": false,
      "subject": "c359f58d2977",
      "interestedParty": "123",
      "interests":[
        {
          "beneficialOwnershipOrControl": true
        }
      ]
    }
  }
]

Invalid data 2 - interestedParty is the recordId of a relationship statement

[
  {
    "statementId": "1dc0e987-5c57-4a1c-b3ad-61353b66a9b7",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "c359f58d2977",
    "recordType": "entity",
    "recordDetails": {
      "isComponent": false,
      "entityType": {
        "type": "registeredEntity"
      }
    }
  },
  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "entity",
    "recordDetails": {
      "isComponent": false,
      "entityType": {
        "type": "registeredEntity"
      }
    }
  },
  {
    "statementId": "fbfd0547-d0c6-4a00-b559-5c5e91c34f5c",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "93b53022ae6a",
    "recordType": "relationship",
    "recordDetails": {
      "isComponent": false,
      "subject": "c359f58d2977",
      "interestedParty": "10478c6cf6de",
      "interests":[
        {
          "beneficialOwnershipOrControl": true
        }
      ]
    }
  },
  {
    "statementId": "cd4c52633f6761962e98e1dd9dbf7da7",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "",
    "recordType": "relationship",
    "recordDetails": {
      "isComponent": false,
      "subject": "c359f58d2977",
      "interestedParty": "93b53022ae6a",
      "interests":[
        {
          "beneficialOwnershipOrControl": true
        }
      ]
    }
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant