|
| 1 | +/* |
| 2 | + * splitit-web-api-v3 |
| 3 | + * |
| 4 | + * Splitit's Web API |
| 5 | + * |
| 6 | + * The version of the OpenAPI document: 1.0.0 |
| 7 | + * Generated by: https://konfigthis.com |
| 8 | + */ |
| 9 | + |
| 10 | + |
| 11 | +using System; |
| 12 | +using System.Collections; |
| 13 | +using System.Collections.Generic; |
| 14 | +using System.Collections.ObjectModel; |
| 15 | +using System.Linq; |
| 16 | +using System.IO; |
| 17 | +using System.Runtime.Serialization; |
| 18 | +using System.Text; |
| 19 | +using System.Text.RegularExpressions; |
| 20 | +using Newtonsoft.Json; |
| 21 | +using Newtonsoft.Json.Converters; |
| 22 | +using Newtonsoft.Json.Linq; |
| 23 | +using System.ComponentModel.DataAnnotations; |
| 24 | +using OpenAPIDateConverter = Splitit.Web.Net.Client.OpenAPIDateConverter; |
| 25 | + |
| 26 | +namespace Splitit.Web.Net.Model |
| 27 | +{ |
| 28 | + /// <summary> |
| 29 | + /// PaymentInfo |
| 30 | + /// </summary> |
| 31 | + [DataContract(Name = "PaymentInfo")] |
| 32 | + public partial class PaymentInfo : IEquatable<PaymentInfo>, IValidatableObject |
| 33 | + { |
| 34 | + |
| 35 | + /// <summary> |
| 36 | + /// Gets or Sets CardType |
| 37 | + /// </summary> |
| 38 | + [DataMember(Name = "CardType", EmitDefaultValue = false)] |
| 39 | + public CardType? CardType { get; set; } |
| 40 | + /// <summary> |
| 41 | + /// Initializes a new instance of the <see cref="PaymentInfo" /> class. |
| 42 | + /// </summary> |
| 43 | + /// <param name="cardBin">cardBin.</param> |
| 44 | + /// <param name="cardType">cardType.</param> |
| 45 | + public PaymentInfo(string cardBin = default(string), CardType? cardType = default(CardType?)) |
| 46 | + { |
| 47 | + this.CardBin = cardBin; |
| 48 | + this.CardType = cardType; |
| 49 | + } |
| 50 | + |
| 51 | + /// <summary> |
| 52 | + /// Gets or Sets CardBin |
| 53 | + /// </summary> |
| 54 | + [DataMember(Name = "CardBin", EmitDefaultValue = false)] |
| 55 | + public string CardBin { get; set; } |
| 56 | + |
| 57 | + /// <summary> |
| 58 | + /// Returns the string presentation of the object |
| 59 | + /// </summary> |
| 60 | + /// <returns>String presentation of the object</returns> |
| 61 | + public override string ToString() |
| 62 | + { |
| 63 | + StringBuilder sb = new StringBuilder(); |
| 64 | + sb.Append("class PaymentInfo {\n"); |
| 65 | + sb.Append(" CardBin: ").Append(CardBin).Append("\n"); |
| 66 | + sb.Append(" CardType: ").Append(CardType).Append("\n"); |
| 67 | + sb.Append("}\n"); |
| 68 | + return sb.ToString(); |
| 69 | + } |
| 70 | + |
| 71 | + /// <summary> |
| 72 | + /// Returns the JSON string presentation of the object |
| 73 | + /// </summary> |
| 74 | + /// <returns>JSON string presentation of the object</returns> |
| 75 | + public virtual string ToJson() |
| 76 | + { |
| 77 | + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); |
| 78 | + } |
| 79 | + |
| 80 | + /// <summary> |
| 81 | + /// Returns true if objects are equal |
| 82 | + /// </summary> |
| 83 | + /// <param name="input">Object to be compared</param> |
| 84 | + /// <returns>Boolean</returns> |
| 85 | + public override bool Equals(object input) |
| 86 | + { |
| 87 | + return this.Equals(input as PaymentInfo); |
| 88 | + } |
| 89 | + |
| 90 | + /// <summary> |
| 91 | + /// Returns true if PaymentInfo instances are equal |
| 92 | + /// </summary> |
| 93 | + /// <param name="input">Instance of PaymentInfo to be compared</param> |
| 94 | + /// <returns>Boolean</returns> |
| 95 | + public bool Equals(PaymentInfo input) |
| 96 | + { |
| 97 | + if (input == null) |
| 98 | + { |
| 99 | + return false; |
| 100 | + } |
| 101 | + return |
| 102 | + ( |
| 103 | + this.CardBin == input.CardBin || |
| 104 | + (this.CardBin != null && |
| 105 | + this.CardBin.Equals(input.CardBin)) |
| 106 | + ) && |
| 107 | + ( |
| 108 | + this.CardType == input.CardType || |
| 109 | + this.CardType.Equals(input.CardType) |
| 110 | + ); |
| 111 | + } |
| 112 | + |
| 113 | + /// <summary> |
| 114 | + /// Gets the hash code |
| 115 | + /// </summary> |
| 116 | + /// <returns>Hash code</returns> |
| 117 | + public override int GetHashCode() |
| 118 | + { |
| 119 | + unchecked // Overflow is fine, just wrap |
| 120 | + { |
| 121 | + int hashCode = 41; |
| 122 | + if (this.CardBin != null) |
| 123 | + { |
| 124 | + hashCode = (hashCode * 59) + this.CardBin.GetHashCode(); |
| 125 | + } |
| 126 | + hashCode = (hashCode * 59) + this.CardType.GetHashCode(); |
| 127 | + return hashCode; |
| 128 | + } |
| 129 | + } |
| 130 | + |
| 131 | + /// <summary> |
| 132 | + /// To validate all properties of the instance |
| 133 | + /// </summary> |
| 134 | + /// <param name="validationContext">Validation context</param> |
| 135 | + /// <returns>Validation Result</returns> |
| 136 | + public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext) |
| 137 | + { |
| 138 | + yield break; |
| 139 | + } |
| 140 | + } |
| 141 | + |
| 142 | +} |
0 commit comments