Last active
October 26, 2018 23:58
-
-
Save diegodfsd/c45050af065e89bb44d55a3f1373c6d3 to your computer and use it in GitHub Desktop.
Exemplos de request para criar rule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Rule four", | |
"description": "description", | |
"conditions": [ | |
{ | |
"operator": "LessOrEqualsThan", | |
"type": "Weight", | |
"value": 1000 | |
}, | |
{ | |
"operator": "GreaterOrEqualsThan", | |
"type": "Width", | |
"value": 50 | |
} | |
], | |
"actions": [ | |
{ | |
"condition": "Twice", | |
"type": "RedirectTo", | |
"outputId": 1 | |
}, | |
{ | |
"condition": "Always", | |
"type": "RedirectTo", | |
"outputId": 4 | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Rule one", | |
"description": "description", | |
"conditions": [ | |
{ | |
"type": "LessOrEqualsThan", | |
"value": 1000 | |
}, | |
{ | |
"type": "BarcodeSize", | |
"value": 10, | |
"operator": "GreaterThan" | |
} | |
], | |
"actions": [ | |
{ | |
"condition": "Always", | |
"type": "RedirectTo", | |
"outputId": 1 | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Rule three", | |
"description": "description", | |
"conditions": [ | |
{ | |
"type": "LessOrEqualsThan", | |
"value": 1000 // 1kg | |
}, | |
{ | |
"type": "GreaterOrEqualsThan", | |
"value": 50 //50cm | |
} | |
], | |
"actions": [ | |
{ | |
"condition": "Twice", | |
"type": "RedirectTo", | |
"outputId": 1 | |
}, | |
{ | |
"condition": "Always", | |
"type": "RedirectTo", | |
"outputId": 4 | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Rule two", | |
"description": "description", | |
"conditions": [ | |
{ | |
"type": "BarcodeSize", | |
"value": 10, | |
"operator": "GreaterThan" | |
}, | |
{ | |
"type": "Barcode", | |
"value": "SP", | |
"startIndex": 5, | |
"length": 4 | |
} | |
], | |
"actions": [ | |
{ | |
"condition": "Once", | |
"type": "RedirectTo", | |
"outputId": 1 | |
}, | |
{ | |
"condition": "Always", | |
"type": "RedirectTo", | |
"outputId": 4 | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Enquanto montava esse exemplo surgiu a ideia de informar o typo de parametro explicitamente e nao implicitamente como hoje. Da forma que esta, se nao for uma condicao barcode ela é uma condição que vai tratar Height, Weight, Width, Depth e etc, mas nao fica claro para quem esta montando a condicao o que ela esta verificando.