intercom / intercom-dotnet

Intercom API client library for .NET
https://developers.intercom.io/reference
Apache License 2.0
63 stars 54 forks source link

Cant create contact as lead #164

Open mohamadDev opened 4 years ago

mohamadDev commented 4 years ago

actually i solved it but because it was a minor fix I am dropping my solution here solution create a class "lead" extends contact

public class Lead: Contact
    {
        public string role { get; set; }
        public Lead()
        {
            role = "lead";
        }
    }

Create Lead

Authentication auth = new Authentication("yourAPITokenHere");
RestClientFactory factory = new RestClientFactory(auth);
ContactsClient contactsClient = new ContactsClient(factory);
var cont = new Lead() {email = "A@b.c", app_id= "yourppidhere"  };
contactsClient.Create(cont);