Represents a saleable item that can be provided/distributed in terms of one purchase.
An asset is characterized by the following:
- Every asset reflects some purchase (somebody purchases either a service or a good).
- Purchase action can be reverted (canceled) or terminated when terms of purchase are expired.
- Asset can be subscription-based (when customer pay for usage in some time terms) or one-time based.
- Matter of asset is defined as list of purchased items with purchased quantities (asset items).
- Item in asset may be either reservation-based, when customer decides how many items of SKU to be purchased or Pay-Per-User based when actual use of the SKU defines quantity for asset item.
- Asset may be modified using change requests: either set of items may be changed or quantities of reservation-based items may be changed.
- Some assets can be put into suspend state, when service is not actually provided and no charges happened.
- Assets also may be parametrized by one or more parameters which differentiate one asset from another.
Static methods
staticlist(filters:Query):Collection<Asset>
Lists all Assets that match the given filters. Supported filters are:
id
conection.hub.id
connection.provider.id
tiers.customer.id
tiers.tier1.id
tiers.tier2.id
connection.id
status
created
updated
marketplace.id
contract.id
product.id
connection.type
Returns:
A Collection of Assets.
Constructor
Variables
status:String
Assets may have one of the following statuses:
- new: First purchase requested.
- processing: Until first purchase request is either completed or rejected.
- active: After the first purchase request is completed. NOTE: Asset stays active regardless of any other requests except cancel.
- rejected: Asset becomes rejected once the first purchase request is rejected.
- terminated: Asset becomes terminated once the 'cancel' request type is fulfilled.
- suspended: Asset becomes suspended once 'suspend' request type is fulfilled.
Methods
getCustomerConfig():TierConfig
Returns:
The TierConfig
object for the customer tier of this asset, or null
.
getItemByGlobalId(globalId:String):Item
Returns:
The item with the given global id, or null
if it was not found.
getItemByMpn(mpn:String):Item
Returns:
The item with the given Manufacture Part Number, or null
if it was not found.
getRequests():Collection<AssetRequest>
Returns:
A collection with all the requests for the this
Asset.