Colleague Discount Handler¶
Overview¶
Inherits GenericHandler class from pymorri library. This code is executed by Colleague Discount Collection Lambda and is either processed in the PUT or DELETE endpoints based on the event http method received. Colleagues can be added to the Colleague Discount Club through PUT and also updated. Colleagues added or updated with this endpoint can also have additionalDiscountMembers, people who can also use this discount. Colleagues added to the Colleague Discount Club will be added to the dynamodb table with their additional members (if any). The DELETE endpoint is used to remove colleagues from this discount along with any of their additional members, thus they would be removed from the dynamodb table as well as from the Club.
If a PUT request is made for a particular employee id that has been previously created by the Discount API, with a different customerId in the body to the one originally used with the creation, then the following process will be done. The DELETE endpoint for this employee ID will be requested, then the employee data will be created once again, with the new customerId given associated with it, this scenario returns a 200 response (as shown in the PUT Endpoint Diagram below).
Diagrams¶
Overview Diagram¶
Colleague Discount API Endpoints¶
PUT Endpoint Diagram¶
DELETE Endpoint Diagram¶
Dependencies¶
SSM Attribute¶
See SSM Key