ripple/ripple-rest

View on GitHub
api/lib/schemas/Notification.json

Summary

Maintainability
Test Coverage
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Notification",
  "description": "A ",
  "type": "object",
  "properties": {
    "account": {
      "description": "The Ripple address of the account to which the notification pertains",
      "$ref": "RippleAddress"
    },
    "type": {
      "description": "The resource type this notification corresponds to. Possible values are \"payment\", \"order\", \"trustline\", \"accountsettings\"",
      "type": "string",
      "pattern": "^payment|order|trustline|accountsettings$" 
    },
    "direction": {
      "description": "The direction of the transaction, from the perspective of the account being queried. Possible values are \"incoming\", \"outgoing\", and \"passthrough\"",
      "type": "string",
      "pattern": "^incoming|outgoing|passthrough$"
    },
    "state": {
      "description": "The state of the transaction from the perspective of the Ripple Ledger. Possible values are \"validated\" and \"failed\"",
      "type": "string",
      "pattern": "^validated|failed$" 
    },
    "result": {
      "description": "The rippled code indicating the success or failure type of the transaction. The code \"tesSUCCESS\" indicates that the transaction was successfully validated and written into the Ripple Ledger. All other codes will begin with the following prefixes: \"tec\", \"tef\", \"tel\", or \"tej\"",
      "type": "string",
      "pattern": "te[cfjlms][A-Za-z_]+"
    },
    "ledger": {
      "description": "The string representation of the index number of the ledger containing the validated or failed transaction. Failed payments will only be written into the Ripple Ledger if they fail after submission to a rippled and a Ripple Network fee is claimed",
      "type": "string",
      "pattern": "^[0-9]+$"
    },
    "hash": {
      "description": "The 256-bit hash of the transaction. This is used throughout the Ripple protocol as the unique identifier for the transaction",
      "$ref": "Hash256"
    },
    "timestamp": {
      "description": "The timestamp representing when the transaction was validated and written into the Ripple ledger",
      "$ref": "Timestamp"
    },
    "transaction_url": {
      "description": "A URL that can be used to fetch the full resource this notification corresponds to",
      "type": "string"
    },
    "previous_notification_url": {
      "description": "A URL that can be used to fetch the notification that preceded this one chronologically",
      "type": "string"
    },
    "next_notification_url": {
      "description": "A URL that can be used to fetch the notification that followed this one chronologically",
      "type": "string"
    }
  },
  "required": []
}