# MTSubscription

The subscription information associated with a ProductOffering when it is subscribed to by an account.

## Program ID

Metratech.MTSubscription.1

## Methods

Save | Saves modifications to this subscription.
GetProductOffering | Returns the associated product offering.
GetICBPriceListMapping | Returns the price list for the given priceable item parameter table.
SetICBPriceListMapping | Overrides the price list for a priceable item parameter table. Creates a new mapping entry if none exists. NOTE: The currency of the overriding price list must match the currency of the default price list.
RemoveICBPriceListMapping | Removes the price list override for a priceable item parameter table.
GetICBPriceListMappings | Returns all subscription-specific price list mappings.

## Properties

Properties | Gets all (core and extended) properties of this object in a collection of MTProperty objects.
AccountID | The unique identifier of the subscription.
ProductOfferingID | The ID of the associated product offering.
Active | If this property returns true, the subscription is active in a subscriber's account.
EffectiveDate | The time span during which this subscription is effective.
ProductOffering | Denotes the product offering that the subscription represents.

# Method Detail

## Save

This method saves modifications to this subscription.

### Visual Basic Syntax

Save()

### C++ Syntax

HRESULT Save();

## GetProductOffering

This method returns the associated product offering.

### Visual Basic Syntax

GetProductOffering() As MTProductOffering

### C++ Syntax

HRESULT GetProductOffering([out, retval] IMTProductOffering** ppProductOffering);

## GetICBPriceListMapping

This method returns the price list for the given priceable item parameter table.

### Visual Basic Syntax

GetICBPriceListMapping(PrcItemID As Long, ParamTableID As Long) As MTPriceListMapping

### C++ Syntax

HRESULT GetICBPriceListMapping([in] long aPrcItemID,[in] long ParamTableID,[out, retval] IMTPriceListMapping** ppMapping);

## SetICBPriceListMapping

Overrides the price list for a priceable item parameter table. Creates a new mapping entry if none exists.

NOTE: The currency of the overriding price list must match the currency of the default price list

### Visual Basic Syntax

SetICBPriceListMapping(PrcItemID As Long, ParamTblID As Long, CurrencyCode As String)

### C++ Syntax

HRESULT SetICBPriceListMapping([in] long aPrcItemID,[in] long aParamTblID,[in] BSTR CurrencyCode);

## RemoveICBPriceListMapping

This method removes the price list override for a priceable item parameter table.

### Visual Basic Syntax

RemoveICBPriceListMapping(PI_ID As Long, PtdID As Long)

### C++ Syntax

HRESULT RemoveICBPriceListMapping([in] long aPI_ID,[in] long aPtdID);

## GetICBPriceListMappings

This method returns all subscription-specific price list mappings.

### Visual Basic Syntax

GetICBPriceListMappings() As MTCollection

### C++ Syntax

HRESULT GetICBPriceListMappings([out, retval] IMTCollection** ppCol);

# Property Detail

## Properties

This property gets all (core and extended) properties of this object in a collection of MTProperty objects.

### Visual Basic Syntax

Property Properties As MTProperties

### C++ Syntax

HRESULT Properties([out, retval] IMTProperties** pVal);

## AccountID

This property specifies the unique identifier of the subscription.

### Visual Basic Syntax

Property ID As Long

### C++ Syntax

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

HRESULT ID([in] long newVal);

## ProductOfferingID

This property establishes the ID of the associated product offering.

### Visual Basic Syntax

Property ProductOfferingID As Long

### C++ Syntax

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

HRESULT ProductOfferingID([in] long newVal);

## Active

If this property returns true, the subscription is active in a subscriber's account.

### Visual Basic Syntax

Property Active As Boolean

### C++ Syntax

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

HRESULT Active([in] VARIANT_BOOL newVal);

## EffectiveDate

The time span during which this subscription is effective.

### Visual Basic Syntax

Property EffectiveDate As MTPCTimeSpan

### C++ Syntax

HRESULT EffectiveDate([out, retval] IMTPCTimeSpan* *pVal);

HRESULT EffectiveDate([in] IMTPCTimeSpan* newVal);

## ProductOffering

This property denotes the product offering that the subscription represents.

### Visual Basic Syntax

Property ProductOfferingID As Long

### C++ Syntax

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

HRESULT ProductOfferingID([in] long newVal);