public static async Task <HttpResponseMessage> SendChangeOversightIntervalOptionRemarkRequestAsync(int id, string remark, Cookie optionalLogin = null) { var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin); var body = new SingleValueDTO <string> { Value = remark }; return(await HttpApi.PatchWithCookieAsync(TestEnvironment.CreateUrl($"api/v1/data-processing-registration/{id}/oversight-interval-remark"), cookie, body)); }
public static async Task <HttpResponseMessage> SendRemoveOversightDateRequestAsync(int id, int oversightDateId, Cookie optionalLogin = null) { var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin); var body = new SingleValueDTO <int> { Value = oversightDateId }; return(await HttpApi.PatchWithCookieAsync(TestEnvironment.CreateUrl($"api/v1/data-processing-registration/{id}/oversight-date/remove"), cookie, body)); }
public static async Task <HttpResponseMessage> SendChangeIsOversightCompletedRequestAsync(int id, YesNoUndecidedOption?yesNoUndecidedOption, Cookie optionalLogin = null) { var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin); var body = new SingleValueDTO <YesNoUndecidedOption?> { Value = yesNoUndecidedOption }; return(await HttpApi.PatchWithCookieAsync(TestEnvironment.CreateUrl($"api/v1/data-processing-registration/{id}/oversight-completed"), cookie, body)); }
public static async Task <HttpResponseMessage> SendAssignDataResponsibleRequestAsync(int id, int?dataResponsibleOptionId, Cookie optionalLogin = null) { var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin); var body = new SingleValueDTO <int?> { Value = dataResponsibleOptionId }; return(await HttpApi.PatchWithCookieAsync(TestEnvironment.CreateUrl($"api/v1/data-processing-registration/{id}/data-responsible/assign"), cookie, body)); }
public static async Task <HttpResponseMessage> SendChangeAgreementConcludedAtRequestAsync(int id, DateTime?dateTime, Cookie optionalLogin = null) { var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin); var body = new SingleValueDTO <DateTime?> { Value = dateTime }; return(await HttpApi.PatchWithCookieAsync(TestEnvironment.CreateUrl($"api/v1/data-processing-registration/{id}/agreement-concluded-at"), cookie, body)); }
public HttpResponseMessage PatchIsAgreementConcluded(int id, [FromBody] SingleValueDTO <YesNoIrrelevantOption> concluded) { if (concluded == null) { return(BadRequest("concluded must be provided")); } return(_dataProcessingRegistrationApplicationService .UpdateIsAgreementConcluded(id, concluded.Value) .Match(dataProcessingRegistration => Ok(ToDTO(dataProcessingRegistration)), FromOperationError)); }
public HttpResponseMessage PatchOversightCompletedRemark(int id, [FromBody] SingleValueDTO <string> oversightCompletedRemark) { if (oversightCompletedRemark == null) { return(BadRequest(nameof(oversightCompletedRemark) + " must be provided")); } return(_dataProcessingRegistrationApplicationService .UpdateOversightCompletedRemark(id, oversightCompletedRemark.Value) .Match(_ => Ok(), FromOperationError)); }
public HttpResponseMessage RemoveOversightOption(int id, [FromBody] SingleValueDTO <int> dataProcessingRegistrationId) { if (dataProcessingRegistrationId == null) { return(BadRequest($"{nameof(dataProcessingRegistrationId)} must be provided")); } return(_itContractService .RemoveDataProcessingRegistration(id, dataProcessingRegistrationId.Value) .Match(_ => Ok(), FromOperationError)); }
public HttpResponseMessage PatchOversightCompleted(int id, [FromBody] SingleValueDTO <YesNoUndecidedOption> completed) { if (completed == null) { return(BadRequest(nameof(completed) + " must be provided")); } return(_dataProcessingRegistrationApplicationService .UpdateIsOversightCompleted(id, completed.Value) .Match(dataProcessingRegistration => Ok(ToDTO(dataProcessingRegistration)), FromOperationError)); }
public HttpResponseMessage RemoveOversightDate(int id, [FromBody] SingleValueDTO <int> oversightDateId) { if (oversightDateId == null) { return(BadRequest(nameof(oversightDateId) + " must be provided")); } return(_dataProcessingRegistrationApplicationService .RemoveOversightDate(id, oversightDateId.Value) .Match(dataProcessingRegistrationOversightDate => Ok(ToDTO(dataProcessingRegistrationOversightDate)), FromOperationError)); }
public HttpResponseMessage PatchDataResponsibleRemark(int id, [FromBody] SingleValueDTO <string> remark) { if (remark == null) { return(BadRequest($"{nameof(remark)} must be provided")); } return(_dataProcessingRegistrationApplicationService .UpdateDataResponsibleRemark(id, remark.Value) .Match(_ => Ok(), FromOperationError)); }
public HttpResponseMessage AssignOversightOption(int id, [FromBody] SingleValueDTO <int> oversightOptionId) { if (oversightOptionId == null) { return(BadRequest($"{nameof(oversightOptionId)} must be provided")); } return(_dataProcessingRegistrationApplicationService .AssignOversightOption(id, oversightOptionId.Value) .Match(_ => Ok(), FromOperationError)); }
public HttpResponseMessage AssignbBasisForTransfer(int id, [FromBody] SingleValueDTO <int> basisForTransferId) { if (basisForTransferId == null) { return(BadRequest($"{nameof(basisForTransferId)} must be provided")); } return(_dataProcessingRegistrationApplicationService .AssignBasisForTransfer(id, basisForTransferId.Value) .Match(_ => Ok(), FromOperationError)); }
public HttpResponseMessage SetTransferToInsecureCountriesState(int id, [FromBody] SingleValueDTO <YesNoUndecidedOption> value) { if (value == null) { return(BadRequest("value must be provided")); } return(_dataProcessingRegistrationApplicationService .UpdateTransferToInsecureThirdCountries(id, value.Value) .Match(dataProcessingRegistration => Ok(ToDTO(dataProcessingRegistration)), FromOperationError)); }
public HttpResponseMessage RemoveInsecureThirdCountry(int id, [FromBody] SingleValueDTO <int> countryId) { if (countryId == null) { return(BadRequest($"{nameof(countryId)} must be provided")); } return(_dataProcessingRegistrationApplicationService .RemoveInsecureThirdCountry(id, countryId.Value) .Match(_ => Ok(), FromOperationError)); }
public HttpResponseMessage PatchAgreementConcludedAt(int id, [FromBody] SingleValueDTO <DateTime?> concludedAt) { if (concludedAt == null) { return(BadRequest("concludedAt must be provided")); } return(_dataProcessingRegistrationApplicationService .UpdateAgreementConcludedAt(id, concludedAt.Value) .Match(_ => Ok(), FromOperationError)); }
public HttpResponseMessage RemoveSubDataProcessor(int id, [FromBody] SingleValueDTO <int> organizationId) { if (organizationId == null) { return(BadRequest("organizationId must be provided")); } return(_dataProcessingRegistrationApplicationService .RemoveSubDataProcessor(id, organizationId.Value) .Match(_ => Ok(), FromOperationError)); }
public HttpResponseMessage AssignSystem(int id, [FromBody] SingleValueDTO <int> systemId) { if (systemId == null) { return(BadRequest("systemId must be provided")); } return(_dataProcessingRegistrationApplicationService .AssignSystem(id, systemId.Value) .Match(_ => Ok(), FromOperationError)); }
public HttpResponseMessage PatchOversightOption(int id, [FromBody] SingleValueDTO <YearMonthIntervalOption> oversightInterval) { if (oversightInterval == null) { return(BadRequest(nameof(oversightInterval) + " must provided")); } return(_dataProcessingRegistrationApplicationService .UpdateOversightInterval(id, oversightInterval.Value) .Match(_ => Ok(), FromOperationError)); }
public HttpResponseMessage ChangeName(int id, [FromBody] SingleValueDTO <string> value) { return(_dataProcessingRegistrationApplicationService .UpdateName(id, value.Value) .Match(_ => Ok(), FromOperationError)); }
public HttpResponseMessage SetMasterReference(int id, [FromBody] SingleValueDTO <int> value) { return(_dataProcessingRegistrationApplicationService .SetMasterReference(id, value.Value) .Match(_ => Ok(), FromOperationError)); }