CSCI-GA-2820-SP24-003 / payments

NYU DevOps Payments Service Spring 2024
Apache License 2.0
2 stars 2 forks source link

Add an action to default the `PaymentMethod` #30

Closed nedjulius closed 6 months ago

nedjulius commented 8 months ago

As a customer I need an action to default an existing payment method
So that I know which payment method is going to be used by default for any of my given transactions

Details and Assumptions

Given two existing payment methods, id = 1 and id = 2, where payment method with id = 2 is set to be default When I send a PUT/payment-method/1/set-default request Then the payment method field is_default for id = 1 should be set to True and I should receive a JSON response that contains the PaymentMethod information with it: {id: 1, name: ..., is_default: True}