public async Task <CertificateIssuer> Create(CertificateIssuer request, Dictionary <string, string> issuerCredentials) { try { var bodyParams = new CertificateIssuer { Description = request.Description, IssuerAttributes = request.IssuerAttributes, IssuerType = request.IssuerType, Name = request.Name, }; var externalBodyParams = new { issuerCredentials = issuerCredentials, }; return(await Client.CallApi <CertificateIssuer>(path : "/v3/certificate-issuers", bodyParams : bodyParams, externalBodyParams : externalBodyParams, objectToUnpack : request, method : HttpMethods.POST)); } catch (ApiException e) { throw new CloudApiException(e.ErrorCode, e.Message, e.ErrorContent); } }
public async Task <CertificateIssuer> Update(string id, CertificateIssuer request, Dictionary <string, string> issuerCredentials = null) { try { var pathParams = new Dictionary <string, object> { { "certificate-issuer-id", id }, }; var bodyParams = new CertificateIssuer { Description = request.Description, IssuerAttributes = request.IssuerAttributes, Name = request.Name, }; var externalBodyParams = new { issuerCredentials = issuerCredentials, }; return(await Client.CallApi <CertificateIssuer>(path : "/v3/certificate-issuers/{certificate-issuer-id}", pathParams : pathParams, bodyParams : bodyParams, externalBodyParams : externalBodyParams, objectToUnpack : request, method : HttpMethods.PUT)); } catch (ApiException e) { throw new CloudApiException(e.ErrorCode, e.Message, e.ErrorContent); } }