retrieveEntityGrant method

Future<ClientResponse<EntityGrantResponse, Errors>> retrieveEntityGrant(
  1. String entityId,
  2. String recipientEntityId,
  3. String userId
)

Retrieves an Entity Grant for the given Entity and User/Entity.

@param {String} entityId The Id of the Entity. @param {String} recipientEntityId (Optional) The Id of the Entity that the Entity Grant is for. @param {String} userId (Optional) The Id of the User that the Entity Grant is for. @returns {Promise<ClientResponse

Implementation

Future<ClientResponse<EntityGrantResponse, Errors>> retrieveEntityGrant(
    String entityId, String recipientEntityId, String userId) {
  return _start<EntityGrantResponse, Errors>()
      .withUri('/api/entity')
      .withUriSegment(entityId)
      .withUriSegment('grant')
      .withParameter('recipientEntityId', recipientEntityId)
      .withParameter('userId', userId)
      .withMethod('GET')
      .withResponseHandler(defaultResponseHandlerBuilder(
          (d) => EntityGrantResponse.fromJson(d)))
      .go();
}