Table of Contents

Class ApplicationTypesController

Namespace
KadicErp.WebApi.Controllers.Receivables.Dictionaries
Assembly
KadicErp.WebApi.dll
[Route("api/receivables/dictionaries/application-types")]
[ApiController]
[Authorize]
public class ApplicationTypesController : ControllerBase
Inheritance
object
ControllerBase
ApplicationTypesController

Constructors

ApplicationTypesController(ISender)

public ApplicationTypesController(ISender sender)

Parameters

sender ISender

Methods

Activate(Guid, CancellationToken)

[HttpPatch("{id:guid}/activate")]
[Authorize(Policy = "RECEIVABLES_APPLICATION_TYPES_ACTIVATE")]
[ProducesResponseType(204)]
[ProducesResponseType(404)]
public Task<IActionResult> Activate(Guid id, CancellationToken ct)

Parameters

id Guid
ct CancellationToken

Returns

Task<IActionResult>

Create(CreateDictionaryItemCommand<ApplicationType>, CancellationToken)

[HttpPost]
[Authorize(Policy = "RECEIVABLES_APPLICATION_TYPES_CREATE")]
[ProducesResponseType(typeof(object), 201)]
[ProducesResponseType(400)]
public Task<IActionResult> Create(CreateDictionaryItemCommand<ApplicationType> command, CancellationToken ct)

Parameters

command CreateDictionaryItemCommand<ApplicationType>
ct CancellationToken

Returns

Task<IActionResult>

Deactivate(Guid, CancellationToken)

[HttpPatch("{id:guid}/deactivate")]
[Authorize(Policy = "RECEIVABLES_APPLICATION_TYPES_DEACTIVATE")]
[ProducesResponseType(204)]
[ProducesResponseType(404)]
public Task<IActionResult> Deactivate(Guid id, CancellationToken ct)

Parameters

id Guid
ct CancellationToken

Returns

Task<IActionResult>

Get(GetDictionaryItemsQuery<ApplicationType>, CancellationToken)

[HttpGet]
[Authorize(Policy = "RECEIVABLES_APPLICATION_TYPES_VIEW")]
[ProducesResponseType(typeof(PaginatorResponseDto<DictionaryItemDto>), 200)]
public Task<IActionResult> Get(GetDictionaryItemsQuery<ApplicationType> query, CancellationToken ct)

Parameters

query GetDictionaryItemsQuery<ApplicationType>
ct CancellationToken

Returns

Task<IActionResult>

GetById(Guid, CancellationToken)

[HttpGet("{id:guid}")]
[Authorize(Policy = "RECEIVABLES_APPLICATION_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<ApplicationType>, CancellationToken)

[HttpPut("{id:guid}")]
[Authorize(Policy = "RECEIVABLES_APPLICATION_TYPES_UPDATE")]
[ProducesResponseType(204)]
[ProducesResponseType(400)]
[ProducesResponseType(404)]
public Task<IActionResult> Update(Guid id, UpdateDictionaryItemCommand<ApplicationType> command, CancellationToken ct)

Parameters

id Guid
command UpdateDictionaryItemCommand<ApplicationType>
ct CancellationToken

Returns

Task<IActionResult>