Pairing Challenge - Antonio Olivares
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
-
Licking Her Sweet Pussy And Put Thick Cock Inside! 4K
10 min ago
-
Untitled
18 min ago
-
dfddsfsdsdf
31 min ago
-
asda4 fdfhhgjkl
33 min ago
-
Teen beauty Elektra Rose and MILF Nikki Daniels using sex toys together
40 min ago
-
sdf dfsdsf sdfdfs dfsfds fdfdddf
52 min ago
-
FamilyXXX - Teen Latina Stepsister Gets The Dick She Needs (Maya Farrell)
1 hour ago
-
NEW🔥💯 UPDTAED🔗 CP😈😏 FOLDERS📁 500 VIDEOS
1 hour ago
-
Adult Telegram Channels
1 hour ago
-
Stepsis Zoe Gets Caught - Convinces Stepbrother To Fuck Her
1 hour ago