-
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-174 Handle PUT /transaction/{dcbTransactionId}/renew API to al…
…low the DCB hub to perform the renew operation (#146) MODDCB-174 Handle PUT /transaction/{dcbTransactionId}/renew API to allow the DCB hub to perform the renew operation
- Loading branch information
1 parent
c51c984
commit 455ca84
Showing
12 changed files
with
878 additions
and
287 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
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
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
20 changes: 20 additions & 0 deletions
20
src/main/java/org/folio/dcb/utils/TransactionDetailsUtil.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,20 @@ | ||
package org.folio.dcb.utils; | ||
|
||
import java.util.Objects; | ||
|
||
import org.folio.dcb.domain.dto.DcbTransaction; | ||
import org.folio.dcb.domain.dto.TransactionStatus; | ||
|
||
import lombok.experimental.UtilityClass; | ||
|
||
@UtilityClass | ||
public class TransactionDetailsUtil { | ||
|
||
public static boolean statusesNotEqual(TransactionStatus.StatusEnum statusOne, TransactionStatus.StatusEnum statusTwo) { | ||
return !Objects.equals(statusOne, statusTwo); | ||
} | ||
|
||
public static boolean rolesNotEqual(DcbTransaction.RoleEnum roleOne, DcbTransaction.RoleEnum roleTwo) { | ||
return !Objects.equals(roleOne, roleTwo); | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
src/main/resources/swagger.api/schemas/RenewByIdRequest.yaml
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,16 @@ | ||
RenewByIdRequest: | ||
type: object | ||
description: Request to renew an existing loan, found by the IDs of item and user | ||
properties: | ||
itemId: | ||
description: ID of the item to be renewed | ||
type: string | ||
$ref: "./uuid.yaml" | ||
userId: | ||
description: ID of the user (representing the patron) the item has been loaned to | ||
type: string | ||
$ref: "./uuid.yaml" | ||
required: | ||
- itemId | ||
- userId | ||
additionalProperties: false |
Oops, something went wrong.