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 Details

  • Method Details

    • currentAccountProcessingRequest

      public PaymentAccountProcessingRequest currentAccountProcessingRequest()
    • currentAccount

      public PaymentAccount currentAccount()
    • setCurrencyCode

      public void setCurrencyCode(String currencyCode)
    • setCurrency

      public void setCurrency(javax.money.CurrencyUnit currency)
      Specified by:
      setCurrency in interface com.broadleafcommerce.money.CurrencyConsumer
    • getPaymentTokenGateway

      @Nullable public String getPaymentTokenGateway()
    • getPaymentAccountId

      @Nullable public String getPaymentAccountId()
    • getTransactionAmount

      public javax.money.MonetaryAmount getTransactionAmount()
    • getSubtotal

      public javax.money.MonetaryAmount getSubtotal()
    • getTaxTotal

      public javax.money.MonetaryAmount getTaxTotal()
    • getId

      public String getId()
      The billing processing request identifier
    • getBillingJobId

      public String getBillingJobId()
      The identifier of the billing job that created this processing request
    • getTransactionType

      public BillingProcessingTransactionTypeEnum getTransactionType()
      Transaction type of the billing request
    • getPaymentOrRefundId

      public String getPaymentOrRefundId()
      Reference to the payment or refund object that this request intends to process.

      If transactionType is BillingProcessingTransactionTypeEnum.CHARGE, reference to the event payment being processed. If transactionType is BillingProcessingTransactionTypeEnum.REFUND, reference to the refund event detail being processed.

    • getRetrySchedule

      public BillingRetrySchedule getRetrySchedule()
      The billing retry schedule
    • getAccounts

      public List<PaymentAccountProcessingRequest> getAccounts()
      The list of payment account to process the transaction against
    • getCurrentAccountIndex

      public Integer getCurrentAccountIndex()
      The index of the payment account being processed
    • getStatus

      public BillingProcessingStatusEnum getStatus()
      Status of the billing processing request
    • getResult

      public BillingProcessingResultEnum getResult()
      Result of the billing processing request
    • getUserRef

      public String getUserRef()
      Identifier of the user billed for this event.
    • getAmount

      public BigDecimal getAmount()
      Amount to be Processed or Refunded for this Request
    • getCurrencyCode

      @Deprecated public String getCurrencyCode()
      Deprecated.
      use getCurrency() field instead
      The 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:
      getCurrency in interface javax.money.CurrencySupplier
    • getBillingEvent

      public BillingEvent getBillingEvent()
      The billing event for this billing processing request.
    • getTransactionIdToRefund

      public String getTransactionIdToRefund()
      If this is a refund, the identifier of payment transaction detail to refund.
    • getCurrentBillingAttemptNumber

      public Integer getCurrentBillingAttemptNumber()
      The number of the current billing attempt. First one is: 1. Second one is: 2 and so on.
    • getInitializationResult

      public BillingProcessingInitializationResultEnum getInitializationResult()
      Derive the initializing status for the BillingProcessingRequest
    • getProcessedOperationIds

      public List<String> getProcessedOperationIds()
      List of operations that have already processed this specific request. All handlers whose messages extend `AbstractBillingOperation` add their id to this list.
    • getVersion

      public Integer getVersion()
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • getTaxProcessingResult

      public TaxProcessingResult getTaxProcessingResult()
    • setId

      public void setId(String id)
      The billing processing request identifier
    • setBillingJobId

      public void setBillingJobId(String billingJobId)
      The identifier of the billing job that created this processing request
    • setTransactionType

      public void setTransactionType(BillingProcessingTransactionTypeEnum transactionType)
      Transaction type of the billing request
    • setPaymentOrRefundId

      public void setPaymentOrRefundId(String paymentOrRefundId)
      Reference to the payment or refund object that this request intends to process.

      If transactionType is BillingProcessingTransactionTypeEnum.CHARGE, reference to the event payment being processed. If transactionType is BillingProcessingTransactionTypeEnum.REFUND, reference to the refund event detail being processed.

    • setRetrySchedule

      public void setRetrySchedule(BillingRetrySchedule retrySchedule)
      The billing retry schedule
    • setAccounts

      public void setAccounts(List<PaymentAccountProcessingRequest> accounts)
      The list of payment account to process the transaction against
    • setCurrentAccountIndex

      public void setCurrentAccountIndex(Integer currentAccountIndex)
      The index of the payment account being processed
    • setStatus

      public void setStatus(BillingProcessingStatusEnum status)
      Status of the billing processing request
    • setResult

      public void setResult(BillingProcessingResultEnum result)
      Result of the billing processing request
    • setUserRef

      public void setUserRef(String userRef)
      Identifier of the user billed for this event.
    • setAmount

      public void setAmount(BigDecimal amount)
      Amount to be Processed or Refunded for this Request
    • setBillingEvent

      public void setBillingEvent(BillingEvent billingEvent)
      The billing event for this billing processing request.
    • setTransactionIdToRefund

      public void setTransactionIdToRefund(String transactionIdToRefund)
      If this is a refund, the identifier of payment transaction detail to refund.
    • setCurrentBillingAttemptNumber

      public void setCurrentBillingAttemptNumber(Integer currentBillingAttemptNumber)
      The number of the current billing attempt. First one is: 1. Second one is: 2 and so on.
    • setInitializationResult

      public void setInitializationResult(BillingProcessingInitializationResultEnum initializationResult)
      Derive the initializing status for the BillingProcessingRequest
    • setProcessedOperationIds

      public void setProcessedOperationIds(List<String> processedOperationIds)
      List of operations that have already processed this specific request. All handlers whose messages extend `AbstractBillingOperation` add their id to this list.
    • setVersion

      public void setVersion(Integer version)
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • setTaxProcessingResult

      public void setTaxProcessingResult(TaxProcessingResult taxProcessingResult)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object