Skip to content

Group

Extends

  • Group

Properties

payload

payload: Group;

The underlying payload data for this resource

Inherited from

Bkper.Group.payload

Methods

create()

create(): Group;

Perform create new group.

Returns

Group

The created Group, for chainning.

Inherited from

Bkper.Group.create

deleteProperty()

deleteProperty(key): this;

Deletes a custom property.

Parameters

ParameterType
keystring

Returns

this

This resource, for chaining

Inherited from

Bkper.Group.deleteProperty

getAccounts()

getAccounts(): Account[];

Returns

Account[]

All Accounts of this group.

Inherited from

Bkper.Group.getAccounts

getChildren()

getChildren(): Group[];

Returns

Group[]

The children Groups

Inherited from

Bkper.Group.getChildren

getDepth()

getDepth(): number;

Returns

number

The depth in the parent Group chain up to the root Group

Inherited from

Bkper.Group.getDepth

getId()

getId(): string;

Returns

string

The id of this Group

Inherited from

Bkper.Group.getId

getName()

getName(): string;

Returns

string

The name of this Group

Inherited from

Bkper.Group.getName

getNormalizedName()

getNormalizedName(): string;

Returns

string

The name of this group without spaces and special characters

Inherited from

Bkper.Group.getNormalizedName

getParent()

getParent(): Group;

Returns

Group

The parent Group

Inherited from

Bkper.Group.getParent

getParentGroupsChain()

getParentGroupsChain(): Group[];

Returns

Group[]

The parent Groups chain up to the root Group

Inherited from

Bkper.Group.getParentGroupsChain

getProperties()

getProperties(): object;

Gets the custom properties stored in this resource.

Returns

object

Object with key/value pair properties

Inherited from

Bkper.Group.getProperties

getProperty()

getProperty(...keys): string;

Gets the property value for given keys. First property found will be retrieved.

Parameters

ParameterType
keysstring[]

Returns

string

The property value or null if not found

Inherited from

Bkper.Group.getProperty

getPropertyKeys()

getPropertyKeys(): string[];

Gets the custom properties keys stored in this resource.

Returns

string[]

Array of property keys sorted alphabetically

Inherited from

Bkper.Group.getPropertyKeys

getRoot()

getRoot(): Group;

Returns

Group

The root Group

Inherited from

Bkper.Group.getRoot

getType()

getType(): AccountType;

Returns

AccountType

The type of the group based on its accounts. Undefined if the group has accounts of different types

Inherited from

Bkper.Group.getType

getVisibleProperties()

getVisibleProperties(): object;

Gets the visible custom properties stored in this resource. Hidden properties (those ending with ”_”) are excluded from the result.

Returns

object

Object with key/value pair properties, excluding hidden properties

Inherited from

Bkper.Group.getVisibleProperties

hasAccounts()

hasAccounts(): boolean;

Returns

boolean

True if this group has any account in it

Inherited from

Bkper.Group.hasAccounts

hasChildren()

hasChildren(): boolean;

Tell if this group has any children

Returns

boolean

Inherited from

Bkper.Group.hasChildren

isCredit()

isCredit(): boolean;

Tell if this is a credit (Incoming and Liabities) group

Returns

boolean

Inherited from

Bkper.Group.isCredit

isHidden()

isHidden(): boolean;

Tell if the Group is hidden on main transactions menu

Returns

boolean

Inherited from

Bkper.Group.isHidden

isLocked()

isLocked(): boolean;

Returns

boolean

True if the Group is locked by the Book owner.

Inherited from

Bkper.Group.isLocked

isMixed()

isMixed(): boolean;

Tell if this is a mixed (Assets/Liabilities or Incoming/Outgoing) group

Returns

boolean

Inherited from

Bkper.Group.isMixed

isPermanent()

isPermanent(): boolean;

Tell if this is a permanent (Assets and Liabilities) group

Returns

boolean

Inherited from

Bkper.Group.isPermanent

json()

json(): Group;

Gets an immutable copy of the JSON payload for this resource.

Returns

Group

An immutable copy of the json payload

Inherited from

Bkper.Group.json

remove()

remove(): Group;

Perform delete group.

Returns

Group

Inherited from

Bkper.Group.remove

setHidden()

setHidden(hidden): Group;

Hide/Show group on main menu.

Parameters

ParameterType
hiddenboolean

Returns

Group

Inherited from

Bkper.Group.setHidden

setLocked()

setLocked(locked): Group;

Sets the locked state of the Group.

Parameters

ParameterType
lockedboolean

Returns

Group

This Group, for chainning.

Inherited from

Bkper.Group.setLocked

setName()

setName(name): Group;

Sets the name of the Group.

Parameters

ParameterType
namestring

Returns

Group

This Group, for chainning.

Inherited from

Bkper.Group.setName

setParent()

setParent(group): Group;

Sets the parent Group.

Parameters

ParameterType
groupGroup | null

Returns

Group

This Group, for chainning.

Inherited from

Bkper.Group.setParent

setProperties()

setProperties(properties): this;

Sets the custom properties of this resource.

Parameters

ParameterType
properties{ [key: string]: string; }

Returns

this

This resource, for chaining

Inherited from

Bkper.Group.setProperties

setProperty()

setProperty(key, value): this;

Sets a custom property in this resource.

Parameters

ParameterType
keystring
valuestring

Returns

this

This resource, for chaining

Inherited from

Bkper.Group.setProperty

setVisibleProperties()

setVisibleProperties(properties): this;

Sets the custom properties of this resource, filtering out hidden properties. Hidden properties are those whose keys end with an underscore ”_”.

Parameters

ParameterType
properties{ [key: string]: string; }

Returns

this

This resource, for chaining

Inherited from

Bkper.Group.setVisibleProperties

setVisibleProperty()

setVisibleProperty(key, value): this;

Sets a custom property in this resource, filtering out hidden properties. Hidden properties are those whose keys end with an underscore ”_”.

Parameters

ParameterType
keystring
valuestring | null

Returns

this

This resource, for chaining

Inherited from

Bkper.Group.setVisibleProperty

update()

update(): Group;

Perform update group, applying pending changes.

Returns

Group

Inherited from

Bkper.Group.update