public class Credit
extends java.lang.Object
implements java.io.Serializable
This class is the value object in Payment Plugin Controller interface which PDP can gets and sets Credit related information. This object means to be used by subsequent operations: credit/reverseCredit
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM copyright notice field.
|
static short | STATE_CANCELED
State for credit when it has been cancelled/reversed.
|
static short | STATE_CREDITED
State for credit when the credit request is successful.
|
static short | STATE_CREDITING
State for credit when the credit request is pending.
|
static short | STATE_FAILED
State for credit when operation failed.
|
static short | STATE_NEW
State for credit when it has been created but not be operated.
|
Constructor and Description |
---|
Credit(Credit credit)
This method constructs from an existing credit.
|
Credit(java.lang.String id, PaymentInstruction paymentInstruction, java.math.BigDecimal expectedAmount)
This method constructs a credit associated to a PaymentInstructions.
|
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal | getCreditedAmount()
This method returns the credited amount of this credit.
|
java.math.BigDecimal | getCreditingAmount()
This method returns the crediting amount of this credit.
|
java.math.BigDecimal | getExpectedAmount()
This method returns the expected amount of this credit, which is the maximum amount that will be credited under this object.
|
java.lang.String | getId()
This method returns the unique identification of this credit.
|
PaymentInstruction | getPaymentInstruction()
This method gets the paymentInstruction.
|
java.math.BigDecimal | getReversingCreditedAmount()
This method returns the reversing credited amount of this credit.
|
short | getState()
This method returns the current status of this credit object.
|
long | getTimeCreated()
This method returns the create time of this credit.
|
long | getTimeUpdated()
This method returns the update time of this credit.
|
boolean | isCreditRequiresAttention()
This method checks if this credit requires attention though it is successful.
|
void | setCreditedAmount(java.math.BigDecimal creditedAmount)
This method sets the credited amount of this credit.
|
void | setCreditingAmount(java.math.BigDecimal creditingAmount)
This method sets the crediting amount of this credit.
|
void | setCreditRequiresAttention(boolean creditRequiresAttention)
This method sets if this credit requires attention though it is successful.
|
void | setExpectedAmount(java.math.BigDecimal expectedAmount)
This method sets the expected amount of this credit, which is the maximum amount that will be credited under this object.
|
void | setPaymentInstruction(PaymentInstruction paymentInstruction)
This method sets the paymentInstruction.
|
void | setReversingCreditedAmount(java.math.BigDecimal reversingCreditedAmount)
This method sets the reversing credited amount of this credit.
|
void | setState(short state)
This method sets the status of this credit object.
|
void | setTimeCreated(long timeCreated)
This method sets the create time of this credit.
|
void | setTimeUpdated(long timeUpdated)
This method sets the update time of this credit.
|
java.lang.String | toString()
This method returns a readable form of the Credit object.
|
public static final java.lang.String COPYRIGHT
public static final short STATE_NEW
public static final short STATE_CREDITING
public static final short STATE_CREDITED
public static final short STATE_FAILED
public static final short STATE_CANCELED
public Credit(java.lang.String id, PaymentInstruction paymentInstruction, java.math.BigDecimal expectedAmount)
This method constructs a credit associated to a PaymentInstructions.
public Credit(Credit credit)
This method constructs from an existing credit.
public void setCreditRequiresAttention(boolean creditRequiresAttention)
This method sets if this credit requires attention though it is successful.
public boolean isCreditRequiresAttention()
This method checks if this credit requires attention though it is successful.
public void setCreditedAmount(java.math.BigDecimal creditedAmount)
This method sets the credited amount of this credit.
public java.math.BigDecimal getCreditedAmount()
This method returns the credited amount of this credit.
public void setCreditingAmount(java.math.BigDecimal creditingAmount)
This method sets the crediting amount of this credit.
public java.math.BigDecimal getCreditingAmount()
This method returns the crediting amount of this credit.
public void setExpectedAmount(java.math.BigDecimal expectedAmount)
This method sets the expected amount of this credit, which is the maximum amount that will be credited under this object.
public java.math.BigDecimal getExpectedAmount()
This method returns the expected amount of this credit, which is the maximum amount that will be credited under this object.
public java.lang.String getId()
This method returns the unique identification of this credit.
public void setPaymentInstruction(PaymentInstruction paymentInstruction)
This method sets the paymentInstruction.
public PaymentInstruction getPaymentInstruction()
This method gets the paymentInstruction.
public void setReversingCreditedAmount(java.math.BigDecimal reversingCreditedAmount)
This method sets the reversing credited amount of this credit.
public java.math.BigDecimal getReversingCreditedAmount()
This method returns the reversing credited amount of this credit.
public void setState(short state)
This method sets the status of this credit object.
public short getState()
This method returns the current status of this credit object.
public void setTimeCreated(long timeCreated)
This method sets the create time of this credit.
public long getTimeCreated()
This method returns the create time of this credit.
public void setTimeUpdated(long timeUpdated)
This method sets the update time of this credit.
public long getTimeUpdated()
This method returns the update time of this credit.
public java.lang.String toString()
This method returns a readable form of the Credit object.
Warning: not localized, for debugging purposes only!