-
- 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 long
id
protected String
bankReference
protected String
text
protected MenigaDecimal
amount
protected MenigaDecimal
amountInCurrency
protected String
currencyCode
protected DateTime
date
protected PaymentStatus
paymentStatus
protected Boolean
isWatched
protected Long
accountId
protected Long
transactionId
protected Long
invoiceId
protected Long
scheduledPaymentId
protected Long
categoryId
protected MenigaUpcomingRecurringPattern
recurringPattern
protected List<MenigaUpcomingComment>
comments
protected List<MenigaUpcomingReconcileScore>
reconcileScores
protected MenigaUpcomingDetails
details
public final static Parcelable.Creator<MenigaUpcoming>
CREATOR
-
Method Summary
Modifier and Type Method Description String
toString()
Boolean
getFlagged()
Boolean
getWatched()
void
setFlagged(boolean isFlagged)
static void
setOperator(MenigaUpcomingOperations operator)
Sets the api operator for doing api calls MenigaUpcoming
clone()
boolean
equals(Object o)
int
hashCode()
int
describeContents()
void
writeToParcel(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)
long
getId()
String
getBankReference()
String
getText()
MenigaDecimal
getAmount()
MenigaDecimal
getAmountInCurrency()
String
getCurrencyCode()
DateTime
getDate()
PaymentStatus
getPaymentStatus()
Long
getAccountId()
Long
getTransactionId()
Long
getInvoiceId()
Long
getScheduledPaymentId()
Long
getCategoryId()
MenigaUpcomingRecurringPattern
getRecurringPattern()
List<MenigaUpcomingComment>
getComments()
List<MenigaUpcomingReconcileScore>
getReconcileScores()
MenigaUpcomingDetails
getDetails()
void
setText(String text)
void
setAmountInCurrency(MenigaDecimal amountInCurrency)
void
setCurrencyCode(String currencyCode)
void
setDate(DateTime date)
void
setPaymentStatus(PaymentStatus paymentStatus)
void
setIsWatched(boolean isWatched)
void
setAccountId(long accountId)
void
setTransactionId(long transactionId)
void
setCategoryId(long categoryId)
void
setRecurringPattern(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)
-
-
-
-