Class LeaseController

java.lang.Object
io.meeds.deeds.web.rest.LeaseController

@RestController @RequestMapping("/api/leases") public class LeaseController extends Object
  • Constructor Details

    • LeaseController

      public LeaseController()
  • Method Details

    • getLeases

      @GetMapping public org.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<DeedTenantLeaseDTO>> getLeases(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<DeedTenantLeaseDTO> assembler, @RequestParam(name="nftId",required=false) Long nftId, @RequestParam(name="cardType",required=false) List<io.meeds.deeds.constant.DeedCard> cardTypes, @RequestParam(name="onlyConfirmed",required=false) boolean onlyConfirmed, @RequestParam(name="address",required=true) String address, @RequestParam(name="owner",required=true) boolean owner, @RequestParam(name="networkId",required=true) long networkId)
    • getLease

      @GetMapping("/{leaseId}") public DeedTenantLeaseDTO getLease(Principal principal, @RequestHeader(name="X-REFRESH",required=false) boolean refreshFromBlockchain, @PathVariable(name="leaseId",required=true) long leaseId)
    • createLease

      @PostMapping(consumes="application/x-www-form-urlencoded") @RolesAllowed("USER") public DeedTenantLeaseDTO createLease(Principal principal, @RequestHeader(name="X-AUTHORIZATION",required=true) int code, @RequestParam(name="offerId",required=true) String offerId, @RequestParam(name="transactionHash",required=true) String transactionHash)
    • payRent

      @PatchMapping(path="/{leaseId}", consumes="application/x-www-form-urlencoded") @RolesAllowed("USER") public DeedTenantLeaseDTO payRent(Principal principal, @PathVariable(name="leaseId",required=true) long leaseId, @RequestParam(name="ownerAddress",required=true) String ownerAddress, @RequestParam(name="paidMonths",required=true) int paidMonths, @RequestParam(name="transactionHash",required=true) String transactionHash)
    • endLease

      @DeleteMapping(path="/{leaseId}", consumes="application/x-www-form-urlencoded") @RolesAllowed("USER") public DeedTenantLeaseDTO endLease(Principal principal, @PathVariable(name="leaseId",required=true) long leaseId, @RequestParam(name="transactionHash",required=true) String transactionHash)