Class ExternalStoreCreditAccountProvider
java.lang.Object
com.broadleafcommerce.payment.service.gateway.provider.external.AbstractExternalProvider
com.broadleafcommerce.payment.service.gateway.provider.external.ExternalStoreCreditAccountProvider
- All Implemented Interfaces:
StoreCreditAccountProvider
public class ExternalStoreCreditAccountProvider
extends AbstractExternalProvider
implements StoreCreditAccountProvider
The default implementation for
StoreCreditTransactionExecutionProvider
.- Author:
- Dima Myroniuk (dmyroniuk)
-
Constructor Summary
ConstructorsConstructorDescriptionExternalStoreCreditAccountProvider
(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ExternalStoreCreditProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.web.util.UriComponentsBuilder
Gets the base URI common to all requests this provider will make.protected ExternalStoreCreditProperties
protected String
retrieveStoreCreditAccount
(@NonNull String accountNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the store credit account by idMethods inherited from class com.broadleafcommerce.payment.service.gateway.provider.external.AbstractExternalProvider
executeRequest, getHeaders, getObjectMapper, getWebClient, uriVars
-
Constructor Details
-
ExternalStoreCreditAccountProvider
public ExternalStoreCreditAccountProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ExternalStoreCreditProperties properties)
-
-
Method Details
-
retrieveStoreCreditAccount
public Optional<CreditAccount> retrieveStoreCreditAccount(@NonNull @NonNull String accountNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:StoreCreditAccountProvider
Reads the store credit account by id- Specified by:
retrieveStoreCreditAccount
in interfaceStoreCreditAccountProvider
- Parameters:
accountNumber
- the credit account numbercontextInfo
- context information related to multitenancy- Returns:
- the store credit account
-
getBaseUri
protected org.springframework.web.util.UriComponentsBuilder getBaseUri()Gets the base URI common to all requests this provider will make.- Returns:
- a URI components builder with the base URI set up
-
getServiceClient
-
getProperties
-