Class BillingProcessingRequest
java.lang.Object
com.broadleafcommerce.billing.job.domain.BillingProcessingRequest
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,com.broadleafcommerce.money.CurrencyConsumer,javax.money.CurrencySupplier
public class BillingProcessingRequest
extends Object
implements com.broadleafcommerce.data.tracking.core.ContextStateAware, javax.money.CurrencySupplier, com.broadleafcommerce.money.CurrencyConsumer
This is the main DTO used throughout the Billing Job to transfer information about payment
methods, transactions, their results, and more.
-
Constructor Summary
ConstructorsConstructorDescriptionBillingProcessingRequest(String id, String billingJobId, BillingProcessingTransactionTypeEnum transactionType, String paymentOrRefundId, BillingRetrySchedule retrySchedule, List<PaymentAccountProcessingRequest> accounts, Integer currentAccountIndex, BillingProcessingStatusEnum status, BillingProcessingResultEnum result, String userRef, BigDecimal amount, String currencyCode, BillingEvent billingEvent) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe list of payment account to process the transaction againstAmount to be Processed or Refunded for this RequestThe billing event for this billing processing request.The identifier of the billing job that created this processing requestcom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.javax.money.CurrencyUnitThe currency (“USD”, “CAD”, etc.) correlated to charges on this BillingEventDeprecated.The index of the payment account being processedThe number of the current billing attempt.getId()The billing processing request identifierDerive the initializing status for the BillingProcessingRequestReference to the payment or refund object that this request intends to process.List of operations that have already processed this specific request.Result of the billing processing requestThe billing retry scheduleStatus of the billing processing requestjavax.money.MonetaryAmountjavax.money.MonetaryAmountjavax.money.MonetaryAmountIf this is a refund, the identifier of payment transaction detail to refund.Transaction type of the billing requestIdentifier of the user billed for this event.inthashCode()voidsetAccounts(List<PaymentAccountProcessingRequest> accounts) The list of payment account to process the transaction againstvoidsetAmount(BigDecimal amount) Amount to be Processed or Refunded for this RequestvoidsetBillingEvent(BillingEvent billingEvent) The billing event for this billing processing request.voidsetBillingJobId(String billingJobId) The identifier of the billing job that created this processing requestvoidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetCurrency(javax.money.CurrencyUnit currency) voidsetCurrencyCode(String currencyCode) voidsetCurrentAccountIndex(Integer currentAccountIndex) The index of the payment account being processedvoidsetCurrentBillingAttemptNumber(Integer currentBillingAttemptNumber) The number of the current billing attempt.voidThe billing processing request identifiervoidsetInitializationResult(BillingProcessingInitializationResultEnum initializationResult) Derive the initializing status for the BillingProcessingRequestvoidsetPaymentOrRefundId(String paymentOrRefundId) Reference to the payment or refund object that this request intends to process.voidsetProcessedOperationIds(List<String> processedOperationIds) List of operations that have already processed this specific request.voidsetResult(BillingProcessingResultEnum result) Result of the billing processing requestvoidsetRetrySchedule(BillingRetrySchedule retrySchedule) The billing retry schedulevoidsetStatus(BillingProcessingStatusEnum status) Status of the billing processing requestvoidsetTaxProcessingResult(TaxProcessingResult taxProcessingResult) voidsetTransactionIdToRefund(String transactionIdToRefund) If this is a refund, the identifier of payment transaction detail to refund.voidsetTransactionType(BillingProcessingTransactionTypeEnum transactionType) Transaction type of the billing requestvoidsetUserRef(String userRef) Identifier of the user billed for this event.voidsetVersion(Integer version) toString()
-
Constructor Details
-
BillingProcessingRequest
public BillingProcessingRequest(String id, String billingJobId, BillingProcessingTransactionTypeEnum transactionType, String paymentOrRefundId, BillingRetrySchedule retrySchedule, List<PaymentAccountProcessingRequest> accounts, Integer currentAccountIndex, BillingProcessingStatusEnum status, BillingProcessingResultEnum result, String userRef, BigDecimal amount, String currencyCode, BillingEvent billingEvent) -
BillingProcessingRequest
public BillingProcessingRequest()
-
-
Method Details
-
currentAccountProcessingRequest
-
currentAccount
-
setCurrencyCode
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) - Specified by:
setCurrencyin interfacecom.broadleafcommerce.money.CurrencyConsumer
-
getPaymentTokenGateway
-
getPaymentAccountId
-
getTransactionAmount
public javax.money.MonetaryAmount getTransactionAmount() -
getSubtotal
public javax.money.MonetaryAmount getSubtotal() -
getTaxTotal
public javax.money.MonetaryAmount getTaxTotal() -
getId
The billing processing request identifier -
getBillingJobId
The identifier of the billing job that created this processing request -
getTransactionType
Transaction type of the billing request -
getPaymentOrRefundId
Reference to the payment or refund object that this request intends to process.If
transactionTypeisBillingProcessingTransactionTypeEnum.CHARGE, reference to the event payment being processed. If transactionType isBillingProcessingTransactionTypeEnum.REFUND, reference to the refund event detail being processed. -
getRetrySchedule
The billing retry schedule -
getAccounts
The list of payment account to process the transaction against -
getCurrentAccountIndex
The index of the payment account being processed -
getStatus
Status of the billing processing request -
getResult
Result of the billing processing request -
getUserRef
Identifier of the user billed for this event. -
getAmount
Amount to be Processed or Refunded for this Request -
getCurrencyCode
Deprecated.usegetCurrency()field insteadThe currency (“USD”, “CAD”, etc.) correlated to charges on this BillingEvent -
getCurrency
public javax.money.CurrencyUnit getCurrency()The currency (“USD”, “CAD”, etc.) correlated to charges on this BillingEvent- Specified by:
getCurrencyin interfacejavax.money.CurrencySupplier
-
getBillingEvent
The billing event for this billing processing request. -
getTransactionIdToRefund
If this is a refund, the identifier of payment transaction detail to refund. -
getCurrentBillingAttemptNumber
The number of the current billing attempt. First one is: 1. Second one is: 2 and so on. -
getInitializationResult
Derive the initializing status for the BillingProcessingRequest -
getProcessedOperationIds
List of operations that have already processed this specific request. All handlers whose messages extend `AbstractBillingOperation` add their id to this list. -
getVersion
-
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
-
getTaxProcessingResult
-
setId
The billing processing request identifier -
setBillingJobId
The identifier of the billing job that created this processing request -
setTransactionType
Transaction type of the billing request -
setPaymentOrRefundId
Reference to the payment or refund object that this request intends to process.If
transactionTypeisBillingProcessingTransactionTypeEnum.CHARGE, reference to the event payment being processed. If transactionType isBillingProcessingTransactionTypeEnum.REFUND, reference to the refund event detail being processed. -
setRetrySchedule
The billing retry schedule -
setAccounts
The list of payment account to process the transaction against -
setCurrentAccountIndex
The index of the payment account being processed -
setStatus
Status of the billing processing request -
setResult
Result of the billing processing request -
setUserRef
Identifier of the user billed for this event. -
setAmount
Amount to be Processed or Refunded for this Request -
setBillingEvent
The billing event for this billing processing request. -
setTransactionIdToRefund
If this is a refund, the identifier of payment transaction detail to refund. -
setCurrentBillingAttemptNumber
The number of the current billing attempt. First one is: 1. Second one is: 2 and so on. -
setInitializationResult
Derive the initializing status for the BillingProcessingRequest -
setProcessedOperationIds
List of operations that have already processed this specific request. All handlers whose messages extend `AbstractBillingOperation` add their id to this list. -
setVersion
-
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
-
setTaxProcessingResult
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getCurrency()field instead