Victor Vega
Never
## Goal To extend the Authorizer exercise with a new operation. #### Extension Create a new operation: `deny-list`. That operation will set the merchants whose the authorizer should deny transactions from. The account has no deny-list by default, and it can be changed anytime. The `deny-list` operation input is going to be: ```json {"deny-list": ["merchant-A", "merchant-B"]} ``` The output of that operation is going to be the current account state: ```json {"account": {"active-card": true, "available-limit": 100, "deny-list": ["merchant-A", "merchant-B"]}, "violations": []} ``` #### Examples: For the following operations: ``` { "account": { "active-card": true, "available-limit": 1000 } } { "transaction": { "merchant": "merchant-A", "amount": 20, "time": "2019-02-13T10:00:00.000Z" } } { "transaction": { "merchant": "merchant-B", "amount": 30, "time": "2019-02-13T11:00:00.000Z" } } {"deny-list": ["merchant-A", "merchant-B"]} { "transaction": { "merchant": "merchant-A", "amount": 20, "time": "2019-02-13T12:00:00.000Z" } } {"deny-list": ["merchant-A"]} { "transaction": { "merchant": "merchant-B", "amount": 30, "time": "2019-02-13T13:00:00.000Z" } } ``` The output should be: ``` { "violations": [], "account": { "deny-list": [], "available-limit": 1000, "active-card": true } } { "violations": [], "account": { "deny-list": [], "available-limit": 980, "active-card": true } } { "violations": [], "account": { "deny-list": [], "available-limit": 950, "active-card": true } } { "violations": [], "account": { "deny-list": ["merchant-A", "merchant-B"], "available-limit": 950, "active-card": true } } { "violations": ["merchant-denied"], "account": { "deny-list": ["merchant-A", "merchant-B"], "available-limit": 950, "active-card": true } } { "violations": [], "account": { "deny-list": ["merchant-A"], "available-limit": 950, "active-card": true } } { "violations": [], "account": { "deny-list": ["merchant-A"], "available-limit": 920, "active-card": true } } ```
Raw Text
-
Movstream
7 min ago
-
Makers CBD Gummies Reviews
10 min ago
-
I have no control over my pussy.
16 min ago
-
mokello
19 min ago
-
I scratched our car, so here's my pussy as an apology
44 min ago
-
Teen Dildo Lover Scarlett Takes Off Her Clothes And Masturbates With Dildo!
1 hour ago
-
step mom and step son amateur سکس مامان و تعریف خاطرات سکس ایرانی داستانی کص مکالمه و حرف زدن
1 hour ago
-
Adult Telegram Channels
2 hours ago
-
No Depsosit Bonus
2 hours ago
-
Step Mom's Gigantic Tits Keep Falling Out - PervMom
2 hours ago