Interface CustomerPaymentAccountProvider<P extends PaymentAccount>
- All Known Implementing Classes:
ExternalCustomerPaymentAccountProvider
@Deprecated(since="1.0.2",
forRemoval=true)
public interface CustomerPaymentAccountProvider<P extends PaymentAccount>
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.
Provider to gather
PaymentAccounts
.
This provider is only registered if
DefaultSavedPaymentMethodStorageLocations.BLC_CUSTOMER_SERVICES
is configured to be
SavedPaymentMethodConfigurationProperties.getStorageLocation()
.
- Author:
- Chris Kittrell (ckittrell)
-
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.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
.
-
Method Details
-
readById
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.Read aPaymentAccount
by id.- 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
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.Creates aPaymentAccount
for a customer.- 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
PaymentAccountSummary updatePaymentAccountLastTransactionData(@NonNull @NonNull String paymentAccountId, @NonNull @NonNull Instant lastTransactionDateTime, @Nullable String lastTransactionResultCode, @Nullable 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
.- 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
-