-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Alexande B <[email protected]>
- Loading branch information
Showing
8 changed files
with
65 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
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
39 changes: 39 additions & 0 deletions
39
sdk/src/main/java/com/hcaptcha/sdk/HCaptchaOrientation.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,39 @@ | ||
package com.hcaptcha.sdk; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
import java.io.Serializable; | ||
|
||
|
||
/** | ||
* The hCaptcha challenge orientation | ||
*/ | ||
public enum HCaptchaOrientation implements Serializable { | ||
|
||
PORTRAIT("portrait"), | ||
|
||
LANDSCAPE("landscape"); | ||
|
||
private final String orientation; | ||
|
||
HCaptchaOrientation(final String orientation) { | ||
this.orientation = orientation; | ||
} | ||
|
||
/** | ||
* @return the hCaptcha api.js string encoding | ||
*/ | ||
public String getOrientation() { | ||
return this.orientation; | ||
} | ||
|
||
@JsonValue | ||
@NonNull | ||
@Override | ||
public String toString() { | ||
return orientation; | ||
} | ||
|
||
} |
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