NewCategory
public struct NewCategory : Codable, Equatable, Sendable
A model representing a new category to be created.
Both name and categoryGroupId are required by the API.
-
The name of the category
Declaration
Swift
public let name: String -
The ID of the category group this category belongs to
Declaration
Swift
public let categoryGroupId: String -
Optional note for the category
Declaration
Swift
public let note: String? -
The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly goal will be created for the category with this target amount. If goalType is not specified, it will default to “NEED” or “MF” for credit card payment categories.
Declaration
Swift
public let goalTarget: Int64? -
The goal target date in ISO format (e.g. 2016-12-01)
Declaration
Swift
public let goalTargetDate: String? -
Whether the goal requires the full target amount each period.
Declaration
Swift
public let goalNeedsWholeAmount: Bool? -
Creates a new NewCategory instance
Declaration
Swift
public init( name: String, categoryGroupId: String, note: String? = nil, goalTarget: Int64? = nil, goalTargetDate: String? = nil, goalNeedsWholeAmount: Bool? = nil )Parameters
nameThe name of the category
categoryGroupIdThe ID of the category group this category belongs to
noteOptional note for the category
goalTargetThe goal target amount in milliunits format
goalTargetDateThe goal target date in ISO format (e.g. 2016-12-01)
goalNeedsWholeAmountWhether the goal requires the full target amount each period
View on GitHub