2021-06-14 04:19:17 +00:00
|
|
|
import ApiClient from './ApiClient';
|
|
|
|
|
|
|
|
class ContactNotes extends ApiClient {
|
|
|
|
constructor() {
|
2021-10-25 13:05:58 +00:00
|
|
|
super('notes', { accountScoped: true });
|
|
|
|
this.contactId = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
get url() {
|
|
|
|
return `${this.baseUrl()}/contacts/${this.contactId}/notes`;
|
|
|
|
}
|
|
|
|
|
|
|
|
get(contactId) {
|
|
|
|
this.contactId = contactId;
|
|
|
|
return super.get();
|
|
|
|
}
|
|
|
|
|
|
|
|
create(contactId, content) {
|
|
|
|
this.contactId = contactId;
|
|
|
|
return super.create({ content });
|
|
|
|
}
|
|
|
|
|
|
|
|
delete(contactId, id) {
|
|
|
|
this.contactId = contactId;
|
|
|
|
return super.delete(id);
|
2021-06-14 04:19:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default new ContactNotes();
|