Class Payment
- java.lang.Object
-
- com.broadleafcommerce.customer.service.provider.domain.Payment
-
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,Serializable
public class Payment extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
This entity is designed to store payment methods associated to a Cart.
- Author:
- Chad Harchar (charchar), Chris Kittrell (ckittrell)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Payment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)Map<String,Address>getAddressByType()The collection of related addresses that may include billing or shipping addressesMap<String,String>getAttributes()General use map to capture any additional attributes needed for this PaymentAddressgetBillingAddress()Gathers one of the payment's relatedaddressesby typecom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStategetContextState()A subset ofTrackinginformation to expose the context state for this object.CustomerRefgetCustomerRef()A reference to the customer that owns this payment.Map<String,String>getDisplayAttributes()General use map to capture any display properties for this PaymentStringgetGatewayType()The gateway used to process this payment.StringgetId()The id of this payment.StringgetName()The name of this payment.StringgetOwnerId()The id of the entity that owns this payment.StringgetOwnerType()Describes the owner of the payment.Map<String,String>getPaymentMethodProperties()Map to capture any information about the payment method needed to perform gateway transactionsbooleangetShouldSavePaymentToCustomer()Should the payment method be saved to the customerList<PaymentTransaction>getTransactions()Transaction data representing each payment gateway interaction related to this payment.StringgetType()The type of this payment like Credit Card or Gift Card.inthashCode()voidsetAddressByType(Map<String,Address> addressByType)The collection of related addresses that may include billing or shipping addressesvoidsetAttributes(Map<String,String> attributes)General use map to capture any additional attributes needed for this PaymentvoidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)A subset ofTrackinginformation to expose the context state for this object.voidsetCustomerRef(CustomerRef customerRef)A reference to the customer that owns this payment.voidsetDisplayAttributes(Map<String,String> displayAttributes)General use map to capture any display properties for this PaymentvoidsetGatewayType(String gatewayType)The gateway used to process this payment.voidsetId(String id)The id of this payment.voidsetName(String name)The name of this payment.voidsetOwnerId(String ownerId)The id of the entity that owns this payment.voidsetOwnerType(String ownerType)Describes the owner of the payment.voidsetPaymentMethodProperties(Map<String,String> paymentMethodProperties)Map to capture any information about the payment method needed to perform gateway transactionsvoidsetShouldSavePaymentToCustomer(boolean shouldSavePaymentToCustomer)Should the payment method be saved to the customervoidsetTransactions(List<PaymentTransaction> transactions)Transaction data representing each payment gateway interaction related to this payment.voidsetType(String type)The type of this payment like Credit Card or Gift Card.StringtoString()
-
-
-
Method Detail
-
getBillingAddress
@Nullable public Address getBillingAddress()
Gathers one of the payment's relatedaddressesby type- Returns:
- The payment's related address identified by type
-
getShouldSavePaymentToCustomer
public boolean getShouldSavePaymentToCustomer()
Should the payment method be saved to the customer- Returns:
- Should the payment method be saved to the customer
-
getId
public String getId()
The id of this payment.- Returns:
- The id of this payment.
-
getName
public String getName()
The name of this payment. This name is typically something like "Visa ending in 1234".- Returns:
- The name of this payment.
-
getOwnerType
public String getOwnerType()
Describes the owner of the payment. For example, the payment could have originated with a cart or a subscription, therefore this value might be CART or SUBSCRIPTION.- Returns:
- The type describing the owner of the payment
-
getOwnerId
public String getOwnerId()
The id of the entity that owns this payment. For example, this may be a cart id, or a subscription billing cycle id.- Returns:
- The id of the entity that owns this payment.
-
getCustomerRef
public CustomerRef getCustomerRef()
A reference to the customer that owns this payment.- Returns:
- A reference to the customer that owns this payment.
-
getType
public String getType()
The type of this payment like Credit Card or Gift Card.- Returns:
- The type of this payment like Credit Card or Gift Card.
-
getGatewayType
public String getGatewayType()
The gateway used to process this payment. Only a SINGLE payment gateway can modify transactions on a particular payment.- Returns:
- The gateway used to process this payment.
-
getAddressByType
public Map<String,Address> getAddressByType()
The collection of related addresses that may include billing or shipping addresses- Returns:
- The collection of related addresses
-
getPaymentMethodProperties
public Map<String,String> 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
public Map<String,String> getAttributes()
General use map to capture any additional attributes needed for this Payment- Returns:
- General use map to capture any additional attributes needed for this Payment
-
getDisplayAttributes
public Map<String,String> getDisplayAttributes()
General use map to capture any display properties for this Payment- Returns:
- General use map to capture any display properties for this Payment
-
getTransactions
public List<PaymentTransaction> getTransactions()
Transaction data representing each payment gateway interaction related to this payment.- Returns:
- Transactions related to this payment.
-
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
-
setId
public void setId(String id)
The id of this payment.- Parameters:
id- The id of this payment.
-
setName
public void setName(String name)
The name of this payment. This name is typically something like "Visa ending in 1234".- Parameters:
name- The name of this payment.
-
setOwnerType
public void setOwnerType(String ownerType)
Describes the owner of the payment. For example, the payment could have originated with a cart or a subscription, therefore this value might be CART or SUBSCRIPTION.- Parameters:
ownerType- The type describing the owner of the payment
-
setOwnerId
public void setOwnerId(String ownerId)
The id of the entity that owns this payment. For example, this may be a cart id, or a subscription billing cycle id.- Parameters:
ownerId- The id of the entity that owns this payment.
-
setCustomerRef
public void setCustomerRef(CustomerRef customerRef)
A reference to the customer that owns this payment.- Parameters:
customerRef- A reference to the customer that owns this payment.
-
setType
public void setType(String type)
The type of this payment like Credit Card or Gift Card.- Parameters:
type- The type of this payment like Credit Card or Gift Card.
-
setGatewayType
public void setGatewayType(String gatewayType)
The gateway used to process this payment. Only a SINGLE payment gateway can modify transactions on a particular payment.- Parameters:
gatewayType- The gateway used to process this payment.
-
setAddressByType
public void setAddressByType(Map<String,Address> addressByType)
The collection of related addresses that may include billing or shipping addresses- Parameters:
addressByType- The collection of related addresses
-
setPaymentMethodProperties
public void setPaymentMethodProperties(Map<String,String> paymentMethodProperties)
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
public void setAttributes(Map<String,String> attributes)
General use map to capture any additional attributes needed for this Payment- Parameters:
attributes- General use map to capture any additional attributes needed for this Payment
-
setDisplayAttributes
public void setDisplayAttributes(Map<String,String> displayAttributes)
General use map to capture any display properties for this Payment- Parameters:
displayAttributes- General use map to capture any display properties for this Payment
-
setShouldSavePaymentToCustomer
public void setShouldSavePaymentToCustomer(boolean shouldSavePaymentToCustomer)
Should the payment method be saved to the customer- Parameters:
shouldSavePaymentToCustomer- Should the payment method be saved to the customer
-
setTransactions
public void setTransactions(List<PaymentTransaction> transactions)
Transaction data representing each payment gateway interaction related to this payment.- Parameters:
transactions- Transactions related to this payment.
-
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
-
canEqual
protected boolean canEqual(Object other)
-
-