Class ExternalCreditAccountTransactionExecutionProvider
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProvider
-
- com.broadleafcommerce.cartoperation.service.provider.external.payments.ExternalCreditAccountTransactionExecutionProvider
-
- All Implemented Interfaces:
CreditAccountTransactionExecutionProvider
public class ExternalCreditAccountTransactionExecutionProvider extends AbstractExternalProvider implements CreditAccountTransactionExecutionProvider
The default implementation forCreditAccountTransactionExecutionProvider.- Author:
- Dima Myroniuk (dmyroniuk)
-
-
Field Summary
-
Fields inherited from class com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProvider
ENTITY_NOT_FOUND
-
-
Constructor Summary
Constructors Constructor Description ExternalCreditAccountTransactionExecutionProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCreditAccountProperties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.web.util.UriComponentsBuildergetBaseUri()Gets the base URI common to all requests this provider will make.protected ExternalCreditAccountPropertiesgetProperties()protected StringgetServiceClient()CreditAccountreadCustomerStoreCreditAccount(@NonNull String customerId, @NonNull String creditAccountNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Reads the credit account for the specified customer id and account number.org.springframework.data.domain.Page<CreditAccount>readCustomerStoreCreditAccounts(String customerId, List<String> creditAccountNumbers, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Reads the credit account for the specified customer id and account numbers.-
Methods inherited from class com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProvider
buildNotFoundException, executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, isEntityNotFound, pageableToParams, uriVars
-
-
-
-
Constructor Detail
-
ExternalCreditAccountTransactionExecutionProvider
public ExternalCreditAccountTransactionExecutionProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCreditAccountProperties properties)
-
-
Method Detail
-
readCustomerStoreCreditAccount
public CreditAccount readCustomerStoreCreditAccount(@NonNull @NonNull String customerId, @NonNull @NonNull String creditAccountNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:CreditAccountTransactionExecutionProviderReads the credit account for the specified customer id and account number.- Specified by:
readCustomerStoreCreditAccountin interfaceCreditAccountTransactionExecutionProvider- Parameters:
customerId- the customer idcreditAccountNumber- the credit account numbercontextInfo- Context information around sandbox and multitenant state.- Returns:
- the credit account number
-
readCustomerStoreCreditAccounts
public org.springframework.data.domain.Page<CreditAccount> readCustomerStoreCreditAccounts(String customerId, List<String> creditAccountNumbers, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:CreditAccountTransactionExecutionProviderReads the credit account for the specified customer id and account numbers.- Specified by:
readCustomerStoreCreditAccountsin interfaceCreditAccountTransactionExecutionProvider- Parameters:
customerId- the customer idcreditAccountNumbers- the credit account numberscontextInfo- Context information around sandbox and multitenant state.- Returns:
- the credit accounts
-
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
protected String getServiceClient()
-
getProperties
protected ExternalCreditAccountProperties getProperties()
-
-