< Summary

Information
Class: /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/NewPaymentDTO.cs
Assembly: Default
File(s): /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/NewPaymentDTO.cs
Line coverage
17%
Covered lines: 9
Uncovered lines: 43
Coverable lines: 52
Total lines: 152
Line coverage: 17.3%
Branch coverage
0%
Covered branches: 0
Total branches: 12
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/NewPaymentDTO.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    /// NewPaymentDTO
 30    /// </summary>
 31    [DataContract(Name = "NewPaymentDTO")]
 32    public partial class NewPaymentDTO : IEquatable<NewPaymentDTO>, IValidatableObject
 33    {
 34        /// <summary>
 35        /// Initializes a new instance of the <see cref="NewPaymentDTO" /> class.
 36        /// </summary>
 37        /// <param name="expenseId">expenseId.</param>
 38        /// <param name="paymentRequestId">paymentRequestId.</param>
 39        /// <param name="payingPersonId">payingPersonId.</param>
 340        public NewPaymentDTO(int expenseId = default(int), int paymentRequestId = default(int), int payingPersonId = def
 341        {
 342            this.ExpenseId = expenseId;
 343            this.PaymentRequestId = paymentRequestId;
 344            this.PayingPersonId = payingPersonId;
 345        }
 46
 47        /// <summary>
 48        /// Gets or Sets ExpenseId
 49        /// </summary>
 50        [DataMember(Name = "expenseId", EmitDefaultValue = false)]
 551        public int ExpenseId { get; set; }
 52
 53        /// <summary>
 54        /// Gets or Sets PaymentRequestId
 55        /// </summary>
 56        [DataMember(Name = "paymentRequestId", EmitDefaultValue = false)]
 557        public int PaymentRequestId { get; set; }
 58
 59        /// <summary>
 60        /// Gets or Sets PayingPersonId
 61        /// </summary>
 62        [DataMember(Name = "payingPersonId", EmitDefaultValue = false)]
 563        public int PayingPersonId { get; set; }
 64
 65        /// <summary>
 66        /// Returns the string presentation of the object
 67        /// </summary>
 68        /// <returns>String presentation of the object</returns>
 69        public override string ToString()
 070        {
 071            StringBuilder sb = new StringBuilder();
 072            sb.Append("class NewPaymentDTO {\n");
 073            sb.Append("  ExpenseId: ").Append(ExpenseId).Append("\n");
 074            sb.Append("  PaymentRequestId: ").Append(PaymentRequestId).Append("\n");
 075            sb.Append("  PayingPersonId: ").Append(PayingPersonId).Append("\n");
 076            sb.Append("}\n");
 077            return sb.ToString();
 078        }
 79
 80        /// <summary>
 81        /// Returns the JSON string presentation of the object
 82        /// </summary>
 83        /// <returns>JSON string presentation of the object</returns>
 84        public virtual string ToJson()
 085        {
 086            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
 087        }
 88
 89        /// <summary>
 90        /// Returns true if objects are equal
 91        /// </summary>
 92        /// <param name="input">Object to be compared</param>
 93        /// <returns>Boolean</returns>
 94        public override bool Equals(object input)
 095        {
 096            return this.Equals(input as NewPaymentDTO);
 097        }
 98
 99        /// <summary>
 100        /// Returns true if NewPaymentDTO instances are equal
 101        /// </summary>
 102        /// <param name="input">Instance of NewPaymentDTO to be compared</param>
 103        /// <returns>Boolean</returns>
 104        public bool Equals(NewPaymentDTO input)
 0105        {
 0106            if (input == null)
 0107            {
 0108                return false;
 109            }
 0110            return
 0111                (
 0112                    this.ExpenseId == input.ExpenseId ||
 0113                    this.ExpenseId.Equals(input.ExpenseId)
 0114                ) &&
 0115                (
 0116                    this.PaymentRequestId == input.PaymentRequestId ||
 0117                    this.PaymentRequestId.Equals(input.PaymentRequestId)
 0118                ) &&
 0119                (
 0120                    this.PayingPersonId == input.PayingPersonId ||
 0121                    this.PayingPersonId.Equals(input.PayingPersonId)
 0122                );
 0123        }
 124
 125        /// <summary>
 126        /// Gets the hash code
 127        /// </summary>
 128        /// <returns>Hash code</returns>
 129        public override int GetHashCode()
 0130        {
 131            unchecked // Overflow is fine, just wrap
 0132            {
 0133                int hashCode = 41;
 0134                hashCode = (hashCode * 59) + this.ExpenseId.GetHashCode();
 0135                hashCode = (hashCode * 59) + this.PaymentRequestId.GetHashCode();
 0136                hashCode = (hashCode * 59) + this.PayingPersonId.GetHashCode();
 0137                return hashCode;
 138            }
 0139        }
 140
 141        /// <summary>
 142        /// To validate all properties of the instance
 143        /// </summary>
 144        /// <param name="validationContext">Validation context</param>
 145        /// <returns>Validation Result</returns>
 146        public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validation
 0147        {
 0148            yield break;
 149        }
 150    }
 151
 152}