-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from gaubansa/master
april-22 release
- Loading branch information
Showing
20 changed files
with
1,196 additions
and
34 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
/// <summary> | ||
/// CreateSharedSecretKeysVerifiRequest | ||
/// </summary> | ||
[DataContract] | ||
public partial class CreateSharedSecretKeysVerifiRequest : IEquatable<CreateSharedSecretKeysVerifiRequest>, IValidatableObject | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="CreateSharedSecretKeysVerifiRequest" /> class. | ||
/// </summary> | ||
/// <param name="ClientReferenceInformation">ClientReferenceInformation.</param> | ||
/// <param name="KeyInformation">KeyInformation.</param> | ||
public CreateSharedSecretKeysVerifiRequest(Kmsv2keyssymClientReferenceInformation ClientReferenceInformation = default(Kmsv2keyssymClientReferenceInformation), List<Kmsv2keyssymverifiKeyInformation> KeyInformation = default(List<Kmsv2keyssymverifiKeyInformation>)) | ||
{ | ||
this.ClientReferenceInformation = ClientReferenceInformation; | ||
this.KeyInformation = KeyInformation; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or Sets ClientReferenceInformation | ||
/// </summary> | ||
[DataMember(Name="clientReferenceInformation", EmitDefaultValue=false)] | ||
public Kmsv2keyssymClientReferenceInformation ClientReferenceInformation { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets KeyInformation | ||
/// </summary> | ||
[DataMember(Name="keyInformation", EmitDefaultValue=false)] | ||
public List<Kmsv2keyssymverifiKeyInformation> KeyInformation { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
var sb = new StringBuilder(); | ||
sb.Append("class CreateSharedSecretKeysVerifiRequest {\n"); | ||
sb.Append(" ClientReferenceInformation: ").Append(ClientReferenceInformation).Append("\n"); | ||
sb.Append(" KeyInformation: ").Append(KeyInformation).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public string ToJson() | ||
{ | ||
return JsonConvert.SerializeObject(this, Formatting.Indented); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
// credit: http://stackoverflow.com/a/10454552/677735 | ||
return this.Equals(obj as CreateSharedSecretKeysVerifiRequest); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if CreateSharedSecretKeysVerifiRequest instances are equal | ||
/// </summary> | ||
/// <param name="other">Instance of CreateSharedSecretKeysVerifiRequest to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public bool Equals(CreateSharedSecretKeysVerifiRequest 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) | ||
); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
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; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// To validate all properties of the instance | ||
/// </summary> | ||
/// <param name="validationContext">Validation context</param> | ||
/// <returns>Validation Result</returns> | ||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) | ||
{ | ||
yield break; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
/// <summary> | ||
/// key information | ||
/// </summary> | ||
[DataContract] | ||
public partial class Kmsv2keyssymverifiKeyInformation : IEquatable<Kmsv2keyssymverifiKeyInformation>, IValidatableObject | ||
{ | ||
/// <summary> | ||
/// Algorithm for message signature authentication | ||
/// </summary> | ||
/// <value>Algorithm for message signature authentication </value> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum DigestAlgorithmEnum | ||
{ | ||
|
||
/// <summary> | ||
/// Enum HMACSHA1 for "HMACSHA1" | ||
/// </summary> | ||
[EnumMember(Value = "HMACSHA1")] | ||
HMACSHA1, | ||
|
||
/// <summary> | ||
/// Enum HMACSHA2 for "HMACSHA2" | ||
/// </summary> | ||
[EnumMember(Value = "HMACSHA2")] | ||
HMACSHA2 | ||
} | ||
|
||
/// <summary> | ||
/// Algorithm for message signature authentication | ||
/// </summary> | ||
/// <value>Algorithm for message signature authentication </value> | ||
[DataMember(Name="digestAlgorithm", EmitDefaultValue=false)] | ||
public DigestAlgorithmEnum? DigestAlgorithm { get; set; } | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Kmsv2keyssymverifiKeyInformation" /> class. | ||
/// </summary> | ||
[JsonConstructorAttribute] | ||
protected Kmsv2keyssymverifiKeyInformation() { } | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Kmsv2keyssymverifiKeyInformation" /> class. | ||
/// </summary> | ||
/// <param name="OrganizationId">Merchant Id (required).</param> | ||
/// <param name="ReferenceNumber">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. .</param> | ||
/// <param name="DigestAlgorithm">Algorithm for message signature authentication (default to DigestAlgorithmEnum.HMACSHA2).</param> | ||
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; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Merchant Id | ||
/// </summary> | ||
/// <value>Merchant Id </value> | ||
[DataMember(Name="organizationId", EmitDefaultValue=false)] | ||
public string OrganizationId { get; set; } | ||
|
||
/// <summary> | ||
/// 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. | ||
/// </summary> | ||
/// <value>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. </value> | ||
[DataMember(Name="referenceNumber", EmitDefaultValue=false)] | ||
public string ReferenceNumber { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
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(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public string ToJson() | ||
{ | ||
return JsonConvert.SerializeObject(this, Formatting.Indented); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
// credit: http://stackoverflow.com/a/10454552/677735 | ||
return this.Equals(obj as Kmsv2keyssymverifiKeyInformation); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if Kmsv2keyssymverifiKeyInformation instances are equal | ||
/// </summary> | ||
/// <param name="other">Instance of Kmsv2keyssymverifiKeyInformation to be compared</param> | ||
/// <returns>Boolean</returns> | ||
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) | ||
); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
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; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// To validate all properties of the instance | ||
/// </summary> | ||
/// <param name="validationContext">Validation context</param> | ||
/// <returns>Validation Result</returns> | ||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) | ||
{ | ||
yield break; | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.