|
| 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 | + /// PostInstrumentIdentifierEnrollmentRequest |
| 29 | + /// </summary> |
| 30 | + [DataContract] |
| 31 | + public partial class PostInstrumentIdentifierEnrollmentRequest : IEquatable<PostInstrumentIdentifierEnrollmentRequest>, IValidatableObject |
| 32 | + { |
| 33 | + /// <summary> |
| 34 | + /// Initializes a new instance of the <see cref="PostInstrumentIdentifierEnrollmentRequest" /> class. |
| 35 | + /// </summary> |
| 36 | + /// <param name="Links">Links.</param> |
| 37 | + /// <param name="Id">The id of the Instrument Identifier Token. .</param> |
| 38 | + /// <param name="Type">The type of Instrument Identifier. Valid values: - enrollable card .</param> |
| 39 | + /// <param name="Card">Card.</param> |
| 40 | + /// <param name="BankAccount">BankAccount.</param> |
| 41 | + /// <param name="TokenizedCard">TokenizedCard.</param> |
| 42 | + /// <param name="Issuer">Issuer.</param> |
| 43 | + /// <param name="ProcessingInformation">ProcessingInformation.</param> |
| 44 | + /// <param name="BillTo">BillTo.</param> |
| 45 | + /// <param name="Metadata">Metadata.</param> |
| 46 | + public PostInstrumentIdentifierEnrollmentRequest(Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierLinks Links = default(Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierLinks), string Id = default(string), string Type = default(string), Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierCard Card = default(Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierCard), Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierBankAccount BankAccount = default(Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierBankAccount), Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierTokenizedCard TokenizedCard = default(Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierTokenizedCard), Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierIssuer Issuer = default(Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierIssuer), Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierProcessingInformation ProcessingInformation = default(Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierProcessingInformation), Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierBillTo BillTo = default(Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierBillTo), Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierMetadata Metadata = default(Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierMetadata)) |
| 47 | + { |
| 48 | + this.Links = Links; |
| 49 | + this.Id = Id; |
| 50 | + this.Type = Type; |
| 51 | + this.Card = Card; |
| 52 | + this.BankAccount = BankAccount; |
| 53 | + this.TokenizedCard = TokenizedCard; |
| 54 | + this.Issuer = Issuer; |
| 55 | + this.ProcessingInformation = ProcessingInformation; |
| 56 | + this.BillTo = BillTo; |
| 57 | + this.Metadata = Metadata; |
| 58 | + } |
| 59 | + |
| 60 | + /// <summary> |
| 61 | + /// Gets or Sets Links |
| 62 | + /// </summary> |
| 63 | + [DataMember(Name="_links", EmitDefaultValue=false)] |
| 64 | + public Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierLinks Links { get; set; } |
| 65 | + |
| 66 | + /// <summary> |
| 67 | + /// The id of the Instrument Identifier Token. |
| 68 | + /// </summary> |
| 69 | + /// <value>The id of the Instrument Identifier Token. </value> |
| 70 | + [DataMember(Name="id", EmitDefaultValue=false)] |
| 71 | + public string Id { get; set; } |
| 72 | + |
| 73 | + /// <summary> |
| 74 | + /// The type of token. Valid values: - instrumentIdentifier |
| 75 | + /// </summary> |
| 76 | + /// <value>The type of token. Valid values: - instrumentIdentifier </value> |
| 77 | + [DataMember(Name="object", EmitDefaultValue=false)] |
| 78 | + public string _Object { get; private set; } |
| 79 | + |
| 80 | + /// <summary> |
| 81 | + /// Issuers state for the card number. Valid values: - ACTIVE - CLOSED : The account has been closed. |
| 82 | + /// </summary> |
| 83 | + /// <value>Issuers state for the card number. Valid values: - ACTIVE - CLOSED : The account has been closed. </value> |
| 84 | + [DataMember(Name="state", EmitDefaultValue=false)] |
| 85 | + public string State { get; private set; } |
| 86 | + |
| 87 | + /// <summary> |
| 88 | + /// The type of Instrument Identifier. Valid values: - enrollable card |
| 89 | + /// </summary> |
| 90 | + /// <value>The type of Instrument Identifier. Valid values: - enrollable card </value> |
| 91 | + [DataMember(Name="type", EmitDefaultValue=false)] |
| 92 | + public string Type { get; set; } |
| 93 | + |
| 94 | + /// <summary> |
| 95 | + /// Gets or Sets Card |
| 96 | + /// </summary> |
| 97 | + [DataMember(Name="card", EmitDefaultValue=false)] |
| 98 | + public Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierCard Card { get; set; } |
| 99 | + |
| 100 | + /// <summary> |
| 101 | + /// Gets or Sets BankAccount |
| 102 | + /// </summary> |
| 103 | + [DataMember(Name="bankAccount", EmitDefaultValue=false)] |
| 104 | + public Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierBankAccount BankAccount { get; set; } |
| 105 | + |
| 106 | + /// <summary> |
| 107 | + /// Gets or Sets TokenizedCard |
| 108 | + /// </summary> |
| 109 | + [DataMember(Name="tokenizedCard", EmitDefaultValue=false)] |
| 110 | + public Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierTokenizedCard TokenizedCard { get; set; } |
| 111 | + |
| 112 | + /// <summary> |
| 113 | + /// Gets or Sets Issuer |
| 114 | + /// </summary> |
| 115 | + [DataMember(Name="issuer", EmitDefaultValue=false)] |
| 116 | + public Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierIssuer Issuer { get; set; } |
| 117 | + |
| 118 | + /// <summary> |
| 119 | + /// Gets or Sets ProcessingInformation |
| 120 | + /// </summary> |
| 121 | + [DataMember(Name="processingInformation", EmitDefaultValue=false)] |
| 122 | + public Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierProcessingInformation ProcessingInformation { get; set; } |
| 123 | + |
| 124 | + /// <summary> |
| 125 | + /// Gets or Sets BillTo |
| 126 | + /// </summary> |
| 127 | + [DataMember(Name="billTo", EmitDefaultValue=false)] |
| 128 | + public Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierBillTo BillTo { get; set; } |
| 129 | + |
| 130 | + /// <summary> |
| 131 | + /// Gets or Sets Metadata |
| 132 | + /// </summary> |
| 133 | + [DataMember(Name="metadata", EmitDefaultValue=false)] |
| 134 | + public Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierMetadata Metadata { get; set; } |
| 135 | + |
| 136 | + /// <summary> |
| 137 | + /// Returns the string presentation of the object |
| 138 | + /// </summary> |
| 139 | + /// <returns>String presentation of the object</returns> |
| 140 | + public override string ToString() |
| 141 | + { |
| 142 | + var sb = new StringBuilder(); |
| 143 | + sb.Append("class PostInstrumentIdentifierEnrollmentRequest {\n"); |
| 144 | + sb.Append(" Links: ").Append(Links).Append("\n"); |
| 145 | + sb.Append(" Id: ").Append(Id).Append("\n"); |
| 146 | + sb.Append(" _Object: ").Append(_Object).Append("\n"); |
| 147 | + sb.Append(" State: ").Append(State).Append("\n"); |
| 148 | + sb.Append(" Type: ").Append(Type).Append("\n"); |
| 149 | + sb.Append(" Card: ").Append(Card).Append("\n"); |
| 150 | + sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); |
| 151 | + sb.Append(" TokenizedCard: ").Append(TokenizedCard).Append("\n"); |
| 152 | + sb.Append(" Issuer: ").Append(Issuer).Append("\n"); |
| 153 | + sb.Append(" ProcessingInformation: ").Append(ProcessingInformation).Append("\n"); |
| 154 | + sb.Append(" BillTo: ").Append(BillTo).Append("\n"); |
| 155 | + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); |
| 156 | + sb.Append("}\n"); |
| 157 | + return sb.ToString(); |
| 158 | + } |
| 159 | + |
| 160 | + /// <summary> |
| 161 | + /// Returns the JSON string presentation of the object |
| 162 | + /// </summary> |
| 163 | + /// <returns>JSON string presentation of the object</returns> |
| 164 | + public string ToJson() |
| 165 | + { |
| 166 | + return JsonConvert.SerializeObject(this, Formatting.Indented); |
| 167 | + } |
| 168 | + |
| 169 | + /// <summary> |
| 170 | + /// Returns true if objects are equal |
| 171 | + /// </summary> |
| 172 | + /// <param name="obj">Object to be compared</param> |
| 173 | + /// <returns>Boolean</returns> |
| 174 | + public override bool Equals(object obj) |
| 175 | + { |
| 176 | + // credit: http://stackoverflow.com/a/10454552/677735 |
| 177 | + return this.Equals(obj as PostInstrumentIdentifierEnrollmentRequest); |
| 178 | + } |
| 179 | + |
| 180 | + /// <summary> |
| 181 | + /// Returns true if PostInstrumentIdentifierEnrollmentRequest instances are equal |
| 182 | + /// </summary> |
| 183 | + /// <param name="other">Instance of PostInstrumentIdentifierEnrollmentRequest to be compared</param> |
| 184 | + /// <returns>Boolean</returns> |
| 185 | + public bool Equals(PostInstrumentIdentifierEnrollmentRequest other) |
| 186 | + { |
| 187 | + // credit: http://stackoverflow.com/a/10454552/677735 |
| 188 | + if (other == null) |
| 189 | + return false; |
| 190 | + |
| 191 | + return |
| 192 | + ( |
| 193 | + this.Links == other.Links || |
| 194 | + this.Links != null && |
| 195 | + this.Links.Equals(other.Links) |
| 196 | + ) && |
| 197 | + ( |
| 198 | + this.Id == other.Id || |
| 199 | + this.Id != null && |
| 200 | + this.Id.Equals(other.Id) |
| 201 | + ) && |
| 202 | + ( |
| 203 | + this._Object == other._Object || |
| 204 | + this._Object != null && |
| 205 | + this._Object.Equals(other._Object) |
| 206 | + ) && |
| 207 | + ( |
| 208 | + this.State == other.State || |
| 209 | + this.State != null && |
| 210 | + this.State.Equals(other.State) |
| 211 | + ) && |
| 212 | + ( |
| 213 | + this.Type == other.Type || |
| 214 | + this.Type != null && |
| 215 | + this.Type.Equals(other.Type) |
| 216 | + ) && |
| 217 | + ( |
| 218 | + this.Card == other.Card || |
| 219 | + this.Card != null && |
| 220 | + this.Card.Equals(other.Card) |
| 221 | + ) && |
| 222 | + ( |
| 223 | + this.BankAccount == other.BankAccount || |
| 224 | + this.BankAccount != null && |
| 225 | + this.BankAccount.Equals(other.BankAccount) |
| 226 | + ) && |
| 227 | + ( |
| 228 | + this.TokenizedCard == other.TokenizedCard || |
| 229 | + this.TokenizedCard != null && |
| 230 | + this.TokenizedCard.Equals(other.TokenizedCard) |
| 231 | + ) && |
| 232 | + ( |
| 233 | + this.Issuer == other.Issuer || |
| 234 | + this.Issuer != null && |
| 235 | + this.Issuer.Equals(other.Issuer) |
| 236 | + ) && |
| 237 | + ( |
| 238 | + this.ProcessingInformation == other.ProcessingInformation || |
| 239 | + this.ProcessingInformation != null && |
| 240 | + this.ProcessingInformation.Equals(other.ProcessingInformation) |
| 241 | + ) && |
| 242 | + ( |
| 243 | + this.BillTo == other.BillTo || |
| 244 | + this.BillTo != null && |
| 245 | + this.BillTo.Equals(other.BillTo) |
| 246 | + ) && |
| 247 | + ( |
| 248 | + this.Metadata == other.Metadata || |
| 249 | + this.Metadata != null && |
| 250 | + this.Metadata.Equals(other.Metadata) |
| 251 | + ); |
| 252 | + } |
| 253 | + |
| 254 | + /// <summary> |
| 255 | + /// Gets the hash code |
| 256 | + /// </summary> |
| 257 | + /// <returns>Hash code</returns> |
| 258 | + public override int GetHashCode() |
| 259 | + { |
| 260 | + // credit: http://stackoverflow.com/a/263416/677735 |
| 261 | + unchecked // Overflow is fine, just wrap |
| 262 | + { |
| 263 | + int hash = 41; |
| 264 | + // Suitable nullity checks etc, of course :) |
| 265 | + if (this.Links != null) |
| 266 | + hash = hash * 59 + this.Links.GetHashCode(); |
| 267 | + if (this.Id != null) |
| 268 | + hash = hash * 59 + this.Id.GetHashCode(); |
| 269 | + if (this._Object != null) |
| 270 | + hash = hash * 59 + this._Object.GetHashCode(); |
| 271 | + if (this.State != null) |
| 272 | + hash = hash * 59 + this.State.GetHashCode(); |
| 273 | + if (this.Type != null) |
| 274 | + hash = hash * 59 + this.Type.GetHashCode(); |
| 275 | + if (this.Card != null) |
| 276 | + hash = hash * 59 + this.Card.GetHashCode(); |
| 277 | + if (this.BankAccount != null) |
| 278 | + hash = hash * 59 + this.BankAccount.GetHashCode(); |
| 279 | + if (this.TokenizedCard != null) |
| 280 | + hash = hash * 59 + this.TokenizedCard.GetHashCode(); |
| 281 | + if (this.Issuer != null) |
| 282 | + hash = hash * 59 + this.Issuer.GetHashCode(); |
| 283 | + if (this.ProcessingInformation != null) |
| 284 | + hash = hash * 59 + this.ProcessingInformation.GetHashCode(); |
| 285 | + if (this.BillTo != null) |
| 286 | + hash = hash * 59 + this.BillTo.GetHashCode(); |
| 287 | + if (this.Metadata != null) |
| 288 | + hash = hash * 59 + this.Metadata.GetHashCode(); |
| 289 | + return hash; |
| 290 | + } |
| 291 | + } |
| 292 | + |
| 293 | + /// <summary> |
| 294 | + /// To validate all properties of the instance |
| 295 | + /// </summary> |
| 296 | + /// <param name="validationContext">Validation context</param> |
| 297 | + /// <returns>Validation Result</returns> |
| 298 | + IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) |
| 299 | + { |
| 300 | + yield break; |
| 301 | + } |
| 302 | + } |
| 303 | + |
| 304 | +} |
0 commit comments