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
ConstructorDescriptionExternalCreditAccountTransactionExecutionProvider
(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.UriComponentsBuilder
Gets the base URI common to all requests this provider will make.protected ExternalCreditAccountProperties
protected String
org.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:CreditAccountTransactionExecutionProvider
Reads the credit account for the specified customer id and account number.- Specified by:
readCustomerStoreCreditAccount
in 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:CreditAccountTransactionExecutionProvider
Reads the credit account for the specified customer id and account numbers.- Specified by:
readCustomerStoreCreditAccounts
in 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:CreditAccountTransactionExecutionProvider
Reads the credit account for the specified account numbers.- Specified by:
readCreditAccounts
in 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
-