ZaimGenre class

One of the user's own genres, from GET /v2/home/genre.

A genre is the second level below a category, and applies to payments only: POST /v2/home/money/payment requires both category_id and genre_id, while income and transfer take neither.

Parameters

Required

  • id: The genre id to pass to the payment endpoints.
  • name: The display name.
  • categoryId: The category this genre sits under.

Optional

  • sort: Display order (default: 0).
  • parentGenreId: The master genre this one derives from, null when Zaim sent 0 (default: null).
  • active: 1 while the genre is in use (default: 1).
  • modified: When the genre last changed (default: null).
Annotations
  • @immutable

Constructors

ZaimGenre({required int id, required String name, required int categoryId, int sort = 0, int? parentGenreId, int active = 1, DateTime? modified})
Creates a genre.
const
ZaimGenre.fromJson(Map<String, dynamic> json)
Parses one element of the genres array.
factory

Properties

active → int
The raw active flag: 1 for a live genre. See isActive.
final
categoryId → int
The category this genre belongs to.
final
hashCode → int
The hash code for this object.
no setteroverride
id → int
The genre id. Pass this to the payment create and update endpoints.
final
isActive → bool
Whether the genre is live, i.e. whether active is 1.
no setter
modified → DateTime?
When the genre was last modified, in UTC.
final
name → String
The display name.
final
parentGenreId → int?
The master genre this one derives from, or null when it has none.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sort → int
The display order within the category.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serialises back to Zaim's wire format.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override