public function getObjectRelationships(
        $repositoryId,
        $objectId,
        $includeSubRelationshipTypes = false,
        RelationshipDirection $relationshipDirection = null,
        $typeId = null,
        $filter = null,
        $includeAllowableActions = false,
        $maxItems = null,
        $skipCount = 0,
        ExtensionDataInterface $extension = null
    ) {
        $url = $this->getObjectUrl($repositoryId, $objectId, Constants::SELECTOR_RELATIONSHIPS);
        $query = $url->getQuery();

        if ($relationshipDirection === null) {
            $relationshipDirection = RelationshipDirection::cast(RelationshipDirection::SOURCE);
        }

        $query->modify(
            [
                Constants::PARAM_TYPE_ID => $typeId,
                Constants::PARAM_RELATIONSHIP_DIRECTION => (string) $relationshipDirection,
                Constants::PARAM_SUB_RELATIONSHIP_TYPES => $includeSubRelationshipTypes ? 'true' : 'false',
                Constants::PARAM_ALLOWABLE_ACTIONS => $includeAllowableActions ? 'true' : 'false',
                Constants::PARAM_SUCCINCT => $this->getSuccinct() ? 'true' : 'false',
                Constants::PARAM_SKIP_COUNT => $skipCount,
                Constants::PARAM_DATETIME_FORMAT => (string) $this->getDateTimeFormat()
            ]
        );

        if ($filter !== null) {
            $query->modify([Constants::PARAM_FILTER => $filter]);
        }

        if ($maxItems !== null) {
            $query->modify([Constants::PARAM_MAX_ITEMS =>  $maxItems]);
        }

        $responseData = (array) $this->readJson($url);

        return $this->getJsonConverter()->convertObjectList($responseData);
    }