Skip to content

Commit 46c69e4

Browse files
author
Andreas Brandt
committed
Change examples to work with changes
1 parent 4236682 commit 46c69e4

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

HubSpot.NET.Examples/Companies.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static void Example()
3737
/**
3838
* Get all companies with domain name "squaredup.com"
3939
*/
40-
var companies = api.Company.GetByDomain<CompanySearchResultModel>("squaredup.com", new CompanySearchByDomain()
40+
var companies = api.Company.GetByDomain<CompanyHubSpotModel>("squaredup.com", new CompanySearchByDomain()
4141
{
4242
Limit = 10
4343
});

HubSpot.NET.Examples/Contacts.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static void Example()
4646
Hidden = true, //set to true for engagements
4747
};
4848

49-
var uploaded = api.File.Upload(file);
49+
var uploaded = api.File.Upload<FileHubSpotModel>(file);
5050
var fileId = uploaded.Objects.First().Id;
5151

5252
/**
@@ -83,12 +83,8 @@ public static void Example()
8383
* Get all contacts with specific properties
8484
* By default only a few properties are returned
8585
*/
86-
var contacts = api.Contact.List<ContactListHubSpotModel>(new List<string>
87-
{
88-
"firstname",
89-
"lastname",
90-
"email"
91-
});
86+
var contacts = api.Contact.List<ContactHubSpotModel>(
87+
new ListRequestOptions { PropertiesToInclude = new List<string> { "firstname", "lastname", "email" } });
9288
}
9389
}
9490
}

HubSpot.NET.Examples/Deals.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ public static void Example()
3131
/**
3232
* Get all deals
3333
*/
34-
var deals = api.Deal.List<DealListHubSpotModel>(new List<string>
35-
{
36-
"dealname", "amount"
37-
}, false);
34+
var deals = api.Deal.List<DealHubSpotModel>(false,
35+
new ListRequestOptions { PropertiesToInclude = new List<string> { "dealname", "amount" } });
3836
}
3937
}
4038
}

0 commit comments

Comments
 (0)