public class XMLBalance extends java.lang.Object implements IXMLEncodable
Modifier and Type | Class and Description |
---|---|
class |
XMLBalance.MonthlyOverusage |
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION
Constructor and Description |
---|
XMLBalance(org.w3c.dom.Document doc) |
XMLBalance(org.w3c.dom.Element elemBalance) |
XMLBalance(long accountNumber,
long deposit,
long spent,
java.sql.Timestamp timestamp,
java.sql.Timestamp validTime,
long volumeBytesleft,
java.sql.Timestamp flatEnddate,
IMyPrivateKey signKey,
long a_lVolumeBytesMonthly,
java.sql.Timestamp a_tMonthlyBytesUpdatedOn,
java.sql.Timestamp a_tStartDate,
long a_lOverusageBytes,
java.sql.Timestamp a_tOverusageDate,
double a_dFactorOverusageGeneral,
double a_dFactorOverusageUser,
long a_lLastMonthRemainingTraffic,
boolean a_bBlocked,
java.lang.String a_strAffiliate,
Transaction a_transaction) |
XMLBalance(java.lang.String xmlDoc) |
Modifier and Type | Method and Description |
---|---|
static java.util.Calendar |
calculateEndDate(java.util.Calendar a_startDate,
int a_duration,
int a_calendarFieldUnit) |
static java.util.Calendar |
calculateEndOfCurrentMonthlyPeriod(java.util.Calendar a_calendarEnd,
java.util.Calendar a_calendarNow) |
static java.sql.Timestamp |
calculateEndOfCurrentMonthlyPeriod(java.sql.Timestamp a_tEnd,
java.sql.Timestamp a_tNow) |
XMLBalance.MonthlyOverusage |
calculateMonthlyOverusage(java.sql.Timestamp a_tNow) |
static int |
calculateRemainingRateMonths(java.util.Calendar a_calendarEnd,
java.util.Calendar a_calendarNow) |
static int |
calculateRemainingRateMonths(java.sql.Timestamp a_tEnd,
java.sql.Timestamp a_tNow) |
boolean |
canDoMonthlyOverusage(java.sql.Timestamp a_tNow) |
long |
getAccountNumber()
Returns the number the number of the account to which this balance belongs to
|
java.lang.String |
getAffiliate() |
long |
getDeposit()
Returns the total amount of money spent by the user to buy the
corresponding volume plan.
|
java.sql.Timestamp |
getFlatEnddate() |
long |
getLastMonthRemainingTraffic() |
PayMessage |
getMessage() |
java.sql.Timestamp |
getMonthlyBytesUpdatedOn() |
long |
getOverusageBytes() |
java.sql.Timestamp |
getOverusageDate() |
double |
getOverusageFactor() |
double |
getOverusageFactorGeneral() |
long |
getSpent()
Returns the overall spent bytes for the corresponding account
|
java.sql.Timestamp |
getStartDate() |
java.sql.Timestamp |
getTimestamp() |
Transaction |
getTransaction()
The transaction ID is only set if a transaction has been started (regardless
whether it is finished or not).
|
java.sql.Timestamp |
getValidTime()
Returns the Date after that unspent byte volume
will expire
|
long |
getVolumeBytesLeft()
returns the current credit of the user
return value will be compared to jap.pay.PaymentMainPanel WARNING_AMOUNT
|
long |
getVolumeBytesMonthly() |
boolean |
isBlocked() |
boolean |
isCurrentlyInOverusage(java.sql.Timestamp a_tNow) |
static boolean |
isLastMonthOfRate(java.util.Calendar a_calendarEnd,
java.util.Calendar a_calendarNow,
java.util.Calendar a_calendarStart) |
boolean |
isLastMonthOfRate(java.sql.Timestamp a_tNow) |
static boolean |
isLastMonthOfRate(java.sql.Timestamp a_tEnd,
java.sql.Timestamp a_tNow,
java.sql.Timestamp a_tStart) |
static boolean |
isSameMonthlyPeriod(java.sql.Timestamp a_tUpdatedOn,
java.sql.Timestamp a_tNow,
java.sql.Timestamp a_tStartDate,
boolean a_bUpdatedOnEarlier) |
void |
setMessage(PayMessage a_message) |
void |
sign(IMyPrivateKey signKey) |
org.w3c.dom.Element |
toXmlElement(org.w3c.dom.Document a_doc)
Return an element that can be appended to the document.
|
public XMLBalance(long accountNumber, long deposit, long spent, java.sql.Timestamp timestamp, java.sql.Timestamp validTime, long volumeBytesleft, java.sql.Timestamp flatEnddate, IMyPrivateKey signKey, long a_lVolumeBytesMonthly, java.sql.Timestamp a_tMonthlyBytesUpdatedOn, java.sql.Timestamp a_tStartDate, long a_lOverusageBytes, java.sql.Timestamp a_tOverusageDate, double a_dFactorOverusageGeneral, double a_dFactorOverusageUser, long a_lLastMonthRemainingTraffic, boolean a_bBlocked, java.lang.String a_strAffiliate, Transaction a_transaction)
public XMLBalance(org.w3c.dom.Document doc) throws java.lang.Exception
java.lang.Exception
public XMLBalance(java.lang.String xmlDoc) throws java.lang.Exception
java.lang.Exception
public XMLBalance(org.w3c.dom.Element elemBalance) throws java.lang.Exception
java.lang.Exception
public void sign(IMyPrivateKey signKey)
public void setMessage(PayMessage a_message)
public long getAccountNumber()
public double getOverusageFactorGeneral()
public double getOverusageFactor()
public java.lang.String getAffiliate()
public boolean isBlocked()
public long getDeposit()
public Transaction getTransaction()
public long getSpent()
public long getOverusageBytes()
public java.sql.Timestamp getOverusageDate()
public java.sql.Timestamp getMonthlyBytesUpdatedOn()
public long getVolumeBytesMonthly()
public long getLastMonthRemainingTraffic()
public long getVolumeBytesLeft()
public java.sql.Timestamp getStartDate()
public java.sql.Timestamp getFlatEnddate()
public java.sql.Timestamp getTimestamp()
public java.sql.Timestamp getValidTime()
public PayMessage getMessage()
public XMLBalance.MonthlyOverusage calculateMonthlyOverusage(java.sql.Timestamp a_tNow)
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
IXMLEncodable
toXmlElement
in interface IXMLEncodable
a_doc
- a documentpublic boolean isCurrentlyInOverusage(java.sql.Timestamp a_tNow)
public boolean canDoMonthlyOverusage(java.sql.Timestamp a_tNow)
public static boolean isSameMonthlyPeriod(java.sql.Timestamp a_tUpdatedOn, java.sql.Timestamp a_tNow, java.sql.Timestamp a_tStartDate, boolean a_bUpdatedOnEarlier)
public static int calculateRemainingRateMonths(java.util.Calendar a_calendarEnd, java.util.Calendar a_calendarNow)
public static java.sql.Timestamp calculateEndOfCurrentMonthlyPeriod(java.sql.Timestamp a_tEnd, java.sql.Timestamp a_tNow)
public static java.util.Calendar calculateEndOfCurrentMonthlyPeriod(java.util.Calendar a_calendarEnd, java.util.Calendar a_calendarNow)
public static int calculateRemainingRateMonths(java.sql.Timestamp a_tEnd, java.sql.Timestamp a_tNow)
public static java.util.Calendar calculateEndDate(java.util.Calendar a_startDate, int a_duration, int a_calendarFieldUnit)
public boolean isLastMonthOfRate(java.sql.Timestamp a_tNow)
public static boolean isLastMonthOfRate(java.sql.Timestamp a_tEnd, java.sql.Timestamp a_tNow, java.sql.Timestamp a_tStart)
public static boolean isLastMonthOfRate(java.util.Calendar a_calendarEnd, java.util.Calendar a_calendarNow, java.util.Calendar a_calendarStart)
Copyright © 2023. All rights reserved.