Skip to content

Commit

Permalink
Updated Intercom.nuspec and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gonace committed Jun 27, 2023
1 parent 3626bbd commit 0e9e757
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Intercom/Intercom.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Intercom.NET</id>
<id>Intercom-NET</id>
<title>Intercom</title>
<version>$version$</version>
<authors>gonace</authors>
Expand Down
138 changes: 138 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,54 @@ The `Configure()` method can be initiated in two ways,
#### Examples
```c#
using Intercom.Constants;
using Intercom.Models;
using Intercom.Request.Companies;

Intercom.Configure(Url.Production, "bearerToken");

var company = new Company
{
Name = "Obscured",
CompanyId = "Obscured_1",
Plan = new Plan
{
Name = "Enterprise"
},
Size = 10,
Attributes = new Dictionary<string, object>
{
{"foo", "bar"},
{"bar", "foo"}
}
};
var request = new UpsertRequest(company);
var response = Intercom.Companies.Upsert(request)

```
```c#
using Intercom.Constants;
using Intercom.Models;
using Intercom.Request.Companies;

Intercom.Configure(Url.Production, "bearerToken", Version.Latest)

var company = new Company
{
Name = "Obscured",
CompanyId = "Obscured_1",
Plan = new Plan
{
Name = "Enterprise"
},
Size = 10,
Attributes = new Dictionary<string, object>
{
{"foo", "bar"},
{"bar", "foo"}
}
};
var request = new UpsertRequest(company);
var response = Intercom.Companies.Upsert(request)
```

### Advanced
Expand All @@ -38,6 +79,8 @@ If you only need access to one (or a few) clients you're able to configure each
#### Examples
```c#
using Intercom.Constants;
using Intercom.Models;
using Intercom.Request.Companies;

public class SomeClass
{
Expand All @@ -47,10 +90,59 @@ public class SomeClass
{
_client = new CompaniesClient(Url.Production, "bearerToken")
}

public Company Upsert()
{
var company = new Company
{
Name = "Obscured",
CompanyId = "Obscured_1",
Plan = new Plan
{
Name = "Enterprise"
},
Size = 10,
Attributes = new Dictionary<string, object>
{
{"foo", "bar"},
{"bar", "foo"}
}
};
var request = new UpsertRequest(company);
var response = Intercom.Companies.Upsert(request)

return response;
}

public async Task<Company> UpsertAsync()
{
var company = new Company
{
Name = "Obscured",
CompanyId = "Obscured_1",
Plan = new Plan
{
Name = "Enterprise"
},
Size = 10,
Attributes = new Dictionary<string, object>
{
{"foo", "bar"},
{"bar", "foo"}
}
};
var request = new UpsertRequest(company);
var response = await Intercom.Companies.UpsertAsync(request)

return response;
}
}
```

```c#
using Intercom.Constants;
using Intercom.Models;
using Intercom.Request.Companies;

public class SomeClass
{
Expand All @@ -60,6 +152,52 @@ public class SomeClass
{
_client = new CompaniesClient(Url.Production, "bearerToken", Version.Latest)
}

public Company Upsert()
{
var company = new Company
{
Name = "Obscured",
CompanyId = "Obscured_1",
Plan = new Plan
{
Name = "Enterprise"
},
Size = 10,
Attributes = new Dictionary<string, object>
{
{"foo", "bar"},
{"bar", "foo"}
}
};
var request = new UpsertRequest(company);
var response = Intercom.Companies.Upsert(request)

return response;
}

public async Task<Company> UpsertAsync()
{
var company = new Company
{
Name = "Obscured",
CompanyId = "Obscured_1",
Plan = new Plan
{
Name = "Enterprise"
},
Size = 10,
Attributes = new Dictionary<string, object>
{
{"foo", "bar"},
{"bar", "foo"}
}
};
var request = new UpsertRequest(company);
var response = await Intercom.Companies.UpsertAsync(request)

return response;
}
}
```

Expand Down

0 comments on commit 0e9e757

Please sign in to comment.