Class ExternalCustomerPaymentAccountProvider<P extends PaymentAccount>
java.lang.Object
com.broadleafcommerce.paymenttransaction.service.provider.external.AbstractExternalProvider
com.broadleafcommerce.paymenttransaction.service.provider.external.ExternalCustomerPaymentAccountProvider<P>
- All Implemented Interfaces:
CustomerPaymentAccountProvider<P>
@Deprecated(since="1.0.2",
forRemoval=true)
public class ExternalCustomerPaymentAccountProvider<P extends PaymentAccount>
extends AbstractExternalProvider
implements CustomerPaymentAccountProvider<P>
Deprecated, for removal: This API element is subject to removal in a future version.
since 1.0.2, in favor of using PaymentTransactionServices to manage saved payment
methods.
External (HTTP) implementation of a payment account provider.
- Author:
- Chris Kittrell (ckittrell)
-
Field Summary
Fields inherited from class com.broadleafcommerce.paymenttransaction.service.provider.external.AbstractExternalProvider
ENTITY_NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionExternalCustomerPaymentAccountProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCustomerProperties properties) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptioncreatePaymentAccount(P paymentAccount, @NonNull String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Creates aPaymentAccountfor a customer.protected org.springframework.web.util.UriComponentsBuilderDeprecated, for removal: This API element is subject to removal in a future version.Gets the base URI common to all requests this provider will make.protected ExternalCustomerPropertiesDeprecated, for removal: This API element is subject to removal in a future version.protected StringDeprecated, for removal: This API element is subject to removal in a future version.protected org.springframework.core.ParameterizedTypeReference<P>getType()Deprecated, for removal: This API element is subject to removal in a future version.Gets the type reference for payment summary.readById(@NonNull String paymentAccountId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Read aPaymentAccountby id.updatePaymentAccountLastTransactionData(@NonNull String paymentAccountId, @NonNull Instant lastTransactionDateTime, String lastTransactionResultCode, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Updates the last transaction data for aPaymentAccount.Methods inherited from class com.broadleafcommerce.paymenttransaction.service.provider.external.AbstractExternalProvider
buildNotFoundException, executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, isEntityNotFound, pageableToParams, uriVars
-
Constructor Details
-
ExternalCustomerPaymentAccountProvider
public ExternalCustomerPaymentAccountProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCustomerProperties properties) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
readById
public Optional<P> readById(@NonNull @NonNull String paymentAccountId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:CustomerPaymentAccountProviderRead aPaymentAccountby id.- Specified by:
readByIdin interfaceCustomerPaymentAccountProvider<P extends PaymentAccount>- Parameters:
paymentAccountId- the ID of paymentAccount to be gatheredcontextInfo- Context information around the multitenant state- Returns:
- An
Optionalincluding aPaymentAccountif one could be found
-
createPaymentAccount
public PaymentAccountSummary createPaymentAccount(@NonNull P paymentAccount, @NonNull @NonNull String customerId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:CustomerPaymentAccountProviderCreates aPaymentAccountfor a customer.- Specified by:
createPaymentAccountin interfaceCustomerPaymentAccountProvider<P extends PaymentAccount>- Parameters:
paymentAccount- thePaymentAccountto createcustomerId- the id of the customer that thisPaymentAccountis forcontextInfo- Context information around the multitenant state- Returns:
- A
PaymentAccountSummarycontaining a summary of the createdPaymentAccount
-
updatePaymentAccountLastTransactionData
public PaymentAccountSummary updatePaymentAccountLastTransactionData(@NonNull @NonNull String paymentAccountId, @NonNull @NonNull Instant lastTransactionDateTime, @Nullable String lastTransactionResultCode, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:CustomerPaymentAccountProviderUpdates the last transaction data for aPaymentAccount.- Specified by:
updatePaymentAccountLastTransactionDatain interfaceCustomerPaymentAccountProvider<P extends PaymentAccount>- Parameters:
paymentAccountId- thePaymentAccount.getId()to update the transaction data forlastTransactionDateTime- thePaymentAccount.getLastTransactionDateTime()to updatelastTransactionResultCode- thePaymentAccount.getLastTransactionResultCode()to updatecontextInfo- Context information around the multitenant state- Returns:
- A
PaymentAccountSummarycontaining a summary of the updatedPaymentAccount
-
getBaseUri
protected org.springframework.web.util.UriComponentsBuilder getBaseUri()Deprecated, for removal: This API element is subject to removal in a future version.Gets the base URI common to all requests this provider will make.- Returns:
- a URI components builder with the base URI set up
-
getType
Deprecated, for removal: This API element is subject to removal in a future version.Gets the type reference for payment summary.- Returns:
- type reference for payment summary
-
getServiceClient
Deprecated, for removal: This API element is subject to removal in a future version. -
getProperties
Deprecated, for removal: This API element is subject to removal in a future version.
-