< Summary

Information
Class: /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/NewPaymentRequestDTO.cs
Assembly: Default
File(s): /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Model/NewPaymentRequestDTO.cs
Line coverage
17%
Covered lines: 13
Uncovered lines: 60
Coverable lines: 73
Total lines: 189
Line coverage: 17.8%
Branch coverage
0%
Covered branches: 0
Total branches: 24
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/NewPaymentRequestDTO.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    /// NewPaymentRequestDTO
 30    /// </summary>
 31    [DataContract(Name = "NewPaymentRequestDTO")]
 32    public partial class NewPaymentRequestDTO : IEquatable<NewPaymentRequestDTO>, IValidatableObject
 33    {
 34        /// <summary>
 35        /// Initializes a new instance of the <see cref="NewPaymentRequestDTO" /> class.
 36        /// </summary>
 37        [JsonConstructorAttribute]
 038        protected NewPaymentRequestDTO() { }
 39        /// <summary>
 40        /// Initializes a new instance of the <see cref="NewPaymentRequestDTO" /> class.
 41        /// </summary>
 42        /// <param name="expenseId">expenseId.</param>
 43        /// <param name="fromPersonId">fromPersonId.</param>
 44        /// <param name="toPersonId">toPersonId.</param>
 45        /// <param name="date">date.</param>
 46        /// <param name="amount">amount (required).</param>
 247        public NewPaymentRequestDTO(int expenseId = default(int), int fromPersonId = default(int), int toPersonId = defa
 248        {
 249            this.Amount = amount;
 250            this.ExpenseId = expenseId;
 251            this.FromPersonId = fromPersonId;
 252            this.ToPersonId = toPersonId;
 253            this.Date = date;
 254        }
 55
 56        /// <summary>
 57        /// Gets or Sets ExpenseId
 58        /// </summary>
 59        [DataMember(Name = "expenseId", EmitDefaultValue = false)]
 460        public int ExpenseId { get; set; }
 61
 62        /// <summary>
 63        /// Gets or Sets FromPersonId
 64        /// </summary>
 65        [DataMember(Name = "fromPersonId", EmitDefaultValue = false)]
 466        public int FromPersonId { get; set; }
 67
 68        /// <summary>
 69        /// Gets or Sets ToPersonId
 70        /// </summary>
 71        [DataMember(Name = "toPersonId", EmitDefaultValue = false)]
 472        public int ToPersonId { get; set; }
 73
 74        /// <summary>
 75        /// Gets or Sets Date
 76        /// </summary>
 77        [DataMember(Name = "date", EmitDefaultValue = false)]
 478        public string Date { get; set; }
 79
 80        /// <summary>
 81        /// Gets or Sets Amount
 82        /// </summary>
 83        [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)]
 484        public long Amount { get; set; }
 85
 86        /// <summary>
 87        /// Returns the string presentation of the object
 88        /// </summary>
 89        /// <returns>String presentation of the object</returns>
 90        public override string ToString()
 091        {
 092            StringBuilder sb = new StringBuilder();
 093            sb.Append("class NewPaymentRequestDTO {\n");
 094            sb.Append("  ExpenseId: ").Append(ExpenseId).Append("\n");
 095            sb.Append("  FromPersonId: ").Append(FromPersonId).Append("\n");
 096            sb.Append("  ToPersonId: ").Append(ToPersonId).Append("\n");
 097            sb.Append("  Date: ").Append(Date).Append("\n");
 098            sb.Append("  Amount: ").Append(Amount).Append("\n");
 099            sb.Append("}\n");
 0100            return sb.ToString();
 0101        }
 102
 103        /// <summary>
 104        /// Returns the JSON string presentation of the object
 105        /// </summary>
 106        /// <returns>JSON string presentation of the object</returns>
 107        public virtual string ToJson()
 0108        {
 0109            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
 0110        }
 111
 112        /// <summary>
 113        /// Returns true if objects are equal
 114        /// </summary>
 115        /// <param name="input">Object to be compared</param>
 116        /// <returns>Boolean</returns>
 117        public override bool Equals(object input)
 0118        {
 0119            return this.Equals(input as NewPaymentRequestDTO);
 0120        }
 121
 122        /// <summary>
 123        /// Returns true if NewPaymentRequestDTO instances are equal
 124        /// </summary>
 125        /// <param name="input">Instance of NewPaymentRequestDTO to be compared</param>
 126        /// <returns>Boolean</returns>
 127        public bool Equals(NewPaymentRequestDTO input)
 0128        {
 0129            if (input == null)
 0130            {
 0131                return false;
 132            }
 0133            return
 0134                (
 0135                    this.ExpenseId == input.ExpenseId ||
 0136                    this.ExpenseId.Equals(input.ExpenseId)
 0137                ) &&
 0138                (
 0139                    this.FromPersonId == input.FromPersonId ||
 0140                    this.FromPersonId.Equals(input.FromPersonId)
 0141                ) &&
 0142                (
 0143                    this.ToPersonId == input.ToPersonId ||
 0144                    this.ToPersonId.Equals(input.ToPersonId)
 0145                ) &&
 0146                (
 0147                    this.Date == input.Date ||
 0148                    (this.Date != null &&
 0149                    this.Date.Equals(input.Date))
 0150                ) &&
 0151                (
 0152                    this.Amount == input.Amount ||
 0153                    this.Amount.Equals(input.Amount)
 0154                );
 0155        }
 156
 157        /// <summary>
 158        /// Gets the hash code
 159        /// </summary>
 160        /// <returns>Hash code</returns>
 161        public override int GetHashCode()
 0162        {
 163            unchecked // Overflow is fine, just wrap
 0164            {
 0165                int hashCode = 41;
 0166                hashCode = (hashCode * 59) + this.ExpenseId.GetHashCode();
 0167                hashCode = (hashCode * 59) + this.FromPersonId.GetHashCode();
 0168                hashCode = (hashCode * 59) + this.ToPersonId.GetHashCode();
 0169                if (this.Date != null)
 0170                {
 0171                    hashCode = (hashCode * 59) + this.Date.GetHashCode();
 0172                }
 0173                hashCode = (hashCode * 59) + this.Amount.GetHashCode();
 0174                return hashCode;
 175            }
 0176        }
 177
 178        /// <summary>
 179        /// To validate all properties of the instance
 180        /// </summary>
 181        /// <param name="validationContext">Validation context</param>
 182        /// <returns>Validation Result</returns>
 183        public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validation
 0184        {
 0185            yield break;
 186        }
 187    }
 188
 189}