feat: client actions (delete) (#1073)

Fixes: #1072
This commit is contained in:
Karan Takalkar
2020-07-13 14:53:04 +05:30
committed by GitHub
parent 20c29569f8
commit 7bd79fb498
3 changed files with 25 additions and 8 deletions
+4 -7
View File
@@ -45,6 +45,10 @@ export class ClientsService {
return this.http.get(`/clients/${clientId}`);
}
deleteClient(clientId: string) {
return this.http.delete(`/clients/${clientId}`);
}
getClientDataAndTemplate(clientId: string) {
const httpParams = new HttpParams()
.set('template', 'true')
@@ -86,18 +90,11 @@ export class ClientsService {
return this.http.get(`/clients/${clientId}/charges`, { params: httpParams });
}
/**
* @param chargeData Charge Data to be waived.
*/
waiveClientCharge(chargeData: any) {
const httpParams = new HttpParams().set('command', 'waive');
return this.http.post(`/clients/${chargeData.clientId}/charges/${chargeData.resourceType}`, chargeData, { params: httpParams });
}
/**
* Get All Client Cgarges.
* @param clientId Client Id of the user.
*/
getAllClientCharges(clientId: string) {
return this.http.get(`/clients/${clientId}/charges`);
}