From fcdffa9e1584c606ede7c6f9bb5a274a6d3f0b66 Mon Sep 17 00:00:00 2001 From: Gaurav Bansal Date: Mon, 11 Apr 2022 16:07:42 +0530 Subject: [PATCH 1/5] april-22 release --- .gitignore | 7 + Client/Configuration.cs | 15 + Model/CreateSharedSecretKeysRequest1.cs | 144 ++++++++++ Model/Kmsv2keyssymverifiKeyInformation.cs | 205 +++++++++++++ ...nformationAuthorizationOptionsInitiator.cs | 10 +- ...nformationAuthorizationOptionsInitiator.cs | 10 +- cybersource-rest-client-dotnet.csproj | 13 +- cybersource-rest-client-dotnet.sln | 10 +- docs/CreateSharedSecretKeysRequest1.md | 10 + docs/Kmsv2keyssymverifiKeyInformation.md | 11 + ...nformationAuthorizationOptionsInitiator.md | 2 +- ...nformationAuthorizationOptionsInitiator.md | 2 +- docs/SymmetricKeyManagementApi.md | 64 +++++ generator/cybersource-rest-spec.json | 271 +++++++++++++++++- test/Api/SymmetricKeyManagementApiTests.cs | 13 + .../CreateSharedSecretKeysRequest1Tests.cs | 86 ++++++ .../Kmsv2keyssymverifiKeyInformationTests.cs | 94 ++++++ ...cybersource-rest-client-dotnet.Test.csproj | 2 +- 18 files changed, 938 insertions(+), 31 deletions(-) create mode 100644 Model/CreateSharedSecretKeysRequest1.cs create mode 100644 Model/Kmsv2keyssymverifiKeyInformation.cs create mode 100644 docs/CreateSharedSecretKeysRequest1.md create mode 100644 docs/Kmsv2keyssymverifiKeyInformation.md create mode 100644 test/Model/CreateSharedSecretKeysRequest1Tests.cs create mode 100644 test/Model/Kmsv2keyssymverifiKeyInformationTests.cs diff --git a/.gitignore b/.gitignore index 28b72cef..356f0ebe 100644 --- a/.gitignore +++ b/.gitignore @@ -183,3 +183,10 @@ $RECYCLE.BIN/ # Visual Studio 2014 CTP **/*.sln.ide +.swagger-codegen-ignore +.swagger-codegen-ignore +.swagger-codegen/VERSION +.travis.yml +.vs/slnx.sqlite +.vs/tasks.vs.json +.vs/VSWorkspaceState.json diff --git a/Client/Configuration.cs b/Client/Configuration.cs index ed85cd73..df2c55b6 100644 --- a/Client/Configuration.cs +++ b/Client/Configuration.cs @@ -170,6 +170,21 @@ public int Timeout /// public void SetApiClientUsingDefault (ApiClient apiClient = null) { + // if (apiClient == null) + // { + // if (Default != null && Default.ApiClient == null) + // Default.ApiClient = new ApiClient(); + + // ApiClient = Default != null ? Default.ApiClient : new ApiClient(); + // } + // else + // { + // if (Default != null && Default.ApiClient == null) + // Default.ApiClient = apiClient; + + // ApiClient = apiClient; + // } + if (apiClient == null) { ApiClient = new ApiClient(); diff --git a/Model/CreateSharedSecretKeysRequest1.cs b/Model/CreateSharedSecretKeysRequest1.cs new file mode 100644 index 00000000..24f47be2 --- /dev/null +++ b/Model/CreateSharedSecretKeysRequest1.cs @@ -0,0 +1,144 @@ +/* + * CyberSource Merged Spec + * + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = CyberSource.Client.SwaggerDateConverter; + +namespace CyberSource.Model +{ + /// + /// CreateSharedSecretKeysRequest1 + /// + [DataContract] + public partial class CreateSharedSecretKeysRequest1 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// ClientReferenceInformation. + /// KeyInformation. + public CreateSharedSecretKeysRequest1(Kmsv2keyssymClientReferenceInformation ClientReferenceInformation = default(Kmsv2keyssymClientReferenceInformation), List KeyInformation = default(List)) + { + this.ClientReferenceInformation = ClientReferenceInformation; + this.KeyInformation = KeyInformation; + } + + /// + /// Gets or Sets ClientReferenceInformation + /// + [DataMember(Name="clientReferenceInformation", EmitDefaultValue=false)] + public Kmsv2keyssymClientReferenceInformation ClientReferenceInformation { get; set; } + + /// + /// Gets or Sets KeyInformation + /// + [DataMember(Name="keyInformation", EmitDefaultValue=false)] + public List KeyInformation { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSharedSecretKeysRequest1 {\n"); + sb.Append(" ClientReferenceInformation: ").Append(ClientReferenceInformation).Append("\n"); + sb.Append(" KeyInformation: ").Append(KeyInformation).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as CreateSharedSecretKeysRequest1); + } + + /// + /// Returns true if CreateSharedSecretKeysRequest1 instances are equal + /// + /// Instance of CreateSharedSecretKeysRequest1 to be compared + /// Boolean + public bool Equals(CreateSharedSecretKeysRequest1 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.ClientReferenceInformation == other.ClientReferenceInformation || + this.ClientReferenceInformation != null && + this.ClientReferenceInformation.Equals(other.ClientReferenceInformation) + ) && + ( + this.KeyInformation == other.KeyInformation || + this.KeyInformation != null && + this.KeyInformation.SequenceEqual(other.KeyInformation) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.ClientReferenceInformation != null) + hash = hash * 59 + this.ClientReferenceInformation.GetHashCode(); + if (this.KeyInformation != null) + hash = hash * 59 + this.KeyInformation.GetHashCode(); + return hash; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Model/Kmsv2keyssymverifiKeyInformation.cs b/Model/Kmsv2keyssymverifiKeyInformation.cs new file mode 100644 index 00000000..c062bde3 --- /dev/null +++ b/Model/Kmsv2keyssymverifiKeyInformation.cs @@ -0,0 +1,205 @@ +/* + * CyberSource Merged Spec + * + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = CyberSource.Client.SwaggerDateConverter; + +namespace CyberSource.Model +{ + /// + /// key information + /// + [DataContract] + public partial class Kmsv2keyssymverifiKeyInformation : IEquatable, IValidatableObject + { + /// + /// Algorithm for message signature authentication + /// + /// Algorithm for message signature authentication + [JsonConverter(typeof(StringEnumConverter))] + public enum DigestAlgorithmEnum + { + + /// + /// Enum HMACSHA1 for "HMACSHA1" + /// + [EnumMember(Value = "HMACSHA1")] + HMACSHA1, + + /// + /// Enum HMACSHA2 for "HMACSHA2" + /// + [EnumMember(Value = "HMACSHA2")] + HMACSHA2 + } + + /// + /// Algorithm for message signature authentication + /// + /// Algorithm for message signature authentication + [DataMember(Name="digestAlgorithm", EmitDefaultValue=false)] + public DigestAlgorithmEnum? DigestAlgorithm { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Kmsv2keyssymverifiKeyInformation() { } + /// + /// Initializes a new instance of the class. + /// + /// Merchant Id (required). + /// Reference number is a unique identifier provided by the client along with the organization Id. This is an optional field provided solely for the client’s convenience. If client specifies value for this field in the request, it is expected to be available in the response. . + /// Algorithm for message signature authentication (default to DigestAlgorithmEnum.HMACSHA2). + public Kmsv2keyssymverifiKeyInformation(string OrganizationId = default(string), string ReferenceNumber = default(string), DigestAlgorithmEnum? DigestAlgorithm = DigestAlgorithmEnum.HMACSHA2) + { + // to ensure "OrganizationId" is required (not null) + if (OrganizationId == null) + { + throw new InvalidDataException("OrganizationId is a required property for Kmsv2keyssymverifiKeyInformation and cannot be null"); + } + else + { + this.OrganizationId = OrganizationId; + } + this.ReferenceNumber = ReferenceNumber; + // use default value if no "DigestAlgorithm" provided + if (DigestAlgorithm == null) + { + this.DigestAlgorithm = DigestAlgorithmEnum.HMACSHA2; + } + else + { + this.DigestAlgorithm = DigestAlgorithm; + } + } + + /// + /// Merchant Id + /// + /// Merchant Id + [DataMember(Name="organizationId", EmitDefaultValue=false)] + public string OrganizationId { get; set; } + + /// + /// Reference number is a unique identifier provided by the client along with the organization Id. This is an optional field provided solely for the client’s convenience. If client specifies value for this field in the request, it is expected to be available in the response. + /// + /// Reference number is a unique identifier provided by the client along with the organization Id. This is an optional field provided solely for the client’s convenience. If client specifies value for this field in the request, it is expected to be available in the response. + [DataMember(Name="referenceNumber", EmitDefaultValue=false)] + public string ReferenceNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Kmsv2keyssymverifiKeyInformation {\n"); + sb.Append(" OrganizationId: ").Append(OrganizationId).Append("\n"); + sb.Append(" ReferenceNumber: ").Append(ReferenceNumber).Append("\n"); + sb.Append(" DigestAlgorithm: ").Append(DigestAlgorithm).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Kmsv2keyssymverifiKeyInformation); + } + + /// + /// Returns true if Kmsv2keyssymverifiKeyInformation instances are equal + /// + /// Instance of Kmsv2keyssymverifiKeyInformation to be compared + /// Boolean + public bool Equals(Kmsv2keyssymverifiKeyInformation other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.OrganizationId == other.OrganizationId || + this.OrganizationId != null && + this.OrganizationId.Equals(other.OrganizationId) + ) && + ( + this.ReferenceNumber == other.ReferenceNumber || + this.ReferenceNumber != null && + this.ReferenceNumber.Equals(other.ReferenceNumber) + ) && + ( + this.DigestAlgorithm == other.DigestAlgorithm || + this.DigestAlgorithm != null && + this.DigestAlgorithm.Equals(other.DigestAlgorithm) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.OrganizationId != null) + hash = hash * 59 + this.OrganizationId.GetHashCode(); + if (this.ReferenceNumber != null) + hash = hash * 59 + this.ReferenceNumber.GetHashCode(); + if (this.DigestAlgorithm != null) + hash = hash * 59 + this.DigestAlgorithm.GetHashCode(); + return hash; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Model/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.cs b/Model/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.cs index dc48ee0a..11067fae 100644 --- a/Model/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.cs +++ b/Model/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.cs @@ -35,9 +35,9 @@ public partial class Ptsv2paymentsProcessingInformationAuthorizationOptionsIniti /// /// This field indicates whether the transaction is a merchant-initiated transaction or customer-initiated transaction. Valid values: - **customer** - **merchant** . /// Indicates to the issuing bank two things: - The merchant has received consent from the cardholder to store their card details on file - The merchant wants the issuing bank to check out the card details before the merchant initiates their first transaction for this cardholder. The purpose of the merchant-initiated transaction is to ensure that the cardholder’s credentials are valid (that the card is not stolen or has restrictions) and that the card details are good to be stored on the merchant’s file for future transactions. Valid values: - `true` means merchant will use this transaction to store payment credentials for follow-up merchant-initiated transactions. - `false` means merchant will not use this transaction to store payment credentials for follow-up merchant-initiated transactions. For details, see `subsequent_auth_first` field description in the [Credit Card Services Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/) **NOTE:** The value for this field does not correspond to any data in the TC 33 capture file5. This field is supported only for Visa transactions on CyberSource through VisaNet. . - /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **true** means the merchant-initiated transaction came from a card that was already stored on file. - **false** means the merchant-initiated transaction came from a card that was not stored on file. . + /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **Y** means the merchant-initiated transaction came from a card that was already stored on file. - **N** means the merchant-initiated transaction came from a card that was not stored on file. . /// MerchantInitiatedTransaction. - public Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator(string Type = default(string), bool? CredentialStoredOnFile = default(bool?), bool? StoredCredentialUsed = default(bool?), Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction MerchantInitiatedTransaction = default(Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction)) + public Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator(string Type = default(string), bool? CredentialStoredOnFile = default(bool?), string StoredCredentialUsed = default(string), Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction MerchantInitiatedTransaction = default(Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction)) { this.Type = Type; this.CredentialStoredOnFile = CredentialStoredOnFile; @@ -60,11 +60,11 @@ public partial class Ptsv2paymentsProcessingInformationAuthorizationOptionsIniti public bool? CredentialStoredOnFile { get; set; } /// - /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **true** means the merchant-initiated transaction came from a card that was already stored on file. - **false** means the merchant-initiated transaction came from a card that was not stored on file. + /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **Y** means the merchant-initiated transaction came from a card that was already stored on file. - **N** means the merchant-initiated transaction came from a card that was not stored on file. /// - /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **true** means the merchant-initiated transaction came from a card that was already stored on file. - **false** means the merchant-initiated transaction came from a card that was not stored on file. + /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **Y** means the merchant-initiated transaction came from a card that was already stored on file. - **N** means the merchant-initiated transaction came from a card that was not stored on file. [DataMember(Name="storedCredentialUsed", EmitDefaultValue=false)] - public bool? StoredCredentialUsed { get; set; } + public string StoredCredentialUsed { get; set; } /// /// Gets or Sets MerchantInitiatedTransaction diff --git a/Model/Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator.cs b/Model/Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator.cs index 99ae7bd8..68f86eb5 100644 --- a/Model/Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator.cs +++ b/Model/Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator.cs @@ -33,18 +33,18 @@ public partial class Ptsv2paymentsidProcessingInformationAuthorizationOptionsIni /// /// Initializes a new instance of the class. /// - /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **true** means the merchant-initiated transaction came from a card that was already stored on file. - **false** means the merchant-initiated transaction came from a card that was not stored on file. . - public Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator(bool? StoredCredentialUsed = default(bool?)) + /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **Y** means the merchant-initiated transaction came from a card that was already stored on file. - **N** means the merchant-initiated transaction came from a card that was not stored on file. . + public Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator(string StoredCredentialUsed = default(string)) { this.StoredCredentialUsed = StoredCredentialUsed; } /// - /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **true** means the merchant-initiated transaction came from a card that was already stored on file. - **false** means the merchant-initiated transaction came from a card that was not stored on file. + /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **Y** means the merchant-initiated transaction came from a card that was already stored on file. - **N** means the merchant-initiated transaction came from a card that was not stored on file. /// - /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **true** means the merchant-initiated transaction came from a card that was already stored on file. - **false** means the merchant-initiated transaction came from a card that was not stored on file. + /// Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **Y** means the merchant-initiated transaction came from a card that was already stored on file. - **N** means the merchant-initiated transaction came from a card that was not stored on file. [DataMember(Name="storedCredentialUsed", EmitDefaultValue=false)] - public bool? StoredCredentialUsed { get; set; } + public string StoredCredentialUsed { get; set; } /// /// Returns the string presentation of the object diff --git a/cybersource-rest-client-dotnet.csproj b/cybersource-rest-client-dotnet.csproj index cccdf12b..c5791ca6 100644 --- a/cybersource-rest-client-dotnet.csproj +++ b/cybersource-rest-client-dotnet.csproj @@ -9,10 +9,10 @@ OpenAPI spec version: 0.0.1 --> - + Debug AnyCPU - {A3B92FD4-787B-411A-A09F-96CB74C8FF5D} + {BFBBDA15-4C78-4924-AA89-8057C77BA052} Library Properties CyberSource @@ -38,10 +38,6 @@ OpenAPI spec version: 0.0.1 4 - - False - packages\CyberSource.Authentication.0.0.0.13\lib\AuthenticationSdk.dll - @@ -52,6 +48,9 @@ OpenAPI spec version: 0.0.1 + + packages\CyberSource.Authentication.0.0.0.13\lib\AuthenticationSdk.dll + False packages\NLog.4.5.10\lib\net45\NLog.dll @@ -75,4 +74,4 @@ OpenAPI spec version: 0.0.1 - \ No newline at end of file + diff --git a/cybersource-rest-client-dotnet.sln b/cybersource-rest-client-dotnet.sln index 1b3577f7..83e6fbc9 100644 --- a/cybersource-rest-client-dotnet.sln +++ b/cybersource-rest-client-dotnet.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cybersource-rest-client-dotnet", "cybersource-rest-client-dotnet.csproj", "{A3B92FD4-787B-411A-A09F-96CB74C8FF5D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cybersource-rest-client-dotnet", "cybersource-rest-client-dotnet.csproj", "{BFBBDA15-4C78-4924-AA89-8057C77BA052}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cybersource-rest-client-dotnet.Test", "test\cybersource-rest-client-dotnet.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A3B92FD4-787B-411A-A09F-96CB74C8FF5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A3B92FD4-787B-411A-A09F-96CB74C8FF5D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A3B92FD4-787B-411A-A09F-96CB74C8FF5D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A3B92FD4-787B-411A-A09F-96CB74C8FF5D}.Release|Any CPU.Build.0 = Release|Any CPU + {BFBBDA15-4C78-4924-AA89-8057C77BA052}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFBBDA15-4C78-4924-AA89-8057C77BA052}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFBBDA15-4C78-4924-AA89-8057C77BA052}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFBBDA15-4C78-4924-AA89-8057C77BA052}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/docs/CreateSharedSecretKeysRequest1.md b/docs/CreateSharedSecretKeysRequest1.md new file mode 100644 index 00000000..dff2d535 --- /dev/null +++ b/docs/CreateSharedSecretKeysRequest1.md @@ -0,0 +1,10 @@ +# CyberSource.Model.CreateSharedSecretKeysRequest1 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientReferenceInformation** | [**Kmsv2keyssymClientReferenceInformation**](Kmsv2keyssymClientReferenceInformation.md) | | [optional] +**KeyInformation** | [**List<Kmsv2keyssymverifiKeyInformation>**](Kmsv2keyssymverifiKeyInformation.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/Kmsv2keyssymverifiKeyInformation.md b/docs/Kmsv2keyssymverifiKeyInformation.md new file mode 100644 index 00000000..76929a28 --- /dev/null +++ b/docs/Kmsv2keyssymverifiKeyInformation.md @@ -0,0 +1,11 @@ +# CyberSource.Model.Kmsv2keyssymverifiKeyInformation +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OrganizationId** | **string** | Merchant Id | +**ReferenceNumber** | **string** | Reference number is a unique identifier provided by the client along with the organization Id. This is an optional field provided solely for the client’s convenience. If client specifies value for this field in the request, it is expected to be available in the response. | [optional] +**DigestAlgorithm** | **string** | Algorithm for message signature authentication | [optional] [default to DigestAlgorithmEnum.HMACSHA2] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.md b/docs/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.md index fa702d99..afc3146c 100644 --- a/docs/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.md +++ b/docs/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **string** | This field indicates whether the transaction is a merchant-initiated transaction or customer-initiated transaction. Valid values: - **customer** - **merchant** | [optional] **CredentialStoredOnFile** | **bool?** | Indicates to the issuing bank two things: - The merchant has received consent from the cardholder to store their card details on file - The merchant wants the issuing bank to check out the card details before the merchant initiates their first transaction for this cardholder. The purpose of the merchant-initiated transaction is to ensure that the cardholder’s credentials are valid (that the card is not stolen or has restrictions) and that the card details are good to be stored on the merchant’s file for future transactions. Valid values: - `true` means merchant will use this transaction to store payment credentials for follow-up merchant-initiated transactions. - `false` means merchant will not use this transaction to store payment credentials for follow-up merchant-initiated transactions. For details, see `subsequent_auth_first` field description in the [Credit Card Services Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/) **NOTE:** The value for this field does not correspond to any data in the TC 33 capture file5. This field is supported only for Visa transactions on CyberSource through VisaNet. | [optional] -**StoredCredentialUsed** | **bool?** | Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **true** means the merchant-initiated transaction came from a card that was already stored on file. - **false** means the merchant-initiated transaction came from a card that was not stored on file. | [optional] +**StoredCredentialUsed** | **string** | Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **Y** means the merchant-initiated transaction came from a card that was already stored on file. - **N** means the merchant-initiated transaction came from a card that was not stored on file. | [optional] **MerchantInitiatedTransaction** | [**Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction**](Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator.md b/docs/Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator.md index 5cb25e63..350a2021 100644 --- a/docs/Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator.md +++ b/docs/Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**StoredCredentialUsed** | **bool?** | Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **true** means the merchant-initiated transaction came from a card that was already stored on file. - **false** means the merchant-initiated transaction came from a card that was not stored on file. | [optional] +**StoredCredentialUsed** | **string** | Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **Y** means the merchant-initiated transaction came from a card that was already stored on file. - **N** means the merchant-initiated transaction came from a card that was not stored on file. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SymmetricKeyManagementApi.md b/docs/SymmetricKeyManagementApi.md index 72698cfe..3ec59db6 100644 --- a/docs/SymmetricKeyManagementApi.md +++ b/docs/SymmetricKeyManagementApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://apitest.cybersource.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**CreateV2SharedSecretKeys**](SymmetricKeyManagementApi.md#createv2sharedsecretkeys) | **POST** /kms/v2/keys-sym | Create Shared-Secret Keys +[**CreateV2SharedSecretKeysVerifi**](SymmetricKeyManagementApi.md#createv2sharedsecretkeysverifi) | **POST** /kms/v2/keys-sym/verifi | Create Shared-Secret Keys as per verifi spec [**DeleteBulkSymmetricKeys**](SymmetricKeyManagementApi.md#deletebulksymmetrickeys) | **POST** /kms/v2/keys-sym/deletes | Delete one or more Symmetric keys [**GetKeyDetails**](SymmetricKeyManagementApi.md#getkeydetails) | **GET** /kms/v2/keys-sym/{keyId} | Retrieves shared secret key details @@ -70,6 +71,69 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CreateV2SharedSecretKeysVerifi** +> KmsV2KeysSymPost201Response CreateV2SharedSecretKeysVerifi (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest) + +Create Shared-Secret Keys as per verifi spec + +Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation. + +### Example +```csharp +using System; +using System.Diagnostics; +using CyberSource.Api; +using CyberSource.Client; +using CyberSource.Model; + +namespace Example +{ + public class CreateV2SharedSecretKeysVerifiExample + { + public void main() + { + var apiInstance = new SymmetricKeyManagementApi(); + var vIcDomain = vIcDomain_example; // string | domain + var createSharedSecretKeysRequest = new CreateSharedSecretKeysRequest1(); // CreateSharedSecretKeysRequest1 | + + try + { + // Create Shared-Secret Keys as per verifi spec + KmsV2KeysSymPost201Response result = apiInstance.CreateV2SharedSecretKeysVerifi(vIcDomain, createSharedSecretKeysRequest); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SymmetricKeyManagementApi.CreateV2SharedSecretKeysVerifi: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **vIcDomain** | **string**| domain | + **createSharedSecretKeysRequest** | [**CreateSharedSecretKeysRequest1**](CreateSharedSecretKeysRequest1.md)| | + +### Return type + +[**KmsV2KeysSymPost201Response**](KmsV2KeysSymPost201Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json;charset=utf-8 + - **Accept**: application/hal+json;charset=utf-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **DeleteBulkSymmetricKeys** > KmsV2KeysSymDeletesPost200Response DeleteBulkSymmetricKeys (DeleteBulkSymmetricKeysRequest deleteBulkSymmetricKeysRequest) diff --git a/generator/cybersource-rest-spec.json b/generator/cybersource-rest-spec.json index 2081e13a..bfe6b9d4 100644 --- a/generator/cybersource-rest-spec.json +++ b/generator/cybersource-rest-spec.json @@ -84,6 +84,10 @@ "name": "Payouts", "description": "A payout enables an originator to send funds on behalf of itself, merchants, or customers to credit card\naccounts using an Original Credit Transaction (OCT). An originator is a merchant, government entity, or\ncorporation with a merchant account from an acquiring bank.\n" }, + { + "name": "installments", + "description": "Provides Visa Installment & Issuer Installment Solution for CyberSource Merchant.\nThis API can be used for sending an installment inquiry transaction to either Visa (for Visa Installments)\nor to the cardholder's issuing bank (for issuer funded installments). The response for this API call\nwill contain list of installment plans that the card holder might be eligible for. This service is applicable\nfor Credit Cards only.\n" + }, { "name": "Plans", "description": "Create and manage Plans for subscriptions.\n" @@ -234,6 +238,10 @@ "name": "Payouts", "description": "For more information about Payouts, see the [Payouts Developer Guides Page](https://developer.cybersource.com/api/developer-guides/dita-payouts/Introduction.html).\n" }, + { + "name": "Installments", + "description": "For more information about Installment contact Cybersource Support. For Visa installments contact VISthroughCYBS@visa.com" + }, { "name": "Recurring_Billing_Subscriptions", "description": "Recurring Billing & Subscriptions" @@ -505,8 +513,8 @@ "description": "Indicates to the issuing bank two things:\n- The merchant has received consent from the cardholder to store their card details on file\n- The merchant wants the issuing bank to check out the card details before the merchant initiates their first transaction for this cardholder.\nThe purpose of the merchant-initiated transaction is to ensure that the cardholder\u2019s credentials are valid (that the card is not stolen or has restrictions) and that the card details are good to be stored on the merchant\u2019s file for future transactions.\n\nValid values:\n- `true` means merchant will use this transaction to store payment credentials for follow-up merchant-initiated transactions.\n- `false` means merchant will not use this transaction to store payment credentials for follow-up merchant-initiated transactions.\n\nFor details, see `subsequent_auth_first` field description in the [Credit Card Services Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/)\n\n**NOTE:** The value for this field does not correspond to any data in the TC 33 capture file5.\n\nThis field is supported only for Visa transactions on CyberSource through VisaNet.\n" }, "storedCredentialUsed": { - "type": "boolean", - "description": "Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file.\n\nPossible values:\n- **true** means the merchant-initiated transaction came from a card that was already stored on file.\n- **false** means the merchant-initiated transaction came from a card that was not stored on file.\n" + "type": "string", + "description": "Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file.\n\nPossible values:\n- **Y** means the merchant-initiated transaction came from a card that was already stored on file.\n- **N** means the merchant-initiated transaction came from a card that was not stored on file.\n" }, "merchantInitiatedTransaction": { "type": "object", @@ -8137,8 +8145,8 @@ "type": "object", "properties": { "storedCredentialUsed": { - "type": "boolean", - "description": "Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file.\n\nPossible values:\n- **true** means the merchant-initiated transaction came from a card that was already stored on file.\n- **false** means the merchant-initiated transaction came from a card that was not stored on file.\n" + "type": "string", + "description": "Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file.\n\nPossible values:\n- **Y** means the merchant-initiated transaction came from a card that was already stored on file.\n- **N** means the merchant-initiated transaction came from a card that was not stored on file.\n" } } } @@ -57831,8 +57839,8 @@ "description": "Indicates to the issuing bank two things:\n- The merchant has received consent from the cardholder to store their card details on file\n- The merchant wants the issuing bank to check out the card details before the merchant initiates their first transaction for this cardholder.\nThe purpose of the merchant-initiated transaction is to ensure that the cardholder\u2019s credentials are valid (that the card is not stolen or has restrictions) and that the card details are good to be stored on the merchant\u2019s file for future transactions.\n\nValid values:\n- `true` means merchant will use this transaction to store payment credentials for follow-up merchant-initiated transactions.\n- `false` means merchant will not use this transaction to store payment credentials for follow-up merchant-initiated transactions.\n\nFor details, see `subsequent_auth_first` field description in the [Credit Card Services Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/)\n\n**NOTE:** The value for this field does not correspond to any data in the TC 33 capture file5.\n\nThis field is supported only for Visa transactions on CyberSource through VisaNet.\n" }, "storedCredentialUsed": { - "type": "boolean", - "description": "Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file.\n\nPossible values:\n- **true** means the merchant-initiated transaction came from a card that was already stored on file.\n- **false** means the merchant-initiated transaction came from a card that was not stored on file.\n" + "type": "string", + "description": "Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file.\n\nPossible values:\n- **Y** means the merchant-initiated transaction came from a card that was already stored on file.\n- **N** means the merchant-initiated transaction came from a card that was not stored on file.\n" }, "merchantInitiatedTransaction": { "type": "object", @@ -73842,6 +73850,257 @@ } } } + }, + "/kms/v2/keys-sym/verifi": { + "post": { + "x-devcenter-metaData": { + "categoryTag": "Key_Management", + "firstLevelApiLifeCycle": "hidden", + "secondLevelApiLifeCycle": "hidden", + "apiLifeCycle": "hidden" + }, + "summary": "Create Shared-Secret Keys as per verifi spec", + "description": "Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation.\n", + "tags": [ + "Symmetric Key Management" + ], + "operationId": "createV2SharedSecretKeys-verifi", + "parameters": [ + { + "name": "v-ic-domain", + "in": "header", + "description": "domain", + "required": true, + "type": "string" + }, + { + "name": "createSharedSecretKeysRequest", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "clientReferenceInformation": { + "type": "object", + "properties": { + "code": { + "type": "string", + "maxLength": 50, + "description": "Client-generated order reference or tracking number. CyberSource recommends that you send a unique value.\n" + }, + "comments": { + "type": "string", + "description": "Comments" + }, + "partner": { + "type": "object", + "properties": { + "developerId": { + "type": "string", + "maxLength": 8, + "description": "Identifier for the developer that helped integrate a partner solution to CyberSource.\n\nSend this value in all requests that are sent through the partner solutions built by that developer.\nCyberSource assigns the ID to the developer.\n\n**Note** When you see a developer ID of 999 in reports, the developer ID that was submitted is incorrect.\n" + }, + "solutionId": { + "type": "string", + "maxLength": 8, + "description": "Identifier for the partner that is integrated to CyberSource.\n\nSend this value in all requests that are sent through the partner solution. CyberSource assigns the ID to the partner.\n\n**Note** When you see a solutionId of 999 in reports, the solutionId that was submitted is incorrect.\n" + } + } + } + } + }, + "keyInformation": { + "type": "array", + "items": { + "type": "object", + "description": "key information\n", + "required": [ + "organizationId" + ], + "properties": { + "organizationId": { + "type": "string", + "description": "Merchant Id\n" + }, + "referenceNumber": { + "type": "string", + "description": "Reference number is a unique identifier provided by the client along with the organization Id. This is an optional field provided solely for the client\u2019s convenience. If client specifies value for this field in the request, it is expected to be available in the response.\n" + }, + "digestAlgorithm": { + "type": "string", + "description": "Algorithm for message signature authentication\n", + "enum": [ + "HMACSHA1", + "HMACSHA2" + ], + "default": "HMACSHA2" + } + } + } + } + } + } + } + ], + "responses": { + "201": { + "description": "Successful response.", + "schema": { + "title": "kmsV2KeysSymPost201Response", + "type": "object", + "properties": { + "submitTimeUtc": { + "type": "string", + "description": "Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ`\n**Example** `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.).\nThe `T` separates the date and the time. The `Z` indicates UTC.\n\nReturned by Cybersource for all services.\n" + }, + "status": { + "type": "string", + "description": "The status of the submitted transaction.\n\nPossible values:\n - ACCEPTED\n" + }, + "clientReferenceInformation": { + "type": "object", + "properties": { + "code": { + "type": "string", + "maxLength": 50, + "description": "Client-generated order reference or tracking number. CyberSource recommends that you send a unique value.\n" + }, + "comments": { + "type": "string", + "description": "Comments" + }, + "partner": { + "type": "object", + "properties": { + "developerId": { + "type": "string", + "maxLength": 8, + "description": "Identifier for the developer that helped integrate a partner solution to CyberSource.\n\nSend this value in all requests that are sent through the partner solutions built by that developer.\nCyberSource assigns the ID to the developer.\n\n**Note** When you see a developer ID of 999 in reports, the developer ID that was submitted is incorrect.\n" + }, + "solutionId": { + "type": "string", + "maxLength": 8, + "description": "Identifier for the partner that is integrated to CyberSource.\n\nSend this value in all requests that are sent through the partner solution. CyberSource assigns the ID to the partner.\n\n**Note** When you see a solutionId of 999 in reports, the solutionId that was submitted is incorrect.\n" + } + } + } + } + }, + "keyInformation": { + "type": "array", + "items": { + "type": "object", + "description": "key information\n", + "properties": { + "organizationId": { + "type": "string", + "description": "Merchant Id\n" + }, + "referenceNumber": { + "type": "string", + "description": "Reference number is a unique identifier provided by the client along with the organization Id. This is an optional field provided solely for the client\u2019s convenience. If client specifies value for this field in the request, it is expected to be available in the response.\n" + }, + "keyId": { + "type": "string", + "description": "Key Serial Number\n" + }, + "key": { + "type": "string", + "description": "value of the key\n" + }, + "status": { + "type": "string", + "description": "The status of the key.\n\nPossible values:\n - FAILED\n - ACTIVE\n" + }, + "expirationDate": { + "type": "string", + "description": "The expiration time in UTC. `Format: YYYY-MM-DDThh:mm:ssZ`\n\nExample 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC.\n" + }, + "message": { + "type": "string", + "description": "message in case of failed key" + }, + "errorInformation": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason of the status.\n\nPossible values:\n - MISSING_FIELD\n - INVALID_DATA\n" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "This is the flattened JSON object field name/path that is either missing or invalid." + }, + "reason": { + "type": "string", + "description": "Possible reasons for the error.\n\nPossible values:\n - MISSING_FIELD\n - INVALID_DATA\n" + } + } + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid request.\n", + "schema": { + "type": "object", + "properties": { + "submitTimeUtc": { + "type": "string", + "description": "Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ`\n**Example** `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.).\nThe `T` separates the date and the time. The `Z` indicates UTC.\n\nReturned by Cybersource for all services.\n" + }, + "status": { + "type": "string", + "description": "The status of the submitted transaction.\n\nPossible values:\n - INVALID_REQUEST\n" + }, + "reason": { + "type": "string", + "description": "The reason of the status.\n\nPossible values:\n - MISSING_FIELD\n - INVALID_DATA\n" + }, + "message": { + "type": "string", + "description": "The detail message related to the status and reason listed above." + } + } + } + }, + "502": { + "description": "Unexpected system error or system timeout.\n", + "schema": { + "type": "object", + "properties": { + "submitTimeUtc": { + "type": "string", + "description": "Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ`\n**Example** `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.).\nThe `T` separates the date and the time. The `Z` indicates UTC.\n\nReturned by Cybersource for all services.\n" + }, + "status": { + "type": "string", + "description": "The status of the submitted transaction.\n\nPossible values:\n - SERVER_ERROR\n" + }, + "reason": { + "type": "string", + "description": "The reason of the status.\n\nPossible values:\n - SYSTEM_ERROR\n - SERVER_TIMEOUT\n - SERVICE_TIMEOUT\n" + }, + "message": { + "type": "string", + "description": "The detail message related to the status and reason listed above." + } + } + } + } + } + } } } } \ No newline at end of file diff --git a/test/Api/SymmetricKeyManagementApiTests.cs b/test/Api/SymmetricKeyManagementApiTests.cs index f4885d56..eb424c82 100644 --- a/test/Api/SymmetricKeyManagementApiTests.cs +++ b/test/Api/SymmetricKeyManagementApiTests.cs @@ -76,6 +76,19 @@ public void CreateV2SharedSecretKeysTest() //Assert.IsInstanceOf (response, "response is KmsV2KeysSymPost201Response"); } + /// + /// Test CreateV2SharedSecretKeysVerifi + /// + [Test] + public void CreateV2SharedSecretKeysVerifiTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string vIcDomain = null; + //CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest = null; + //var response = instance.CreateV2SharedSecretKeysVerifi(vIcDomain, createSharedSecretKeysRequest); + //Assert.IsInstanceOf (response, "response is KmsV2KeysSymPost201Response"); + } + /// /// Test DeleteBulkSymmetricKeys /// diff --git a/test/Model/CreateSharedSecretKeysRequest1Tests.cs b/test/Model/CreateSharedSecretKeysRequest1Tests.cs new file mode 100644 index 00000000..35fe12c9 --- /dev/null +++ b/test/Model/CreateSharedSecretKeysRequest1Tests.cs @@ -0,0 +1,86 @@ +/* + * CyberSource Merged Spec + * + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using CyberSource.Api; +using CyberSource.Model; +using CyberSource.Client; +using System.Reflection; + +namespace CyberSource.Test +{ + /// + /// Class for testing CreateSharedSecretKeysRequest1 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateSharedSecretKeysRequest1Tests + { + // TODO uncomment below to declare an instance variable for CreateSharedSecretKeysRequest1 + //private CreateSharedSecretKeysRequest1 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateSharedSecretKeysRequest1 + //instance = new CreateSharedSecretKeysRequest1(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateSharedSecretKeysRequest1 + /// + [Test] + public void CreateSharedSecretKeysRequest1InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateSharedSecretKeysRequest1 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateSharedSecretKeysRequest1"); + } + + /// + /// Test the property 'ClientReferenceInformation' + /// + [Test] + public void ClientReferenceInformationTest() + { + // TODO unit test for the property 'ClientReferenceInformation' + } + /// + /// Test the property 'KeyInformation' + /// + [Test] + public void KeyInformationTest() + { + // TODO unit test for the property 'KeyInformation' + } + + } + +} diff --git a/test/Model/Kmsv2keyssymverifiKeyInformationTests.cs b/test/Model/Kmsv2keyssymverifiKeyInformationTests.cs new file mode 100644 index 00000000..4961b2cf --- /dev/null +++ b/test/Model/Kmsv2keyssymverifiKeyInformationTests.cs @@ -0,0 +1,94 @@ +/* + * CyberSource Merged Spec + * + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using CyberSource.Api; +using CyberSource.Model; +using CyberSource.Client; +using System.Reflection; + +namespace CyberSource.Test +{ + /// + /// Class for testing Kmsv2keyssymverifiKeyInformation + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class Kmsv2keyssymverifiKeyInformationTests + { + // TODO uncomment below to declare an instance variable for Kmsv2keyssymverifiKeyInformation + //private Kmsv2keyssymverifiKeyInformation instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of Kmsv2keyssymverifiKeyInformation + //instance = new Kmsv2keyssymverifiKeyInformation(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Kmsv2keyssymverifiKeyInformation + /// + [Test] + public void Kmsv2keyssymverifiKeyInformationInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" Kmsv2keyssymverifiKeyInformation + //Assert.IsInstanceOfType (instance, "variable 'instance' is a Kmsv2keyssymverifiKeyInformation"); + } + + /// + /// Test the property 'OrganizationId' + /// + [Test] + public void OrganizationIdTest() + { + // TODO unit test for the property 'OrganizationId' + } + /// + /// Test the property 'ReferenceNumber' + /// + [Test] + public void ReferenceNumberTest() + { + // TODO unit test for the property 'ReferenceNumber' + } + /// + /// Test the property 'DigestAlgorithm' + /// + [Test] + public void DigestAlgorithmTest() + { + // TODO unit test for the property 'DigestAlgorithm' + } + + } + +} diff --git a/test/cybersource-rest-client-dotnet.Test.csproj b/test/cybersource-rest-client-dotnet.Test.csproj index 11adcbd2..9c3f7297 100644 --- a/test/cybersource-rest-client-dotnet.Test.csproj +++ b/test/cybersource-rest-client-dotnet.Test.csproj @@ -66,7 +66,7 @@ OpenAPI spec version: 0.0.1 - {A3B92FD4-787B-411A-A09F-96CB74C8FF5D} + {BFBBDA15-4C78-4924-AA89-8057C77BA052} cybersource-rest-client-dotnet From 1228aa333d18530383fe06b72207d0d439f0bd43 Mon Sep 17 00:00:00 2001 From: Gaurav Bansal Date: Mon, 11 Apr 2022 16:09:16 +0530 Subject: [PATCH 2/5] april-22 release --- Api/SymmetricKeyManagementApi.cs | 262 +++++++++++++++++++++++++++++++ 1 file changed, 262 insertions(+) diff --git a/Api/SymmetricKeyManagementApi.cs b/Api/SymmetricKeyManagementApi.cs index 26cefa32..47e86b23 100644 --- a/Api/SymmetricKeyManagementApi.cs +++ b/Api/SymmetricKeyManagementApi.cs @@ -48,6 +48,29 @@ public interface ISymmetricKeyManagementApi : IApiAccessor /// ApiResponse of KmsV2KeysSymPost201Response ApiResponse CreateV2SharedSecretKeysWithHttpInfo (CreateSharedSecretKeysRequest createSharedSecretKeysRequest); /// + /// Create Shared-Secret Keys as per verifi spec + /// + /// + /// Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation. + /// + /// Thrown when fails to make API call + /// domain + /// + /// KmsV2KeysSymPost201Response + KmsV2KeysSymPost201Response CreateV2SharedSecretKeysVerifi (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest); + + /// + /// Create Shared-Secret Keys as per verifi spec + /// + /// + /// Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation. + /// + /// Thrown when fails to make API call + /// domain + /// + /// ApiResponse of KmsV2KeysSymPost201Response + ApiResponse CreateV2SharedSecretKeysVerifiWithHttpInfo (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest); + /// /// Delete one or more Symmetric keys /// /// @@ -113,6 +136,29 @@ public interface ISymmetricKeyManagementApi : IApiAccessor /// Task of ApiResponse (KmsV2KeysSymPost201Response) System.Threading.Tasks.Task> CreateV2SharedSecretKeysAsyncWithHttpInfo (CreateSharedSecretKeysRequest createSharedSecretKeysRequest); /// + /// Create Shared-Secret Keys as per verifi spec + /// + /// + /// Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation. + /// + /// Thrown when fails to make API call + /// domain + /// + /// Task of KmsV2KeysSymPost201Response + System.Threading.Tasks.Task CreateV2SharedSecretKeysVerifiAsync (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest); + + /// + /// Create Shared-Secret Keys as per verifi spec + /// + /// + /// Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation. + /// + /// Thrown when fails to make API call + /// domain + /// + /// Task of ApiResponse (KmsV2KeysSymPost201Response) + System.Threading.Tasks.Task> CreateV2SharedSecretKeysVerifiAsyncWithHttpInfo (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest); + /// /// Delete one or more Symmetric keys /// /// @@ -467,6 +513,222 @@ public async System.Threading.Tasks.Task + /// Create Shared-Secret Keys as per verifi spec Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation. + /// + /// Thrown when fails to make API call + /// domain + /// + /// KmsV2KeysSymPost201Response + public KmsV2KeysSymPost201Response CreateV2SharedSecretKeysVerifi (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest) + { + logger.Debug("CALLING API \"CreateV2SharedSecretKeysVerifi\" STARTED"); + ApiResponse localVarResponse = CreateV2SharedSecretKeysVerifiWithHttpInfo(vIcDomain, createSharedSecretKeysRequest); + logger.Debug("CALLING API \"CreateV2SharedSecretKeysVerifi\" ENDED"); + return localVarResponse.Data; + } + + /// + /// Create Shared-Secret Keys as per verifi spec Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation. + /// + /// Thrown when fails to make API call + /// domain + /// + /// ApiResponse of KmsV2KeysSymPost201Response + public ApiResponse< KmsV2KeysSymPost201Response > CreateV2SharedSecretKeysVerifiWithHttpInfo (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest) + { + LogUtility logUtility = new LogUtility(); + + // verify the required parameter 'vIcDomain' is set + if (vIcDomain == null) + { + logger.Error("ApiException : Missing required parameter 'vIcDomain' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + throw new ApiException(400, "Missing required parameter 'vIcDomain' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + } + // verify the required parameter 'createSharedSecretKeysRequest' is set + if (createSharedSecretKeysRequest == null) + { + logger.Error("ApiException : Missing required parameter 'createSharedSecretKeysRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + throw new ApiException(400, "Missing required parameter 'createSharedSecretKeysRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + } + + var localVarPath = $"/kms/v2/keys-sym/verifi"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + object localVarPostBody = null; + + // to determine the Content-Type header + string[] localVarHttpContentTypes = new string[] { + "application/json;charset=utf-8" + }; + string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + string[] localVarHttpHeaderAccepts = new string[] { + "application/hal+json;charset=utf-8" + }; + string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + { + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + } + + if (vIcDomain != null) + { + localVarHeaderParams.Add("v-ic-domain", Configuration.ApiClient.ParameterToString(vIcDomain)); // header parameter + } + if (createSharedSecretKeysRequest != null && createSharedSecretKeysRequest.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(createSharedSecretKeysRequest); // http body (model) parameter + } + else + { + localVarPostBody = createSharedSecretKeysRequest; // byte array + } + + if (logUtility.IsMaskingEnabled(logger)) + { + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); + } + else + { + logger.Debug($"HTTP Request Body :\n{localVarPostBody}"); + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateV2SharedSecretKeysVerifi", localVarResponse); + if (exception != null) + { + logger.Error($"Exception : {exception.Message}"); + throw exception; + } + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (KmsV2KeysSymPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(KmsV2KeysSymPost201Response))); // Return statement + } + + /// + /// Create Shared-Secret Keys as per verifi spec Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation. + /// + /// Thrown when fails to make API call + /// domain + /// + /// Task of KmsV2KeysSymPost201Response + public async System.Threading.Tasks.Task CreateV2SharedSecretKeysVerifiAsync (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest) + { + logger.Debug("CALLING API \"CreateV2SharedSecretKeysVerifiAsync\" STARTED"); + ApiResponse localVarResponse = await CreateV2SharedSecretKeysVerifiAsyncWithHttpInfo(vIcDomain, createSharedSecretKeysRequest); + logger.Debug("CALLING API \"CreateV2SharedSecretKeysVerifiAsync\" STARTED"); + return localVarResponse.Data; + + } + + /// + /// Create Shared-Secret Keys as per verifi spec Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation. + /// + /// Thrown when fails to make API call + /// domain + /// + /// Task of ApiResponse (KmsV2KeysSymPost201Response) + public async System.Threading.Tasks.Task> CreateV2SharedSecretKeysVerifiAsyncWithHttpInfo (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest) + { + LogUtility logUtility = new LogUtility(); + + // verify the required parameter 'vIcDomain' is set + if (vIcDomain == null) + { + logger.Error("ApiException : Missing required parameter 'vIcDomain' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + throw new ApiException(400, "Missing required parameter 'vIcDomain' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + } + // verify the required parameter 'createSharedSecretKeysRequest' is set + if (createSharedSecretKeysRequest == null) + { + logger.Error("ApiException : Missing required parameter 'createSharedSecretKeysRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + throw new ApiException(400, "Missing required parameter 'createSharedSecretKeysRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + } + + var localVarPath = $"/kms/v2/keys-sym/verifi"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + object localVarPostBody = null; + + // to determine the Content-Type header + string[] localVarHttpContentTypes = new string[] { + "application/json;charset=utf-8" + }; + string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + string[] localVarHttpHeaderAccepts = new string[] { + "application/hal+json;charset=utf-8" + }; + string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + { + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + } + + if (vIcDomain != null) + { + localVarHeaderParams.Add("v-ic-domain", Configuration.ApiClient.ParameterToString(vIcDomain)); // header parameter + } + if (createSharedSecretKeysRequest != null && createSharedSecretKeysRequest.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(createSharedSecretKeysRequest); // http body (model) parameter + } + else + { + localVarPostBody = createSharedSecretKeysRequest; // byte array + } + + if (logUtility.IsMaskingEnabled(logger)) + { + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); + } + else + { + logger.Debug($"HTTP Request Body :\n{localVarPostBody}"); + } + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateV2SharedSecretKeysVerifi", localVarResponse); + if (exception != null) + { + logger.Error($"Exception : {exception.Message}"); + throw exception; + } + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (KmsV2KeysSymPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(KmsV2KeysSymPost201Response))); // Return statement + } + /// /// Delete one or more Symmetric keys 'Delete one or more Symmetric keys' /// /// Thrown when fails to make API call From aab2400bb17ec30c12a81fa07a255e513774b569 Mon Sep 17 00:00:00 2001 From: Gaurav Bansal Date: Tue, 12 Apr 2022 10:17:22 +0530 Subject: [PATCH 3/5] april-22 changes --- Api/SymmetricKeyManagementApi.cs | 64 +++++++++---------- ...=> CreateSharedSecretKeysVerifiRequest.cs} | 18 +++--- cybersource-rest-client-dotnet.csproj | 2 +- cybersource-rest-client-dotnet.sln | 10 +-- ...=> CreateSharedSecretKeysVerifiRequest.md} | 2 +- docs/SymmetricKeyManagementApi.md | 8 +-- generator/cybersource-rest-spec.json | 2 +- test/Api/SymmetricKeyManagementApiTests.cs | 4 +- ...eateSharedSecretKeysVerifiRequestTests.cs} | 20 +++--- ...cybersource-rest-client-dotnet.Test.csproj | 2 +- 10 files changed, 66 insertions(+), 66 deletions(-) rename Model/{CreateSharedSecretKeysRequest1.cs => CreateSharedSecretKeysVerifiRequest.cs} (85%) rename docs/{CreateSharedSecretKeysRequest1.md => CreateSharedSecretKeysVerifiRequest.md} (90%) rename test/Model/{CreateSharedSecretKeysRequest1Tests.cs => CreateSharedSecretKeysVerifiRequestTests.cs} (73%) diff --git a/Api/SymmetricKeyManagementApi.cs b/Api/SymmetricKeyManagementApi.cs index 47e86b23..3353535c 100644 --- a/Api/SymmetricKeyManagementApi.cs +++ b/Api/SymmetricKeyManagementApi.cs @@ -55,9 +55,9 @@ public interface ISymmetricKeyManagementApi : IApiAccessor /// /// Thrown when fails to make API call /// domain - /// + /// /// KmsV2KeysSymPost201Response - KmsV2KeysSymPost201Response CreateV2SharedSecretKeysVerifi (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest); + KmsV2KeysSymPost201Response CreateV2SharedSecretKeysVerifi (string vIcDomain, CreateSharedSecretKeysVerifiRequest createSharedSecretKeysVerifiRequest); /// /// Create Shared-Secret Keys as per verifi spec @@ -67,9 +67,9 @@ public interface ISymmetricKeyManagementApi : IApiAccessor /// /// Thrown when fails to make API call /// domain - /// + /// /// ApiResponse of KmsV2KeysSymPost201Response - ApiResponse CreateV2SharedSecretKeysVerifiWithHttpInfo (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest); + ApiResponse CreateV2SharedSecretKeysVerifiWithHttpInfo (string vIcDomain, CreateSharedSecretKeysVerifiRequest createSharedSecretKeysVerifiRequest); /// /// Delete one or more Symmetric keys /// @@ -143,9 +143,9 @@ public interface ISymmetricKeyManagementApi : IApiAccessor /// /// Thrown when fails to make API call /// domain - /// + /// /// Task of KmsV2KeysSymPost201Response - System.Threading.Tasks.Task CreateV2SharedSecretKeysVerifiAsync (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest); + System.Threading.Tasks.Task CreateV2SharedSecretKeysVerifiAsync (string vIcDomain, CreateSharedSecretKeysVerifiRequest createSharedSecretKeysVerifiRequest); /// /// Create Shared-Secret Keys as per verifi spec @@ -155,9 +155,9 @@ public interface ISymmetricKeyManagementApi : IApiAccessor /// /// Thrown when fails to make API call /// domain - /// + /// /// Task of ApiResponse (KmsV2KeysSymPost201Response) - System.Threading.Tasks.Task> CreateV2SharedSecretKeysVerifiAsyncWithHttpInfo (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest); + System.Threading.Tasks.Task> CreateV2SharedSecretKeysVerifiAsyncWithHttpInfo (string vIcDomain, CreateSharedSecretKeysVerifiRequest createSharedSecretKeysVerifiRequest); /// /// Delete one or more Symmetric keys /// @@ -517,12 +517,12 @@ public async System.Threading.Tasks.Task /// Thrown when fails to make API call /// domain - /// + /// /// KmsV2KeysSymPost201Response - public KmsV2KeysSymPost201Response CreateV2SharedSecretKeysVerifi (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest) + public KmsV2KeysSymPost201Response CreateV2SharedSecretKeysVerifi (string vIcDomain, CreateSharedSecretKeysVerifiRequest createSharedSecretKeysVerifiRequest) { logger.Debug("CALLING API \"CreateV2SharedSecretKeysVerifi\" STARTED"); - ApiResponse localVarResponse = CreateV2SharedSecretKeysVerifiWithHttpInfo(vIcDomain, createSharedSecretKeysRequest); + ApiResponse localVarResponse = CreateV2SharedSecretKeysVerifiWithHttpInfo(vIcDomain, createSharedSecretKeysVerifiRequest); logger.Debug("CALLING API \"CreateV2SharedSecretKeysVerifi\" ENDED"); return localVarResponse.Data; } @@ -532,9 +532,9 @@ public KmsV2KeysSymPost201Response CreateV2SharedSecretKeysVerifi (string vIcDom /// /// Thrown when fails to make API call /// domain - /// + /// /// ApiResponse of KmsV2KeysSymPost201Response - public ApiResponse< KmsV2KeysSymPost201Response > CreateV2SharedSecretKeysVerifiWithHttpInfo (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest) + public ApiResponse< KmsV2KeysSymPost201Response > CreateV2SharedSecretKeysVerifiWithHttpInfo (string vIcDomain, CreateSharedSecretKeysVerifiRequest createSharedSecretKeysVerifiRequest) { LogUtility logUtility = new LogUtility(); @@ -544,11 +544,11 @@ public ApiResponse< KmsV2KeysSymPost201Response > CreateV2SharedSecretKeysVerifi logger.Error("ApiException : Missing required parameter 'vIcDomain' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); throw new ApiException(400, "Missing required parameter 'vIcDomain' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); } - // verify the required parameter 'createSharedSecretKeysRequest' is set - if (createSharedSecretKeysRequest == null) + // verify the required parameter 'createSharedSecretKeysVerifiRequest' is set + if (createSharedSecretKeysVerifiRequest == null) { - logger.Error("ApiException : Missing required parameter 'createSharedSecretKeysRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); - throw new ApiException(400, "Missing required parameter 'createSharedSecretKeysRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + logger.Error("ApiException : Missing required parameter 'createSharedSecretKeysVerifiRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + throw new ApiException(400, "Missing required parameter 'createSharedSecretKeysVerifiRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); } var localVarPath = $"/kms/v2/keys-sym/verifi"; @@ -579,13 +579,13 @@ public ApiResponse< KmsV2KeysSymPost201Response > CreateV2SharedSecretKeysVerifi { localVarHeaderParams.Add("v-ic-domain", Configuration.ApiClient.ParameterToString(vIcDomain)); // header parameter } - if (createSharedSecretKeysRequest != null && createSharedSecretKeysRequest.GetType() != typeof(byte[])) + if (createSharedSecretKeysVerifiRequest != null && createSharedSecretKeysVerifiRequest.GetType() != typeof(byte[])) { - localVarPostBody = Configuration.ApiClient.Serialize(createSharedSecretKeysRequest); // http body (model) parameter + localVarPostBody = Configuration.ApiClient.Serialize(createSharedSecretKeysVerifiRequest); // http body (model) parameter } else { - localVarPostBody = createSharedSecretKeysRequest; // byte array + localVarPostBody = createSharedSecretKeysVerifiRequest; // byte array } if (logUtility.IsMaskingEnabled(logger)) @@ -625,12 +625,12 @@ public ApiResponse< KmsV2KeysSymPost201Response > CreateV2SharedSecretKeysVerifi /// /// Thrown when fails to make API call /// domain - /// + /// /// Task of KmsV2KeysSymPost201Response - public async System.Threading.Tasks.Task CreateV2SharedSecretKeysVerifiAsync (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest) + public async System.Threading.Tasks.Task CreateV2SharedSecretKeysVerifiAsync (string vIcDomain, CreateSharedSecretKeysVerifiRequest createSharedSecretKeysVerifiRequest) { logger.Debug("CALLING API \"CreateV2SharedSecretKeysVerifiAsync\" STARTED"); - ApiResponse localVarResponse = await CreateV2SharedSecretKeysVerifiAsyncWithHttpInfo(vIcDomain, createSharedSecretKeysRequest); + ApiResponse localVarResponse = await CreateV2SharedSecretKeysVerifiAsyncWithHttpInfo(vIcDomain, createSharedSecretKeysVerifiRequest); logger.Debug("CALLING API \"CreateV2SharedSecretKeysVerifiAsync\" STARTED"); return localVarResponse.Data; @@ -641,9 +641,9 @@ public async System.Threading.Tasks.Task CreateV2Sh /// /// Thrown when fails to make API call /// domain - /// + /// /// Task of ApiResponse (KmsV2KeysSymPost201Response) - public async System.Threading.Tasks.Task> CreateV2SharedSecretKeysVerifiAsyncWithHttpInfo (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest) + public async System.Threading.Tasks.Task> CreateV2SharedSecretKeysVerifiAsyncWithHttpInfo (string vIcDomain, CreateSharedSecretKeysVerifiRequest createSharedSecretKeysVerifiRequest) { LogUtility logUtility = new LogUtility(); @@ -653,11 +653,11 @@ public async System.Threading.Tasks.TaskCreateV2SharedSecretKeysVerifi"); throw new ApiException(400, "Missing required parameter 'vIcDomain' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); } - // verify the required parameter 'createSharedSecretKeysRequest' is set - if (createSharedSecretKeysRequest == null) + // verify the required parameter 'createSharedSecretKeysVerifiRequest' is set + if (createSharedSecretKeysVerifiRequest == null) { - logger.Error("ApiException : Missing required parameter 'createSharedSecretKeysRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); - throw new ApiException(400, "Missing required parameter 'createSharedSecretKeysRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + logger.Error("ApiException : Missing required parameter 'createSharedSecretKeysVerifiRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); + throw new ApiException(400, "Missing required parameter 'createSharedSecretKeysVerifiRequest' when calling SymmetricKeyManagementApi->CreateV2SharedSecretKeysVerifi"); } var localVarPath = $"/kms/v2/keys-sym/verifi"; @@ -688,13 +688,13 @@ public async System.Threading.Tasks.Task - /// CreateSharedSecretKeysRequest1 + /// CreateSharedSecretKeysVerifiRequest /// [DataContract] - public partial class CreateSharedSecretKeysRequest1 : IEquatable, IValidatableObject + public partial class CreateSharedSecretKeysVerifiRequest : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// ClientReferenceInformation. /// KeyInformation. - public CreateSharedSecretKeysRequest1(Kmsv2keyssymClientReferenceInformation ClientReferenceInformation = default(Kmsv2keyssymClientReferenceInformation), List KeyInformation = default(List)) + public CreateSharedSecretKeysVerifiRequest(Kmsv2keyssymClientReferenceInformation ClientReferenceInformation = default(Kmsv2keyssymClientReferenceInformation), List KeyInformation = default(List)) { this.ClientReferenceInformation = ClientReferenceInformation; this.KeyInformation = KeyInformation; @@ -60,7 +60,7 @@ public partial class CreateSharedSecretKeysRequest1 : IEquatable - /// Returns true if CreateSharedSecretKeysRequest1 instances are equal + /// Returns true if CreateSharedSecretKeysVerifiRequest instances are equal /// - /// Instance of CreateSharedSecretKeysRequest1 to be compared + /// Instance of CreateSharedSecretKeysVerifiRequest to be compared /// Boolean - public bool Equals(CreateSharedSecretKeysRequest1 other) + public bool Equals(CreateSharedSecretKeysVerifiRequest other) { // credit: http://stackoverflow.com/a/10454552/677735 if (other == null) diff --git a/cybersource-rest-client-dotnet.csproj b/cybersource-rest-client-dotnet.csproj index c5791ca6..8bd4ecbe 100644 --- a/cybersource-rest-client-dotnet.csproj +++ b/cybersource-rest-client-dotnet.csproj @@ -12,7 +12,7 @@ OpenAPI spec version: 0.0.1 Debug AnyCPU - {BFBBDA15-4C78-4924-AA89-8057C77BA052} + {BE688374-90A6-4DA2-8C3F-9A685CDC9F89} Library Properties CyberSource diff --git a/cybersource-rest-client-dotnet.sln b/cybersource-rest-client-dotnet.sln index 83e6fbc9..deb073c5 100644 --- a/cybersource-rest-client-dotnet.sln +++ b/cybersource-rest-client-dotnet.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cybersource-rest-client-dotnet", "cybersource-rest-client-dotnet.csproj", "{BFBBDA15-4C78-4924-AA89-8057C77BA052}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cybersource-rest-client-dotnet", "cybersource-rest-client-dotnet.csproj", "{BE688374-90A6-4DA2-8C3F-9A685CDC9F89}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cybersource-rest-client-dotnet.Test", "test\cybersource-rest-client-dotnet.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BFBBDA15-4C78-4924-AA89-8057C77BA052}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BFBBDA15-4C78-4924-AA89-8057C77BA052}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BFBBDA15-4C78-4924-AA89-8057C77BA052}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BFBBDA15-4C78-4924-AA89-8057C77BA052}.Release|Any CPU.Build.0 = Release|Any CPU + {BE688374-90A6-4DA2-8C3F-9A685CDC9F89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE688374-90A6-4DA2-8C3F-9A685CDC9F89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE688374-90A6-4DA2-8C3F-9A685CDC9F89}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE688374-90A6-4DA2-8C3F-9A685CDC9F89}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/docs/CreateSharedSecretKeysRequest1.md b/docs/CreateSharedSecretKeysVerifiRequest.md similarity index 90% rename from docs/CreateSharedSecretKeysRequest1.md rename to docs/CreateSharedSecretKeysVerifiRequest.md index dff2d535..8e430c97 100644 --- a/docs/CreateSharedSecretKeysRequest1.md +++ b/docs/CreateSharedSecretKeysVerifiRequest.md @@ -1,4 +1,4 @@ -# CyberSource.Model.CreateSharedSecretKeysRequest1 +# CyberSource.Model.CreateSharedSecretKeysVerifiRequest ## Properties Name | Type | Description | Notes diff --git a/docs/SymmetricKeyManagementApi.md b/docs/SymmetricKeyManagementApi.md index 3ec59db6..a8368082 100644 --- a/docs/SymmetricKeyManagementApi.md +++ b/docs/SymmetricKeyManagementApi.md @@ -73,7 +73,7 @@ No authorization required # **CreateV2SharedSecretKeysVerifi** -> KmsV2KeysSymPost201Response CreateV2SharedSecretKeysVerifi (string vIcDomain, CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest) +> KmsV2KeysSymPost201Response CreateV2SharedSecretKeysVerifi (string vIcDomain, CreateSharedSecretKeysVerifiRequest createSharedSecretKeysVerifiRequest) Create Shared-Secret Keys as per verifi spec @@ -95,12 +95,12 @@ namespace Example { var apiInstance = new SymmetricKeyManagementApi(); var vIcDomain = vIcDomain_example; // string | domain - var createSharedSecretKeysRequest = new CreateSharedSecretKeysRequest1(); // CreateSharedSecretKeysRequest1 | + var createSharedSecretKeysVerifiRequest = new CreateSharedSecretKeysVerifiRequest(); // CreateSharedSecretKeysVerifiRequest | try { // Create Shared-Secret Keys as per verifi spec - KmsV2KeysSymPost201Response result = apiInstance.CreateV2SharedSecretKeysVerifi(vIcDomain, createSharedSecretKeysRequest); + KmsV2KeysSymPost201Response result = apiInstance.CreateV2SharedSecretKeysVerifi(vIcDomain, createSharedSecretKeysVerifiRequest); Debug.WriteLine(result); } catch (Exception e) @@ -117,7 +117,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **vIcDomain** | **string**| domain | - **createSharedSecretKeysRequest** | [**CreateSharedSecretKeysRequest1**](CreateSharedSecretKeysRequest1.md)| | + **createSharedSecretKeysVerifiRequest** | [**CreateSharedSecretKeysVerifiRequest**](CreateSharedSecretKeysVerifiRequest.md)| | ### Return type diff --git a/generator/cybersource-rest-spec.json b/generator/cybersource-rest-spec.json index bfe6b9d4..3d072a68 100644 --- a/generator/cybersource-rest-spec.json +++ b/generator/cybersource-rest-spec.json @@ -73874,7 +73874,7 @@ "type": "string" }, { - "name": "createSharedSecretKeysRequest", + "name": "createSharedSecretKeysVerifiRequest", "in": "body", "required": true, "schema": { diff --git a/test/Api/SymmetricKeyManagementApiTests.cs b/test/Api/SymmetricKeyManagementApiTests.cs index eb424c82..70252b80 100644 --- a/test/Api/SymmetricKeyManagementApiTests.cs +++ b/test/Api/SymmetricKeyManagementApiTests.cs @@ -84,8 +84,8 @@ public void CreateV2SharedSecretKeysVerifiTest() { // TODO uncomment below to test the method and replace null with proper value //string vIcDomain = null; - //CreateSharedSecretKeysRequest1 createSharedSecretKeysRequest = null; - //var response = instance.CreateV2SharedSecretKeysVerifi(vIcDomain, createSharedSecretKeysRequest); + //CreateSharedSecretKeysVerifiRequest createSharedSecretKeysVerifiRequest = null; + //var response = instance.CreateV2SharedSecretKeysVerifi(vIcDomain, createSharedSecretKeysVerifiRequest); //Assert.IsInstanceOf (response, "response is KmsV2KeysSymPost201Response"); } diff --git a/test/Model/CreateSharedSecretKeysRequest1Tests.cs b/test/Model/CreateSharedSecretKeysVerifiRequestTests.cs similarity index 73% rename from test/Model/CreateSharedSecretKeysRequest1Tests.cs rename to test/Model/CreateSharedSecretKeysVerifiRequestTests.cs index 35fe12c9..ffd08bae 100644 --- a/test/Model/CreateSharedSecretKeysRequest1Tests.cs +++ b/test/Model/CreateSharedSecretKeysVerifiRequestTests.cs @@ -23,17 +23,17 @@ namespace CyberSource.Test { /// - /// Class for testing CreateSharedSecretKeysRequest1 + /// Class for testing CreateSharedSecretKeysVerifiRequest /// /// /// This file is automatically generated by Swagger Codegen. /// Please update the test case below to test the model. /// [TestFixture] - public class CreateSharedSecretKeysRequest1Tests + public class CreateSharedSecretKeysVerifiRequestTests { - // TODO uncomment below to declare an instance variable for CreateSharedSecretKeysRequest1 - //private CreateSharedSecretKeysRequest1 instance; + // TODO uncomment below to declare an instance variable for CreateSharedSecretKeysVerifiRequest + //private CreateSharedSecretKeysVerifiRequest instance; /// /// Setup before each test @@ -41,8 +41,8 @@ public class CreateSharedSecretKeysRequest1Tests [SetUp] public void Init() { - // TODO uncomment below to create an instance of CreateSharedSecretKeysRequest1 - //instance = new CreateSharedSecretKeysRequest1(); + // TODO uncomment below to create an instance of CreateSharedSecretKeysVerifiRequest + //instance = new CreateSharedSecretKeysVerifiRequest(); } /// @@ -55,13 +55,13 @@ public void Cleanup() } /// - /// Test an instance of CreateSharedSecretKeysRequest1 + /// Test an instance of CreateSharedSecretKeysVerifiRequest /// [Test] - public void CreateSharedSecretKeysRequest1InstanceTest() + public void CreateSharedSecretKeysVerifiRequestInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" CreateSharedSecretKeysRequest1 - //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateSharedSecretKeysRequest1"); + // TODO uncomment below to test "IsInstanceOfType" CreateSharedSecretKeysVerifiRequest + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateSharedSecretKeysVerifiRequest"); } /// diff --git a/test/cybersource-rest-client-dotnet.Test.csproj b/test/cybersource-rest-client-dotnet.Test.csproj index 9c3f7297..fbf74f77 100644 --- a/test/cybersource-rest-client-dotnet.Test.csproj +++ b/test/cybersource-rest-client-dotnet.Test.csproj @@ -66,7 +66,7 @@ OpenAPI spec version: 0.0.1 - {BFBBDA15-4C78-4924-AA89-8057C77BA052} + {BE688374-90A6-4DA2-8C3F-9A685CDC9F89} cybersource-rest-client-dotnet From 52a3db5a3d4f76f88225efb4b40ecf739c214896 Mon Sep 17 00:00:00 2001 From: Gaurav Bansal Date: Mon, 18 Apr 2022 10:55:01 +0530 Subject: [PATCH 4/5] removing git ignore added files --- .gitignore | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.gitignore b/.gitignore index 356f0ebe..28b72cef 100644 --- a/.gitignore +++ b/.gitignore @@ -183,10 +183,3 @@ $RECYCLE.BIN/ # Visual Studio 2014 CTP **/*.sln.ide -.swagger-codegen-ignore -.swagger-codegen-ignore -.swagger-codegen/VERSION -.travis.yml -.vs/slnx.sqlite -.vs/tasks.vs.json -.vs/VSWorkspaceState.json From 0bab5d10ef3dc7fa5ba64ceeb06e98ccb14eab7d Mon Sep 17 00:00:00 2001 From: Gaurav Bansal Date: Fri, 22 Apr 2022 15:51:40 +0530 Subject: [PATCH 5/5] april release- version updated --- Properties/AssemblyInfo.cs | 4 ++-- cybersource-rest-client-dotnet.nuspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index bfb6ab65..38abeb7f 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -28,5 +28,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.0.1.21")] -[assembly: AssemblyFileVersion("0.0.1.21")] +[assembly: AssemblyVersion("0.0.1.22")] +[assembly: AssemblyFileVersion("0.0.1.22")] diff --git a/cybersource-rest-client-dotnet.nuspec b/cybersource-rest-client-dotnet.nuspec index cd217fa4..cbcb9a57 100644 --- a/cybersource-rest-client-dotnet.nuspec +++ b/cybersource-rest-client-dotnet.nuspec @@ -2,7 +2,7 @@ CyberSource.Rest.Client - 0.0.1.21 + 0.0.1.22 CyberSource.Rest.Client CyberSource Corporation CyberSource