Application Packaging Standard

Last updated 18-Mar-2019

ServicePlan

Service plan is set of basic services and resources assigned with definite pricing. Services plans are offered for sale to customers.

Schema

The considered APS type (download) extends the Resource APS type(s) and looks as follows:

{
  "name": "ServicePlan",
  "id": "http://www.odin.com/billing/ServicePlan/1.0",
  "apsVersion": "2.0",
  "implements": [
    "http://aps-standard.org/types/core/resource/1.0"
  ],
  "relations": {
    "vendor": {
      "type": "http://parallels.com/aps/types/pa/account",
      "required": true
    },
    "serviceTemplate": {
      "type": "http://parallels.com/aps/types/pa/serviceTemplate",
      "backrel": false
    },
    "category": {
      "type": "http://www.odin.com/billing/ServicePlanCategory/1.0",
      "required": true
    },
    "serviceTerms": {
      "type": "http://www.odin.com/billing/ServiceTerms/1.0",
      "required": true
    },
    "resources": {
      "type": "http://www.odin.com/billing/Resource/1.1",
      "collection": true
    }
  },
  "properties": {
    "name": {
      "type": "http://aps-standard.org/types/core/i18n/1.0#MLString",
      "required": true
    },
    "shortDescription": {
      "type": "http://aps-standard.org/types/core/i18n/1.0#MLString",
      "required": true
    },
    "longDescription": {
      "type": "http://aps-standard.org/types/core/i18n/1.0#MLString",
      "required": true
    },
    "publication": {
      "type": "ServicePlanPublication"
    },
    "subscriptionPeriods": {
      "type": "array",
      "items": {
        "type": "ServicePlanSubscriptionPeriod"
      }
    },
    "subscriptionPeriodResourceRates": {
      "type": "array",
      "items": {
        "type": "ServicePlanSubscriptionPeriodResourceRate"
      }
    },
    "resourceRates": {
      "type": "array",
      "items": {
        "type": "ServicePlanResourceRate"
      }
    },
    "billingTerms": {
      "type": "ServicePlanBillingTerms"
    }
  },
  "structures": {
    "ServicePlanPublication": {
      "type": "object",
      "properties": {
        "published": {
          "type": "boolean",
          "required": true
        }
      }
    },
    "ServicePlanSubscriptionPeriod": {
      "type": "object",
      "properties": {
        "autoRenewalPeriod": {
          "type": "SubscriptionPeriod"
        },
        "numberOfBillingPeriods": {
          "type": "integer",
          "readonly": true
        },
        "trial": {
          "type": "boolean"
        },
        "defaultPeriod": {
          "type": "boolean"
        },
        "fees": {
          "type": "ServicePlanSubscriptionPeriodFees",
          "required": true
        },
        "refund": {
          "type": "ServicePlanSubscriptionPeriodRefund",
          "required": true
        },
        "sortOrder": {
          "type": "integer"
        },
        "active": {
          "type": "boolean"
        }
      }
    },
    "SubscriptionPeriod": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "enum": [
            "DAYS",
            "MONTHS",
            "YEARS"
          ]
        },
        "duration": {
          "type": "integer"
        }
      }
    },
    "ServicePlanSubscriptionPeriodFees": {
      "type": "object",
      "properties": {
        "setup": {
          "type": "ServicePlanSubscriptionPeriodFeeSetup"
        },
        "recurring": {
          "type": "ServicePlanSubscriptionPeriodFeeRecurring"
        },
        "renewal": {
          "type": "ServicePlanSubscriptionPeriodFeeRenewal"
        },
        "deposit": {
          "type": "ServicePlanSubscriptionPeriodFeeDeposit"
        }
      }
    },
    "ServicePlanSubscriptionPeriodFeeSetup": {
      "type": "object",
      "properties": {
        "showZeroPrice": {
          "type": "boolean"
        }
      }
    },
    "ServicePlanSubscriptionPeriodFeeRecurring": {
      "type": "object",
      "properties": {
        "showZeroPrice": {
          "type": "boolean"
        }
      }
    },
    "ServicePlanSubscriptionPeriodFeeRenewal": {
      "type": "object",
      "properties": {
        "showZeroPrice": {
          "type": "boolean"
        }
      }
    },
    "ServicePlanSubscriptionPeriodFeeDeposit": {
      "type": "object",
      "properties": {
        "showZeroPrice": {
          "type": "boolean"
        }
      }
    },
    "ServicePlanSubscriptionPeriodRefund": {
      "type": "object",
      "properties": {
        "nonRefundableAmount": {
          "type": "Currency",
          "required": true
        },
        "fullRefundPeriodInDays": {
          "type": "integer",
          "required": true,
          "default": "0"
        },
        "afterRefundPeriod": {
          "type": "string",
          "required": true,
          "default": "NO",
          "enum": [
            "NO",
            "RECURRING"
          ]
        }
      }
    },
    "Currency": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        },
        "code": {
          "type": "string"
        }
      }
    },
    "ServicePlanSubscriptionPeriodResourceRate": {
      "type": "object",
      "properties": {
        "autoRenewalPeriod": {
          "type": "SubscriptionPeriod"
        },
        "resourceId": {
          "type": "string",
          "required": true
        },
        "fees": {
          "type": "ServicePlanResourceRateFees"
        },
        "publication": {
          "type": "ServicePlanResourceRatePublication"
        }
      }
    },
    "ServicePlanResourceRateFees": {
      "type": "object",
      "properties": {
        "setup": {
          "type": "ServicePlanResourceRateFeeSetup"
        },
        "recurring": {
          "type": "ServicePlanResourceRateFeeRecurring"
        },
        "overuse": {
          "type": "ServicePlanResourceRateFeeOveruse"
        }
      }
    },
    "ServicePlanResourceRateFeeSetup": {
      "type": "object",
      "properties": {
        "showZeroPrice": {
          "type": "boolean"
        },
        "chargePerUnit": {
          "type": "boolean"
        }
      }
    },
    "ServicePlanResourceRateFeeRecurring": {
      "type": "object",
      "properties": {
        "showZeroPrice": {
          "type": "boolean"
        },
        "chargePerUnit": {
          "type": "boolean"
        }
      }
    },
    "ServicePlanResourceRateFeeOveruse": {
      "type": "object",
      "properties": {
        "showZeroPrice": {
          "type": "boolean"
        }
      }
    },
    "ServicePlanResourceRatePublication": {
      "type": "object",
      "properties": {
        "store": {
          "type": "ServicePlanResourceRatePublicationStore"
        }
      }
    },
    "ServicePlanResourceRatePublicationStore": {
      "type": "object",
      "properties": {
        "description": {
          "type": "http://aps-standard.org/types/core/i18n/1.0#MLString"
        },
        "priceText": {
          "type": "http://aps-standard.org/types/core/i18n/1.0#MLString"
        }
      }
    },
    "ServicePlanResourceRate": {
      "type": "object",
      "properties": {
        "resourceId": {
          "type": "string",
          "required": true
        },
        "showInStore": {
          "type": "boolean"
        },
        "measurable": {
          "type": "boolean"
        },
        "showInCustomerPanel": {
          "type": "boolean"
        },
        "sortNumber": {
          "type": "integer"
        },
        "fees": {
          "type": "ServicePlanResourceRateFees"
        },
        "publication": {
          "type": "ServicePlanResourceRatePublication"
        },
        "units": {
          "type": "ServicePlanResourceRateUnits"
        }
      }
    },
    "ServicePlanResourceRateUnits": {
      "type": "object",
      "properties": {
        "included": {
          "type": "number",
          "required": true
        },
        "min": {
          "type": "number"
        },
        "max": {
          "type": "number"
        }
      }
    },
    "ServicePlanBillingTerms": {
      "type": "object",
      "properties": {
        "model": {
          "type": "string",
          "enum": [
            "CHARGE_BEFORE_BILLING_PERIOD",
            "CHARGE_AFTER_BILLING_PERIOD",
            "CHARGE_BEFORE_SUBSCRIPTION_PERIOD"
          ]
        },
        "period": {
          "type": "ServicePlanBillingPeriod",
          "required": true
        },
        "recurringPricesEvery": {
          "type": "string",
          "enum": [
            "BILLING_PERIOD",
            "MONTH"
          ]
        },
        "autorenewal": {
          "type": "ServicePlanAutorenewal"
        }
      }
    },
    "ServicePlanBillingPeriod": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "enum": [
            "STATEMENT_DAY",
            "MONTHS",
            "YEARS"
          ]
        },
        "duration": {
          "type": "integer"
        }
      }
    },
    "ServicePlanAutorenewal": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "DISABLED",
            "BEFORE_EXPIRATION_DATE",
            "ON_LAST_STATEMENT_DATE"
          ]
        },
        "days": {
          "type": "integer"
        }
      }
    }
  }
}

Properties

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
billingTerms ServicePlanBillingTerms Not Required   Billing terms for service plan
longDescription Multi-Language String Required   Service plan’s long description
name Multi-Language String Required   Service plan’s name
publication ServicePlanPublication Not Required   Service plan’s publication information
resourceRates ServicePlanResourceRate array Not Required   List of plan’s subscription rates
shortDescription Multi-Language String Required   Service plan’s short description
subscriptionPeriodResourceRates ServicePlanSubscriptionPeriodResourceRate array Not Required   List of subscription’s resource rates.
subscriptionPeriods ServicePlanSubscriptionPeriod array Not Required   List of plan’s subscription periods

Relationship

NAME TYPE REQUIRED DESCRIPTION
category ServicePlanCategory Yes Service plan category
resources Collection of Resource No Collection of resources for this service plan
serviceTemplate PAServiceTemplate No OSS service template
serviceTerms ServiceTerms Yes Service terms for service plan
vendor PAAccount Yes Vendor - owner of this service plan

Enums

NAME VALUES DESCRIPTION
BillingServicePlanRecurringPrices
  • BILLING_PERIOD
  • MONTH
Service plan recurring price period type.
BillingServicePlanSubscriptionPeriodRefundAfter
  • NO
  • RECURRING
After refund period type
ServicePlanAutorenewalType
  • DISABLED
  • BEFORE_EXPIRATION_DATE
  • ON_LAST_STATEMENT_DATE
Service plan autorenewal type.
ServicePlanBillingModel
  • CHARGE_BEFORE_BILLING_PERIOD
  • CHARGE_AFTER_BILLING_PERIOD
  • CHARGE_BEFORE_SUBSCRIPTION_PERIOD
Service plan billing model.
ServicePlanBillingPeriodUnit
  • STATEMENT_DAY
  • MONTHS
  • YEARS
Service plan billing period unit type.
SubscriptionPeriodUnit
  • DAYS
  • MONTHS
  • YEARS
Subscription period unit type

Structures

ServicePlanAutorenewal

Service plan autorenewal parameters.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
days Integer Not Required   Autorenewal period in days
type enum ServicePlanAutorenewalType Not Required   Autorenewal type

ServicePlanBillingPeriod

Billing period for service plan.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
duration Integer Not Required   Duration of billing period.
unit enum ServicePlanBillingPeriodUnit Not Required   Service plan billing period’s unit.

ServicePlanBillingTerms

Billing terms for ServicePlan.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
autorenewal ServicePlanAutorenewal Not Required   Autorenewal period
model enum ServicePlanBillingModel Not Required   Billing model
period ServicePlanBillingPeriod Required   Billing Period
recurringPricesEvery enum BillingServicePlanRecurringPrices Not Required   Period of recurring fees charging

ServicePlanPublication

Service plan’s publication information.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
published Boolean Required   Publishing flag for service plan

ServicePlanResourceRate

Resource rate info.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
fees ServicePlanResourceRateFees Not Required   Fees for resource.
measurable Boolean Not Required   Flag indicating that resource is measurable.
publication ServicePlanResourceRatePublication Not Required   Publication information for resource.
resourceId String Required   UUID of corresponding Resource.
showInCustomerPanel Boolean Not Required   Flag to show/hide resource in customer panel.
showInStore Boolean Not Required   Flag to show/hide resource in store.
sortNumber Integer Not Required   Sort number.
units ServicePlanResourceRateUnits Not Required   Resource rate units info.

ServicePlanResourceRateFeeOveruse

Overuse fee for ServicePlanResourceRate.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
showZeroPrice Boolean Not Required   Show zero price flag

ServicePlanResourceRateFeeRecurring

Recurring fee for ServicePlanResourceRate.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
chargePerUnit Boolean Not Required   Charge per unit flag
showZeroPrice Boolean Not Required   Show zero price flag

ServicePlanResourceRateFeeSetup

Setup fee for ServicePlanResourceRate.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
chargePerUnit Boolean Not Required   Charge per unit flag
showZeroPrice Boolean Not Required   Show zero price flag

ServicePlanResourceRateFees

Fees for ServicePlanResourceRate and ServicePlanSubscriptionPeriodResourceRate.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
overuse ServicePlanResourceRateFeeOveruse Not Required   Overuse fee
recurring ServicePlanResourceRateFeeRecurring Not Required   Recurring fee
setup ServicePlanResourceRateFeeSetup Not Required   Setup fee

ServicePlanResourceRatePublication

Publication information for ServicePlanResourceRate and ServicePlanSubscriptionPeriodResourceRate.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
store ServicePlanResourceRatePublicationStore Not Required   Store publication information

ServicePlanResourceRatePublicationStore

Store publication information for resource.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
description Multi-Language String Not Required   Description in store.
priceText Multi-Language String Not Required   Price text.

ServicePlanResourceRateUnits

Resource rate units info.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
included Real Required   Included resources in service plan.
max Real Not Required   Maximum resources in service plan. -1 for unlimited value.
min Real Not Required   Minimum resources in service plan.

ServicePlanSubscriptionPeriod

Service Plan period for a service plan. Contains duration and corresponding fees for subscription and optionally fees for corresponding resources in a service plan.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
active Boolean Not Required   Flag for active subscription.
autoRenewalPeriod SubscriptionPeriod Not Required   Service Plan auto renewal period - period in which subscription will be renewed.
defaultPeriod Boolean Not Required   Flag for default subscription period.
fees ServicePlanSubscriptionPeriodFees Required   Fees for subscription period.
numberOfBillingPeriods Integer Not Required Read Only   Number of billing periods in subscription period.
refund ServicePlanSubscriptionPeriodRefund Required   Refund info.
sortOrder Integer Not Required   Sort order.
trial Boolean Not Required   Flag for trial subscription.

ServicePlanSubscriptionPeriodFeeDeposit

Subscription period deposit fee type.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
showZeroPrice Boolean Not Required   Show zero price flag

ServicePlanSubscriptionPeriodFeeRecurring

Subscription period recurring fee type.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
showZeroPrice Boolean Not Required   Show zero price flag

ServicePlanSubscriptionPeriodFeeRenewal

Subscription period renewal fee type.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
showZeroPrice Boolean Not Required   Show zero price flag

ServicePlanSubscriptionPeriodFeeSetup

Subscription period setup fee type.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
showZeroPrice Boolean Not Required   Show zero price flag

ServicePlanSubscriptionPeriodFees

Fees for ServicePlanSubscriptionPeriod.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
deposit ServicePlanSubscriptionPeriodFeeDeposit Not Required   Deposit fee
recurring ServicePlanSubscriptionPeriodFeeRecurring Not Required   Recurring fee.
renewal ServicePlanSubscriptionPeriodFeeRenewal Not Required   Renewal fee
setup ServicePlanSubscriptionPeriodFeeSetup Not Required   Setup fee.

ServicePlanSubscriptionPeriodRefund

Refund info for ServicePlanSubscriptionPeriod.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
afterRefundPeriod enum BillingServicePlanSubscriptionPeriodRefundAfter Required NO After refund period option.
fullRefundPeriodInDays Integer Required 0 Full refund period in days.
nonRefundableAmount Currency Required   Non refundable amount of money.

ServicePlanSubscriptionPeriodResourceRate

Subscription resource rate info for ServicePlanSubscriptionPeriod.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
autoRenewalPeriod SubscriptionPeriod Not Required   Service Plan auto renewal period - period in which subscription will be renewed.
fees ServicePlanResourceRateFees Not Required   Fees for resource rate
publication ServicePlanResourceRatePublication Not Required   Publication information for resource rate
resourceId String Required   UUID of corresponding Resource

SubscriptionPeriod

Subscription period duration and type structure.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
duration Integer Not Required   Duration of subscription period.
unit enum SubscriptionPeriodUnit Not Required   Subscription period unit.

Examples

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