|
| 1 | +/* |
| 2 | + * Accounting API |
| 3 | + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
| 4 | + * |
| 5 | + * OpenAPI spec version: 2.0.0 |
| 6 | + * Contact: api@xero.com |
| 7 | + * |
| 8 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 9 | + * https://openapi-generator.tech |
| 10 | + * Do not edit the class manually. |
| 11 | + */ |
| 12 | + |
| 13 | + |
| 14 | +package com.xero.models.accounting; |
| 15 | + |
| 16 | +import java.util.Objects; |
| 17 | +import java.util.Arrays; |
| 18 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 19 | +import com.fasterxml.jackson.annotation.JsonCreator; |
| 20 | +import com.fasterxml.jackson.annotation.JsonValue; |
| 21 | +import com.xero.models.accounting.TaxType; |
| 22 | +import com.xero.models.accounting.TrackingCategory; |
| 23 | +import io.swagger.annotations.ApiModel; |
| 24 | +import io.swagger.annotations.ApiModelProperty; |
| 25 | +import java.util.ArrayList; |
| 26 | +import java.util.List; |
| 27 | + |
| 28 | +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; |
| 29 | + |
| 30 | +/** |
| 31 | + * ManualJournalLine |
| 32 | + */ |
| 33 | + |
| 34 | +public class ManualJournalLine { |
| 35 | + |
| 36 | + @JsonProperty("LineAmount") |
| 37 | + private Float lineAmount = null; |
| 38 | + |
| 39 | + |
| 40 | + @JsonProperty("AccountCode") |
| 41 | + private String accountCode = null; |
| 42 | + |
| 43 | + |
| 44 | + @JsonProperty("Description") |
| 45 | + private String description = null; |
| 46 | + |
| 47 | + |
| 48 | + @JsonProperty("TaxType") |
| 49 | + private TaxType taxType = null; |
| 50 | + |
| 51 | + |
| 52 | + @JsonProperty("Tracking") |
| 53 | + private List<TrackingCategory> tracking = null; |
| 54 | + |
| 55 | + |
| 56 | + @JsonProperty("TaxAmount") |
| 57 | + private Float taxAmount = null; |
| 58 | + |
| 59 | + |
| 60 | + @JsonProperty("IsBlank") |
| 61 | + private Boolean isBlank = null; |
| 62 | + |
| 63 | + public ManualJournalLine lineAmount(Float lineAmount) { |
| 64 | + this.lineAmount = lineAmount; |
| 65 | + return this; |
| 66 | + } |
| 67 | + |
| 68 | + /** |
| 69 | + * total for line. Debits are positive, credits are negative value |
| 70 | + * @return lineAmount |
| 71 | + **/ |
| 72 | + @ApiModelProperty(example = "-2569.0", value = "total for line. Debits are positive, credits are negative value") |
| 73 | + public Float getLineAmount() { |
| 74 | + return lineAmount; |
| 75 | + } |
| 76 | + |
| 77 | + public void setLineAmount(Float lineAmount) { |
| 78 | + this.lineAmount = lineAmount; |
| 79 | + } |
| 80 | + |
| 81 | + public ManualJournalLine accountCode(String accountCode) { |
| 82 | + this.accountCode = accountCode; |
| 83 | + return this; |
| 84 | + } |
| 85 | + |
| 86 | + /** |
| 87 | + * See Accounts |
| 88 | + * @return accountCode |
| 89 | + **/ |
| 90 | + @ApiModelProperty(example = "720", value = "See Accounts") |
| 91 | + public String getAccountCode() { |
| 92 | + return accountCode; |
| 93 | + } |
| 94 | + |
| 95 | + public void setAccountCode(String accountCode) { |
| 96 | + this.accountCode = accountCode; |
| 97 | + } |
| 98 | + |
| 99 | + public ManualJournalLine description(String description) { |
| 100 | + this.description = description; |
| 101 | + return this; |
| 102 | + } |
| 103 | + |
| 104 | + /** |
| 105 | + * Description for journal line |
| 106 | + * @return description |
| 107 | + **/ |
| 108 | + @ApiModelProperty(example = "Coded incorrectly Office Equipment should be Computer Equipment", value = "Description for journal line") |
| 109 | + public String getDescription() { |
| 110 | + return description; |
| 111 | + } |
| 112 | + |
| 113 | + public void setDescription(String description) { |
| 114 | + this.description = description; |
| 115 | + } |
| 116 | + |
| 117 | + public ManualJournalLine taxType(TaxType taxType) { |
| 118 | + this.taxType = taxType; |
| 119 | + return this; |
| 120 | + } |
| 121 | + |
| 122 | + /** |
| 123 | + * Get taxType |
| 124 | + * @return taxType |
| 125 | + **/ |
| 126 | + @ApiModelProperty(value = "") |
| 127 | + public TaxType getTaxType() { |
| 128 | + return taxType; |
| 129 | + } |
| 130 | + |
| 131 | + public void setTaxType(TaxType taxType) { |
| 132 | + this.taxType = taxType; |
| 133 | + } |
| 134 | + |
| 135 | + public ManualJournalLine tracking(List<TrackingCategory> tracking) { |
| 136 | + this.tracking = tracking; |
| 137 | + return this; |
| 138 | + } |
| 139 | + |
| 140 | + public ManualJournalLine addTrackingItem(TrackingCategory trackingItem) { |
| 141 | + if (this.tracking == null) { |
| 142 | + this.tracking = new ArrayList<TrackingCategory>(); |
| 143 | + } |
| 144 | + this.tracking.add(trackingItem); |
| 145 | + return this; |
| 146 | + } |
| 147 | + |
| 148 | + /** |
| 149 | + * Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 <TrackingCategory> elements. |
| 150 | + * @return tracking |
| 151 | + **/ |
| 152 | + @ApiModelProperty(value = "Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 <TrackingCategory> elements.") |
| 153 | + public List<TrackingCategory> getTracking() { |
| 154 | + return tracking; |
| 155 | + } |
| 156 | + |
| 157 | + public void setTracking(List<TrackingCategory> tracking) { |
| 158 | + this.tracking = tracking; |
| 159 | + } |
| 160 | + |
| 161 | + /** |
| 162 | + * The calculated tax amount based on the TaxType and LineAmount |
| 163 | + * @return taxAmount |
| 164 | + **/ |
| 165 | + @ApiModelProperty(example = "0.0", value = "The calculated tax amount based on the TaxType and LineAmount") |
| 166 | + public Float getTaxAmount() { |
| 167 | + return taxAmount; |
| 168 | + } |
| 169 | + |
| 170 | + public ManualJournalLine isBlank(Boolean isBlank) { |
| 171 | + this.isBlank = isBlank; |
| 172 | + return this; |
| 173 | + } |
| 174 | + |
| 175 | + /** |
| 176 | + * is the line blank |
| 177 | + * @return isBlank |
| 178 | + **/ |
| 179 | + @ApiModelProperty(value = "is the line blank") |
| 180 | + public Boolean getIsBlank() { |
| 181 | + return isBlank; |
| 182 | + } |
| 183 | + |
| 184 | + public void setIsBlank(Boolean isBlank) { |
| 185 | + this.isBlank = isBlank; |
| 186 | + } |
| 187 | + |
| 188 | + |
| 189 | + @Override |
| 190 | + public boolean equals(java.lang.Object o) { |
| 191 | + if (this == o) { |
| 192 | + return true; |
| 193 | + } |
| 194 | + if (o == null || getClass() != o.getClass()) { |
| 195 | + return false; |
| 196 | + } |
| 197 | + ManualJournalLine manualJournalLine = (ManualJournalLine) o; |
| 198 | + return Objects.equals(this.lineAmount, manualJournalLine.lineAmount) && |
| 199 | + Objects.equals(this.accountCode, manualJournalLine.accountCode) && |
| 200 | + Objects.equals(this.description, manualJournalLine.description) && |
| 201 | + Objects.equals(this.taxType, manualJournalLine.taxType) && |
| 202 | + Objects.equals(this.tracking, manualJournalLine.tracking) && |
| 203 | + Objects.equals(this.taxAmount, manualJournalLine.taxAmount) && |
| 204 | + Objects.equals(this.isBlank, manualJournalLine.isBlank); |
| 205 | + } |
| 206 | + |
| 207 | + @Override |
| 208 | + public int hashCode() { |
| 209 | + return Objects.hash(lineAmount, accountCode, description, taxType, tracking, taxAmount, isBlank); |
| 210 | + } |
| 211 | + |
| 212 | + |
| 213 | + @Override |
| 214 | + public String toString() { |
| 215 | + StringBuilder sb = new StringBuilder(); |
| 216 | + sb.append("class ManualJournalLine {\n"); |
| 217 | + |
| 218 | + sb.append(" lineAmount: ").append(toIndentedString(lineAmount)).append("\n"); |
| 219 | + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); |
| 220 | + sb.append(" description: ").append(toIndentedString(description)).append("\n"); |
| 221 | + sb.append(" taxType: ").append(toIndentedString(taxType)).append("\n"); |
| 222 | + sb.append(" tracking: ").append(toIndentedString(tracking)).append("\n"); |
| 223 | + sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n"); |
| 224 | + sb.append(" isBlank: ").append(toIndentedString(isBlank)).append("\n"); |
| 225 | + sb.append("}"); |
| 226 | + return sb.toString(); |
| 227 | + } |
| 228 | + |
| 229 | + /** |
| 230 | + * Convert the given object to string with each line indented by 4 spaces |
| 231 | + * (except the first line). |
| 232 | + */ |
| 233 | + private String toIndentedString(java.lang.Object o) { |
| 234 | + if (o == null) { |
| 235 | + return "null"; |
| 236 | + } |
| 237 | + return o.toString().replace("\n", "\n "); |
| 238 | + } |
| 239 | + |
| 240 | +} |
| 241 | + |
0 commit comments