# MTPaymentMgr

Manages all of the payment operations for a single paying account. The payment manager is only accessible through the YAAC

## Program ID

MetraTech.MTPaymentMgr

## MTPaymentMgr Methods

PayForAccount | Sets up a payer to pay for an account. The accountID can be the same as the payer.
ChangePaymentEffectiveDate | Updates an existing payment record with a new effective date.
PayForAccountBatch | Pay for accounts using a batch interface (more info below).
PaymentSlice | Returns a payment redirection configuration slice at the specified date.
PaymentSliceNow | Returns a payment redirection configuration slice at the current system time.
PaymentSliceAtSystemDate | Returns a payment redirection configuration slice at the specified system time.
SetAccountAsBillable | Sets an account as billable.
SetAccountAsNonBillable | Marks an account as non billable.
AllPayees | Returns all subscribers paid for by a given payer.
PaymentHistory | The history of payment redirection for a payer.
BitemporalPaymentHistory | Returns a history of payment redirection information (including bitemporal information) for a given payer.

## MTPaymentMgr Properties

AccountIsBillable | Indicates if the account can pay for other accounts.

# Method Detail

## PayForAccount

Sets up a payer to pay for an account. The accountID can be the same as the payer.

### Visual Basic Syntax

PayForAccount(byValAccount As Long, byValStartDate As Date, byValEndDate As Variant)

### C++ Syntax

HRESULT PayForAccount([in] long aAccount,[in] DATE StartDate,[in,optional] VARIANT EndDate);

## ChangePaymentEffectiveDate

Updates an existing payment record with a new effective date.

### Visual Basic Syntax

ChangePaymentEffectiveDate(byValAccount As Long, byValOldStartDate As Date, byValOldEndDate As Date, byValStartDate As Date, byValEndDate As Date)

### C++ Syntax

HRESULT ChangePaymentEffectiveDate([in] long aAccount, [in] DATE OldStartDate,[in] DATE OldEndDate,[in] DATE StartDate,[in] DATE EndDate);

## PayForAccountBatch

Pay for accounts using a batch interface. pCol is a collection of account ID's (the index is "id_acc"). The IMTPRogress object is used to indicate the current progress to the UI. See the MTProgressExec.idl for more information. StartDate indicates the payment startdate. The return value is a rowset of errors. If the rowset is empty, the operation succeeded.

### Visual Basic Syntax

PayForAccountBatch(

byValCol As IMTCollectionEx,

byValProgress As IMTProgress,

byValStartDate As Date,

byValEndDate as Variant) As IMTRowSet

### C++ Syntax

HRESULT PayForAccountBatch(

[in] IMTCollectionEx* pCol,

[in] IMTProgress* pProgress,

[in] DATE aStartDate,

[in,optional] VARIANT aEndDate,

[out,retval] IMTRowSet** ppCol);

## PaymentSlice

Returns a payment redirection configuration slice at the specified date.

### Visual Basic Syntax

PaymentSlice(RefDate As Date) As IMTPaymentSlice

### C++ Syntax

HRESULT PaymentSlice([in] DATE RefDate,[out, retval] IMTPaymentSlice** ppSlace);

## PaymentSliceNow

Returns a payment redirection configuration slice at the current system time.

### Visual Basic Syntax

PaymentSliceNow() As IMTPaymentSlice

### C++ Syntax

HRESULT PaymentSliceNow([out, retval] IMTPaymentSlice** ppSlice);

## PaymentSliceAtSystemDate

Returns a payment redirection configuration slice at the specified system time.

### Visual Basic Syntax

PaymentSliceAtSystemDate(RefDate As Date, SystemDate As Date) As IMTPaymentSlice

### C++ Syntax

HRESULT PaymentSliceAtSystemDate([in] DATE RefDate, [in] DATE SystemDate,[out, retval] IMTPaymentSlice** ppSlice);

## SetAccountAsBillable

Sets an account as billable.

### Visual Basic Syntax

SetAccountAsBillable()

### C++ Syntax

HRESULT SetAccountAsBillable();

## SetAccountAsNonBillable

Marks an account as non billable.

### Visual Basic Syntax

SetAccountAsNonBillable()

### C++ Syntax

HRESULT SetAccountAsNonBillable();

## AllPayees

Returns all subscribers paid for by a given payer.

### Visual Basic Syntax

AllPayees() As IMTPaymentSlice

### C++ Syntax

HRESULT AllPayees([out, retval] IMTPaymentSlice** ppSlice);

## PaymentHistory

Returns all subscribers paid for by a given payer.

### Visual Basic Syntax

PaymentHistory() As IMTRowSet

### C++ Syntax

HRESULT PaymentHistory([out,retval] IMTRowSet** ppRowset);

## BitemporalPaymentHistory

Returns a history of payment redirection information (including bitemporal information) for a given payer.

### Visual Basic Syntax

BitemporalPaymentHistory() As IMTRowSet

### C++ Syntax

HRESULT BitemporalPaymentHistory([out,retval] IMTRowSet** ppRowset);

# Properties Detail

## AccountIsBillable

Indicates if the account can pay for other accounts.

### Visual Basic Syntax

Property AccountIsBillable As Variant Boolean

### C++ Syntax

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

###