Class SavedPaymentMethod
java.lang.Object
com.broadleafcommerce.paymenttransaction.domain.SavedPaymentMethod
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,com.broadleafcommerce.data.tracking.core.policy.Owned,Serializable
public class SavedPaymentMethod
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware, com.broadleafcommerce.data.tracking.core.policy.Owned
This entity is designed to store customer's, account's, or other entity's saved payment methods
for future use.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanGeneral use map to capture any additional attributes needed for this saved payment method.The billing address of this saved payment method.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.General use map to capture any display properties for this saved payment method.The gateway used to process this saved payment method.getId()The id of this saved payment method.The timestamp of the last transaction made by this saved payment method.The result code returned from the gateway on the last transaction.getName()The name of this saved payment method.ThePayment.getId()that this saved payment was created from.The id of the entity that owns this saved payment method.Describes the owning user of the saved payment method.Map to capture any information about the payment method needed to perform gateway transactions.getType()The type of this saved payment method like Credit Card or Gift Card.The version of this saved payment.The visibility of the payment method to child accounts.inthashCode()booleanWhether this saved payment is the default payment method for the owner entity.voidsetAttributes(Map<String, String> attributes) General use map to capture any additional attributes needed for this saved payment method.voidsetBillingAddress(Address billingAddress) The billing address of this saved payment method.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetDefaultForOwner(boolean defaultForOwner) Whether this saved payment is the default payment method for the owner entity.voidsetDisplayAttributes(Map<String, String> displayAttributes) General use map to capture any display properties for this saved payment method.voidsetGatewayType(String gatewayType) The gateway used to process this saved payment method.voidThe id of this saved payment method.voidsetLastTransactionDateTime(Instant lastTransactionDateTime) The timestamp of the last transaction made by this saved payment method.voidsetLastTransactionResultCode(String lastTransactionResultCode) The result code returned from the gateway on the last transaction.voidThe name of this saved payment method.voidsetOriginatingPaymentId(String originatingPaymentId) ThePayment.getId()that this saved payment was created from.voidsetOwningUserId(String owningUserId) The id of the entity that owns this saved payment method.voidsetOwningUserType(String owningUserType) Describes the owning user of the saved payment method.voidsetPaymentMethodProperties(Map<String, String> paymentMethodProperties) Map to capture any information about the payment method needed to perform gateway transactions.voidThe type of this saved payment method like Credit Card or Gift Card.voidsetVersion(Integer version) The version of this saved payment.voidsetVisibleToChildren(String visibleToChildren) The visibility of the payment method to child accounts.toString()
-
Constructor Details
-
SavedPaymentMethod
public SavedPaymentMethod()
-
-
Method Details
-
getOwnerIdentifier
- Specified by:
getOwnerIdentifierin interfacecom.broadleafcommerce.data.tracking.core.policy.Owned
-
getId
The id of this saved payment method.- Returns:
- The id of this saved payment method.
-
getName
The name of this saved payment method. This name is typically something like "Visa ending in 1234".- Returns:
- The name of this saved payment method.
-
isDefaultForOwner
public boolean isDefaultForOwner()Whether this saved payment is the default payment method for the owner entity.- Returns:
- True if this saved payment is the default payment method for the owner, otherwise false.
-
getOriginatingPaymentId
ThePayment.getId()that this saved payment was created from. This is typically populated when a multi-use payment token is produced by executing a transaction against a single-use token via a checkout interaction.- Returns:
- The
Payment.getId()that this saved payment was created from
-
getOwningUserType
Describes the owning user of the saved payment method. For example, the saved payment could belong to a Broadleaf customer or an account, therefore this value might be BLC_CUSTOMER, or BLC_ACCOUNT.- Returns:
- The type describing the owning user of the saved payment method
-
getOwningUserId
The id of the entity that owns this saved payment method. For example, this may be a customer id, or an account id.- Returns:
- The id of the entity that owns this saved payment method.
-
getType
The type of this saved payment method like Credit Card or Gift Card.- Returns:
- The type of this saved payment method like Credit Card or Gift Card.
-
getGatewayType
The gateway used to process this saved payment method. Only a SINGLE payment gateway can be used for a payment.- Returns:
- The gateway used to process this saved payment method.
-
getPaymentMethodProperties
Map to capture any information about the payment method needed to perform gateway transactions.- Returns:
- Map to capture any information about the payment method needed to perform gateway transactions
-
getAttributes
General use map to capture any additional attributes needed for this saved payment method.- Returns:
- General use map to capture any additional attributes needed for this saved payment method
-
getDisplayAttributes
General use map to capture any display properties for this saved payment method.- Returns:
- General use map to capture any display properties for this saved payment method
-
getLastTransactionDateTime
The timestamp of the last transaction made by this saved payment method.- Returns:
- the last transaction date and time of the saved payment method
-
getLastTransactionResultCode
The result code returned from the gateway on the last transaction.- Returns:
- the result code from the last transaction for this saved payment method
-
getBillingAddress
The billing address of this saved payment method.- Returns:
- the billing address of this saved payment method
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
getVersion
The version of this saved payment. Used for checking that the requested version of the saved payment is up-to-date before saving changes. Required for any request which results in an update being made to the saved payment. This should never be manually incremented/decremented. -
getVisibleToChildren
The visibility of the payment method to child accounts.This is typically for B2B use cases where the
getOwningUserType()isDefaultSavedPaymentMethodOwningUserTypes.BLC_ACCOUNT. Should beDefaultChildrenVisibilityType.NOfor typical B2C use cases.- Returns:
- The visibility of the payment method to child accounts
- See Also:
-
setId
The id of this saved payment method.- Parameters:
id- The id of this saved payment method.
-
setName
The name of this saved payment method. This name is typically something like "Visa ending in 1234".- Parameters:
name- The name of this saved payment method.
-
setDefaultForOwner
public void setDefaultForOwner(boolean defaultForOwner) Whether this saved payment is the default payment method for the owner entity.- Parameters:
defaultForOwner- Whether this saved payment is the default payment method for the owner entity.
-
setOriginatingPaymentId
ThePayment.getId()that this saved payment was created from. This is typically populated when a multi-use payment token is produced by executing a transaction against a single-use token via a checkout interaction.- Parameters:
originatingPaymentId- ThePayment.getId()that this saved payment was created from
-
setOwningUserType
Describes the owning user of the saved payment method. For example, the saved payment could belong to a Broadleaf customer or an account, therefore this value might be BLC_CUSTOMER, or BLC_ACCOUNT.- Parameters:
owningUserType- The type describing the owning user of the saved payment method
-
setOwningUserId
The id of the entity that owns this saved payment method. For example, this may be a customer id, or an account id.- Parameters:
owningUserId- The id of the entity that owns this saved payment method.
-
setType
The type of this saved payment method like Credit Card or Gift Card.- Parameters:
type- The type of this saved payment method like Credit Card or Gift Card.
-
setGatewayType
The gateway used to process this saved payment method. Only a SINGLE payment gateway can be used for a payment.- Parameters:
gatewayType- The gateway used to process this saved payment method.
-
setPaymentMethodProperties
Map to capture any information about the payment method needed to perform gateway transactions.- Parameters:
paymentMethodProperties- Map to capture any information about the payment method needed to perform gateway transactions
-
setAttributes
General use map to capture any additional attributes needed for this saved payment method.- Parameters:
attributes- General use map to capture any additional attributes needed for this payment method
-
setDisplayAttributes
General use map to capture any display properties for this saved payment method.- Parameters:
displayAttributes- General use map to capture any display properties for this payment method
-
setLastTransactionDateTime
The timestamp of the last transaction made by this saved payment method.- Parameters:
lastTransactionDateTime- the last transaction date and time of the saved payment method
-
setLastTransactionResultCode
The result code returned from the gateway on the last transaction.- Parameters:
lastTransactionResultCode- the result code from the last transaction for this saved payment method
-
setBillingAddress
The billing address of this saved payment method.- Parameters:
billingAddress- the billing address of this saved payment method
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
setVersion
The version of this saved payment. Used for checking that the requested version of the saved payment is up-to-date before saving changes. Required for any request which results in an update being made to the saved payment. This should never be manually incremented/decremented. -
setVisibleToChildren
The visibility of the payment method to child accounts.This is typically for B2B use cases where the
getOwningUserType()isDefaultSavedPaymentMethodOwningUserTypes.BLC_ACCOUNT. Should beDefaultChildrenVisibilityType.NOfor typical B2C use cases.- Parameters:
visibleToChildren- The visibility of the payment method to child accounts- See Also:
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-