Package io.meeds.dapp.web.rest
Class LeaseController
java.lang.Object
io.meeds.dapp.web.rest.LeaseController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.meeds.deeds.common.model.DeedTenantLeaseDTOcreateLease(Principal principal, int code, String offerId, String transactionHash) io.meeds.deeds.common.model.DeedTenantLeaseDTOio.meeds.deeds.common.model.DeedTenantLeaseDTOorg.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<io.meeds.deeds.common.model.DeedTenantLeaseDTO>> getLeases(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<io.meeds.deeds.common.model.DeedTenantLeaseDTO> assembler, Long nftId, List<io.meeds.deeds.common.constant.DeedCard> cardTypes, boolean onlyConfirmed, String address, boolean owner) io.meeds.deeds.common.model.DeedTenantLeaseDTOpayRent(Principal principal, long leaseId, String ownerAddress, int paidMonths, String transactionHash)
-
Constructor Details
-
LeaseController
public LeaseController()
-
-
Method Details
-
getLeases
@GetMapping public org.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<io.meeds.deeds.common.model.DeedTenantLeaseDTO>> getLeases(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<io.meeds.deeds.common.model.DeedTenantLeaseDTO> assembler, @RequestParam(name="nftId",required=false) Long nftId, @RequestParam(name="cardType",required=false) List<io.meeds.deeds.common.constant.DeedCard> cardTypes, @RequestParam(name="onlyConfirmed",required=false) boolean onlyConfirmed, @RequestParam(name="address",required=true) String address, @RequestParam(name="owner",required=true) boolean owner) -
getLease
@GetMapping("/{leaseId}") public io.meeds.deeds.common.model.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") @Secured("USER") public io.meeds.deeds.common.model.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") @Secured("USER") public io.meeds.deeds.common.model.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") @Secured("USER") public io.meeds.deeds.common.model.DeedTenantLeaseDTO endLease(Principal principal, @PathVariable(name="leaseId",required=true) long leaseId, @RequestParam(name="transactionHash",required=true) String transactionHash)
-