Table of Contents

Class ContactPointTypesController

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

Constructors

ContactPointTypesController(ISender, IStringLocalizer<BusinessPartnerMessages>)

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

Parameters

sender ISender
localizer IStringLocalizer<BusinessPartnerMessages>

Methods

Activate(Guid)

[HttpPatch("{id}/activate")]
[Authorize(Policy = "BUSINESS_PARTNERS_CONTACT_POINT_TYPES_ACTIVATE")]
[ProducesResponseType(200)]
[ProducesResponseType(typeof(Error), 404)]
public Task<IActionResult> Activate(Guid id)

Parameters

id Guid

Returns

Task<IActionResult>

Create(CreateContactPointTypeCommand)

[HttpPost]
[Authorize(Policy = "BUSINESS_PARTNERS_CONTACT_POINT_TYPES_CREATE")]
[ProducesResponseType(typeof(Guid), 201)]
[ProducesResponseType(typeof(Error), 400)]
[ProducesResponseType(typeof(Error), 409)]
public Task<ActionResult<Guid>> Create(CreateContactPointTypeCommand command)

Parameters

command CreateContactPointTypeCommand

Returns

Task<ActionResult<Guid>>

Deactivate(Guid)

[HttpPatch("{id}/deactivate")]
[Authorize(Policy = "BUSINESS_PARTNERS_CONTACT_POINT_TYPES_DEACTIVATE")]
[ProducesResponseType(200)]
[ProducesResponseType(typeof(Error), 404)]
public Task<IActionResult> Deactivate(Guid id)

Parameters

id Guid

Returns

Task<IActionResult>

Get(PaginatorRequestDto)

[HttpGet]
[Authorize(Policy = "BUSINESS_PARTNERS_CONTACT_POINT_TYPES_VIEW")]
[ProducesResponseType(typeof(PaginatorResponseDto<ContactPointTypeDto>), 200)]
[ProducesResponseType(typeof(Error), 400)]
public Task<IActionResult> Get(PaginatorRequestDto request)

Parameters

request PaginatorRequestDto

Returns

Task<IActionResult>

GetById(Guid)

[HttpGet("{id}")]
[Authorize(Policy = "BUSINESS_PARTNERS_CONTACT_POINT_TYPES_VIEW")]
[ProducesResponseType(typeof(ContactPointTypeDto), 200)]
[ProducesResponseType(typeof(Error), 404)]
public Task<IActionResult> GetById(Guid id)

Parameters

id Guid

Returns

Task<IActionResult>

Update(Guid, UpdateContactPointTypeCommand)

[HttpPut("{id}")]
[Authorize(Policy = "BUSINESS_PARTNERS_CONTACT_POINT_TYPES_UPDATE")]
[ProducesResponseType(200)]
[ProducesResponseType(typeof(Error), 400)]
[ProducesResponseType(typeof(Error), 409)]
[ProducesResponseType(typeof(Error), 404)]
public Task<IActionResult> Update(Guid id, UpdateContactPointTypeCommand command)

Parameters

id Guid
command UpdateContactPointTypeCommand

Returns

Task<IActionResult>