-
Notifications
You must be signed in to change notification settings - Fork 134
Expand file tree
/
Copy pathCompanies.cs
More file actions
71 lines (61 loc) · 1.85 KB
/
Companies.cs
File metadata and controls
71 lines (61 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using HubSpot.NET.Api.Company;
using HubSpot.NET.Api.Company.Dto;
using HubSpot.NET.Core;
using System;
namespace HubSpot.NET.Examples
{
public class Companies
{
public static void Example(HubSpotApi api)
{
try
{
Tests(api);
Console.WriteLine("Companies example completed successfully.");
}
catch(Exception ex)
{
Console.WriteLine("Companies tests failed!");
Console.WriteLine(ex.ToString());
}
}
private static void Tests(HubSpotApi api)
{
/**
* Create a company
*/
//var company = api.Company.Create(new CompanyHubSpotModel()
//{
// Domain = "squaredup.com",
// Name = "Squared Up"
//});
/**
* Update a company's property
*/
//company.Description = "Data Visualization for Enterprise IT";
//api.Company.Update(company);
/**
* Get all companies with domain name "squaredup.com"
*/
//var companies = api.Company.GetByDomain("squaredup.com", new CompanySearchByDomain()
//{
// Limit = 10
//});
var companiesList = api.Company.List(new ListRequestOptions()
{
Limit = 10,
//PropertiesToInclude = new List<string>() {
// "name",
// "description",
// "companyId"
//}
//Offset = companyLists.Offset
});
Console.WriteLine($"Pass...");
/**
* Delete a contact
*/
//api.Company.Delete(company.Id.Value);
}
}
}