Commit 94a05735 authored by Siiri Tann's avatar Siiri Tann
Browse files

Merge branch 'TEIS-2084-1' into 'develop'

TEIS-2084: new endpoint for testing: getting representative emails.

See merge request teis/common-api-gateway!209
parents e06f07a0 2c2f31f8
package ee.sm.ti.teis.commongateway.representative;
import ee.sm.ti.teis.AbstractDTO;
import ee.sm.ti.teis.ErrorDTO;
import java.util.UUID;
public class GetRepresentativeEmailsRequest extends AbstractDTO<UUID, ErrorDTO> {
public static final String ROUTING_KEY = "api.GetRepresentativeEmailsRequest";
@Override
public String routingKey() {
return ROUTING_KEY;
}
}
package ee.sm.ti.teis.commongateway.representative;
import ee.sm.ti.teis.AbstractDTO;
import ee.sm.ti.teis.ErrorDTO;
import java.util.List;
public class GetRepresentativeEmailsResponse extends AbstractDTO<List<String>, ErrorDTO> {
public static final String ROUTING_KEY = "api.GetRepresentativeEmailsResponse";
@Override
public String routingKey() {
return ROUTING_KEY;
}
}
......@@ -6,11 +6,9 @@ import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Profile;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.UUID;
@RestController
......@@ -29,4 +27,14 @@ public class RepresentativeTestController extends TeisBaseController {
service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.messages.get-representative-emails}")
@GetMapping("employer-emails")
public List<String> getRepresentativeEmails(@RequestParam UUID employerId, RequestMetaDTO requestMetaDTO) {
GetRepresentativeEmailsRequest request = new GetRepresentativeEmailsRequest();
request.setPayload(employerId, requestMetaDTO);
return (List<String>) service.sendAndReceive(request);
}
}
......@@ -27,6 +27,7 @@ teis.api.messages.delete-location-id: Kustutava tegevuskoha id kood
teis.api.messages.get-representative: Väljastab TK esindaja identifikaatori alusel ettevõtte TK esindaja andmed
teis.api.messages.get-representatives: Väljastab sisestatud parameetrite alusel TK esindajate andmed
teis.api.messages.patch-representative: Teenus märgib teatud rollis olevate töökeskkonna esindajad kehtetuks. Kasutatakse rollide haldamiseks.
teis.api.messages.get-representative-emails: Teenus väljastab ettevõtte identifikaatori alusel ettevõtte esindajate e-posti aadresside andmed.
teis.api.messages.post-representative: Teenus lisab uue TK esindaja andmed
teis.api.messages.post-representative-location: Teenus lisab TK esindaja andmete juurde viite tegevuskohale
teis.api.messages.post-representative-location-id-ex: dadcb5aa-f462-4c70-8de4-93cc4ba8c3d8
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment