public List <AddedOrUpdatedNote> AddOrUpdateNote(AddOrUpdateNoteRequest addOrUpdateNoteRequest) { var request = addOrUpdateNoteRequest; var response = AmoMethod.Post <AddOrUpdateNoteResponse>(request, _crmConfig); return(response.Response.Tasks); }
public List <AddedOrUpdatedContact> AddOrUpdateContact(AddOrUpdateContactRequest addOrUpdateContactRequest) { var request = addOrUpdateContactRequest; var response = AmoMethod.Post <AddOrUpdateContactResponse>(request, _crmConfig); return(response.Response.Contacts); }
public List <AddedOrUpdatedLead> AddOrUpdateLead(AddOrUpdateLeadRequest addOrUpdateLeadRequest) { var request = addOrUpdateLeadRequest; var response = AmoMethod.Post <AddOrUpdateLeadResponse>(request, _crmConfig); long id = 0; if (addOrUpdateLeadRequest.Request.Leads.Add != null) { id = response.Response.Leads.Add.First().Id; } else { id = response.Response.Leads.Update.First().Id; } return(new List <AddedOrUpdatedLead>() { new AddedOrUpdatedLead() { Id = id } }); //return response.Response.Leads; }
public List <AddedOrUpdatedCompany> AddOrUpdateCompany(AddOrUpdateCompanyRequest addOrUpdateCompanyRequest) { var request = addOrUpdateCompanyRequest; var response = AmoMethod.Post <AddOrUpdateCompanyResponse>(request, _crmConfig); return(response.Response.Companies); }