Table of Contents

Class NoteTypesController

Namespace
KadicErp.WebApi.Controllers.BusinessPartners
Assembly
KadicErp.WebApi.dll
[Route("api/business-partners/note-types")]
[ApiController]
public class NoteTypesController : ControllerBase
Inheritance
object
ControllerBase
NoteTypesController

Constructors

NoteTypesController(ISender, IStringLocalizer<BusinessPartnerMessages>)

public NoteTypesController(ISender sender, IStringLocalizer<BusinessPartnerMessages> localizer)

Parameters

sender ISender
localizer IStringLocalizer<BusinessPartnerMessages>

Methods

Activate(Guid)

[HttpPatch("{id}/activate")]
[Authorize(Policy = "BUSINESS_PARTNERS_NOTE_TYPES_ACTIVATE")]
public Task<IActionResult> Activate(Guid id)

Parameters

id Guid

Returns

Task<IActionResult>

Create(CreateNoteTypeCommand)

[HttpPost]
[Authorize(Policy = "BUSINESS_PARTNERS_NOTE_TYPES_CREATE")]
public Task<IActionResult> Create(CreateNoteTypeCommand command)

Parameters

command CreateNoteTypeCommand

Returns

Task<IActionResult>

Deactivate(Guid)

[HttpPatch("{id}/deactivate")]
[Authorize(Policy = "BUSINESS_PARTNERS_NOTE_TYPES_DEACTIVATE")]
public Task<IActionResult> Deactivate(Guid id)

Parameters

id Guid

Returns

Task<IActionResult>

GetAll(PaginatorRequestDto, bool?, string?)

[HttpGet]
[Authorize(Policy = "BUSINESS_PARTNERS_NOTE_TYPES_VIEW")]
public Task<IActionResult> GetAll(PaginatorRequestDto paginator, bool? isActive = null, string? term = null)

Parameters

paginator PaginatorRequestDto
isActive bool?
term string

Returns

Task<IActionResult>

GetById(Guid)

[HttpGet("{id}")]
[Authorize(Policy = "BUSINESS_PARTNERS_NOTE_TYPES_VIEW")]
public Task<IActionResult> GetById(Guid id)

Parameters

id Guid

Returns

Task<IActionResult>

Update(Guid, UpdateNoteTypeCommand)

[HttpPut("{id}")]
[Authorize(Policy = "BUSINESS_PARTNERS_NOTE_TYPES_UPDATE")]
public Task<IActionResult> Update(Guid id, UpdateNoteTypeCommand command)

Parameters

id Guid
command UpdateNoteTypeCommand

Returns

Task<IActionResult>