-
Notifications
You must be signed in to change notification settings - Fork 0
Nitpick SDK updates #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
912c3dc
Nitpick SDK updates
vitalii-t 62b8bb7
Updated validator instantiation and several example classes
vitalii-t 75c2786
Updated validator name and instantiation, minor tests tweaks
vitalii-t 4a313a4
Reverted parameters order change in removeAccountAccess
vitalii-t File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ | |
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| public class Batch { | ||
| public class BatchExample { | ||
|
|
||
| private static final String TOKEN = "<YOUR MAILTRAP TOKEN>"; | ||
| private static final String SENDER_EMAIL = "[email protected]"; | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
|
|
||
| import java.util.List; | ||
|
|
||
| public class BulkSend { | ||
| public class BulkSendExample { | ||
|
|
||
| private static final String TOKEN = "<YOUR MAILTRAP TOKEN>"; | ||
| private static final String SENDER_EMAIL = "[email protected]"; | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ | |
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| public class Batch { | ||
| public class BatchExample { | ||
|
|
||
| private static final String TOKEN = "<YOUR MAILTRAP TOKEN>"; | ||
| private static final String SENDER_EMAIL = "[email protected]"; | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ | |
| import java.util.List; | ||
| import java.util.UUID; | ||
|
|
||
| public class Errors { | ||
| public class ErrorsExample { | ||
|
|
||
| private static final String TOKEN = "<YOUR MAILTRAP TOKEN>"; | ||
| private static final String SENDER_EMAIL = "[email protected]"; | ||
|
|
@@ -33,11 +33,11 @@ public static void main(String[] args) { | |
|
|
||
| try { | ||
| System.out.println(client.sendingApi().emails().send(invalidMail_TemplateUUIDAndSubjectAreUsed)); | ||
| } catch (InvalidRequestBodyException e) { | ||
| } catch (final InvalidRequestBodyException e) { | ||
| System.out.println("Caught invalid request body exception : " + e); | ||
| } | ||
|
|
||
| var clientWithInvalidToken = MailtrapClientFactory.createMailtrapClient(new MailtrapConfig.Builder() | ||
| final var clientWithInvalidToken = MailtrapClientFactory.createMailtrapClient(new MailtrapConfig.Builder() | ||
| .token("invalid token") | ||
| .build()); | ||
|
|
||
|
|
@@ -50,13 +50,13 @@ public static void main(String[] args) { | |
|
|
||
| try { | ||
| System.out.println(clientWithInvalidToken.sendingApi().emails().send(validMail)); | ||
| } catch (HttpClientException e) { | ||
| } catch (final HttpClientException e) { | ||
| System.out.println("Caught unauthorized exception : " + e); | ||
| } | ||
|
|
||
| try { | ||
| System.out.println(client.sendingApi().emails().send(null)); | ||
| } catch (InvalidRequestBodyException e) { | ||
| } catch (final InvalidRequestBodyException e) { | ||
| System.out.println("Caught invalid request body exception : " + e); | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ | |
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| public class Everything { | ||
| public class EverythingExample { | ||
|
|
||
| private static final String TOKEN = "<YOUR MAILTRAP TOKEN>"; | ||
| private static final String SENDER_EMAIL = "[email protected]"; | ||
|
|
@@ -72,12 +72,12 @@ public static void main(String[] args) { | |
| } | ||
|
|
||
| private static String readAndEncodeAttachment(String filename) { | ||
| try (InputStream inputStream = Everything.class.getClassLoader().getResourceAsStream(filename)) { | ||
| try (final InputStream inputStream = EverythingExample.class.getClassLoader().getResourceAsStream(filename)) { | ||
| if (inputStream == null) { | ||
| return ""; | ||
| } | ||
| return Base64.getEncoder().encodeToString(inputStream.readAllBytes()); | ||
| } catch (Exception e) { | ||
| } catch (final Exception e) { | ||
| return ""; | ||
| } | ||
|
|
||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
|
|
||
| import java.util.List; | ||
|
|
||
| public class Minimal { | ||
| public class MinimalExample { | ||
|
|
||
| private static final String TOKEN = "<YOUR MAILTRAP TOKEN>"; | ||
| private static final String SENDER_EMAIL = "[email protected]"; | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| public class Template { | ||
| public class TemplateExample { | ||
|
|
||
| private static final String TOKEN = "<YOUR MAILTRAP TOKEN>"; | ||
| private static final String SENDER_EMAIL = "[email protected]"; | ||
|
|
||
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.