-
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 #140 from CyberSource/oct-22-release
oct release
- Loading branch information
Showing
86 changed files
with
9,435 additions
and
105 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
/* | ||
* 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> | ||
/// Body | ||
/// </summary> | ||
[DataContract] | ||
public partial class Body : IEquatable<Body>, IValidatableObject | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Body" /> class. | ||
/// </summary> | ||
[JsonConstructorAttribute] | ||
protected Body() { } | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Body" /> class. | ||
/// </summary> | ||
/// <param name="Requestor">Identifies the service requesting parsing (required).</param> | ||
/// <param name="ParsedTagLimit">Number of tags to parse for each EMV tag string provided. .</param> | ||
/// <param name="EmvDetailsList">An array of objects, each containing a requestId and the corresponding emvRequestCombinedTags (required).</param> | ||
public Body(string Requestor = default(string), int? ParsedTagLimit = default(int?), List<Tssv2transactionsemvTagDetailsEmvDetailsList> EmvDetailsList = default(List<Tssv2transactionsemvTagDetailsEmvDetailsList>)) | ||
{ | ||
// to ensure "Requestor" is required (not null) | ||
if (Requestor == null) | ||
{ | ||
throw new InvalidDataException("Requestor is a required property for Body and cannot be null"); | ||
} | ||
else | ||
{ | ||
this.Requestor = Requestor; | ||
} | ||
// to ensure "EmvDetailsList" is required (not null) | ||
if (EmvDetailsList == null) | ||
{ | ||
throw new InvalidDataException("EmvDetailsList is a required property for Body and cannot be null"); | ||
} | ||
else | ||
{ | ||
this.EmvDetailsList = EmvDetailsList; | ||
} | ||
this.ParsedTagLimit = ParsedTagLimit; | ||
} | ||
|
||
/// <summary> | ||
/// Identifies the service requesting parsing | ||
/// </summary> | ||
/// <value>Identifies the service requesting parsing </value> | ||
[DataMember(Name="requestor", EmitDefaultValue=false)] | ||
public string Requestor { get; set; } | ||
|
||
/// <summary> | ||
/// Number of tags to parse for each EMV tag string provided. | ||
/// </summary> | ||
/// <value>Number of tags to parse for each EMV tag string provided. </value> | ||
[DataMember(Name="parsedTagLimit", EmitDefaultValue=false)] | ||
public int? ParsedTagLimit { get; set; } | ||
|
||
/// <summary> | ||
/// An array of objects, each containing a requestId and the corresponding emvRequestCombinedTags | ||
/// </summary> | ||
/// <value>An array of objects, each containing a requestId and the corresponding emvRequestCombinedTags </value> | ||
[DataMember(Name="emvDetailsList", EmitDefaultValue=false)] | ||
public List<Tssv2transactionsemvTagDetailsEmvDetailsList> EmvDetailsList { 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 Body {\n"); | ||
sb.Append(" Requestor: ").Append(Requestor).Append("\n"); | ||
sb.Append(" ParsedTagLimit: ").Append(ParsedTagLimit).Append("\n"); | ||
sb.Append(" EmvDetailsList: ").Append(EmvDetailsList).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 Body); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if Body instances are equal | ||
/// </summary> | ||
/// <param name="other">Instance of Body to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public bool Equals(Body other) | ||
{ | ||
// credit: http://stackoverflow.com/a/10454552/677735 | ||
if (other == null) | ||
return false; | ||
|
||
return | ||
( | ||
this.Requestor == other.Requestor || | ||
this.Requestor != null && | ||
this.Requestor.Equals(other.Requestor) | ||
) && | ||
( | ||
this.ParsedTagLimit == other.ParsedTagLimit || | ||
this.ParsedTagLimit != null && | ||
this.ParsedTagLimit.Equals(other.ParsedTagLimit) | ||
) && | ||
( | ||
this.EmvDetailsList == other.EmvDetailsList || | ||
this.EmvDetailsList != null && | ||
this.EmvDetailsList.SequenceEqual(other.EmvDetailsList) | ||
); | ||
} | ||
|
||
/// <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.Requestor != null) | ||
hash = hash * 59 + this.Requestor.GetHashCode(); | ||
if (this.ParsedTagLimit != null) | ||
hash = hash * 59 + this.ParsedTagLimit.GetHashCode(); | ||
if (this.EmvDetailsList != null) | ||
hash = hash * 59 + this.EmvDetailsList.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.