Class TermTypesController
[Route("api/receivables/dictionaries/term-types")]
[ApiController]
[Authorize]
public class TermTypesController : ControllerBase
- Inheritance
-
object
ControllerBase
TermTypesController
Constructors
public TermTypesController(ISender sender)
Parameters
sender ISender
Methods
Activate(Guid, CancellationToken)
[HttpPatch("{id:guid}/activate")]
[Authorize(Policy = "RECEIVABLES_TERM_TYPES_ACTIVATE")]
[ProducesResponseType(204)]
[ProducesResponseType(404)]
public Task<IActionResult> Activate(Guid id, CancellationToken ct)
Parameters
id Guid
ct CancellationToken
Returns
- Task<IActionResult>
Create(CreateDictionaryItemCommand<TermType>, CancellationToken)
[HttpPost]
[Authorize(Policy = "RECEIVABLES_TERM_TYPES_CREATE")]
[ProducesResponseType(typeof(object), 201)]
[ProducesResponseType(400)]
public Task<IActionResult> Create(CreateDictionaryItemCommand<TermType> command, CancellationToken ct)
Parameters
command CreateDictionaryItemCommand<TermType>
ct CancellationToken
Returns
- Task<IActionResult>
Deactivate(Guid, CancellationToken)
[HttpPatch("{id:guid}/deactivate")]
[Authorize(Policy = "RECEIVABLES_TERM_TYPES_DEACTIVATE")]
[ProducesResponseType(204)]
[ProducesResponseType(404)]
public Task<IActionResult> Deactivate(Guid id, CancellationToken ct)
Parameters
id Guid
ct CancellationToken
Returns
- Task<IActionResult>
Get(GetDictionaryItemsQuery<TermType>, CancellationToken)
[HttpGet]
[Authorize(Policy = "RECEIVABLES_TERM_TYPES_VIEW")]
[ProducesResponseType(typeof(PaginatorResponseDto<DictionaryItemDto>), 200)]
public Task<IActionResult> Get(GetDictionaryItemsQuery<TermType> query, CancellationToken ct)
Parameters
query GetDictionaryItemsQuery<TermType>
ct CancellationToken
Returns
- Task<IActionResult>
GetById(Guid, CancellationToken)
[HttpGet("{id:guid}")]
[Authorize(Policy = "RECEIVABLES_TERM_TYPES_VIEW")]
[ProducesResponseType(typeof(DictionaryItemDto), 200)]
[ProducesResponseType(404)]
public Task<IActionResult> GetById(Guid id, CancellationToken ct)
Parameters
id Guid
ct CancellationToken
Returns
- Task<IActionResult>
Update(Guid, UpdateDictionaryItemCommand<TermType>, CancellationToken)
[HttpPut("{id:guid}")]
[Authorize(Policy = "RECEIVABLES_TERM_TYPES_UPDATE")]
[ProducesResponseType(204)]
[ProducesResponseType(400)]
[ProducesResponseType(404)]
public Task<IActionResult> Update(Guid id, UpdateDictionaryItemCommand<TermType> command, CancellationToken ct)
Parameters
id Guid
command UpdateDictionaryItemCommand<TermType>
ct CancellationToken
Returns
- Task<IActionResult>