< Summary

Information
Class: /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/PaymentDTO.cs
Assembly: Default
File(s): /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/PaymentDTO.cs
Line coverage
18%
Covered lines: 15
Uncovered lines: 65
Coverable lines: 80
Total lines: 198
Line coverage: 18.7%
Branch coverage
0%
Covered branches: 0
Total branches: 28
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/PaymentDTO.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    /// PaymentDTO
 30    /// </summary>
 31    [DataContract(Name = "PaymentDTO")]
 32    public partial class PaymentDTO : IEquatable<PaymentDTO>, IValidatableObject
 33    {
 34        /// <summary>
 35        /// Initializes a new instance of the <see cref="PaymentDTO" /> class.
 36        /// </summary>
 37        /// <param name="id">id.</param>
 38        /// <param name="expenseId">expenseId.</param>
 39        /// <param name="paymentRequestId">paymentRequestId.</param>
 40        /// <param name="payingPersonId">payingPersonId.</param>
 41        /// <param name="amount">amount.</param>
 42        /// <param name="date">date.</param>
 243        public PaymentDTO(int id = default(int), int expenseId = default(int), int paymentRequestId = default(int), int 
 244        {
 245            this.Id = id;
 246            this.ExpenseId = expenseId;
 247            this.PaymentRequestId = paymentRequestId;
 248            this.PayingPersonId = payingPersonId;
 249            this.Amount = amount;
 250            this.Date = date;
 251        }
 52
 53        /// <summary>
 54        /// Gets or Sets Id
 55        /// </summary>
 56        [DataMember(Name = "id", EmitDefaultValue = false)]
 257        public int Id { get; set; }
 58
 59        /// <summary>
 60        /// Gets or Sets ExpenseId
 61        /// </summary>
 62        [DataMember(Name = "expenseId", EmitDefaultValue = false)]
 263        public int ExpenseId { get; set; }
 64
 65        /// <summary>
 66        /// Gets or Sets PaymentRequestId
 67        /// </summary>
 68        [DataMember(Name = "paymentRequestId", EmitDefaultValue = false)]
 269        public int PaymentRequestId { get; set; }
 70
 71        /// <summary>
 72        /// Gets or Sets PayingPersonId
 73        /// </summary>
 74        [DataMember(Name = "payingPersonId", EmitDefaultValue = false)]
 275        public int PayingPersonId { get; set; }
 76
 77        /// <summary>
 78        /// Gets or Sets Amount
 79        /// </summary>
 80        [DataMember(Name = "amount", EmitDefaultValue = false)]
 281        public long Amount { get; set; }
 82
 83        /// <summary>
 84        /// Gets or Sets Date
 85        /// </summary>
 86        [DataMember(Name = "date", EmitDefaultValue = false)]
 287        public string Date { get; set; }
 88
 89        /// <summary>
 90        /// Returns the string presentation of the object
 91        /// </summary>
 92        /// <returns>String presentation of the object</returns>
 93        public override string ToString()
 094        {
 095            StringBuilder sb = new StringBuilder();
 096            sb.Append("class PaymentDTO {\n");
 097            sb.Append("  Id: ").Append(Id).Append("\n");
 098            sb.Append("  ExpenseId: ").Append(ExpenseId).Append("\n");
 099            sb.Append("  PaymentRequestId: ").Append(PaymentRequestId).Append("\n");
 0100            sb.Append("  PayingPersonId: ").Append(PayingPersonId).Append("\n");
 0101            sb.Append("  Amount: ").Append(Amount).Append("\n");
 0102            sb.Append("  Date: ").Append(Date).Append("\n");
 0103            sb.Append("}\n");
 0104            return sb.ToString();
 0105        }
 106
 107        /// <summary>
 108        /// Returns the JSON string presentation of the object
 109        /// </summary>
 110        /// <returns>JSON string presentation of the object</returns>
 111        public virtual string ToJson()
 0112        {
 0113            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
 0114        }
 115
 116        /// <summary>
 117        /// Returns true if objects are equal
 118        /// </summary>
 119        /// <param name="input">Object to be compared</param>
 120        /// <returns>Boolean</returns>
 121        public override bool Equals(object input)
 0122        {
 0123            return this.Equals(input as PaymentDTO);
 0124        }
 125
 126        /// <summary>
 127        /// Returns true if PaymentDTO instances are equal
 128        /// </summary>
 129        /// <param name="input">Instance of PaymentDTO to be compared</param>
 130        /// <returns>Boolean</returns>
 131        public bool Equals(PaymentDTO input)
 0132        {
 0133            if (input == null)
 0134            {
 0135                return false;
 136            }
 0137            return
 0138                (
 0139                    this.Id == input.Id ||
 0140                    this.Id.Equals(input.Id)
 0141                ) &&
 0142                (
 0143                    this.ExpenseId == input.ExpenseId ||
 0144                    this.ExpenseId.Equals(input.ExpenseId)
 0145                ) &&
 0146                (
 0147                    this.PaymentRequestId == input.PaymentRequestId ||
 0148                    this.PaymentRequestId.Equals(input.PaymentRequestId)
 0149                ) &&
 0150                (
 0151                    this.PayingPersonId == input.PayingPersonId ||
 0152                    this.PayingPersonId.Equals(input.PayingPersonId)
 0153                ) &&
 0154                (
 0155                    this.Amount == input.Amount ||
 0156                    this.Amount.Equals(input.Amount)
 0157                ) &&
 0158                (
 0159                    this.Date == input.Date ||
 0160                    (this.Date != null &&
 0161                    this.Date.Equals(input.Date))
 0162                );
 0163        }
 164
 165        /// <summary>
 166        /// Gets the hash code
 167        /// </summary>
 168        /// <returns>Hash code</returns>
 169        public override int GetHashCode()
 0170        {
 171            unchecked // Overflow is fine, just wrap
 0172            {
 0173                int hashCode = 41;
 0174                hashCode = (hashCode * 59) + this.Id.GetHashCode();
 0175                hashCode = (hashCode * 59) + this.ExpenseId.GetHashCode();
 0176                hashCode = (hashCode * 59) + this.PaymentRequestId.GetHashCode();
 0177                hashCode = (hashCode * 59) + this.PayingPersonId.GetHashCode();
 0178                hashCode = (hashCode * 59) + this.Amount.GetHashCode();
 0179                if (this.Date != null)
 0180                {
 0181                    hashCode = (hashCode * 59) + this.Date.GetHashCode();
 0182                }
 0183                return hashCode;
 184            }
 0185        }
 186
 187        /// <summary>
 188        /// To validate all properties of the instance
 189        /// </summary>
 190        /// <param name="validationContext">Validation context</param>
 191        /// <returns>Validation Result</returns>
 192        public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validation
 0193        {
 0194            yield break;
 195        }
 196    }
 197
 198}