Class PaymentInfo
- Author:
- Dima Myroniuk (dmyroniuk)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
javax.money.MonetaryAmount
The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.javax.money.MonetaryAmount
The amount for which this payment is allotted.General use map to capture any additional attributes.javax.money.CurrencyUnit
The currency gathered fromgetAmount()
javax.money.MonetaryAmount
The total fees related to the transactionamount
.javax.money.MonetaryAmount
The payment's total fulfillment cost.The payment gateway used to process this payment.javax.money.MonetaryAmount
The amount of taxes that are included in the subtotal (VAT).The id of the entity that owns this payment.Describes the owner of the payment.Map to capture any information about the payment method needed to perform gateway transactionsjavax.money.MonetaryAmount
The payment's total usually excluding adjustments, tax, fees, and shipping.javax.money.MonetaryAmount
The payment's total tax cost.getType()
The type of this payment like Credit Card or Gift Card.int
hashCode()
void
setAdjustmentsTotal
(javax.money.MonetaryAmount adjustmentsTotal) The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.void
setAmount
(javax.money.MonetaryAmount amount) The amount for which this payment is allotted.void
setAttributes
(Map<String, String> attributes) General use map to capture any additional attributes.void
setCurrency
(javax.money.CurrencyUnit currency) Deprecated.No longer needed to set currency as it is derived from the amount.void
setFeesTotal
(javax.money.MonetaryAmount feesTotal) The total fees related to the transactionamount
.void
setFulfillmentTotal
(javax.money.MonetaryAmount fulfillmentTotal) The payment's total fulfillment cost.void
setGatewayType
(String gatewayType) The payment gateway used to process this payment.void
setIncludedTaxTotal
(javax.money.MonetaryAmount includedTaxTotal) The amount of taxes that are included in the subtotal (VAT).void
setOwnerId
(String ownerId) The id of the entity that owns this payment.void
setOwnerType
(String ownerType) Describes the owner of the payment.void
setPaymentMethodProperties
(Map<String, String> paymentMethodProperties) Map to capture any information about the payment method needed to perform gateway transactionsvoid
setSubtotal
(javax.money.MonetaryAmount subtotal) The payment's total usually excluding adjustments, tax, fees, and shipping.void
setTaxTotal
(javax.money.MonetaryAmount taxTotal) The payment's total tax cost.void
The type of this payment like Credit Card or Gift Card.toString()
-
Constructor Details
-
PaymentInfo
public PaymentInfo()
-
-
Method Details
-
getCurrency
@Nullable public javax.money.CurrencyUnit getCurrency()The currency gathered fromgetAmount()
- Returns:
- The currency gathered from the amount
-
setCurrency
Deprecated.No longer needed to set currency as it is derived from the amount.Declare the currency for this object. Note: this value is ignored if an amount can be obtained fromgetAmount()
.- Parameters:
currency
- The currency which should match the currency of getAmount
-
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
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.
-
getGatewayType
The payment gateway used to process this payment. -
getType
The type of this payment like Credit Card or Gift Card.- Returns:
- The type of this payment like Credit Card or Gift Card.
-
getAmount
public javax.money.MonetaryAmount getAmount()The amount for which this payment is allotted.If specified, the amount details should be equal to this amount using the following equation: transactionAmount = subtotal + fulfillmentTotal + feesTotal - adjustmentsTotal + taxTotal - includedTaxTotal.
- Returns:
- The amount for which this payment is allotted.
-
getSubtotal
public javax.money.MonetaryAmount getSubtotal()The payment's total usually excluding adjustments, tax, fees, and shipping.Note: Only the
amount
is required, but if this value is included, then thefulfillmentTotal
,feesTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- Returns:
- The payment's total usually excluding adjustments, tax, fees, and shipping.
-
getAdjustmentsTotal
public javax.money.MonetaryAmount getAdjustmentsTotal()The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.Note: Only the
amount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,taxTotal
, &includedTaxTotal
should be included also.- Returns:
- The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.
-
getFulfillmentTotal
public javax.money.MonetaryAmount getFulfillmentTotal()The payment's total fulfillment cost.Note: Only the
amount
is required, but if this value is included, then thesubtotal
,feesTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- Returns:
- The payment's total fulfillment cost.
-
getFeesTotal
public javax.money.MonetaryAmount getFeesTotal()The total fees related to the transactionamount
.Note: Only the
amount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- Returns:
- The total fees related to the transaction
amount
-
getTaxTotal
public javax.money.MonetaryAmount getTaxTotal()The payment's total tax cost.Note: Only the
amount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,adjustmentsTotal
, &includedTaxTotal
should be included also.- Returns:
- The payment's total tax cost.
-
getIncludedTaxTotal
public javax.money.MonetaryAmount getIncludedTaxTotal()The amount of taxes that are included in the subtotal (VAT).Note: Only the
amount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,adjustmentsTotal
, &taxTotal
should be included also.- Returns:
- The amount of taxes that are included in the subtotal (VAT).
-
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.- Returns:
- General use map to capture any additional attributes
-
setOwnerType
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
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.
-
setGatewayType
The payment gateway used to process this payment. -
setType
The type of this payment like Credit Card or Gift Card.- Parameters:
type
- The type of this payment like Credit Card or Gift Card.
-
setAmount
public void setAmount(javax.money.MonetaryAmount amount) The amount for which this payment is allotted.If specified, the amount details should be equal to this amount using the following equation: transactionAmount = subtotal + fulfillmentTotal + feesTotal - adjustmentsTotal + taxTotal - includedTaxTotal.
- Parameters:
amount
- The amount for which this payment is allotted.
-
setSubtotal
public void setSubtotal(javax.money.MonetaryAmount subtotal) The payment's total usually excluding adjustments, tax, fees, and shipping.Note: Only the
amount
is required, but if this value is included, then thefulfillmentTotal
,feesTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- Parameters:
subtotal
- The payment's total usually excluding adjustments, tax, fees, and shipping.
-
setAdjustmentsTotal
public void setAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal) The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.Note: Only the
amount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,taxTotal
, &includedTaxTotal
should be included also.- Parameters:
adjustmentsTotal
- The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.
-
setFulfillmentTotal
public void setFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) The payment's total fulfillment cost.Note: Only the
amount
is required, but if this value is included, then thesubtotal
,feesTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- Parameters:
fulfillmentTotal
- The payment's total fulfillment cost.
-
setFeesTotal
public void setFeesTotal(javax.money.MonetaryAmount feesTotal) The total fees related to the transactionamount
.Note: Only the
amount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- Parameters:
feesTotal
- The total fees related to the transactionamount
-
setTaxTotal
public void setTaxTotal(javax.money.MonetaryAmount taxTotal) The payment's total tax cost.Note: Only the
amount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,adjustmentsTotal
, &includedTaxTotal
should be included also.- Parameters:
taxTotal
- The payment's total tax cost.
-
setIncludedTaxTotal
public void setIncludedTaxTotal(javax.money.MonetaryAmount includedTaxTotal) The amount of taxes that are included in the subtotal (VAT).Note: Only the
amount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,adjustmentsTotal
, &taxTotal
should be included also.- Parameters:
includedTaxTotal
- The amount of taxes that are included in the subtotal (VAT).
-
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.- Parameters:
attributes
- General use map to capture any additional attributes
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-