# MTYAAC

The YAAC object is the main object for all new account information. It contains many of the core properties and serves as a factory for hierarchy, payment, template, and account state information.

A YAAC may represent a number of different types of accounts, including subscriber accounts, and end-user "accounts".

## Program ID

MetraTech.MTYAAC

## MTYAAC Methods

GetPaymentMgr | Retrieves the payment manager "factory".
GetAccountStateMgr | Retrieves the account state manager "factory"
GetStateHistory | The account state's history (not including bitemporal information).
AddOwnedFolderByID | Configures the current YAAC to own a folder.
GetOwnedFolderList | Retrieves the list of owned folders.
GetAncestorMgr | Retrieves the ancestor manager "factory".
CanManageAccount | Indicates if the current YAAC can manage other accounts.
GetDescendents | Retrieves a collection of all descendents for the specified date.
AccessibleCorporateAccounts | Returns the list of corporate accounts accessible by the actor.
SetOwnedFoldersBatch | Configures a YAAC to own a collection of folders as part of one operation.
Refresh | Refreshes a YAAC's properties.

## MTYAAC Properties

AccountTemplate | Retrieves the account template for a folder.
AccountID | The account's unique ID.
IsFolder | Indicates whether the account is a folder.
LoginName | The account's loginname.
HierarchyPath | The path that uniquely identifies the account in the hierarchy. (An example of a path might be /1/138/256/234.)
CorporateAccountID | The account's corporate account. This value can never change for a given account.
AccountType | The type of account. Possible values include CSR, SUB (subscriber), OPS (operations personnel), IND (independent account).
namespace | The namespace that corresponds with the account.
AccountName | The account's current name.
CurrentFolderOwner | The account's current parent folder.
AccountExternalIdentifier | A GUID uniquely identifying the account.

# Method Detail

## GetPaymentMgr

Retrieves the payment manager "factory".

### Visual Basic Syntax

GetPaymentMgr() As IMTPaymentMgr

### C++ Syntax

HRESULT GetPaymentMgr([out, retval] IMTPaymentMgr** ppPaymentMgr);

## GetAccountStateMgr

Retrieves the account state manager "factory"

### Visual Basic Syntax

GetAccountStateMgr() As IMTAccountStateManager

### C++ Syntax

HRESULT GetAccountStateMgr([out, retval] IMTAccountStateManager** ppMgr);

## GetStateHistory

The account state's history (not including bitemporal information).

### Visual Basic Syntax

GetStateHistory(SystemDate As Variant) As IMTSQLRowset

### C++ Syntax

HRESULT GetStateHistory([in, optional] VARIANT SystemDate,[out,retval] IMTSQLRowset** ppRowset);

## AddOwnedFolderByID

Configures the current YAAC to own a folder.

### Visual Basic Syntax

AddOwnedFolderByID(byValFolderID As Long)

### C++ Syntax

HRESULT AddOwnedFolderByID([in] long aFolderID);

## GetOwnedFolderList

Retrieves the list of owned folders.

### Visual Basic Syntax

RemovedOwnedFolderById(byValFolderID As Long)

### C++ Syntax

HRESULT RemovedOwnedFolderById([in] long aFolderID);

## GetAncestorMgr

Retrieves the list of owned folders.

### Visual Basic Syntax

GetAncestorMgr() As IMTAncestorMgr

### C++ Syntax

HRESULT GetAncestorMgr([out,retval] IMTAncestorMgr** ppMgr);

## CanManageAccount

Indicates if the current YAAC can manage other accounts.

### Visual Basic Syntax

CanManageAccount() As Variant Boolean

### C++ Syntax

HRESULT CanManageAccount([out,retval] VARIANT_BOOL* pRetVal);

## GetDescendents

Retrieves a collection of all descendents for the specified date.

### Visual Basic Syntax

GetDescendents(byValCol As IMTCollection, byValRefDate As Date, byValHint As MTHierarchyPathWildCard, byValIncludeFolders As Variant Boolean)

### C++ Syntax

HRESULT GetDescendents([in] IMTCollection* pCol,[in] DATE RefDate,[in] MTHierarchyPathWildCard treeHint,[in] VARIANT_BOOL IncludeFolders);

## AccessibleCorporateAccounts

Returns the list of corporate accounts accessible by the actor.

### Visual Basic Syntax

AccessibleCorporateAccounts(byValRefDate As Variant) As IMTCollectionReadOnly

### C++ Syntax

HRESULT AccessibleCorporateAccounts([in,optional] VARIANT RefDate,[out, retval] IMTCollectionReadOnly** ppCol);

## SetOwnedFoldersBatch

Configures a YAAC to own a collection of folders as part of one operation.

### Visual Basic Syntax

SetOwnedFoldersBatch(byValCol As IMTCollectionEx, byValProgress As IMTProgress) As IMTRowSet

### C++ Syntax

HRESULT SetOwnedFoldersBatch([in] IMTCollectionEx* pCol,[in] IMTProgress* pProgress,[out,retval] IMTRowSet** ppErrors);

## Refresh

Refreshes a YAAC's properties.

### Visual Basic Syntax

Refresh(byValRefDate As Variant)

### C++ Syntax

HRESULT Refresh([in,optional] VARIANT RefDate);

# Properties Detail

## AccountTemplate

Retrieves the account template for a folder.

### Visual Basic Syntax

Property AccountTemplate As IMTAccountTemplate

### C++ Syntax

HRESULT AccountTemplate([out, retval] IMTAccountTemplate* *pVal);

## AccountID

The account's unique ID.

### Visual Basic Syntax

Property AccountID As Long

### C++ Syntax

HRESULT AccountID([out, retval] long *pVal);

## IsFolder

Indicates whether the account is a folder.

### Visual Basic Syntax

Property IsFolder As Variant Boolean

### C++ Syntax

HRESULT IsFolder([out, retval] VARIANT_BOOL *pVal);

## LoginName

The account's loginname.

### Visual Basic Syntax

Property LoginName As String

### C++ Syntax

HRESULT LoginName([out, retval] BSTR *pVal);

## HierarchyPath

The path that uniquely identifies the account in the hierarchy. (An example of a path might be /1/138/256/234.)

### Visual Basic Syntax

Property HierarchyPath As String

### C++ Syntax

HRESULT HierarchyPath([out, retval] BSTR *pVal);

## CorporateAccountID

The account's corporate account. This value can never change for a given account.

### Visual Basic Syntax

Property CorporateAccountID As Long

### C++ Syntax

HRESULT CorporateAccountID([out, retval] long *pVal);

## AccountType

The type of account. Possible values include CSR, SUB (subscriber), OPS (operations personnel), IND (independent account).

### Visual Basic Syntax

Property AccountType As String

### C++ Syntax

HRESULT AccountType([out, retval] BSTR *pVal);

## namespace

The namespace that corresponds with the account.

### Visual Basic Syntax

Property Namespace As String

### C++ Syntax

HRESULT Namespace([out, retval] BSTR *pVal);

## AccountName

The account's current name.

### Visual Basic Syntax

Property AccountName As String

### C++ Syntax

HRESULT AccountName([out, retval] BSTR *pVal);

## CurrentFolderOwner

The account's current parent folder.

### Visual Basic Syntax

Property CurrentFolderOwner As Long

### C++ Syntax

HRESULT CurrentFolderOwner([out, retval] long *pVal);

## AccountExternalIdentifier

A GUID uniquely identifying the account.

### Visual Basic Syntax

Property AccountExternalIdentifier As String

### C++ Syntax

HRESULT AccountExternalIdentifier([out, retval] BSTR *pVal);

##