Skip to content

Commit e65874b

Browse files
authored
Merge pull request #130 from gaubansa/master
april-22 release
2 parents b8afdd9 + 0bab5d1 commit e65874b

20 files changed

+1196
-34
lines changed

Api/SymmetricKeyManagementApi.cs

+262
Large diffs are not rendered by default.

Client/Configuration.cs

+15
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,21 @@ public int Timeout
170170
/// <returns></returns>
171171
public void SetApiClientUsingDefault (ApiClient apiClient = null)
172172
{
173+
// if (apiClient == null)
174+
// {
175+
// if (Default != null && Default.ApiClient == null)
176+
// Default.ApiClient = new ApiClient();
177+
178+
// ApiClient = Default != null ? Default.ApiClient : new ApiClient();
179+
// }
180+
// else
181+
// {
182+
// if (Default != null && Default.ApiClient == null)
183+
// Default.ApiClient = apiClient;
184+
185+
// ApiClient = apiClient;
186+
// }
187+
173188
if (apiClient == null)
174189
{
175190
ApiClient = new ApiClient();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
/*
2+
* CyberSource Merged Spec
3+
*
4+
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5+
*
6+
* OpenAPI spec version: 0.0.1
7+
*
8+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9+
*/
10+
11+
using System;
12+
using System.Linq;
13+
using System.IO;
14+
using System.Text;
15+
using System.Text.RegularExpressions;
16+
using System.Collections;
17+
using System.Collections.Generic;
18+
using System.Collections.ObjectModel;
19+
using System.Runtime.Serialization;
20+
using Newtonsoft.Json;
21+
using Newtonsoft.Json.Converters;
22+
using System.ComponentModel.DataAnnotations;
23+
using SwaggerDateConverter = CyberSource.Client.SwaggerDateConverter;
24+
25+
namespace CyberSource.Model
26+
{
27+
/// <summary>
28+
/// CreateSharedSecretKeysVerifiRequest
29+
/// </summary>
30+
[DataContract]
31+
public partial class CreateSharedSecretKeysVerifiRequest : IEquatable<CreateSharedSecretKeysVerifiRequest>, IValidatableObject
32+
{
33+
/// <summary>
34+
/// Initializes a new instance of the <see cref="CreateSharedSecretKeysVerifiRequest" /> class.
35+
/// </summary>
36+
/// <param name="ClientReferenceInformation">ClientReferenceInformation.</param>
37+
/// <param name="KeyInformation">KeyInformation.</param>
38+
public CreateSharedSecretKeysVerifiRequest(Kmsv2keyssymClientReferenceInformation ClientReferenceInformation = default(Kmsv2keyssymClientReferenceInformation), List<Kmsv2keyssymverifiKeyInformation> KeyInformation = default(List<Kmsv2keyssymverifiKeyInformation>))
39+
{
40+
this.ClientReferenceInformation = ClientReferenceInformation;
41+
this.KeyInformation = KeyInformation;
42+
}
43+
44+
/// <summary>
45+
/// Gets or Sets ClientReferenceInformation
46+
/// </summary>
47+
[DataMember(Name="clientReferenceInformation", EmitDefaultValue=false)]
48+
public Kmsv2keyssymClientReferenceInformation ClientReferenceInformation { get; set; }
49+
50+
/// <summary>
51+
/// Gets or Sets KeyInformation
52+
/// </summary>
53+
[DataMember(Name="keyInformation", EmitDefaultValue=false)]
54+
public List<Kmsv2keyssymverifiKeyInformation> KeyInformation { get; set; }
55+
56+
/// <summary>
57+
/// Returns the string presentation of the object
58+
/// </summary>
59+
/// <returns>String presentation of the object</returns>
60+
public override string ToString()
61+
{
62+
var sb = new StringBuilder();
63+
sb.Append("class CreateSharedSecretKeysVerifiRequest {\n");
64+
sb.Append(" ClientReferenceInformation: ").Append(ClientReferenceInformation).Append("\n");
65+
sb.Append(" KeyInformation: ").Append(KeyInformation).Append("\n");
66+
sb.Append("}\n");
67+
return sb.ToString();
68+
}
69+
70+
/// <summary>
71+
/// Returns the JSON string presentation of the object
72+
/// </summary>
73+
/// <returns>JSON string presentation of the object</returns>
74+
public string ToJson()
75+
{
76+
return JsonConvert.SerializeObject(this, Formatting.Indented);
77+
}
78+
79+
/// <summary>
80+
/// Returns true if objects are equal
81+
/// </summary>
82+
/// <param name="obj">Object to be compared</param>
83+
/// <returns>Boolean</returns>
84+
public override bool Equals(object obj)
85+
{
86+
// credit: http://stackoverflow.com/a/10454552/677735
87+
return this.Equals(obj as CreateSharedSecretKeysVerifiRequest);
88+
}
89+
90+
/// <summary>
91+
/// Returns true if CreateSharedSecretKeysVerifiRequest instances are equal
92+
/// </summary>
93+
/// <param name="other">Instance of CreateSharedSecretKeysVerifiRequest to be compared</param>
94+
/// <returns>Boolean</returns>
95+
public bool Equals(CreateSharedSecretKeysVerifiRequest other)
96+
{
97+
// credit: http://stackoverflow.com/a/10454552/677735
98+
if (other == null)
99+
return false;
100+
101+
return
102+
(
103+
this.ClientReferenceInformation == other.ClientReferenceInformation ||
104+
this.ClientReferenceInformation != null &&
105+
this.ClientReferenceInformation.Equals(other.ClientReferenceInformation)
106+
) &&
107+
(
108+
this.KeyInformation == other.KeyInformation ||
109+
this.KeyInformation != null &&
110+
this.KeyInformation.SequenceEqual(other.KeyInformation)
111+
);
112+
}
113+
114+
/// <summary>
115+
/// Gets the hash code
116+
/// </summary>
117+
/// <returns>Hash code</returns>
118+
public override int GetHashCode()
119+
{
120+
// credit: http://stackoverflow.com/a/263416/677735
121+
unchecked // Overflow is fine, just wrap
122+
{
123+
int hash = 41;
124+
// Suitable nullity checks etc, of course :)
125+
if (this.ClientReferenceInformation != null)
126+
hash = hash * 59 + this.ClientReferenceInformation.GetHashCode();
127+
if (this.KeyInformation != null)
128+
hash = hash * 59 + this.KeyInformation.GetHashCode();
129+
return hash;
130+
}
131+
}
132+
133+
/// <summary>
134+
/// To validate all properties of the instance
135+
/// </summary>
136+
/// <param name="validationContext">Validation context</param>
137+
/// <returns>Validation Result</returns>
138+
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
139+
{
140+
yield break;
141+
}
142+
}
143+
144+
}
+205
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
/*
2+
* CyberSource Merged Spec
3+
*
4+
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5+
*
6+
* OpenAPI spec version: 0.0.1
7+
*
8+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9+
*/
10+
11+
using System;
12+
using System.Linq;
13+
using System.IO;
14+
using System.Text;
15+
using System.Text.RegularExpressions;
16+
using System.Collections;
17+
using System.Collections.Generic;
18+
using System.Collections.ObjectModel;
19+
using System.Runtime.Serialization;
20+
using Newtonsoft.Json;
21+
using Newtonsoft.Json.Converters;
22+
using System.ComponentModel.DataAnnotations;
23+
using SwaggerDateConverter = CyberSource.Client.SwaggerDateConverter;
24+
25+
namespace CyberSource.Model
26+
{
27+
/// <summary>
28+
/// key information
29+
/// </summary>
30+
[DataContract]
31+
public partial class Kmsv2keyssymverifiKeyInformation : IEquatable<Kmsv2keyssymverifiKeyInformation>, IValidatableObject
32+
{
33+
/// <summary>
34+
/// Algorithm for message signature authentication
35+
/// </summary>
36+
/// <value>Algorithm for message signature authentication </value>
37+
[JsonConverter(typeof(StringEnumConverter))]
38+
public enum DigestAlgorithmEnum
39+
{
40+
41+
/// <summary>
42+
/// Enum HMACSHA1 for "HMACSHA1"
43+
/// </summary>
44+
[EnumMember(Value = "HMACSHA1")]
45+
HMACSHA1,
46+
47+
/// <summary>
48+
/// Enum HMACSHA2 for "HMACSHA2"
49+
/// </summary>
50+
[EnumMember(Value = "HMACSHA2")]
51+
HMACSHA2
52+
}
53+
54+
/// <summary>
55+
/// Algorithm for message signature authentication
56+
/// </summary>
57+
/// <value>Algorithm for message signature authentication </value>
58+
[DataMember(Name="digestAlgorithm", EmitDefaultValue=false)]
59+
public DigestAlgorithmEnum? DigestAlgorithm { get; set; }
60+
/// <summary>
61+
/// Initializes a new instance of the <see cref="Kmsv2keyssymverifiKeyInformation" /> class.
62+
/// </summary>
63+
[JsonConstructorAttribute]
64+
protected Kmsv2keyssymverifiKeyInformation() { }
65+
/// <summary>
66+
/// Initializes a new instance of the <see cref="Kmsv2keyssymverifiKeyInformation" /> class.
67+
/// </summary>
68+
/// <param name="OrganizationId">Merchant Id (required).</param>
69+
/// <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>
70+
/// <param name="DigestAlgorithm">Algorithm for message signature authentication (default to DigestAlgorithmEnum.HMACSHA2).</param>
71+
public Kmsv2keyssymverifiKeyInformation(string OrganizationId = default(string), string ReferenceNumber = default(string), DigestAlgorithmEnum? DigestAlgorithm = DigestAlgorithmEnum.HMACSHA2)
72+
{
73+
// to ensure "OrganizationId" is required (not null)
74+
if (OrganizationId == null)
75+
{
76+
throw new InvalidDataException("OrganizationId is a required property for Kmsv2keyssymverifiKeyInformation and cannot be null");
77+
}
78+
else
79+
{
80+
this.OrganizationId = OrganizationId;
81+
}
82+
this.ReferenceNumber = ReferenceNumber;
83+
// use default value if no "DigestAlgorithm" provided
84+
if (DigestAlgorithm == null)
85+
{
86+
this.DigestAlgorithm = DigestAlgorithmEnum.HMACSHA2;
87+
}
88+
else
89+
{
90+
this.DigestAlgorithm = DigestAlgorithm;
91+
}
92+
}
93+
94+
/// <summary>
95+
/// Merchant Id
96+
/// </summary>
97+
/// <value>Merchant Id </value>
98+
[DataMember(Name="organizationId", EmitDefaultValue=false)]
99+
public string OrganizationId { get; set; }
100+
101+
/// <summary>
102+
/// 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.
103+
/// </summary>
104+
/// <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>
105+
[DataMember(Name="referenceNumber", EmitDefaultValue=false)]
106+
public string ReferenceNumber { get; set; }
107+
108+
109+
/// <summary>
110+
/// Returns the string presentation of the object
111+
/// </summary>
112+
/// <returns>String presentation of the object</returns>
113+
public override string ToString()
114+
{
115+
var sb = new StringBuilder();
116+
sb.Append("class Kmsv2keyssymverifiKeyInformation {\n");
117+
sb.Append(" OrganizationId: ").Append(OrganizationId).Append("\n");
118+
sb.Append(" ReferenceNumber: ").Append(ReferenceNumber).Append("\n");
119+
sb.Append(" DigestAlgorithm: ").Append(DigestAlgorithm).Append("\n");
120+
sb.Append("}\n");
121+
return sb.ToString();
122+
}
123+
124+
/// <summary>
125+
/// Returns the JSON string presentation of the object
126+
/// </summary>
127+
/// <returns>JSON string presentation of the object</returns>
128+
public string ToJson()
129+
{
130+
return JsonConvert.SerializeObject(this, Formatting.Indented);
131+
}
132+
133+
/// <summary>
134+
/// Returns true if objects are equal
135+
/// </summary>
136+
/// <param name="obj">Object to be compared</param>
137+
/// <returns>Boolean</returns>
138+
public override bool Equals(object obj)
139+
{
140+
// credit: http://stackoverflow.com/a/10454552/677735
141+
return this.Equals(obj as Kmsv2keyssymverifiKeyInformation);
142+
}
143+
144+
/// <summary>
145+
/// Returns true if Kmsv2keyssymverifiKeyInformation instances are equal
146+
/// </summary>
147+
/// <param name="other">Instance of Kmsv2keyssymverifiKeyInformation to be compared</param>
148+
/// <returns>Boolean</returns>
149+
public bool Equals(Kmsv2keyssymverifiKeyInformation other)
150+
{
151+
// credit: http://stackoverflow.com/a/10454552/677735
152+
if (other == null)
153+
return false;
154+
155+
return
156+
(
157+
this.OrganizationId == other.OrganizationId ||
158+
this.OrganizationId != null &&
159+
this.OrganizationId.Equals(other.OrganizationId)
160+
) &&
161+
(
162+
this.ReferenceNumber == other.ReferenceNumber ||
163+
this.ReferenceNumber != null &&
164+
this.ReferenceNumber.Equals(other.ReferenceNumber)
165+
) &&
166+
(
167+
this.DigestAlgorithm == other.DigestAlgorithm ||
168+
this.DigestAlgorithm != null &&
169+
this.DigestAlgorithm.Equals(other.DigestAlgorithm)
170+
);
171+
}
172+
173+
/// <summary>
174+
/// Gets the hash code
175+
/// </summary>
176+
/// <returns>Hash code</returns>
177+
public override int GetHashCode()
178+
{
179+
// credit: http://stackoverflow.com/a/263416/677735
180+
unchecked // Overflow is fine, just wrap
181+
{
182+
int hash = 41;
183+
// Suitable nullity checks etc, of course :)
184+
if (this.OrganizationId != null)
185+
hash = hash * 59 + this.OrganizationId.GetHashCode();
186+
if (this.ReferenceNumber != null)
187+
hash = hash * 59 + this.ReferenceNumber.GetHashCode();
188+
if (this.DigestAlgorithm != null)
189+
hash = hash * 59 + this.DigestAlgorithm.GetHashCode();
190+
return hash;
191+
}
192+
}
193+
194+
/// <summary>
195+
/// To validate all properties of the instance
196+
/// </summary>
197+
/// <param name="validationContext">Validation context</param>
198+
/// <returns>Validation Result</returns>
199+
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
200+
{
201+
yield break;
202+
}
203+
}
204+
205+
}

0 commit comments

Comments
 (0)