|
| 1 | +/* |
| 2 | + * Management API |
| 3 | + * |
| 4 | + * The version of the OpenAPI document: 3 |
| 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 | + |
| 13 | +package com.adyen.model.management; |
| 14 | + |
| 15 | +import java.util.Objects; |
| 16 | +import java.util.Arrays; |
| 17 | +import java.util.Map; |
| 18 | +import java.util.HashMap; |
| 19 | +import com.adyen.model.management.TransactionDescriptionInfo; |
| 20 | +import com.fasterxml.jackson.annotation.JsonInclude; |
| 21 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 22 | +import com.fasterxml.jackson.annotation.JsonCreator; |
| 23 | +import com.fasterxml.jackson.annotation.JsonTypeName; |
| 24 | +import com.fasterxml.jackson.annotation.JsonValue; |
| 25 | +import io.swagger.annotations.ApiModel; |
| 26 | +import io.swagger.annotations.ApiModelProperty; |
| 27 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| 28 | +import com.fasterxml.jackson.core.JsonProcessingException; |
| 29 | + |
| 30 | + |
| 31 | +/** |
| 32 | + * AccelInfo |
| 33 | + */ |
| 34 | +@JsonPropertyOrder({ |
| 35 | + AccelInfo.JSON_PROPERTY_PROCESSING_TYPE, |
| 36 | + AccelInfo.JSON_PROPERTY_TRANSACTION_DESCRIPTION |
| 37 | +}) |
| 38 | + |
| 39 | +public class AccelInfo { |
| 40 | + /** |
| 41 | + * The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. |
| 42 | + */ |
| 43 | + public enum ProcessingTypeEnum { |
| 44 | + BILLPAY("billpay"), |
| 45 | + |
| 46 | + ECOM("ecom"), |
| 47 | + |
| 48 | + POS("pos"); |
| 49 | + |
| 50 | + private String value; |
| 51 | + |
| 52 | + ProcessingTypeEnum(String value) { |
| 53 | + this.value = value; |
| 54 | + } |
| 55 | + |
| 56 | + @JsonValue |
| 57 | + public String getValue() { |
| 58 | + return value; |
| 59 | + } |
| 60 | + |
| 61 | + @Override |
| 62 | + public String toString() { |
| 63 | + return String.valueOf(value); |
| 64 | + } |
| 65 | + |
| 66 | + @JsonCreator |
| 67 | + public static ProcessingTypeEnum fromValue(String value) { |
| 68 | + for (ProcessingTypeEnum b : ProcessingTypeEnum.values()) { |
| 69 | + if (b.value.equals(value)) { |
| 70 | + return b; |
| 71 | + } |
| 72 | + } |
| 73 | + throw new IllegalArgumentException("Unexpected value '" + value + "'"); |
| 74 | + } |
| 75 | + } |
| 76 | + |
| 77 | + public static final String JSON_PROPERTY_PROCESSING_TYPE = "processingType"; |
| 78 | + private ProcessingTypeEnum processingType; |
| 79 | + |
| 80 | + public static final String JSON_PROPERTY_TRANSACTION_DESCRIPTION = "transactionDescription"; |
| 81 | + private TransactionDescriptionInfo transactionDescription; |
| 82 | + |
| 83 | + public AccelInfo() { |
| 84 | + } |
| 85 | + |
| 86 | + public AccelInfo processingType(ProcessingTypeEnum processingType) { |
| 87 | + this.processingType = processingType; |
| 88 | + return this; |
| 89 | + } |
| 90 | + |
| 91 | + /** |
| 92 | + * The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. |
| 93 | + * @return processingType |
| 94 | + **/ |
| 95 | + @ApiModelProperty(required = true, value = "The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. ") |
| 96 | + @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) |
| 97 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 98 | + |
| 99 | + public ProcessingTypeEnum getProcessingType() { |
| 100 | + return processingType; |
| 101 | + } |
| 102 | + |
| 103 | + |
| 104 | + /** |
| 105 | + * The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. |
| 106 | + * |
| 107 | + * @param processingType |
| 108 | + */ |
| 109 | + @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) |
| 110 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 111 | + public void setProcessingType(ProcessingTypeEnum processingType) { |
| 112 | + this.processingType = processingType; |
| 113 | + } |
| 114 | + |
| 115 | + |
| 116 | + public AccelInfo transactionDescription(TransactionDescriptionInfo transactionDescription) { |
| 117 | + this.transactionDescription = transactionDescription; |
| 118 | + return this; |
| 119 | + } |
| 120 | + |
| 121 | + /** |
| 122 | + * Get transactionDescription |
| 123 | + * @return transactionDescription |
| 124 | + **/ |
| 125 | + @ApiModelProperty(value = "") |
| 126 | + @JsonProperty(JSON_PROPERTY_TRANSACTION_DESCRIPTION) |
| 127 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 128 | + |
| 129 | + public TransactionDescriptionInfo getTransactionDescription() { |
| 130 | + return transactionDescription; |
| 131 | + } |
| 132 | + |
| 133 | + |
| 134 | + /** |
| 135 | + * transactionDescription |
| 136 | + * |
| 137 | + * @param transactionDescription |
| 138 | + */ |
| 139 | + @JsonProperty(JSON_PROPERTY_TRANSACTION_DESCRIPTION) |
| 140 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 141 | + public void setTransactionDescription(TransactionDescriptionInfo transactionDescription) { |
| 142 | + this.transactionDescription = transactionDescription; |
| 143 | + } |
| 144 | + |
| 145 | + |
| 146 | + /** |
| 147 | + * Return true if this AccelInfo object is equal to o. |
| 148 | + */ |
| 149 | + @Override |
| 150 | + public boolean equals(Object o) { |
| 151 | + if (this == o) { |
| 152 | + return true; |
| 153 | + } |
| 154 | + if (o == null || getClass() != o.getClass()) { |
| 155 | + return false; |
| 156 | + } |
| 157 | + AccelInfo accelInfo = (AccelInfo) o; |
| 158 | + return Objects.equals(this.processingType, accelInfo.processingType) && |
| 159 | + Objects.equals(this.transactionDescription, accelInfo.transactionDescription); |
| 160 | + } |
| 161 | + |
| 162 | + @Override |
| 163 | + public int hashCode() { |
| 164 | + return Objects.hash(processingType, transactionDescription); |
| 165 | + } |
| 166 | + |
| 167 | + @Override |
| 168 | + public String toString() { |
| 169 | + StringBuilder sb = new StringBuilder(); |
| 170 | + sb.append("class AccelInfo {\n"); |
| 171 | + sb.append(" processingType: ").append(toIndentedString(processingType)).append("\n"); |
| 172 | + sb.append(" transactionDescription: ").append(toIndentedString(transactionDescription)).append("\n"); |
| 173 | + sb.append("}"); |
| 174 | + return sb.toString(); |
| 175 | + } |
| 176 | + |
| 177 | + /** |
| 178 | + * Convert the given object to string with each line indented by 4 spaces |
| 179 | + * (except the first line). |
| 180 | + */ |
| 181 | + private String toIndentedString(Object o) { |
| 182 | + if (o == null) { |
| 183 | + return "null"; |
| 184 | + } |
| 185 | + return o.toString().replace("\n", "\n "); |
| 186 | + } |
| 187 | + |
| 188 | +/** |
| 189 | + * Create an instance of AccelInfo given an JSON string |
| 190 | + * |
| 191 | + * @param jsonString JSON string |
| 192 | + * @return An instance of AccelInfo |
| 193 | + * @throws JsonProcessingException if the JSON string is invalid with respect to AccelInfo |
| 194 | + */ |
| 195 | + public static AccelInfo fromJson(String jsonString) throws JsonProcessingException { |
| 196 | + return JSON.getMapper().readValue(jsonString, AccelInfo.class); |
| 197 | + } |
| 198 | +/** |
| 199 | + * Convert an instance of AccelInfo to an JSON string |
| 200 | + * |
| 201 | + * @return JSON string |
| 202 | + */ |
| 203 | + public String toJson() throws JsonProcessingException { |
| 204 | + return JSON.getMapper().writeValueAsString(this); |
| 205 | + } |
| 206 | +} |
| 207 | + |
0 commit comments