share certificate and share product maker checker
This commit is contained in:
@@ -32,6 +32,16 @@ export class SharesService {
|
||||
return this.http.get(`/accounts/share/${accountId}`, { params: httpParams });
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} offset Paging offset.
|
||||
* @param {number} limit Paging size limit.
|
||||
* @returns {Observable<any>} A page of all (active) share accounts, backed by m_share_account.
|
||||
*/
|
||||
getAllShareAccounts(offset: number = 0, limit: number = 200): Observable<any> {
|
||||
const httpParams = new HttpParams().set('offset', offset.toString()).set('limit', limit.toString());
|
||||
return this.http.get('/accounts/share', { params: httpParams });
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} clientId Client Id assosciated with shares account.
|
||||
* @param {string} productId Product Id
|
||||
@@ -78,4 +88,45 @@ export class SharesService {
|
||||
const httpParams = new HttpParams().set('command', command);
|
||||
return this.http.post(`/accounts/share/${accountId}`, data, { params: httpParams });
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} accountId Shares Account Id.
|
||||
* @param {any} data Details edit payload.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
submitShareAccountEdit(accountId: string, data: any): Observable<any> {
|
||||
return this.http.post(`/shareaccounts/${accountId}/edit`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} accountId Shares Account Id.
|
||||
* @returns {Observable<any>} The pending details edit for this account, if any.
|
||||
*/
|
||||
getPendingShareAccountEdit(accountId: string): Observable<any> {
|
||||
return this.http.get(`/shareaccounts/${accountId}/edit/pending`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Observable<any>} All Share Account details edits pending approval.
|
||||
*/
|
||||
getAllPendingShareAccountEdits(): Observable<any> {
|
||||
return this.http.get(`/shareaccounts/edit/pending`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} accountId Shares Account Id.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
approveShareAccountEdit(accountId: string): Observable<any> {
|
||||
return this.http.post(`/shareaccounts/${accountId}/edit/approve`, {});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} accountId Shares Account Id.
|
||||
* @param {string} rejectReason Optional reason for rejection.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
rejectShareAccountEdit(accountId: string, rejectReason?: string): Observable<any> {
|
||||
return this.http.post(`/shareaccounts/${accountId}/edit/reject`, { rejectReason: rejectReason || '' });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user