-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MODDCB-173: The GET status API extended with renewal count and renewa…
…l maximum number in the borrowing or borrowing-pickup role and ITEM_CHECKED_OUT.
- Loading branch information
1 parent
5c3e61d
commit 069e0c0
Showing
8 changed files
with
177 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/org/folio/dcb/client/feign/CirculationLoanPolicyStorageClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.folio.dcb.client.feign; | ||
|
||
import org.folio.dcb.domain.dto.LoanPolicyCollection; | ||
import org.folio.spring.config.FeignClientConfiguration; | ||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
@FeignClient(name = "loan-policy-storage", configuration = FeignClientConfiguration.class) | ||
public interface CirculationLoanPolicyStorageClient { | ||
@GetMapping("/loan-policies") | ||
LoanPolicyCollection fetchLoanPolicyByQuery(@RequestParam("query") String query); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Loan: | ||
type: object | ||
title: Loan | ||
properties: | ||
id: | ||
description: A globally unique (UUID) identifier for the Loan | ||
type: string | ||
userId: | ||
description: A globally unique (UUID) identifier for the user | ||
type: string | ||
itemId: | ||
description: A globally unique (UUID) identifier for the item | ||
type: string | ||
renewalCount: | ||
description: renewalCount of the loan | ||
type: string | ||
loanPolicyId: | ||
description: A unique name belonging to a user. Typically used for login | ||
type: string | ||
status: | ||
"$ref": "Loan.yaml#/status" | ||
status: | ||
type: object | ||
properties: | ||
name: | ||
description: loan status | ||
type: string | ||
|
||
LoanCollection: | ||
type: object | ||
properties: | ||
loans: | ||
type: array | ||
description: "Loan collection" | ||
items: | ||
$ref: "Loan.yaml#/Loan" | ||
totalRecords: | ||
type: integer | ||
additionalProperties: false | ||
required: | ||
- loans | ||
- totalRecords |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
LoanPolicy: | ||
type: object | ||
title: LoanPolicy | ||
properties: | ||
id: | ||
description: A globally unique (UUID) identifier for the LoanPolicy | ||
type: string | ||
name: | ||
description: Policy Name | ||
type: string | ||
renewalsPolicy: | ||
"$ref": "LoanPolicy.yaml#/renewalsPolicy" | ||
renewalsPolicy: | ||
type: object | ||
properties: | ||
unlimited: | ||
description: unlimited | ||
type: boolean | ||
numberAllowed: | ||
description: numberAllowed | ||
type: integer | ||
|
||
LoanPolicyCollection: | ||
type: object | ||
properties: | ||
loanPolicies: | ||
type: array | ||
description: "LoanPolicy collection" | ||
items: | ||
$ref: "LoanPolicy.yaml#/LoanPolicy" | ||
totalRecords: | ||
type: integer | ||
additionalProperties: false | ||
required: | ||
- loanPolicies | ||
- totalRecords |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters