SubscriptionController

@Validated
@RestController
@RequestMapping(value = ["/api/v1"], produces = ["application/json"])
class SubscriptionController(subscribeWorkbookUseCase: SubscribeWorkbookUseCase, unsubscribeWorkbookUseCase: UnsubscribeWorkbookUseCase, unsubscribeAllUseCase: UnsubscribeAllUseCase, browseSubscribeWorkbooksUseCase: BrowseSubscribeWorkbooksUseCase, updateSubscriptionDayUseCase: UpdateSubscriptionDayUseCase, updateSubscriptionTimeUseCase: UpdateSubscriptionTimeUseCase)

Constructors

Link copied to clipboard
constructor(subscribeWorkbookUseCase: SubscribeWorkbookUseCase, unsubscribeWorkbookUseCase: UnsubscribeWorkbookUseCase, unsubscribeAllUseCase: UnsubscribeAllUseCase, browseSubscribeWorkbooksUseCase: BrowseSubscribeWorkbooksUseCase, updateSubscriptionDayUseCase: UpdateSubscriptionDayUseCase, updateSubscriptionTimeUseCase: UpdateSubscriptionTimeUseCase)

Functions

Link copied to clipboard
@GetMapping(value = ["/subscriptions/workbooks"])
fun browseSubscribeWorkbooks(@AuthenticationPrincipal userDetails: TokenUserDetails, @RequestParam(value = "view", required = false) view: ViewCategory?): ApiResponse<ApiResponse.SuccessBody<SubscribeWorkbooksResponse>>
Link copied to clipboard
@PostMapping(value = ["/subscriptions/unsubs"])
fun deactivateAllSubscriptions(@AuthenticationPrincipal userDetails: TokenUserDetails, @Valid @RequestBody body: UnsubscribeAllRequest?): ApiResponse<ApiResponse.Success>
Link copied to clipboard
@PostMapping(value = ["/workbooks/{workbookId}/subs"])
fun subscribeWorkbook(@AuthenticationPrincipal userDetails: TokenUserDetails, @PathVariable(value = "workbookId") @Min(value = 1, message = "{min.id}") workbookId: Long): ApiResponse<ApiResponse.Success>
Link copied to clipboard
@PostMapping(value = ["/workbooks/{workbookId}/unsubs"])
fun unsubscribeWorkbook(@AuthenticationPrincipal userDetails: TokenUserDetails, @PathVariable(value = "workbookId") @Min(value = 1, message = "{min.id}") workbookId: Long, @Valid @RequestBody body: UnsubscribeWorkbookRequest?): ApiResponse<ApiResponse.Success>
Link copied to clipboard
@PatchMapping(value = ["/subscriptions/day"])
fun updateSubscriptionDay(@AuthenticationPrincipal userDetails: TokenUserDetails, @Valid @RequestBody body: UpdateSubscriptionDayRequest): ApiResponse<ApiResponse.Success>
Link copied to clipboard
@PatchMapping(value = ["/subscriptions/time"])
fun updateSubscriptionTime(@AuthenticationPrincipal userDetails: TokenUserDetails, @Valid @RequestBody body: UpdateSubscriptionTimeRequest): ApiResponse<ApiResponse.Success>