public static async Task <HttpResponseMessage> SendGetRequestAsync(int id, Cookie optionalLogin = null)
        {
            var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin);

            return(await HttpApi.GetWithCookieAsync(TestEnvironment.CreateUrl($"api/v1/data-processing-registration/{id}"), cookie));
        }
示例#2
0
        public static async Task <HttpResponseMessage> SendRemoveExhibitRequest(int interfaceId, Cookie optionalLogin = null)
        {
            var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin);

            return(await HttpApi.DeleteWithCookieAsync(TestEnvironment.CreateUrl($"api/exhibit/{interfaceId}?{KitosApiConstants.UnusedOrganizationIdParameter}" /*org id not used*/), cookie));
        }
        public static async Task <HttpResponseMessage> SendRemoveSystemRequestAsync(int registrationId, int systemId, Cookie optionalLogin = null)
        {
            var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin);

            return(await HttpApi.PatchWithCookieAsync(TestEnvironment.CreateUrl($"api/v1/data-processing-registration/{registrationId}/it-systems/remove"), cookie, new { Value = systemId }));
        }
        public static async Task <HttpResponseMessage> SendClearBasisForTransferRequestAsync(int registrationId, Cookie optionalLogin = null)
        {
            var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin);

            return(await HttpApi.PatchWithCookieAsync(TestEnvironment.CreateUrl($"api/v1/data-processing-registration/{registrationId}/basis-for-transfer/clear"), cookie, new { }));
        }
        public static async Task <HttpResponseMessage> SendCanCreateRequestAsync(int organizationId, string name, Cookie optionalLogin = null)
        {
            var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin);

            return(await HttpApi.GetWithCookieAsync(TestEnvironment.CreateUrl($"api/v1/data-processing-registration?orgId={organizationId}&checkname={name}"), cookie));
        }
示例#6
0
        public static async Task <HttpResponseMessage> SendRemoveUsageAsync(int systemUsageId, int organizationId)
        {
            var cookie = await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin);

            return(await HttpApi.DeleteWithCookieAsync(TestEnvironment.CreateUrl($"api/itSystemUsage/{systemUsageId}?organizationId={organizationId}"), cookie));
        }
示例#7
0
        public static async Task <HttpResponseMessage> GetContractAdvicesAsync(int contractId)
        {
            var cookie = await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin);

            return(await HttpApi.GetWithCookieAsync(TestEnvironment.CreateUrl($"/Odata/advice?$filter=type eq '0' and RelationId eq {contractId}"), cookie));
        }
示例#8
0
        public static async Task <HttpResponseMessage> DeactivateAdviceAsync(int adviceId, Cookie optionalLogin = null)
        {
            var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin);

            return(await HttpApi.PatchWithCookieAsync(TestEnvironment.CreateUrl($"odata/DeactivateAdvice?key={adviceId}"), cookie, null));
        }
示例#9
0
        public static async Task <HttpResponseMessage> SendRemoveDataProcessingRegistrationAsync(int contractId, int registrationId, Cookie optionalLogin = null)
        {
            var cookie = optionalLogin ?? await HttpApi.GetCookieAsync(OrganizationRole.GlobalAdmin);

            return(await HttpApi.PatchWithCookieAsync(TestEnvironment.CreateUrl($"api/itcontract/{contractId}/data-processing-registration/remove"), cookie, new { Value = registrationId }));
        }