-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom Transport Configuration support (#373)
* Custom Transport Configuration support --------- Co-authored-by: Darren Labey <[email protected]> Co-authored-by: Armando Rodríguez <[email protected]>
- Loading branch information
1 parent
7d1170d
commit 8f6ea46
Showing
13 changed files
with
134 additions
and
69 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
16 changes: 16 additions & 0 deletions
16
src/main/java/com/checkout/CustomTransportConfiguration.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.checkout; | ||
|
||
import lombok.Builder; | ||
import lombok.Setter; | ||
|
||
@Builder | ||
public class CustomTransportConfiguration implements TransportConfiguration { | ||
|
||
@Setter | ||
private int defaultHttpStatusCode; | ||
|
||
@Override | ||
public int getDefaultHttpStatusCode() { | ||
return defaultHttpStatusCode; | ||
} | ||
} |
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
17 changes: 17 additions & 0 deletions
17
src/main/java/com/checkout/DefaultTransportConfiguration.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,17 @@ | ||
package com.checkout; | ||
|
||
import org.apache.http.HttpStatus; | ||
|
||
public class DefaultTransportConfiguration implements TransportConfiguration { | ||
|
||
private final int defaultHttpStatusCode; | ||
|
||
public DefaultTransportConfiguration() { | ||
this.defaultHttpStatusCode = HttpStatus.SC_BAD_REQUEST; | ||
} | ||
|
||
@Override | ||
public int getDefaultHttpStatusCode() { | ||
return defaultHttpStatusCode; | ||
} | ||
} |
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,6 @@ | ||
package com.checkout; | ||
|
||
public interface TransportConfiguration { | ||
|
||
int getDefaultHttpStatusCode(); | ||
} |
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
Oops, something went wrong.