MNFBudgetEntry

Objective-C

@interface MNFBudgetEntry : MNFObject

Swift

class MNFBudgetEntry : MNFObject

The MNFBudgetEntry class represents a single budget entry.

Immutable properties

  • The date and time the entry was last edited.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSDate *_Nullable updatedAt;

    Swift

    var updatedAt: Date? { get }
  • The id of the budget the entry is in.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSNumber *_Nullable budgetId;

    Swift

    var budgetId: NSNumber? { get }
  • The generation type for the entry if iti is in a planning budget.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSNumber *_Nullable generationType;

    Swift

    var generationType: NSNumber? { get }
  • The spent amount in the associated categories if the entry is current.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSNumber *_Nullable spentAmount;

    Swift

    var spentAmount: NSNumber? { get }
  • The id of the associated rule.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSNumber *_Nullable ruleId;

    Swift

    var ruleId: NSNumber? { get }
  • The number of transactions.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSNumber *_Nullable transactionCount;

    Swift

    var transactionCount: NSNumber? { get }

Mutable properties

  • The target amount for the budget entry.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSNumber *_Nullable targetAmount;

    Swift

    var targetAmount: NSNumber? { get set }
  • The start date for the budget entry.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSDate *_Nullable startDate;

    Swift

    var startDate: Date? { get set }
  • The end date for the budget entry.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSDate *_Nullable endDate;

    Swift

    var endDate: Date? { get set }
  • The category ids associated with the budget entry.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSArray<NSNumber *> *_Nullable categoryIds;

    Swift

    var categoryIds: [NSNumber]? { get set }

Saving

  • Saves changes to a budget.

    Declaration

    Objective-C

    - (nonnull MNFJob *)saveWithCompletion:
        (nullable MNFErrorOnlyCompletionHandler)completion;

    Swift

    func save(completion: MNFErrorOnlyCompletionHandler? = nil) -> MNFJob

    Parameters

    completion

    A completion block returning an error.

    Return Value

    MNFJob A job containing an error.

Deleting

  • Deletes a budget.

    Declaration

    Objective-C

    - (nonnull MNFJob *)deleteWithCompletion:
        (nullable MNFErrorOnlyCompletionHandler)completion;

    Swift

    func delete(completion: MNFErrorOnlyCompletionHandler? = nil) -> MNFJob

    Parameters

    completion

    A completion block returning an error.

    Return Value

    MNFJob A job containing an error.

Refreshing

  • Refreshes a budget.

    Declaration

    Objective-C

    - (nonnull MNFJob *)refreshWithCompletion:
        (nullable MNFErrorOnlyCompletionHandler)completion;

    Swift

    func refresh(completion: MNFErrorOnlyCompletionHandler? = nil) -> MNFJob

    Parameters

    completion

    A completion block returning an error.

    Return Value

    MNFJob A job containing an error.