Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eng 6888 dotnet 3.0.x documentation #409

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tenants
  • Loading branch information
greathouse committed Jul 1, 2024
commit ce8cb0aa0d44716b64a30ab89f1f824b6d4125b3
59 changes: 39 additions & 20 deletions docs/api/tenants/tenants.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,17 @@ const tenant = await bt.tenants.retrieve();
<TabItem value="csharp" label="C#">

```csharp showLineNumbers
using BasisTheory.net.Tenants;
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;

var client = new TenantClient("<MANAGEMENT_API_KEY>");
Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");

var tenant = await client.GetSelfAsync();
var apiInstance = new TenantsApi(config);

Tenant result = apiInstance.Get();
```

</TabItem>
Expand Down Expand Up @@ -197,20 +203,21 @@ const tenant = await bt.tenants.update({
<TabItem value="csharp" label="C#">

```csharp showLineNumbers
using BasisTheory.net.Tenants;
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;

var client = new TenantClient("<MANAGEMENT_API_KEY>");
Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");

var tenant = await client.UpdateAsync(new TenantUpdateRequest
var apiInstance = new TenantsApi(config);
var updateTenantRequest = new UpdateTenantRequest(/*required parameters*/)
{
Name = "My Example Tenant",
Settings = new Dictionary<string, string>
{
{ "fingerprint_tokens", "true" },
{ "disable_ephemeral_proxy", "true" },
{ "deduplicate_tokens", "true" }
}
});
// Additional parameters
};

Tenant result = apiInstance.Update(updateTenantRequest);
```

</TabItem>
Expand Down Expand Up @@ -351,11 +358,17 @@ await bt.tenants.delete();
<TabItem value="csharp" label="C#">

```csharp showLineNumbers
using BasisTheory.net.Tenants;
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;

Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");

var client = new TenantClient("<MANAGEMENT_API_KEY>");
var apiInstance = new TenantsApi(config);

await client.DeleteAsync();
apiInstance.Delete();
```

</TabItem>
Expand Down Expand Up @@ -459,11 +472,17 @@ const tenantUsageReport = await bt.tenants.retrieveUsageReport();
<TabItem value="csharp" label="C#">

```csharp showLineNumbers
using BasisTheory.net.Tenants;
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;

Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");

var client = new TenantClient("<MANAGEMENT_API_KEY>");
var apiInstance = new TenantsApi(config);

var tenantUsageReport = await client.GetTenantUsageReportAsync();
TenantUsageReport result = apiInstance.GetTenantUsageReport();
```

</TabItem>
Expand Down