ServiceTerms

The service terms is a set of parameters that defines how a subscription services processing is managed.

GraphViz

Schema

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

{
  "name": "ServiceTerms",
  "id": "http://www.odin.com/billing/ServiceTerms/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
    }
  },
  "properties": {
    "name": {
      "type": "string",
      "required": true
    },
    "subGracePeriod": {
      "type": "integer"
    },
    "subHoldPeriod": {
      "type": "integer"
    },
    "destroyAfterHold": {
      "type": "boolean"
    },
    "trialSubGracePeriod": {
      "type": "integer"
    },
    "trialSubHoldPeriod": {
      "type": "integer"
    },
    "trialDestroyAfterHold": {
      "type": "boolean"
    }
  }
}

The APS type is used to manage a collection of APS resources. To get a list of resources from that collection, use the following API call:

GET  /aps/2/collections/service-terms?<RQL-filter>

Properties

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

name

String

Required

Service term’s name

subGracePeriod

Integer

Not Required

Subscription grace period in days

subHoldPeriod

Integer

Not Required

Subscription hold period in days

destroyAfterHold

Boolean

Not Required

Destroy Service after Hold Period

trialSubGracePeriod

Integer

Not Required

Trial subscription grace period in days

trialSubHoldPeriod

Integer

Not Required

Trial subscription hold period in days

trialDestroyAfterHold

Boolean

Not Required

Destroy trial service after hold period

Relationship

NAME

TYPE

REQUIRED

DESCRIPTION

vendor

PAAccount

Yes

Vendor - owner of this service Terms

Examples

Every service plan must be bound to a service terms object.

Get all Service Terms

To get a list of all service terms in BSS, a management system must issue the following request

GET /aps/2/collections/service-terms

The list of service terms in the response will look like this:

HTTP/1.1 200 OK

[
   {
      "aps": {
         "type": "http://www.odin.com/billing/ServiceTerms/1.0",
         "id": "8f9da85c-7e1c-443c-bac1-074cc21c2500",
         "status": "aps:ready",
         "revision": 2,
         "modified": "2017-08-04T13:53:58Z"
      },
      "destroyAfterHold": false,
      "name": "Hosting Service Terms",
      "subGracePeriod": 10,
      "subHoldPeriod": 30,
      "trialDestroyAfterHold": true,
      "trialSubGracePeriod": 0,
      "trialSubHoldPeriod": 0
   },
   /* ... */
]

Get Service Terms Details

If a management system knows the APS ID of a service terms object it can request its full JSON representation:

GET /aps/2/resources/8f9da85c-7e1c-443c-bac1-074cc21c2500

The service terms representation will look like in the following response:

HTTP/1.1 200 OK

{
   "aps": {
      "type": "http://www.odin.com/billing/ServiceTerms/1.0",
      "id": "8f9da85c-7e1c-443c-bac1-074cc21c2500",
      "status": "aps:ready",
      "revision": 2,
      "modified": "2017-08-04T13:53:58Z",
      "schema": "/aps/2/types/107",
      "package": {
         "id": "2e9e3bfd-74cd-44ed-95e5-6dc22e51b1c3",
         "href": "/aps/2/packages/2e9e3bfd-74cd-44ed-95e5-6dc22e51b1c3"
      }
   },
   "destroyAfterHold": false,
   "name": "Hosting Service Terms",
   "subGracePeriod": 10,
   "subHoldPeriod": 30,
   "trialDestroyAfterHold": true,
   "trialSubGracePeriod": 0,
   "trialSubHoldPeriod": 0,
   "vendor": {
      "aps": {
         "link": "strong",
         "href": "/aps/2/resources/0ab950d1-abc9-4433-a87d-8ba009bf4bce",
         "id": "0ab950d1-abc9-4433-a87d-8ba009bf4bce"
      }
   }
}