Table of Contents

Class IntervalUnitsController

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

Constructors

IntervalUnitsController(ISender)

public IntervalUnitsController(ISender sender)

Parameters

sender ISender

Methods

Activate(Guid, CancellationToken)

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

Parameters

id Guid
ct CancellationToken

Returns

Task<IActionResult>

Create(CreateDictionaryItemCommand<IntervalUnit>, CancellationToken)

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

Parameters

command CreateDictionaryItemCommand<IntervalUnit>
ct CancellationToken

Returns

Task<IActionResult>

Deactivate(Guid, CancellationToken)

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

Parameters

id Guid
ct CancellationToken

Returns

Task<IActionResult>

Get(GetDictionaryItemsQuery<IntervalUnit>, CancellationToken)

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

Parameters

query GetDictionaryItemsQuery<IntervalUnit>
ct CancellationToken

Returns

Task<IActionResult>

GetById(Guid, CancellationToken)

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

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

Parameters

id Guid
command UpdateDictionaryItemCommand<IntervalUnit>
ct CancellationToken

Returns

Task<IActionResult>