-
Notifications
You must be signed in to change notification settings - Fork 0
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 #41 from companieshouse/lp-218-api-transaction-int…
…erceptor LP-218 API transaction interceptor to get transaction
- Loading branch information
Showing
8 changed files
with
79 additions
and
9 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
34 changes: 34 additions & 0 deletions
34
src/main/java/uk/gov/companieshouse/limitedpartnershipsapi/client/ApiClientServiceImpl.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,34 @@ | ||
package uk.gov.companieshouse.limitedpartnershipsapi.client; | ||
|
||
import org.springframework.stereotype.Component; | ||
import uk.gov.companieshouse.api.ApiClient; | ||
import uk.gov.companieshouse.api.InternalApiClient; | ||
import uk.gov.companieshouse.api.sdk.ApiClientService; | ||
import uk.gov.companieshouse.sdk.manager.ApiSdkManager; | ||
|
||
import java.io.IOException; | ||
|
||
@Component | ||
public class ApiClientServiceImpl implements ApiClientService { | ||
|
||
|
||
@Override | ||
public ApiClient getApiClient() { | ||
return ApiSdkManager.getSDK(); | ||
} | ||
|
||
@Override | ||
public ApiClient getApiClient(String ericPassThroughHeader) throws IOException { | ||
return ApiSdkManager.getSDK(ericPassThroughHeader); | ||
} | ||
|
||
@Override | ||
public InternalApiClient getInternalApiClient() { | ||
return ApiSdkManager.getPrivateSDK(); | ||
} | ||
|
||
@Override | ||
public InternalApiClient getInternalApiClient(String passthroughHeader) throws IOException { | ||
return ApiSdkManager.getPrivateSDK(passthroughHeader); | ||
} | ||
} |
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