Aspect | Detail |
---|---|
Version | 0.5 |
Written by | GochoMugo [email protected] |
The data used in the application in its computations is fed through data files placed in this directory. This allows the application logic code remain independent of the different networks available.
The data files are written in JSON format.
A single data file can only hold one Network object.
Key | Type | Description |
---|---|---|
name | Name | Name of the Network |
meta | Metadata | Metadata associated with the network |
transactions | [Transaction] | Transactions supported by the network |
ussd_codes | [USSDCode] | The available shortcodes |
Key | Type | Description |
---|---|---|
spec | String | Specification version the file adheres to |
date_updated | Date | Date on which the data was last updated |
url | String | A valid URL to the network's homepage, preferably to the page concerning money transactions |
Key | Type | Description |
---|---|---|
name | Name | Type of the transaction |
classes | [Class] | The different classes of the transaction |
amount_input | boolean | false if an amount, as input to the transaction, is not applicable. Defaults to true . |
Key | Type | Description |
---|---|---|
name | Name | Name of the class of the transaction |
ranges | [Range] | The ranges in the transaction class |
amount | Cost | Amount charged to the user. This should be provided only if parent Transaction has amount_input set to false . |
message | String | Optional. Accompanying message for any raised errors, due to amount |
Key | Type | Description |
---|---|---|
low | Cost | Lower-bound of the Range |
high | Cost | Upper-bound of the Range |
amount | Cost | Amount charged to user |
This type is based on the native Number
type in JSON with these few
additions:
"-Infinity"
: implies-Infinity
"+Infinity"
: implies+Infinity
-1
: raisesAmountNotAllowedError
, inferring that the provided amount is forbidden for this transaction-2
: raisesAmountNotFoundError
, inferring that the amount for this transaction can not be determined using our data (depends on external factors, e.g. merchant reputation)
This is a USSD code, supported by the network.
Key | Type | Description |
---|---|---|
code | string | The actual USSD code. For example, *144# |
description | string | Describes the use of the code |
This is a string, uniquely identifying the named object.
Date, in YYYY-MM-DD
format. See this W3C document for
more information.