package click.kamil.examples.enterprise.api;

import click.kamil.examples.enterprise.service.OrderService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class OrderController implements OrderApi {

    private final OrderService orderService;

    @Override
    public void placeOrder() {
        orderService.place();
    }

    @Override
    public void cancelOrder(String id) {
        orderService.cancel(id);
    }
}
