Represents an account in the Connect platform, of either a Vendor or a Provider.

Static methods

staticcreate():Account

Creates a new Account.

Returns:

The created Account.

staticget(id:String):Account

Returns:

The Account with the given id, or null if it was not found.

staticlist(filters:Query):Collection<Account>

Lists all Accounts that match the given filters.

Returns:

A Collection of Accounts.

Constructor

new()

Variables

brand:String

Brand id of the account object.

events:Events

Contains the created event, with the date when the account object was created.

externalId:String

External id of the account object.

name:String

Name of account object.

sourcing:Bool

Whether the account has the ability to create Sourcing Agreements (is HyperProvider), defaults to false.

type:String

Type of the account object ("vendor" or "provider").

Methods

getUser(userId:String):User

Returns:

The User belonging to this Account with the given userId, or null if it was not found.

listUsers():Collection<User>

Returns:

A Collection of Users of this Account.

Inherited Variables

Defined by IdModel

id:String

Id of the model.

Inherited Methods

Defined by Model

toObject():Dynamic

Returns:

A Haxe dynamic object with a shallow copy of this model's properties.

toString():String

Returns:

A String with the JSON representation of this Model.