Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ var newCert = await client.Certificates.CreateAsync(new CreateCertificateRequest
{
DomainNames = new List<string> { "new.example.com" },
Provider = "letsencrypt",
Meta = new CertificateMeta { LetsencryptEmail = "admin@example.com", LetsencryptAgree = 1 },
Meta = new CertificateMeta { LetsencryptEmail = "admin@example.com", LetsencryptAgree = true },
});
```

Expand Down
2 changes: 1 addition & 1 deletion examples/CertificateManagement/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
Meta = new CertificateMeta
{
LetsencryptEmail = "admin@example.com",
LetsencryptAgree = 1,
LetsencryptAgree = true,
},
});
Console.WriteLine($"Provisioned certificate {newCert.Id} for {string.Join(", ", newCert.DomainNames)}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ public class CertificateMeta
public string? DnsProviderCredentials { get; set; }

/// <summary>Whether the user agreed to Let's Encrypt terms.</summary>
public int? LetsencryptAgree { get; set; }
public bool? LetsencryptAgree { get; set; }
}
4 changes: 2 additions & 2 deletions src/NginxApiClient/Models/ProxyHosts/ProxyHostResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public class ProxyHostResponse
/// </summary>
public class ProxyHostMeta
{
/// <summary>Number of times letsencrypt has been provisioned.</summary>
public int? LetsencryptAgree { get; set; }
/// <summary>Whether the user agreed to Let's Encrypt terms.</summary>
public bool? LetsencryptAgree { get; set; }

/// <summary>DNS challenge flag.</summary>
public bool? DnsChallenge { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public async Task CreateAsync_ProvisionsCert_WithLetsEncrypt()
{
DomainNames = new List<string> { "new.example.com" },
Provider = "letsencrypt",
Meta = new CertificateMeta { LetsencryptEmail = "admin@example.com", LetsencryptAgree = 1 },
Meta = new CertificateMeta { LetsencryptEmail = "admin@example.com", LetsencryptAgree = true },
};

var result = await client.CreateAsync(request);
Expand Down
Loading