Closed thewheat closed 6 years ago
Test code
using System;
using System.Collections.Generic;
using Intercom.Clients;
using Intercom.Core;
using Intercom.Data;
namespace use_intercom
{
class Program
{
static void Main(string[] args)
{
string TOKEN = "INSERT_TOKEN_HERE=";
UsersClient usersClient = new UsersClient(new Authentication(TOKEN));
CompanyClient companiesClient = new CompanyClient(new Authentication(TOKEN));
Company c = new Company { website = "http://company1take2.com", industry ="the ind", size = 11, company_id = "1", name = "Co 1" };
List<Company> companies = new List<Company>();
companies.Add(c);
usersClient.Create(new User
{
user_id = "1",
name = "User 1",
companies = companies
});
Company cc = companiesClient.View(new Company { company_id = "1" });
Console.WriteLine(cc.id);
Console.WriteLine(cc.website);
Console.WriteLine(cc.industry);
Console.WriteLine(cc.size);
}
}
}
Output
Fixes #108: https://github.com/intercom/intercom-dotnet/issues/108