-
-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added all passport error types - PassportElementErrorFrontSide, Passp…
…ortElementErrorReverseSide, PassportElementErrorSelfie, PassportElementErrorFile, PassportElementErrorFiles, PassportElementErrorTranslationFile, PassportElementErrorTranslationFiles, PassportElementErrorUnspecified
- Loading branch information
Showing
10 changed files
with
130 additions
and
3 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
library/src/main/java/com/pengrad/telegrambot/passport/PassportElementErrorAbstractFile.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,16 @@ | ||
package com.pengrad.telegrambot.passport; | ||
|
||
/** | ||
* Stas Parshin | ||
* 28 August 2018 | ||
*/ | ||
abstract class PassportElementErrorAbstractFile extends PassportElementError { | ||
private final static long serialVersionUID = 0L; | ||
|
||
private final String file_hash; | ||
|
||
public PassportElementErrorAbstractFile(String source, String type, String fileHash, String message) { | ||
super(source, type, message); | ||
file_hash = fileHash; | ||
} | ||
} |
4 changes: 1 addition & 3 deletions
4
library/src/main/java/com/pengrad/telegrambot/passport/PassportElementErrorDataField.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
13 changes: 13 additions & 0 deletions
13
library/src/main/java/com/pengrad/telegrambot/passport/PassportElementErrorFile.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 com.pengrad.telegrambot.passport; | ||
|
||
/** | ||
* Stas Parshin | ||
* 28 August 2018 | ||
*/ | ||
public class PassportElementErrorFile extends PassportElementErrorAbstractFile { | ||
private final static long serialVersionUID = 0L; | ||
|
||
public PassportElementErrorFile(String type, String fileHash, String message) { | ||
super("file", type, fileHash, message); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
library/src/main/java/com/pengrad/telegrambot/passport/PassportElementErrorFiles.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,16 @@ | ||
package com.pengrad.telegrambot.passport; | ||
|
||
/** | ||
* Stas Parshin | ||
* 28 August 2018 | ||
*/ | ||
public class PassportElementErrorFiles extends PassportElementError { | ||
private final static long serialVersionUID = 0L; | ||
|
||
private String[] file_hashes; | ||
|
||
public PassportElementErrorFiles(String type, String[] fileHashes, String message) { | ||
super("files", type, message); | ||
file_hashes = fileHashes; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
library/src/main/java/com/pengrad/telegrambot/passport/PassportElementErrorFrontSide.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 com.pengrad.telegrambot.passport; | ||
|
||
/** | ||
* Stas Parshin | ||
* 28 August 2018 | ||
*/ | ||
public class PassportElementErrorFrontSide extends PassportElementErrorAbstractFile { | ||
private final static long serialVersionUID = 0L; | ||
|
||
public PassportElementErrorFrontSide(String type, String fileHash, String message) { | ||
super("front_side", type, fileHash, message); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
library/src/main/java/com/pengrad/telegrambot/passport/PassportElementErrorReverseSide.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 com.pengrad.telegrambot.passport; | ||
|
||
/** | ||
* Stas Parshin | ||
* 28 August 2018 | ||
*/ | ||
public class PassportElementErrorReverseSide extends PassportElementErrorAbstractFile { | ||
private final static long serialVersionUID = 0L; | ||
|
||
public PassportElementErrorReverseSide(String type, String fileHash, String message) { | ||
super("reverse_side", type, fileHash, message); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
library/src/main/java/com/pengrad/telegrambot/passport/PassportElementErrorSelfie.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 com.pengrad.telegrambot.passport; | ||
|
||
/** | ||
* Stas Parshin | ||
* 28 August 2018 | ||
*/ | ||
public class PassportElementErrorSelfie extends PassportElementErrorAbstractFile { | ||
private final static long serialVersionUID = 0L; | ||
|
||
public PassportElementErrorSelfie(String type, String fileHash, String message) { | ||
super("selfie", type, fileHash, message); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...y/src/main/java/com/pengrad/telegrambot/passport/PassportElementErrorTranslationFile.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 com.pengrad.telegrambot.passport; | ||
|
||
/** | ||
* Stas Parshin | ||
* 28 August 2018 | ||
*/ | ||
public class PassportElementErrorTranslationFile extends PassportElementErrorAbstractFile { | ||
private final static long serialVersionUID = 0L; | ||
|
||
public PassportElementErrorTranslationFile(String type, String fileHash, String message) { | ||
super("translation_file", type, fileHash, message); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
.../src/main/java/com/pengrad/telegrambot/passport/PassportElementErrorTranslationFiles.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,16 @@ | ||
package com.pengrad.telegrambot.passport; | ||
|
||
/** | ||
* Stas Parshin | ||
* 28 August 2018 | ||
*/ | ||
public class PassportElementErrorTranslationFiles extends PassportElementError { | ||
private final static long serialVersionUID = 0L; | ||
|
||
private String[] file_hashes; | ||
|
||
public PassportElementErrorTranslationFiles(String type, String[] fileHashes, String message) { | ||
super("translation_files", type, message); | ||
file_hashes = fileHashes; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
library/src/main/java/com/pengrad/telegrambot/passport/PassportElementErrorUnspecified.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,16 @@ | ||
package com.pengrad.telegrambot.passport; | ||
|
||
/** | ||
* Stas Parshin | ||
* 28 August 2018 | ||
*/ | ||
public class PassportElementErrorUnspecified extends PassportElementError { | ||
private final static long serialVersionUID = 0L; | ||
|
||
private String element_hash; | ||
|
||
public PassportElementErrorUnspecified(String type, String elementHash, String message) { | ||
super("unspecified", type, message); | ||
element_hash = elementHash; | ||
} | ||
} |