< Summary

Information
Class: /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/PaymentRequestDTO.cs
Assembly: Default
File(s): /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/PaymentRequestDTO.cs
Line coverage
20%
Covered lines: 18
Uncovered lines: 71
Coverable lines: 89
Total lines: 217
Line coverage: 20.2%
Branch coverage
0%
Covered branches: 0
Total branches: 32
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

File(s)

/home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/PaymentRequestDTO.cs

#LineLine coverage
 1/*
 2 * WeShare API
 3 *
 4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 5 *
 6 * The version of the OpenAPI document: 1.0
 7 * Generated by: https://github.com/openapitools/openapi-generator.git
 8 */
 9
 10
 11using System;
 12using System.Collections;
 13using System.Collections.Generic;
 14using System.Collections.ObjectModel;
 15using System.Linq;
 16using System.IO;
 17using System.Runtime.Serialization;
 18using System.Text;
 19using System.Text.RegularExpressions;
 20using Newtonsoft.Json;
 21using Newtonsoft.Json.Converters;
 22using Newtonsoft.Json.Linq;
 23using System.ComponentModel.DataAnnotations;
 24using OpenAPIDateConverter = Applications.WeShare.Swagger.Client.OpenAPIDateConverter;
 25
 26namespace Applications.WeShare.Swagger.Model
 27{
 28    /// <summary>
 29    /// PaymentRequestDTO
 30    /// </summary>
 31    [DataContract(Name = "PaymentRequestDTO")]
 32    public partial class PaymentRequestDTO : IEquatable<PaymentRequestDTO>, IValidatableObject
 33    {
 34        /// <summary>
 35        /// Initializes a new instance of the <see cref="PaymentRequestDTO" /> class.
 36        /// </summary>
 37        [JsonConstructorAttribute]
 2438        protected PaymentRequestDTO() { }
 39        /// <summary>
 40        /// Initializes a new instance of the <see cref="PaymentRequestDTO" /> class.
 41        /// </summary>
 42        /// <param name="id">id.</param>
 43        /// <param name="expenseId">expenseId.</param>
 44        /// <param name="fromPersonId">fromPersonId.</param>
 45        /// <param name="toPersonId">toPersonId.</param>
 46        /// <param name="date">date.</param>
 47        /// <param name="amount">amount (required).</param>
 48        /// <param name="paid">paid (required).</param>
 1249        public PaymentRequestDTO(int id = default(int), int expenseId = default(int), int fromPersonId = default(int), i
 1250        {
 1251            this.Amount = amount;
 1252            this.Paid = paid;
 1253            this.Id = id;
 1254            this.ExpenseId = expenseId;
 1255            this.FromPersonId = fromPersonId;
 1256            this.ToPersonId = toPersonId;
 1257            this.Date = date;
 1258        }
 59
 60        /// <summary>
 61        /// Gets or Sets Id
 62        /// </summary>
 63        [DataMember(Name = "id", EmitDefaultValue = false)]
 2664        public int Id { get; set; }
 65
 66        /// <summary>
 67        /// Gets or Sets ExpenseId
 68        /// </summary>
 69        [DataMember(Name = "expenseId", EmitDefaultValue = false)]
 2670        public int ExpenseId { get; set; }
 71
 72        /// <summary>
 73        /// Gets or Sets FromPersonId
 74        /// </summary>
 75        [DataMember(Name = "fromPersonId", EmitDefaultValue = false)]
 2676        public int FromPersonId { get; set; }
 77
 78        /// <summary>
 79        /// Gets or Sets ToPersonId
 80        /// </summary>
 81        [DataMember(Name = "toPersonId", EmitDefaultValue = false)]
 2682        public int ToPersonId { get; set; }
 83
 84        /// <summary>
 85        /// Gets or Sets Date
 86        /// </summary>
 87        [DataMember(Name = "date", EmitDefaultValue = false)]
 2388        public string Date { get; set; }
 89
 90        /// <summary>
 91        /// Gets or Sets Amount
 92        /// </summary>
 93        [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)]
 2694        public long Amount { get; set; }
 95
 96        /// <summary>
 97        /// Gets or Sets Paid
 98        /// </summary>
 99        [DataMember(Name = "paid", IsRequired = true, EmitDefaultValue = true)]
 20100        public bool Paid { get; set; }
 101
 102        /// <summary>
 103        /// Returns the string presentation of the object
 104        /// </summary>
 105        /// <returns>String presentation of the object</returns>
 106        public override string ToString()
 0107        {
 0108            StringBuilder sb = new StringBuilder();
 0109            sb.Append("class PaymentRequestDTO {\n");
 0110            sb.Append("  Id: ").Append(Id).Append("\n");
 0111            sb.Append("  ExpenseId: ").Append(ExpenseId).Append("\n");
 0112            sb.Append("  FromPersonId: ").Append(FromPersonId).Append("\n");
 0113            sb.Append("  ToPersonId: ").Append(ToPersonId).Append("\n");
 0114            sb.Append("  Date: ").Append(Date).Append("\n");
 0115            sb.Append("  Amount: ").Append(Amount).Append("\n");
 0116            sb.Append("  Paid: ").Append(Paid).Append("\n");
 0117            sb.Append("}\n");
 0118            return sb.ToString();
 0119        }
 120
 121        /// <summary>
 122        /// Returns the JSON string presentation of the object
 123        /// </summary>
 124        /// <returns>JSON string presentation of the object</returns>
 125        public virtual string ToJson()
 0126        {
 0127            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
 0128        }
 129
 130        /// <summary>
 131        /// Returns true if objects are equal
 132        /// </summary>
 133        /// <param name="input">Object to be compared</param>
 134        /// <returns>Boolean</returns>
 135        public override bool Equals(object input)
 0136        {
 0137            return this.Equals(input as PaymentRequestDTO);
 0138        }
 139
 140        /// <summary>
 141        /// Returns true if PaymentRequestDTO instances are equal
 142        /// </summary>
 143        /// <param name="input">Instance of PaymentRequestDTO to be compared</param>
 144        /// <returns>Boolean</returns>
 145        public bool Equals(PaymentRequestDTO input)
 0146        {
 0147            if (input == null)
 0148            {
 0149                return false;
 150            }
 0151            return
 0152                (
 0153                    this.Id == input.Id ||
 0154                    this.Id.Equals(input.Id)
 0155                ) &&
 0156                (
 0157                    this.ExpenseId == input.ExpenseId ||
 0158                    this.ExpenseId.Equals(input.ExpenseId)
 0159                ) &&
 0160                (
 0161                    this.FromPersonId == input.FromPersonId ||
 0162                    this.FromPersonId.Equals(input.FromPersonId)
 0163                ) &&
 0164                (
 0165                    this.ToPersonId == input.ToPersonId ||
 0166                    this.ToPersonId.Equals(input.ToPersonId)
 0167                ) &&
 0168                (
 0169                    this.Date == input.Date ||
 0170                    (this.Date != null &&
 0171                    this.Date.Equals(input.Date))
 0172                ) &&
 0173                (
 0174                    this.Amount == input.Amount ||
 0175                    this.Amount.Equals(input.Amount)
 0176                ) &&
 0177                (
 0178                    this.Paid == input.Paid ||
 0179                    this.Paid.Equals(input.Paid)
 0180                );
 0181        }
 182
 183        /// <summary>
 184        /// Gets the hash code
 185        /// </summary>
 186        /// <returns>Hash code</returns>
 187        public override int GetHashCode()
 0188        {
 189            unchecked // Overflow is fine, just wrap
 0190            {
 0191                int hashCode = 41;
 0192                hashCode = (hashCode * 59) + this.Id.GetHashCode();
 0193                hashCode = (hashCode * 59) + this.ExpenseId.GetHashCode();
 0194                hashCode = (hashCode * 59) + this.FromPersonId.GetHashCode();
 0195                hashCode = (hashCode * 59) + this.ToPersonId.GetHashCode();
 0196                if (this.Date != null)
 0197                {
 0198                    hashCode = (hashCode * 59) + this.Date.GetHashCode();
 0199                }
 0200                hashCode = (hashCode * 59) + this.Amount.GetHashCode();
 0201                hashCode = (hashCode * 59) + this.Paid.GetHashCode();
 0202                return hashCode;
 203            }
 0204        }
 205
 206        /// <summary>
 207        /// To validate all properties of the instance
 208        /// </summary>
 209        /// <param name="validationContext">Validation context</param>
 210        /// <returns>Validation Result</returns>
 211        public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validation
 0212        {
 0213            yield break;
 214        }
 215    }
 216
 217}