Skip to content

Commit 9e9edb8

Browse files
authored
Merge pull request #142 from CyberSource/nov-release
nov-release update
2 parents 8e16aa3 + fca1a78 commit 9e9edb8

File tree

75 files changed

+6637
-495
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+6637
-495
lines changed

Api/AsymmetricKeyManagementApi.cs

Lines changed: 268 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,29 @@ public interface IAsymmetricKeyManagementApi : IApiAccessor
8989
/// <param name="keyId">Key ID. </param>
9090
/// <returns>ApiResponse of KmsV2KeysAsymGet200Response</returns>
9191
ApiResponse<KmsV2KeysAsymGet200Response> GetP12KeyDetailsWithHttpInfo (string keyId);
92+
/// <summary>
93+
/// Activate or De-activate Asymmetric Key
94+
/// </summary>
95+
/// <remarks>
96+
/// Activate or De-activate Asymmetric Key
97+
/// </remarks>
98+
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
99+
/// <param name="keyId">Key ID. </param>
100+
/// <param name="updateAsymKeysRequest"></param>
101+
/// <returns>Object</returns>
102+
Object UpdateAsymKey (string keyId, UpdateAsymKeysRequest updateAsymKeysRequest);
103+
104+
/// <summary>
105+
/// Activate or De-activate Asymmetric Key
106+
/// </summary>
107+
/// <remarks>
108+
/// Activate or De-activate Asymmetric Key
109+
/// </remarks>
110+
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
111+
/// <param name="keyId">Key ID. </param>
112+
/// <param name="updateAsymKeysRequest"></param>
113+
/// <returns>ApiResponse of Object</returns>
114+
ApiResponse<Object> UpdateAsymKeyWithHttpInfo (string keyId, UpdateAsymKeysRequest updateAsymKeysRequest);
92115
#endregion Synchronous Operations
93116
#region Asynchronous Operations
94117
/// <summary>
@@ -154,6 +177,29 @@ public interface IAsymmetricKeyManagementApi : IApiAccessor
154177
/// <param name="keyId">Key ID. </param>
155178
/// <returns>Task of ApiResponse (KmsV2KeysAsymGet200Response)</returns>
156179
System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymGet200Response>> GetP12KeyDetailsAsyncWithHttpInfo (string keyId);
180+
/// <summary>
181+
/// Activate or De-activate Asymmetric Key
182+
/// </summary>
183+
/// <remarks>
184+
/// Activate or De-activate Asymmetric Key
185+
/// </remarks>
186+
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
187+
/// <param name="keyId">Key ID. </param>
188+
/// <param name="updateAsymKeysRequest"></param>
189+
/// <returns>Task of Object</returns>
190+
System.Threading.Tasks.Task<Object> UpdateAsymKeyAsync (string keyId, UpdateAsymKeysRequest updateAsymKeysRequest);
191+
192+
/// <summary>
193+
/// Activate or De-activate Asymmetric Key
194+
/// </summary>
195+
/// <remarks>
196+
/// Activate or De-activate Asymmetric Key
197+
/// </remarks>
198+
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
199+
/// <param name="keyId">Key ID. </param>
200+
/// <param name="updateAsymKeysRequest"></param>
201+
/// <returns>Task of ApiResponse (Object)</returns>
202+
System.Threading.Tasks.Task<ApiResponse<Object>> UpdateAsymKeyAsyncWithHttpInfo (string keyId, UpdateAsymKeysRequest updateAsymKeysRequest);
157203
#endregion Asynchronous Operations
158204
}
159205

@@ -874,5 +920,227 @@ public async System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymGet200Response
874920
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
875921
(KmsV2KeysAsymGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(KmsV2KeysAsymGet200Response))); // Return statement
876922
}
923+
/// <summary>
924+
/// Activate or De-activate Asymmetric Key Activate or De-activate Asymmetric Key
925+
/// </summary>
926+
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
927+
/// <param name="keyId">Key ID. </param>
928+
/// <param name="updateAsymKeysRequest"></param>
929+
/// <returns>Object</returns>
930+
public Object UpdateAsymKey (string keyId, UpdateAsymKeysRequest updateAsymKeysRequest)
931+
{
932+
logger.Debug("CALLING API \"UpdateAsymKey\" STARTED");
933+
this.SetStatusCode(null);
934+
ApiResponse<Object> localVarResponse = UpdateAsymKeyWithHttpInfo(keyId, updateAsymKeysRequest);
935+
logger.Debug("CALLING API \"UpdateAsymKey\" ENDED");
936+
this.SetStatusCode(localVarResponse.StatusCode);
937+
return localVarResponse.Data;
938+
}
939+
940+
/// <summary>
941+
/// Activate or De-activate Asymmetric Key Activate or De-activate Asymmetric Key
942+
/// </summary>
943+
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
944+
/// <param name="keyId">Key ID. </param>
945+
/// <param name="updateAsymKeysRequest"></param>
946+
/// <returns>ApiResponse of Object</returns>
947+
public ApiResponse< Object > UpdateAsymKeyWithHttpInfo (string keyId, UpdateAsymKeysRequest updateAsymKeysRequest)
948+
{
949+
LogUtility logUtility = new LogUtility();
950+
951+
// verify the required parameter 'keyId' is set
952+
if (keyId == null)
953+
{
954+
logger.Error("ApiException : Missing required parameter 'keyId' when calling AsymmetricKeyManagementApi->UpdateAsymKey");
955+
throw new ApiException(400, "Missing required parameter 'keyId' when calling AsymmetricKeyManagementApi->UpdateAsymKey");
956+
}
957+
// verify the required parameter 'updateAsymKeysRequest' is set
958+
if (updateAsymKeysRequest == null)
959+
{
960+
logger.Error("ApiException : Missing required parameter 'updateAsymKeysRequest' when calling AsymmetricKeyManagementApi->UpdateAsymKey");
961+
throw new ApiException(400, "Missing required parameter 'updateAsymKeysRequest' when calling AsymmetricKeyManagementApi->UpdateAsymKey");
962+
}
963+
964+
var localVarPath = $"/kms/v2/keys-asym/{keyId}";
965+
var localVarPathParams = new Dictionary<string, string>();
966+
var localVarQueryParams = new Dictionary<string, string>();
967+
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
968+
var localVarFormParams = new Dictionary<string, string>();
969+
var localVarFileParams = new Dictionary<string, FileParameter>();
970+
object localVarPostBody = null;
971+
972+
// to determine the Content-Type header
973+
string[] localVarHttpContentTypes = new string[] {
974+
"application/json;charset=utf-8"
975+
};
976+
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
977+
978+
// to determine the Accept header
979+
string[] localVarHttpHeaderAccepts = new string[] {
980+
"application/hal+json;charset=utf-8"
981+
};
982+
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
983+
if (localVarHttpHeaderAccept != null)
984+
{
985+
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
986+
}
987+
988+
if (keyId != null)
989+
{
990+
localVarPathParams.Add("keyId", Configuration.ApiClient.ParameterToString(keyId)); // path parameter
991+
}
992+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarPathParams)}");
993+
if (updateAsymKeysRequest != null && updateAsymKeysRequest.GetType() != typeof(byte[]))
994+
{
995+
localVarPostBody = Configuration.ApiClient.Serialize(updateAsymKeysRequest); // http body (model) parameter
996+
}
997+
else
998+
{
999+
localVarPostBody = updateAsymKeysRequest; // byte array
1000+
}
1001+
1002+
if (logUtility.IsMaskingEnabled(logger))
1003+
{
1004+
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
1005+
}
1006+
else
1007+
{
1008+
logger.Debug($"HTTP Request Body :\n{localVarPostBody}");
1009+
}
1010+
1011+
1012+
// make the HTTP request
1013+
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
1014+
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
1015+
localVarPathParams, localVarHttpContentType);
1016+
1017+
int localVarStatusCode = (int) localVarResponse.StatusCode;
1018+
1019+
if (ExceptionFactory != null)
1020+
{
1021+
Exception exception = ExceptionFactory("UpdateAsymKey", localVarResponse);
1022+
if (exception != null)
1023+
{
1024+
logger.Error($"Exception : {exception.Message}");
1025+
throw exception;
1026+
}
1027+
}
1028+
1029+
return new ApiResponse<Object>(localVarStatusCode,
1030+
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
1031+
(Object) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); // Return statement
1032+
}
1033+
1034+
/// <summary>
1035+
/// Activate or De-activate Asymmetric Key Activate or De-activate Asymmetric Key
1036+
/// </summary>
1037+
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
1038+
/// <param name="keyId">Key ID. </param>
1039+
/// <param name="updateAsymKeysRequest"></param>
1040+
/// <returns>Task of Object</returns>
1041+
public async System.Threading.Tasks.Task<Object> UpdateAsymKeyAsync (string keyId, UpdateAsymKeysRequest updateAsymKeysRequest)
1042+
{
1043+
logger.Debug("CALLING API \"UpdateAsymKeyAsync\" STARTED");
1044+
this.SetStatusCode(null);
1045+
ApiResponse<Object> localVarResponse = await UpdateAsymKeyAsyncWithHttpInfo(keyId, updateAsymKeysRequest);
1046+
logger.Debug("CALLING API \"UpdateAsymKeyAsync\" ENDED");
1047+
this.SetStatusCode(localVarResponse.StatusCode);
1048+
return localVarResponse.Data;
1049+
1050+
}
1051+
1052+
/// <summary>
1053+
/// Activate or De-activate Asymmetric Key Activate or De-activate Asymmetric Key
1054+
/// </summary>
1055+
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
1056+
/// <param name="keyId">Key ID. </param>
1057+
/// <param name="updateAsymKeysRequest"></param>
1058+
/// <returns>Task of ApiResponse (Object)</returns>
1059+
public async System.Threading.Tasks.Task<ApiResponse<Object>> UpdateAsymKeyAsyncWithHttpInfo (string keyId, UpdateAsymKeysRequest updateAsymKeysRequest)
1060+
{
1061+
LogUtility logUtility = new LogUtility();
1062+
1063+
// verify the required parameter 'keyId' is set
1064+
if (keyId == null)
1065+
{
1066+
logger.Error("ApiException : Missing required parameter 'keyId' when calling AsymmetricKeyManagementApi->UpdateAsymKey");
1067+
throw new ApiException(400, "Missing required parameter 'keyId' when calling AsymmetricKeyManagementApi->UpdateAsymKey");
1068+
}
1069+
// verify the required parameter 'updateAsymKeysRequest' is set
1070+
if (updateAsymKeysRequest == null)
1071+
{
1072+
logger.Error("ApiException : Missing required parameter 'updateAsymKeysRequest' when calling AsymmetricKeyManagementApi->UpdateAsymKey");
1073+
throw new ApiException(400, "Missing required parameter 'updateAsymKeysRequest' when calling AsymmetricKeyManagementApi->UpdateAsymKey");
1074+
}
1075+
1076+
var localVarPath = $"/kms/v2/keys-asym/{keyId}";
1077+
var localVarPathParams = new Dictionary<string, string>();
1078+
var localVarQueryParams = new Dictionary<string, string>();
1079+
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
1080+
var localVarFormParams = new Dictionary<string, string>();
1081+
var localVarFileParams = new Dictionary<string, FileParameter>();
1082+
object localVarPostBody = null;
1083+
1084+
// to determine the Content-Type header
1085+
string[] localVarHttpContentTypes = new string[] {
1086+
"application/json;charset=utf-8"
1087+
};
1088+
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
1089+
1090+
// to determine the Accept header
1091+
string[] localVarHttpHeaderAccepts = new string[] {
1092+
"application/hal+json;charset=utf-8"
1093+
};
1094+
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
1095+
if (localVarHttpHeaderAccept != null)
1096+
{
1097+
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
1098+
}
1099+
1100+
if (keyId != null)
1101+
{
1102+
localVarPathParams.Add("keyId", Configuration.ApiClient.ParameterToString(keyId)); // path parameter
1103+
}
1104+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarPathParams)}");
1105+
if (updateAsymKeysRequest != null && updateAsymKeysRequest.GetType() != typeof(byte[]))
1106+
{
1107+
localVarPostBody = Configuration.ApiClient.Serialize(updateAsymKeysRequest); // http body (model) parameter
1108+
}
1109+
else
1110+
{
1111+
localVarPostBody = updateAsymKeysRequest; // byte array
1112+
}
1113+
1114+
if (logUtility.IsMaskingEnabled(logger))
1115+
{
1116+
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
1117+
}
1118+
else
1119+
{
1120+
logger.Debug($"HTTP Request Body :\n{localVarPostBody}");
1121+
}
1122+
1123+
1124+
// make the HTTP request
1125+
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
1126+
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
1127+
localVarPathParams, localVarHttpContentType);
1128+
1129+
int localVarStatusCode = (int)localVarResponse.StatusCode;
1130+
1131+
if (ExceptionFactory != null)
1132+
{
1133+
Exception exception = ExceptionFactory("UpdateAsymKey", localVarResponse);
1134+
if (exception != null)
1135+
{
1136+
logger.Error($"Exception : {exception.Message}");
1137+
throw exception;
1138+
}
1139+
}
1140+
1141+
return new ApiResponse<Object>(localVarStatusCode,
1142+
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
1143+
(Object) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); // Return statement
1144+
}
8771145
}
8781146
}

0 commit comments

Comments
 (0)