Class IdentifierTypesController
[ApiController]
[Route("api/business-partners/[controller]")]
[Authorize]
public class IdentifierTypesController : ControllerBase
- Inheritance
-
object
ControllerBase
IdentifierTypesController
Constructors
public IdentifierTypesController(ISender sender, IStringLocalizer<BusinessPartnerMessages> localizer)
Parameters
sender ISender
localizer IStringLocalizer<BusinessPartnerMessages>
Methods
Activate(Guid)
[HttpPatch("{id}/activate")]
[Authorize(Policy = "BUSINESS_PARTNERS_IDENTIFIER_TYPES_ACTIVATE")]
[ProducesResponseType(200)]
[ProducesResponseType(typeof(Error), 404)]
public Task<IActionResult> Activate(Guid id)
Parameters
id Guid
Returns
- Task<IActionResult>
Create(CreateIdentifierTypeCommand)
[HttpPost]
[Authorize(Policy = "BUSINESS_PARTNERS_IDENTIFIER_TYPES_CREATE")]
[ProducesResponseType(typeof(Guid), 201)]
[ProducesResponseType(typeof(Error), 400)]
[ProducesResponseType(typeof(Error), 409)]
public Task<ActionResult<Guid>> Create(CreateIdentifierTypeCommand command)
Parameters
command CreateIdentifierTypeCommand
Returns
- Task<ActionResult<Guid>>
Deactivate(Guid)
[HttpPatch("{id}/deactivate")]
[Authorize(Policy = "BUSINESS_PARTNERS_IDENTIFIER_TYPES_DEACTIVATE")]
[ProducesResponseType(200)]
[ProducesResponseType(typeof(Error), 404)]
public Task<IActionResult> Deactivate(Guid id)
Parameters
id Guid
Returns
- Task<IActionResult>
Get(PaginatorRequestDto, bool?, CancellationToken)
[HttpGet]
[Authorize(Policy = "BUSINESS_PARTNERS_IDENTIFIER_TYPES_VIEW")]
[ProducesResponseType(typeof(PaginatorResponseDto<IdentifierTypeDto>), 200)]
[ProducesResponseType(typeof(Error), 400)]
public Task<IActionResult> Get(PaginatorRequestDto request, bool? isActive = null, CancellationToken cancellationToken = default)
Parameters
request PaginatorRequestDto
isActive bool?
cancellationToken CancellationToken
Returns
- Task<IActionResult>
GetById(Guid)
[HttpGet("{id}")]
[Authorize(Policy = "BUSINESS_PARTNERS_IDENTIFIER_TYPES_VIEW")]
[ProducesResponseType(typeof(IdentifierTypeDto), 200)]
[ProducesResponseType(typeof(Error), 404)]
public Task<IActionResult> GetById(Guid id)
Parameters
id Guid
Returns
- Task<IActionResult>
Update(Guid, UpdateIdentifierTypeCommand)
[HttpPut("{id}")]
[Authorize(Policy = "BUSINESS_PARTNERS_IDENTIFIER_TYPES_UPDATE")]
[ProducesResponseType(200)]
[ProducesResponseType(typeof(Error), 400)]
[ProducesResponseType(typeof(Error), 409)]
[ProducesResponseType(typeof(Error), 404)]
public Task<IActionResult> Update(Guid id, UpdateIdentifierTypeCommand command)
Parameters
id Guid
command UpdateIdentifierTypeCommand
Returns
- Task<IActionResult>