|
| 1 | +/* |
| 2 | + * Open Banking API |
| 3 | + * |
| 4 | + * The version of the OpenAPI document: 1 |
| 5 | + * |
| 6 | + * |
| 7 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 8 | + * https://openapi-generator.tech |
| 9 | + * Do not edit the class manually. |
| 10 | + */ |
| 11 | + |
| 12 | +package com.adyen.model.openbanking; |
| 13 | + |
| 14 | +import com.fasterxml.jackson.annotation.JsonInclude; |
| 15 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 16 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| 17 | +import com.fasterxml.jackson.core.JsonProcessingException; |
| 18 | +import java.util.*; |
| 19 | + |
| 20 | +/** ACHAccountIdentifier */ |
| 21 | +@JsonPropertyOrder({ |
| 22 | + ACHAccountIdentifier.JSON_PROPERTY_ACCOUNT_NUMBER, |
| 23 | + ACHAccountIdentifier.JSON_PROPERTY_ROUTING_NUMBER |
| 24 | +}) |
| 25 | +public class ACHAccountIdentifier { |
| 26 | + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; |
| 27 | + private String accountNumber; |
| 28 | + |
| 29 | + public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber"; |
| 30 | + private String routingNumber; |
| 31 | + |
| 32 | + public ACHAccountIdentifier() {} |
| 33 | + |
| 34 | + /** |
| 35 | + * The account number of the bank account. |
| 36 | + * |
| 37 | + * @param accountNumber The account number of the bank account. |
| 38 | + * @return the current {@code ACHAccountIdentifier} instance, allowing for method chaining |
| 39 | + */ |
| 40 | + public ACHAccountIdentifier accountNumber(String accountNumber) { |
| 41 | + this.accountNumber = accountNumber; |
| 42 | + return this; |
| 43 | + } |
| 44 | + |
| 45 | + /** |
| 46 | + * The account number of the bank account. |
| 47 | + * |
| 48 | + * @return accountNumber The account number of the bank account. |
| 49 | + */ |
| 50 | + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) |
| 51 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 52 | + public String getAccountNumber() { |
| 53 | + return accountNumber; |
| 54 | + } |
| 55 | + |
| 56 | + /** |
| 57 | + * The account number of the bank account. |
| 58 | + * |
| 59 | + * @param accountNumber The account number of the bank account. |
| 60 | + */ |
| 61 | + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) |
| 62 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 63 | + public void setAccountNumber(String accountNumber) { |
| 64 | + this.accountNumber = accountNumber; |
| 65 | + } |
| 66 | + |
| 67 | + /** |
| 68 | + * The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without |
| 69 | + * separators or whitespace. |
| 70 | + * |
| 71 | + * @param routingNumber The [routing |
| 72 | + * number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or |
| 73 | + * whitespace. |
| 74 | + * @return the current {@code ACHAccountIdentifier} instance, allowing for method chaining |
| 75 | + */ |
| 76 | + public ACHAccountIdentifier routingNumber(String routingNumber) { |
| 77 | + this.routingNumber = routingNumber; |
| 78 | + return this; |
| 79 | + } |
| 80 | + |
| 81 | + /** |
| 82 | + * The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without |
| 83 | + * separators or whitespace. |
| 84 | + * |
| 85 | + * @return routingNumber The [routing |
| 86 | + * number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or |
| 87 | + * whitespace. |
| 88 | + */ |
| 89 | + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) |
| 90 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 91 | + public String getRoutingNumber() { |
| 92 | + return routingNumber; |
| 93 | + } |
| 94 | + |
| 95 | + /** |
| 96 | + * The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without |
| 97 | + * separators or whitespace. |
| 98 | + * |
| 99 | + * @param routingNumber The [routing |
| 100 | + * number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or |
| 101 | + * whitespace. |
| 102 | + */ |
| 103 | + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) |
| 104 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 105 | + public void setRoutingNumber(String routingNumber) { |
| 106 | + this.routingNumber = routingNumber; |
| 107 | + } |
| 108 | + |
| 109 | + /** Return true if this ACHAccountIdentifier object is equal to o. */ |
| 110 | + @Override |
| 111 | + public boolean equals(Object o) { |
| 112 | + if (this == o) { |
| 113 | + return true; |
| 114 | + } |
| 115 | + if (o == null || getClass() != o.getClass()) { |
| 116 | + return false; |
| 117 | + } |
| 118 | + ACHAccountIdentifier acHAccountIdentifier = (ACHAccountIdentifier) o; |
| 119 | + return Objects.equals(this.accountNumber, acHAccountIdentifier.accountNumber) |
| 120 | + && Objects.equals(this.routingNumber, acHAccountIdentifier.routingNumber); |
| 121 | + } |
| 122 | + |
| 123 | + @Override |
| 124 | + public int hashCode() { |
| 125 | + return Objects.hash(accountNumber, routingNumber); |
| 126 | + } |
| 127 | + |
| 128 | + @Override |
| 129 | + public String toString() { |
| 130 | + StringBuilder sb = new StringBuilder(); |
| 131 | + sb.append("class ACHAccountIdentifier {\n"); |
| 132 | + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); |
| 133 | + sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); |
| 134 | + sb.append("}"); |
| 135 | + return sb.toString(); |
| 136 | + } |
| 137 | + |
| 138 | + /** |
| 139 | + * Convert the given object to string with each line indented by 4 spaces (except the first line). |
| 140 | + */ |
| 141 | + private String toIndentedString(Object o) { |
| 142 | + if (o == null) { |
| 143 | + return "null"; |
| 144 | + } |
| 145 | + return o.toString().replace("\n", "\n "); |
| 146 | + } |
| 147 | + |
| 148 | + /** |
| 149 | + * Create an instance of ACHAccountIdentifier given an JSON string |
| 150 | + * |
| 151 | + * @param jsonString JSON string |
| 152 | + * @return An instance of ACHAccountIdentifier |
| 153 | + * @throws JsonProcessingException if the JSON string is invalid with respect to |
| 154 | + * ACHAccountIdentifier |
| 155 | + */ |
| 156 | + public static ACHAccountIdentifier fromJson(String jsonString) throws JsonProcessingException { |
| 157 | + return JSON.getMapper().readValue(jsonString, ACHAccountIdentifier.class); |
| 158 | + } |
| 159 | + |
| 160 | + /** |
| 161 | + * Convert an instance of ACHAccountIdentifier to an JSON string |
| 162 | + * |
| 163 | + * @return JSON string |
| 164 | + */ |
| 165 | + public String toJson() throws JsonProcessingException { |
| 166 | + return JSON.getMapper().writeValueAsString(this); |
| 167 | + } |
| 168 | +} |
0 commit comments