-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #345 from diadoc/fix-clients
Исправление багов и добавление недостающих параметров в методы
- Loading branch information
Showing
11 changed files
with
441 additions
and
74 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
20 changes: 20 additions & 0 deletions
20
src/main/java/Diadoc/Api/counteragent/CounteragentStatus.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 Diadoc.Api.counteragent; | ||
|
||
import java.util.Arrays; | ||
import java.util.Optional; | ||
|
||
public enum CounteragentStatus { | ||
IsMyCounteragent, | ||
InvitesMe, | ||
IsInvitedByMe, | ||
Rejected; | ||
|
||
public static Optional<CounteragentStatus> fromString(String value) { | ||
if (value == null) { | ||
return Optional.empty(); | ||
} | ||
return Arrays.stream(values()) | ||
.filter(status -> status.name().equals(value)) | ||
.findFirst(); | ||
} | ||
} |
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
Oops, something went wrong.