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
ConstructorDescriptionExternalCustomerPaymentAccountProvider
(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 aPaymentAccount
for a customer.protected org.springframework.web.util.UriComponentsBuilder
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.protected ExternalCustomerProperties
Deprecated, for removal: This API element is subject to removal in a future version.protected String
Deprecated, 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 aPaymentAccount
by 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:CustomerPaymentAccountProvider
Read aPaymentAccount
by id.- Specified by:
readById
in interfaceCustomerPaymentAccountProvider<P extends PaymentAccount>
- Parameters:
paymentAccountId
- the ID of paymentAccount to be gatheredcontextInfo
- Context information around the multitenant state- Returns:
- An
Optional
including aPaymentAccount
if 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:CustomerPaymentAccountProvider
Creates aPaymentAccount
for a customer.- Specified by:
createPaymentAccount
in interfaceCustomerPaymentAccountProvider<P extends PaymentAccount>
- Parameters:
paymentAccount
- thePaymentAccount
to createcustomerId
- the id of the customer that thisPaymentAccount
is forcontextInfo
- Context information around the multitenant state- Returns:
- A
PaymentAccountSummary
containing 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:CustomerPaymentAccountProvider
Updates the last transaction data for aPaymentAccount
.- Specified by:
updatePaymentAccountLastTransactionData
in 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
PaymentAccountSummary
containing 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.
-