Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
DiscountService service.DiscountService
}
func NewHandler ¶
func (Handler) Create ¶
swagger:route POST /discounts discounts reqDiscountCreate
Create discount data ¶
This endpoint will create or update the discount and return the discount structure
Responses: 200: Discount 400: HTTPError 404: HTTPError 500: HTTPError
func (Handler) Delete ¶
swagger:route DELETE /discounts/{id} discounts reqDiscountGetByID
Delete a discount by ID ¶
This endpoint deletes discount and returns 204 response code (no content).
Responses: 204: 400: HTTPError 404: HTTPError 500: HTTPError
func (Handler) GetByFilter ¶
swagger:route GET /discounts discounts reqDiscountGetByFilter
Getting a list of discounts by filter. It returns only current user discounts.
This endpoint returns a list of discount structures
Responses: 200: DiscountList 500: HTTPError
func (Handler) GetByID ¶
swagger:route GET /discounts/{id} discounts reqDiscountGetByID
Getting a discount by ID ¶
This endpoint returns the discount structure
Responses: 200: Discount 400: HTTPError 404: HTTPError 500: HTTPError
Click to show internal directories.
Click to hide internal directories.