<p> APS resources of this type contain information about margins or markups of the service plan resources. <p> Each service plan can have only one Margin resource without relation {@link Margin#resaleAccount} specified. The default margin or markup configuration for the service plan is set using relation {@link Margin#plan}. This resource contains default margins or markups for the service plan resources, which will be applied to child accounts of the service plan owner, except for Margin resources with specified relation {@link Margin#resaleAccount}. <p> If relation {@link Margin#resaleAccount} is specified in a Margin resource, then the service plan resource margins or markups from this Margin resource will be applied to the specified account. </p>
In this document:
The considered APS type (download
) looks as follows:
{
"name": "Margin",
"id": "http://aps-standard.org/types/margin/1.0",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/abstract/types/unlimited-resource/1.0"
],
"relations": {
"owner": {
"type": "http://parallels.com/aps/types/pa/account",
"required": true
},
"resaleAccount": {
"type": "http://parallels.com/aps/types/pa/account"
},
"plan": {
"type": "http://www.odin.com/billing/ServicePlan",
"required": true
}
},
"properties": {
"priceModel": {
"type": "string",
"enum": [
"COS",
"MSRP"
]
},
"marginAttributes": {
"type": "array",
"items": {
"type": "MarginAttribute"
}
},
"marginRates": {
"type": "array",
"items": {
"type": "MarginResourceRate"
}
}
},
"structures": {
"MarginAttribute": {
"type": "object",
"properties": {
"attribute": {
"type": "string",
"required": true
},
"attributeValue": {
"type": "string"
},
"totalMargin": {
"type": "number"
},
"resellerMargin": {
"type": "number"
}
}
},
"MarginResourceRate": {
"type": "object",
"properties": {
"resourceId": {
"type": "string",
"required": true
},
"totalMargin": {
"type": "number"
},
"resellerMargin": {
"type": "number"
},
"marginAttributes": {
"type": "array",
"items": {
"type": "MarginAttribute"
}
}
}
}
}
}
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
priceModel |
Enum |
Not Required |
MSRP - Price Rated model, based on margins. <br> COS - Cost Rated model, based on markups. |
|
marginAttributes |
Array of MarginAttribute |
Not Required |
The list of attributes. For attributes from this list you can configure custom margins or markups for service plan resources. |
|
marginRates |
Array of MarginResourceRate |
Not Required |
The list of margins or markups configured for service plan resources. |
NAME |
TYPE |
REQUIRED |
DESCRIPTION |
---|---|---|---|
owner |
Yes |
Service Plan Owner |
|
resaleAccount |
No |
The account for which the custom margin or markup is configured. <br> If a resale account is specified, then resource margins or markups configured in property {@link Margin#marginRates} will only be applied to this account. <br> If a resale account is not specified, then this is the default margin or markup. Margins or markups of a BSS resource configured in property {@link Margin#marginRates} will be applied to all child accounts of this service plan owner, except for those with custom margin or markup configured. |
|
plan |
Yes |
The service plan for which the margin or markup is configured. Margins or markups of a BSS resource configured in property {@link Margin#marginRates} will be applied to all child accounts of this service plan owner. |
Information about a margin or markup of a BSS resource specified for attributes.
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
attribute |
String |
Required |
Attribute name |
|
attributeValue |
String |
Not Required |
Attribute value |
|
totalMargin |
Number |
Not Required |
The total margin or markup of a BSS resource specified for the attribute. It includes: <ul> <li>The margin for the Price Rated model. It applies to the owner of the service plan specified in the Margin resource.</li> <li>The markup for the Cost Rated model. It applies to end customers if their reseller did not configure the default markup for the BSS resource.</li> </ul> |
|
resellerMargin |
Number |
Not Required |
The reseller margin or markup of a BSS resource specified for the attribute. It includes: <ul> <li>The margin for the Price Rated model. It applies to child accounts of the owner of the service plan specified in Margin resource.</li> <li>The markup for the Cost Rated model. It applies to child accounts of the owner of the service plan specified in Margin resource.</li> </ul> |
Resource margin or markup info
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
resourceId |
String |
Required |
APS ID of the BSS resource. |
|
totalMargin |
Number |
Not Required |
The default total margin or markup of a BSS resource. It applies to subscriptions of the service plan specified in Margin resource. If there is a custom margin or markup defined for the attribute specified in the vendor’s charge, then this custom margin or markup applies instead. The default total margin includes: <ul> <li>The margin for the Price Rated model. It applies to the owner of the service plan specified in the Margin resource.</li> <li>The markup for the Cost Rated model. It applies to end customers if their reseller did not configure the default markup for the BSS resource.</li> </ul> |
|
resellerMargin |
Number |
Not Required |
The default reseller margin or markup of the BSS resource. It applies to subscriptions of the service plan specified in the Margin resource. If there is a custom margin or markup defined for the attribute specified in the vendor’s charge, then this custom margin or markup applies instead. The default reseller total margin includes: <ul> <li>The margin for the Price Rated model. It applies to child accounts of the owner of the service plan specified in the Margin resource.</li> <li>The markup for the Cost Rated model. It applies to child accounts of the owner of the service plan specified in the Margin resource.</li> </ul> |
|
marginAttributes |
Array of MarginAttribute |
Not Required |
The BSS resource margin or markup specified in attributes. |