Posting
public class Posting
extension Posting: CustomStringConvertible
extension Posting: Equatable
extension Posting: Hashable
A Posting contains an AccountName with the corresponding Amount,
as well as the price and cost (if applicable).
-
AccountNameof the account the posting is inDeclaration
Swift
public let accountName: AccountName -
Declaration
Swift
public let price: Amount? -
MetaData of the Posting
Declaration
Swift
public let metaData: [String : String] -
Creats an posting with the given parameters
Declaration
Swift
public init(accountName: AccountName, amount: Amount, price: Amount? = nil, cost: Cost? = nil, metaData: [String : String] = [:])Parameters
accountNameamountpricecost -
String to describe the posting in the ledget file
Declaration
Swift
public var description: String { get } -
Compares two postings
If a
priceis set it must matchDeclaration
Swift
public static func == (lhs: Posting, rhs: Posting) -> BoolParameters
lhsfirst posting
rhssecond posting
Return Value
if the accountName, ammount, meta data and price are the same on both postings
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
View on GitHub
Install in Dash
Posting Class Reference