You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An entity created by a [customer] into their bank account. The automation is created from a PayScript from among the ones that have been deployed by [developers]. If the selected payscript uses a trigger type that requires [trigger parameters], those need to be specified as part of creating the automation. If the selected payscript defines [script parameters], those need to be specified as part of creating the automation.
11
+
12
+
## Reserve
13
+
An abstract segregation of funds in a customer's account with a name and a purpose, so that those funds can be considered unavailable for other purposes, effectively reserving them. Funds can be added to and removed from the reserve by the account owner, or by whoever the account owner has given [consent] to do this.
14
+
15
+
## Consent
16
+
Consent is given by a [customer] to another customer perform specific actions on their accounts. The types of consent that can be given are:
17
+
Fund check: Allows checking if the owner has more available funds than a given amount
18
+
Automations:
19
+
Balance: Allows seeing the balance of the owner
20
+
Transactions: Allows making transactions on behalf of the owner
Copy file name to clipboardExpand all lines: docs/payscript/language_reference.md
+7-23Lines changed: 7 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,30 +11,11 @@ Payscript is a domain specific language (DSL) derived from Groovy. Using the Gro
11
11
For Syntax, this version does not differ from Groovy. please consult the [Groovy syntax reference][groovy syntax].
12
12
13
13
## Script Structure
14
-
A payscript is structured in such a way to best meet the needs of the architecture proposed by Quant Flow. During the script’s lifecycle it's expected to be deployed by developers into a collection, and to be made available to use with Automations.
15
-
16
-
[comment]: Add image
17
-
18
-
## Triggers
19
-
Triggers specify which type of event will cause the script to run. They take parameters, which are only given during the creation of an Automation (not when the script is written or deployed). These are the types of triggers available:
20
-
21
-
**time**: This trigger will cause the script to be run on a schedule, specified at the time when the automation is created. For example, daily at 14:00, or monthly on the first day of the month, at 00:00.
22
-
23
-
**balance**: This trigger will cause the script to run whenever the balance oft owns it is a certain number or above or below a specified number.
24
-
25
-
**transaction**: This trigger will cause the script to run whenever a transaction happens on the account who owns the script.
26
-
27
-
The actual values for these triggers (trigger parameters) will only be specified at the time when it is used in the creation of an automation.
28
-
29
-
The trigger definition follows the syntax:
30
-
31
-
trigger="[trigger]";
32
-
33
-
where [trigger] is replaced by a trigger type name. Example: trigger="time";
34
-
14
+
PayScript has two special structures, beyond the programming logic; A [trigger] definition and [script parameters]. The trigger specifies what type of event will cause the script to run. When an automation is created with the script, the parameters of the trigger will be specified. For example, if the script's trigger type is "time", the parameters would be which date and time it should run on.
15
+
Also during the creation of the automation, the script parameters required by the script will be supplied.
35
16
36
17
## Parameters
37
-
The script parameters are values which will be used by the script but will be specified by the user who creates an automation which uses this script. At that time they will be prompted for the values, much like the trigger parameters.
18
+
The script parameters are values which will be used by the script but will be specified by the customer who creates an automation which uses this script. At that time they will be prompted for the values, much like the trigger parameters.
38
19
39
20
Parameters are specified in the script using the following syntax:
40
21
@@ -49,4 +30,7 @@ The logic section contains what the script needs to accomplish, utilizing groovy
0 commit comments