mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Allow a platform admin user to set flexible data retention for a service for a specified notification type.
Still a work in progress
This commit is contained in:
@@ -480,3 +480,23 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
"updated_by_id": user_id
|
||||
}
|
||||
return self.post("/service/{}/delivery-receipt-api".format(service_id), data)
|
||||
|
||||
def create_service_data_retention(self, service_id, notification_type, days_of_retention):
|
||||
data = {
|
||||
"notification_type": notification_type,
|
||||
"days_of_retention": days_of_retention
|
||||
}
|
||||
|
||||
return self.post("/service/{}/data-retention".format(service_id), data)
|
||||
|
||||
def update_service_data_retention(self, service_id, data_retention_id, days_of_retention):
|
||||
data = {
|
||||
"days_of_retention": days_of_retention
|
||||
}
|
||||
return self.post("/service/{}/data-retention/{}".format(service_id, data_retention_id), data)
|
||||
|
||||
def get_service_data_retention(self, service_id):
|
||||
return self.get("/service/{}/data-retention".format(service_id))
|
||||
|
||||
def get_service_data_retention_by_id(self, service_id, data_retention_id):
|
||||
return self.get("service/{}/data-retention/{}".format(service_id, data_retention_id))
|
||||
|
||||
Reference in New Issue
Block a user