-
- All Implemented Interfaces:
-
android.os.Parcelable,java.io.Serializable,java.lang.Cloneable
public class MenigaUpcoming implements Serializable, Parcelable, Cloneable
Copyright 2017 Meniga Iceland Inc.
-
-
Field Summary
Fields Modifier and Type Field Description protected longidprotected StringbankReferenceprotected Stringtextprotected MenigaDecimalamountprotected MenigaDecimalamountInCurrencyprotected StringcurrencyCodeprotected DateTimedateprotected PaymentStatuspaymentStatusprotected BooleanisWatchedprotected LongaccountIdprotected LongtransactionIdprotected LonginvoiceIdprotected LongscheduledPaymentIdprotected LongcategoryIdprotected MenigaUpcomingRecurringPatternrecurringPatternprotected List<MenigaUpcomingComment>commentsprotected List<MenigaUpcomingReconcileScore>reconcileScoresprotected MenigaUpcomingDetailsdetailspublic final static Parcelable.Creator<MenigaUpcoming>CREATOR
-
Method Summary
Modifier and Type Method Description StringtoString()BooleangetFlagged()BooleangetWatched()voidsetFlagged(boolean isFlagged)static voidsetOperator(MenigaUpcomingOperations operator)Sets the api operator for doing api calls MenigaUpcomingclone()booleanequals(Object o)inthashCode()intdescribeContents()voidwriteToParcel(Parcel dest, int flags)static Result<List<MenigaUpcoming>>fetch(DateTime from, DateTime to)Fetches all upcoming items between the date range static Result<MenigaUpcoming>fetch(long id)Fetches a specific upcoming item static Result<List<MenigaUpcoming>>create(String text, MenigaDecimal amountInCurrency, String currencyCode, DateTime date, Long accountId, Long categoryId, Boolean isFlagged, Boolean isWatched, MenigaUpcomingRecurringPattern recurringPattern)Creates a new instance of an upcoming series Result<Void>update(boolean updateWholeSeries)Saves change made to this upcoming item Result<Void>delete(boolean deleteSeries)Deletes this upcoming itom from the server Result<Void>reconcile(ReconcileEntityType entityType, long entityId)static Result<Void>reconcile(long upcomingId, ReconcileEntityType entityType, long entityId)longgetId()StringgetBankReference()StringgetText()MenigaDecimalgetAmount()MenigaDecimalgetAmountInCurrency()StringgetCurrencyCode()DateTimegetDate()PaymentStatusgetPaymentStatus()LonggetAccountId()LonggetTransactionId()LonggetInvoiceId()LonggetScheduledPaymentId()LonggetCategoryId()MenigaUpcomingRecurringPatterngetRecurringPattern()List<MenigaUpcomingComment>getComments()List<MenigaUpcomingReconcileScore>getReconcileScores()MenigaUpcomingDetailsgetDetails()voidsetText(String text)voidsetAmountInCurrency(MenigaDecimal amountInCurrency)voidsetCurrencyCode(String currencyCode)voidsetDate(DateTime date)voidsetPaymentStatus(PaymentStatus paymentStatus)voidsetIsWatched(boolean isWatched)voidsetAccountId(long accountId)voidsetTransactionId(long transactionId)voidsetCategoryId(long categoryId)voidsetRecurringPattern(MenigaUpcomingRecurringPattern recurringPattern)-
-
Method Detail
-
getFlagged
Boolean getFlagged()
-
getWatched
Boolean getWatched()
-
setFlagged
void setFlagged(boolean isFlagged)
-
setOperator
static void setOperator(MenigaUpcomingOperations operator)
Sets the api operator for doing api calls
- Parameters:
operator- An object that implements the MenigaUpcomingOperations interface for carrying out api operations on this class.
-
clone
MenigaUpcoming clone()
-
hashCode
int hashCode()
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
fetch
static Result<List<MenigaUpcoming>> fetch(DateTime from, DateTime to)
Fetches all upcoming items between the date range
- Parameters:
from- Get all upcoming items after this dateto- Get all upcoming items before this date
-
fetch
static Result<MenigaUpcoming> fetch(long id)
Fetches a specific upcoming item
- Parameters:
id- The id of the upcoming to fetch
-
create
static Result<List<MenigaUpcoming>> create(String text, MenigaDecimal amountInCurrency, String currencyCode, DateTime date, Long accountId, Long categoryId, Boolean isFlagged, Boolean isWatched, MenigaUpcomingRecurringPattern recurringPattern)
Creates a new instance of an upcoming series
- Parameters:
text- A human readable text that is displayed to the end user as the title or subject of the upcoming transactionamountInCurrency- An amount in the currency specified.currencyCode- The amount for the upcoming transaction in the currency of the "CurrencyCode"date- The expected booking/payment date of the upcoming transactionaccountId- The id of the account that the upcoming transaction is expected to be booked fromcategoryId- The id of the category this upcoming transaction has been categorized asisFlagged- True if the upcoming transaction is flagged by the userisWatched- True if the upcoming transaction added to the watched listrecurringPattern- The recurring pattern that will be used to generate all the upcoming items
-
update
Result<Void> update(boolean updateWholeSeries)
Saves change made to this upcoming item
- Parameters:
updateWholeSeries- Updates the whole series, this means that a new series of upcomingitems will be created, all having paymentStatus=Open
-
reconcile
Result<Void> reconcile(ReconcileEntityType entityType, long entityId)
-
reconcile
static Result<Void> reconcile(long upcomingId, ReconcileEntityType entityType, long entityId)
-
getId
long getId()
-
getBankReference
String getBankReference()
-
getAmount
MenigaDecimal getAmount()
-
getAmountInCurrency
MenigaDecimal getAmountInCurrency()
-
getCurrencyCode
String getCurrencyCode()
-
getDate
DateTime getDate()
-
getPaymentStatus
PaymentStatus getPaymentStatus()
-
getAccountId
Long getAccountId()
-
getTransactionId
Long getTransactionId()
-
getInvoiceId
Long getInvoiceId()
-
getScheduledPaymentId
Long getScheduledPaymentId()
-
getCategoryId
Long getCategoryId()
-
getRecurringPattern
MenigaUpcomingRecurringPattern getRecurringPattern()
-
getComments
List<MenigaUpcomingComment> getComments()
-
getReconcileScores
List<MenigaUpcomingReconcileScore> getReconcileScores()
-
getDetails
MenigaUpcomingDetails getDetails()
-
setAmountInCurrency
void setAmountInCurrency(MenigaDecimal amountInCurrency)
-
setCurrencyCode
void setCurrencyCode(String currencyCode)
-
setDate
void setDate(DateTime date)
-
setPaymentStatus
void setPaymentStatus(PaymentStatus paymentStatus)
-
setIsWatched
void setIsWatched(boolean isWatched)
-
setAccountId
void setAccountId(long accountId)
-
setTransactionId
void setTransactionId(long transactionId)
-
setCategoryId
void setCategoryId(long categoryId)
-
setRecurringPattern
void setRecurringPattern(MenigaUpcomingRecurringPattern recurringPattern)
-
-
-
-