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 for
CreditAccountTransactionExecutionProvider.- Author:
- Dima Myroniuk (dmyroniuk)
-
Field Summary
Fields inherited from class com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProvider
ENTITY_NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionExternalCreditAccountTransactionExecutionProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCreditAccountProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.web.util.UriComponentsBuilderGets the base URI common to all requests this provider will make.protected ExternalCreditAccountPropertiesprotected Stringorg.springframework.data.domain.Page<CreditAccount>readCreditAccounts(List<String> creditAccountNumbers, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the credit account for the specified account numbers.readCustomerStoreCreditAccount(@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 Details
-
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 Details
-
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
-
readCreditAccounts
public org.springframework.data.domain.Page<CreditAccount> readCreditAccounts(List<String> creditAccountNumbers, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CreditAccountTransactionExecutionProviderReads the credit account for the specified account numbers.- Specified by:
readCreditAccountsin interfaceCreditAccountTransactionExecutionProvider- Parameters:
creditAccountNumbers- 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
-
getProperties
-