-
- All Implemented Interfaces:
-
android.os.Parcelable
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable
public class MenigaNetWorthBalance implements Parcelable, Serializable, Cloneable, Comparable<MenigaNetWorthBalance>
Represents a balance on a net worth account at a certain point in time.
Copyright 2017 Meniga Iceland Inc.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Parcelable.Creator<MenigaNetWorthBalance>
CREATOR
protected long
id
protected MenigaDecimal
balance
protected DateTime
balanceDate
protected Boolean
isDefault
-
Constructor Summary
Constructors Constructor Description MenigaNetWorthBalance(Parcel in)
-
Method Summary
Modifier and Type Method Description static void
setOperator(MenigaNetWorthBalanceOperations operator)
Sets the api operator for doing api calls Long
getNetWorthId()
int
describeContents()
void
writeToParcel(Parcel dest, int flags)
MenigaNetWorthBalance
clone()
String
toString()
boolean
equals(Object o)
int
hashCode()
int
compareTo(MenigaNetWorthBalance another)
Result<Void>
update()
Updates an account balance history entry of a manual account. Result<Void>
delete()
Deletes and account balance history entry of a manual account. Result<List<MenigaNetWorth>>
refresh()
Fetches the server version of this object and updates all fields in this object with the server values, essentially syncing it with the server static Result<MenigaNetWorthBalance>
create(long netWorthId, MenigaDecimal balance, DateTime balanceDate)
Creates an account balance history entry of a manual account. long
getId()
MenigaDecimal
getBalance()
DateTime
getBalanceDate()
Boolean
getIsDefault()
void
setBalance(MenigaDecimal balance)
Set a new balance at this point in time. void
setBalanceDate(DateTime date)
Set a new date for this history balance entry -
-
Constructor Detail
-
MenigaNetWorthBalance
MenigaNetWorthBalance(Parcel in)
-
-
Method Detail
-
setOperator
static void setOperator(MenigaNetWorthBalanceOperations operator)
Sets the api operator for doing api calls
- Parameters:
operator
- An object that implements the MenigaNetWorthBalanceOperations interface for carrying out api operations on this class.
-
getNetWorthId
Long getNetWorthId()
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
clone
MenigaNetWorthBalance clone()
-
hashCode
int hashCode()
-
compareTo
int compareTo(MenigaNetWorthBalance another)
-
refresh
Result<List<MenigaNetWorth>> refresh()
Fetches the server version of this object and updates all fields in this object with the server values, essentially syncing it with the server
-
create
static Result<MenigaNetWorthBalance> create(long netWorthId, MenigaDecimal balance, DateTime balanceDate)
Creates an account balance history entry of a manual account.
- Parameters:
balance
- The balance of the of the account balance history entry.balanceDate
- The balance date of the account balance history entry.
-
getId
long getId()
-
getBalance
MenigaDecimal getBalance()
-
getBalanceDate
DateTime getBalanceDate()
-
getIsDefault
Boolean getIsDefault()
-
setBalance
void setBalance(MenigaDecimal balance)
Set a new balance at this point in time.
- Parameters:
balance
- The new balance at the point in time represented by this history entry
-
setBalanceDate
void setBalanceDate(DateTime date)
Set a new date for this history balance entry
- Parameters:
date
- The new date of the balance for the net worth account associated with this history balance item
-
-
-
-