Skip to content

Instantly share code, notes, and snippets.

@diorahman
Last active May 2, 2016 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diorahman/79d07707971140fe51128f0f620b8014 to your computer and use it in GitHub Desktop.
Save diorahman/79d07707971140fe51128f0f620b8014 to your computer and use it in GitHub Desktop.
  • Validation Errors (machine-to-machine)
  • Not eligible Error (to-user)
  • Internal Errors (to-user)
    • EV related err
{
"owner": "",
"region": "ID",
"code": "entpack",
"name": "Telkomsel Entertainment Pack"
"authorization": {
"ip": "",
"port": "",
"signature": ""
},
"skus": [],
// the available contexts for input is request.{query, params, headers}
// available constructors: ["rule", "constant", "template"]
// available types: ["string", "number", "date", "map"]
// available aritmethic transformation: ["date"]
"input": {
"key": {
"value": {
"constructor": "rule",
"params": "",
"type": "string",
},
},
"foo": {
"value": {
"constructor": "rule",
"params": "",
"type": "date",
"options": {
"datePattern": "", // grab date data from string input
"dateFormat": "" // format the date object to string
}
},
},
},
// availabe contexts for metadata is request.{query, params, headers}, input.{*}
"metadata": {
},
// availabe contexts for metadata are request.{query, params, headers}, input.{*}, metadata.{*}
"validation": {
},
// availabe contexts for actions is request.{query, params, headers}, input.{*}, metadata.{*}
"actions": {
"isNew": [
{
"type": "activation"
},
{
"type": "notification",
"message": {
"template": "",
"params": []
}
}
]
},
"isDormant": [
{
"type": "activation"
},
{
"type": "notification"
}
],
// there might be more than one SKU buckets
"isMovable": [
{
"bucket": [],
"action": {
{
"type": "deactivation"
},
{
"type": "activation"
},
{
"type": "notification"
}
}
}
],
"isNotMovable": [
{
"type": "notification"
}
]
},
"output": {
"sync": {
},
"async": {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment