Margin

GraphViz

Schema

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"
          }
        }
      }
    }
  }
}

Properties

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

priceModel

Enum

Not Required

marginAttributes

Array of MarginAttribute

Not Required

marginRates

Array of MarginResourceRate

Not Required

Relationship

NAME

TYPE

REQUIRED

DESCRIPTION

owner

PAAccount

Yes

resaleAccount

PAAccount

No

plan

ServicePlan

Yes

Structures

MarginAttribute

Margin resource info.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

attribute

String

Required

Attribute used to rate costs with custom provider and reseller margins

attributeValue

String

Not Required

Attribute value used to get right attribute with specific margins

totalMargin

Number

Not Required

Provider margin

resellerMargin

Number

Not Required

Reseller margin

MarginResourceRate

Margin resource info.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

resourceId

String

Required

Resource id for resource rate.

totalMargin

Number

Not Required

Provider margin

resellerMargin

Number

Not Required

Reseller margin

marginAttributes

Array of MarginAttribute

Not Required

Customization marginAttributes. Depends on attributes Rating Engine will apply different provider and reseller margins

Examples

Please find general description of create-read-update-delete (CRUD) operations with resources, properties, and structures respectively at: