In this document:
The considered APS type (download
)
extends the Resource APS type(s) and looks as follows:
{
"name": "DiscountInformation",
"id": "http://www.odin.com/oa/billing/discount-management/1.2",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/types/core/resource/1.0"
],
"access": {
"public": true
},
"operations": {
"getSubscriptionResourceDiscountInfo": {
"path": "/discounts/resource-discount",
"verb": "GET",
"response": {
"type": "DiscountInfo"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"accountUuid": {
"kind": "query",
"type": "string"
},
"subscriptionUuid": {
"kind": "query",
"type": "string"
},
"resourceUuid": {
"kind": "query",
"type": "string"
}
}
},
"getDealsForPlans": {
"path": "/deals/get-for-plans",
"verb": "POST",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"includeParentPlanDiscountConditions": {
"kind": "query",
"type": "boolean"
},
"plans": {
"kind": "body",
"type": "array",
"required": true
}
}
},
"getDealsPerUnit": {
"path": "/deals",
"verb": "POST",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
},
"access": {
"public": true
},
"parameters": {
"plans": {
"kind": "body",
"type": "array",
"required": true
}
}
}
},
"structures": {
"DiscountInfo": {
"type": "object",
"properties": {
"discountId": {
"type": "integer"
},
"discountPercent": {
"type": "number"
}
}
},
"PeriodDeals": {
"type": "object",
"properties": {
"period": {
"type": "Period",
"required": true
},
"parentPlanDiscountCondition": {
"type": "ParentPlanDiscountCondition"
},
"resources": {
"type": "array",
"items": {
"type": "ResourceDeals"
}
},
"effectiveFees": {
"type": "array",
"items": {
"type": "EffectiveFees"
}
}
}
},
"Period": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"enum": [
"MONTHS",
"YEARS"
]
},
"duration": {
"type": "integer"
}
}
},
"ParentPlanDiscountCondition": {
"type": "object",
"properties": {
"planId": {
"type": "string",
"required": true
},
"planPeriod": {
"type": "Period"
}
}
},
"ResourceDeals": {
"type": "object",
"properties": {
"resourceId": {
"type": "string",
"required": true
},
"effectiveFees": {
"type": "array",
"items": {
"type": "EffectiveFees"
}
}
}
},
"EffectiveFees": {
"type": "object",
"properties": {
"name": {
"type": "string",
"required": true
},
"fee": {
"type": "Currency"
},
"msrp": {
"type": "Currency"
},
"discount": {
"type": "Discount"
},
"quantity": {
"type": "number",
"description": "Deprecated"
},
"lowerLimit": {
"type": "number"
}
}
},
"Currency": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"code": {
"type": "string"
}
}
},
"Discount": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"PERCENT",
"FIXED"
]
},
"value": {
"type": "number"
},
"amount": {
"type": "number"
}
}
},
"PlanDeals": {
"type": "object",
"properties": {
"planId": {
"type": "string",
"required": true
},
"periodDeals": {
"type": "array",
"required": true,
"items": {
"type": "PeriodDeals"
}
}
}
},
"Plan": {
"type": "object",
"properties": {
"planId": {
"type": "string",
"required": true
},
"periods": {
"type": "array",
"items": {
"type": "Period"
}
}
}
}
}
}
OPERATION |
VERB |
PATH |
RETURNS |
Description |
---|---|---|---|---|
GET |
/discounts/resource-discount |
DiscountInfo instance |
Gets discount id and percent for specific resources of subscription |
|
POST |
/deals/get-for-plans |
|||
POST |
/deals |
HTTP Request
GET /aps/2/resources/{aps-id}/discounts/resource-discount
Description
Gets discount id and percent for specific resources of subscription
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
accountUuid |
String |
Account uuid of subscription owner |
subscriptionUuid |
String |
Subscription uuid |
resourceUuid |
String |
Uuid of subscription resource for which discount should be found |
Returns
DiscountInfo instance
HTTP Request
POST /aps/2/resources/{aps-id}/deals/get-for-plans
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
includeParentPlanDiscountConditions |
Boolean |
|
plans |
Array |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/deals
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
plans |
Array |
Returns
Discount Information.
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
discountId |
Integer |
Not Required |
Discount id. |
|
discountPercent |
Number |
Not Required |
Discount percent. |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
period |
Required |
Service plan period. |
||
parentPlanDiscountCondition |
Not Required |
Discount condition. |
||
resources |
Array of ResourceDeals |
Not Required |
Resource deals by service plan period. |
|
effectiveFees |
Array of EffectiveFees |
Not Required |
Effective fees for service plan periods. |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
unit |
Enum |
Not Required |
Period unit. Available values are “MONTHS” and “YEARS”. |
|
duration |
Integer |
Not Required |
Period duration. |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
planId |
String |
Required |
Parent service plan APS ID. |
|
planPeriod |
Not Required |
Parent service plan period. |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
resourceId |
String |
Required |
Resource APS ID. |
|
effectiveFees |
Array of EffectiveFees |
Not Required |
Effective fees for the service plan resources. |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
name |
String |
Required |
Fee name. |
|
fee |
Not Required |
Fee value. |
||
msrp |
Not Required |
Manufacturer’s Suggested Retail Price. |
||
discount |
Not Required |
Applicable discount. |
||
quantity |
Number |
Not Required |
Deprecated property. Quantity of resource units for which fee is indicated |
|
lowerLimit |
Number |
Not Required |
Lower limit for tiered price. |
Basic currency structure.
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
value |
String |
Not Required |
Amount. |
|
code |
String |
Not Required |
Currency Code |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
type |
Enum |
Not Required |
Discount type. Possible values are “PERCENT”, “FIXED”. |
|
value |
Number |
Not Required |
Discount value. |
|
amount |
Number |
Not Required |
Discount amount. |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
planId |
String |
Required |
Service plan APS ID. |
|
periodDeals |
Array of PeriodDeals |
Required |
Plan period deals. See PeriodDeals. |
Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.