Skip to content

Commit

Permalink
Merge branch 'power-of-attorney-delete'
Browse files Browse the repository at this point in the history
  • Loading branch information
Capucinimo committed Feb 8, 2022
2 parents cc026ae + 2cb9079 commit e91c285
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ComDiadocApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,13 @@ EmployeePowerOfAttorney AddEmployeePowerOfAttorney(
string registrationNumber,
string issuerInn);

void DeleteEmployeePowerOfAttorney(
string authToken,
string boxId,
string userId,
string registrationNumber,
string issuerInn);

Departments.Department GetDepartmentByFullId(string authToken, string boxId, string departmentId);
Departments.DepartmentList GetDepartments(string authToken, string boxId, int? page = null, int? count = null);
Departments.Department CreateDepartment(string authToken, string boxId, [MarshalAs(UnmanagedType.IDispatch)] object departmentToCreate);
Expand Down Expand Up @@ -768,6 +775,11 @@ public EmployeePowerOfAttorney AddEmployeePowerOfAttorney(string authToken, stri
return diadoc.AddEmployeePowerOfAttorney(authToken, boxId, userId, registrationNumber, issuerInn);
}

public void DeleteEmployeePowerOfAttorney(string authToken, string boxId, string userId, string registrationNumber, string issuerInn)
{
diadoc.DeleteEmployeePowerOfAttorney(authToken, boxId, userId, registrationNumber, issuerInn);
}

public Departments.Department GetDepartmentByFullId(string authToken, string boxId, string departmentId)
{
return diadoc.GetDepartmentByFullId(authToken, boxId, departmentId);
Expand Down
10 changes: 10 additions & 0 deletions src/DiadocApi.Async.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,16 @@ public Task<EmployeePowerOfAttorney> AddEmployeePowerOfAttorneyAsync(string auth
return diadocHttpApi.AddEmployeePowerOfAttorneyAsync(authToken, boxId, userId, registrationNumber, issuerInn);
}

public Task DeleteEmployeePowerOfAttorneyAsync(string authToken, string boxId, string userId, string registrationNumber, string issuerInn)
{
if (authToken == null) throw new ArgumentNullException("authToken");
if (boxId == null) throw new ArgumentNullException("boxId");
if (userId == null) throw new ArgumentNullException("userId");
if (registrationNumber == null) throw new ArgumentNullException("registrationNumber");
if (issuerInn == null) throw new ArgumentNullException("issuerInn");
return diadocHttpApi.DeleteEmployeePowerOfAttorneyAsync(authToken, boxId, userId, registrationNumber, issuerInn);
}

public Task<Departments.Department> GetDepartmentByFullIdAsync(string authToken, string boxId, string departmentId)
{
if (authToken == null) throw new ArgumentNullException("authToken");
Expand Down
10 changes: 10 additions & 0 deletions src/DiadocApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,16 @@ public EmployeePowerOfAttorney AddEmployeePowerOfAttorney(string authToken, stri
return diadocHttpApi.AddEmployeePowerOfAttorney(authToken, boxId, userId, registrationNumber, issuerInn);
}

public void DeleteEmployeePowerOfAttorney(string authToken, string boxId, string userId, string registrationNumber, string issuerInn)
{
if (authToken == null) throw new ArgumentNullException("authToken");
if (boxId == null) throw new ArgumentNullException("boxId");
if (userId == null) throw new ArgumentNullException("userId");
if (registrationNumber == null) throw new ArgumentNullException("registrationNumber");
if (issuerInn == null) throw new ArgumentNullException("issuerInn");
diadocHttpApi.DeleteEmployeePowerOfAttorney(authToken, boxId, userId, registrationNumber, issuerInn);
}

public Departments.Department GetDepartmentByFullId(string authToken, string boxId, string departmentId)
{
if (authToken == null) throw new ArgumentNullException("authToken");
Expand Down
15 changes: 15 additions & 0 deletions src/DiadocHttpApi.Employees.PowersOfAttorney.Async.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,20 @@ public Task<EmployeePowerOfAttorney> AddEmployeePowerOfAttorneyAsync(
queryString.AddParameter("issuerInn", issuerInn);
return PerformHttpRequestAsync<EmployeePowerOfAttorney>(authToken, "POST", queryString.BuildPathAndQuery());
}

public Task DeleteEmployeePowerOfAttorneyAsync(
string authToken,
string boxId,
string userId,
string registrationNumber,
string issuerInn)
{
var queryString = new PathAndQueryBuilder("/DeleteEmployeePowerOfAttorney");
queryString.AddParameter("boxId", boxId);
queryString.AddParameter("userId", userId);
queryString.AddParameter("registrationNumber", registrationNumber);
queryString.AddParameter("issuerInn", issuerInn);
return PerformHttpRequestAsync(authToken, "POST", queryString.BuildPathAndQuery());
}
}
}
15 changes: 15 additions & 0 deletions src/DiadocHttpApi.Employees.PowersOfAttorney.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,20 @@ public EmployeePowerOfAttorney AddEmployeePowerOfAttorney(
queryString.AddParameter("issuerInn", issuerInn);
return PerformHttpRequest<EmployeePowerOfAttorney>(authToken, "POST", queryString.BuildPathAndQuery());
}

public void DeleteEmployeePowerOfAttorney(
string authToken,
string boxId,
string userId,
string registrationNumber,
string issuerInn)
{
var queryString = new PathAndQueryBuilder("/DeleteEmployeePowerOfAttorney");
queryString.AddParameter("boxId", boxId);
queryString.AddParameter("userId", userId);
queryString.AddParameter("registrationNumber", registrationNumber);
queryString.AddParameter("issuerInn", issuerInn);
PerformHttpRequest(authToken, "POST", queryString.BuildPathAndQuery());
}
}
}
14 changes: 14 additions & 0 deletions src/IDiadocApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ EmployeePowerOfAttorney AddEmployeePowerOfAttorney(
string registrationNumber,
string issuerInn);

void DeleteEmployeePowerOfAttorney(
string authToken,
string boxId,
string userId,
string registrationNumber,
string issuerInn);

Departments.Department GetDepartmentByFullId(string authToken, string boxId, string departmentId);
Departments.DepartmentList GetDepartments(string authToken, string boxId, int? page = null, int? count = null);
Departments.Department CreateDepartment(string authToken, string boxId, Departments.DepartmentToCreate departmentToCreate);
Expand Down Expand Up @@ -512,6 +519,13 @@ Task<EmployeePowerOfAttorney> AddEmployeePowerOfAttorneyAsync(
string registrationNumber,
string issuerInn);

Task DeleteEmployeePowerOfAttorneyAsync(
string authToken,
string boxId,
string userId,
string registrationNumber,
string issuerInn);

Task<EmployeeSubscriptions> GetSubscriptionsAsync(string authToken, string boxId, string userId);
Task<EmployeeSubscriptions> UpdateSubscriptionsAsync(string authToken, string boxId, string userId, SubscriptionsToUpdate subscriptionsToUpdate);
Task<Departments.Department> GetDepartmentByFullIdAsync(string authToken, string boxId, string departmentId);
Expand Down

0 comments on commit e91c285

Please sign in to comment.