deployed method

Future<StudyDeploymentStatus> deployed()

Mark this deployment as a deployed on the server.

Returns the updated study deployment status if successful. Throws a CarpServiceException if not.

Implementation

Future<StudyDeploymentStatus> deployed() async {
  assert(
      deployment != null,
      'The deployment needs to be fetched before marking it as deployed. '
      'Use the get() method to get the primary device deployment.');

  return _status = StudyDeploymentStatus.fromJson(await _rpc(DeviceDeployed(
    studyDeploymentId,
    status!.primaryDeviceStatus!.device.roleName,
    deployment!.lastUpdatedOn,
  )));
}