39 std::
string bookingDateValue,
40 std::
string valutaValue,
42 bool allocatableValue = false);
58 void setName(std::
string value);
147 [[nodiscard]]
bool hasActor() const noexcept;
220 std::
string bookingDate_;
222 double amount_ = 0.0;
224 std::
string contractId_;
225 std::
string actorId_;
226 std::
string statementId_;
227 bool allocatable_ = false;
228 std::vector<std::
string> propertyIds_;
229 std::
string createdAt_;
230 std::
string updatedAt_;
234 [[nodiscard]] const std::
string&
id() const noexcept;
235 [[nodiscard]] const std::
string&
name() const noexcept;
236 [[nodiscard]] const std::
string&
bookingDate() const noexcept;
237 [[nodiscard]] const std::
string&
valuta() const noexcept;
238 [[nodiscard]] const
double&
amount() const noexcept;
240 [[nodiscard]] const std::
string&
contractId() const noexcept;
241 [[nodiscard]] const std::
string&
actorId() const noexcept;
242 [[nodiscard]] const std::
string&
statementId() const noexcept;
243 [[nodiscard]] const std::vector<std::
string>&
propertyIds() const noexcept;
244 [[nodiscard]] const std::
string&
createdAt() const noexcept;
245 [[nodiscard]] const std::
string&
updatedAt() const noexcept;
248 void setId(std::
string value);
Value object for normalized booking dates.
Small value object for normalized entity display names.
Value object for monetary transaction amounts.
Shared transaction transition and normalization helpers.
bool hasRelations() const noexcept
Checks whether the transaction has any relations.
void clearActor()
Clears the linked actor id.
void setAmount(MoneyAmount value)
Sets the amount from a value object.
void setStatementId(std::string value)
Sets the statement id.
bool isStandalone() const noexcept
Checks whether the transaction is standalone.
void removePropertyId(const std::string &value)
Removes a property id from the transaction.
void setActorId(std::string value)
Sets the actor id.
bool containsPropertyId(const std::string &value) const
Checks whether a property id exists.
bool hasStatus(Status value) const noexcept
Checks whether the transaction has a given status.
void clearProperties()
Clears linked property ids.
void setName(EntityName value)
Sets the transaction name from a value object.
void setStatus(Status value)
Sets the transaction status.
void setValuta(std::string value)
Sets the valuta text.
void setContractId(std::string value)
Sets the contract id.
std::size_t propertyCount() const noexcept
Returns the number of linked properties.
bool hasProperties() const noexcept
Checks whether the transaction is linked to properties.
const std::string & name() const noexcept
const std::vector< std::string > & propertyIds() const noexcept
const std::string & statementId() const noexcept
void markVerified()
Advances the transaction to verified status when allowed.
void setPropertyIds(std::vector< std::string > value)
Replaces the property id list with normalized values.
const std::string & actorId() const noexcept
void addPropertyId(std::string value)
Adds a property id when it is not already present.
const std::string & updatedAt() const noexcept
bool belongsToStatement(const std::string &value) const
Checks whether the transaction belongs to a statement.
bool isAllocatable() const noexcept
Checks whether the transaction can be allocated.
const std::string & createdAt() const noexcept
const std::string & bookingDate() const noexcept
const std::string & valuta() const noexcept
void markUnverified()
Advances the transaction to unverified status when allowed.
void markCompleted()
Advances the transaction to completed status when allowed.
bool hasActor() const noexcept
Checks whether the transaction is linked to an actor.
bool hasStatement() const noexcept
Checks whether the transaction is linked to a statement.
const Status & status() const noexcept
void setCreatedAt(std::string value)
void setBookingDate(BookingDate value)
Sets the booking date from a value object.
void setId(std::string value)
void setUpdatedAt(std::string value)
void setAllocatable(bool value)
Sets the allocatable flag.
bool hasContract() const noexcept
Checks whether the transaction is linked to a contract.
const double & amount() const noexcept
const std::string & contractId() const noexcept
void clearContract()
Clears the linked contract id.
void clearStatement()
Clears the linked statement id.