• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Adyen / adyen-java-api-library / #2660

18 Sep 2023 12:27PM UTC coverage: 13.146%. First build
#2660

push

web-flow
Merge fdf590561 into ba706cfa8

2480 of 2480 new or added lines in 54 files covered. (100.0%)

10283 of 78224 relevant lines covered (13.15%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/adyen/model/management/TransactionDescriptionInfo.java
1
/*
2
 * Management 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

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.fasterxml.jackson.annotation.JsonInclude;
20
import com.fasterxml.jackson.annotation.JsonProperty;
21
import com.fasterxml.jackson.annotation.JsonCreator;
22
import com.fasterxml.jackson.annotation.JsonTypeName;
23
import com.fasterxml.jackson.annotation.JsonValue;
24
import io.swagger.annotations.ApiModel;
25
import io.swagger.annotations.ApiModelProperty;
26
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
27
import com.fasterxml.jackson.core.JsonProcessingException;
28

29

30
/**
31
 * TransactionDescriptionInfo
32
 */
33
@JsonPropertyOrder({
34
  TransactionDescriptionInfo.JSON_PROPERTY_DOING_BUSINESS_AS_NAME,
35
  TransactionDescriptionInfo.JSON_PROPERTY_TYPE
36
})
37

38
public class TransactionDescriptionInfo {
39
  public static final String JSON_PROPERTY_DOING_BUSINESS_AS_NAME = "doingBusinessAsName";
40
  private String doingBusinessAsName;
41

42
  /**
43
   * The type of transaction description you want to use: - **fixed**: The transaction description set in this request is used for all payments with this payment method. - **append**: The transaction description set in this request is used as a base for all payments with this payment method. The [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is appended to this base description. Note that if the combined length exceeds 22 characters, banks may truncate the string. - **dynamic**: Only the [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is used for payments with this payment method.
44
   */
45
  public enum TypeEnum {
×
46
    APPEND("append"),
×
47
    
48
    DYNAMIC("dynamic"),
×
49
    
50
    FIXED("fixed");
×
51

52
    private String value;
53

54
    TypeEnum(String value) {
×
55
      this.value = value;
×
56
    }
×
57

58
    @JsonValue
59
    public String getValue() {
60
      return value;
×
61
    }
62

63
    @Override
64
    public String toString() {
65
      return String.valueOf(value);
×
66
    }
67

68
    @JsonCreator
69
    public static TypeEnum fromValue(String value) {
70
      for (TypeEnum b : TypeEnum.values()) {
×
71
        if (b.value.equals(value)) {
×
72
          return b;
×
73
        }
74
      }
75
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
76
    }
77
  }
78

79
  public static final String JSON_PROPERTY_TYPE = "type";
80
  private TypeEnum type = TypeEnum.DYNAMIC;
×
81

82
  public TransactionDescriptionInfo() { 
×
83
  }
×
84

85
  public TransactionDescriptionInfo doingBusinessAsName(String doingBusinessAsName) {
86
    this.doingBusinessAsName = doingBusinessAsName;
×
87
    return this;
×
88
  }
89

90
   /**
91
   * The text to be shown on the shopper's bank statement.  We recommend sending a maximum of 22 characters, otherwise banks might truncate the string.  Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.
92
   * @return doingBusinessAsName
93
  **/
94
  @ApiModelProperty(value = "The text to be shown on the shopper's bank statement.  We recommend sending a maximum of 22 characters, otherwise banks might truncate the string.  Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.")
95
  @JsonProperty(JSON_PROPERTY_DOING_BUSINESS_AS_NAME)
96
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
97

98
  public String getDoingBusinessAsName() {
99
    return doingBusinessAsName;
×
100
  }
101

102

103
  @JsonProperty(JSON_PROPERTY_DOING_BUSINESS_AS_NAME)
104
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
105
  public void setDoingBusinessAsName(String doingBusinessAsName) {
106
    this.doingBusinessAsName = doingBusinessAsName;
×
107
  }
×
108

109

110
  public TransactionDescriptionInfo type(TypeEnum type) {
111
    this.type = type;
×
112
    return this;
×
113
  }
114

115
   /**
116
   * The type of transaction description you want to use: - **fixed**: The transaction description set in this request is used for all payments with this payment method. - **append**: The transaction description set in this request is used as a base for all payments with this payment method. The [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is appended to this base description. Note that if the combined length exceeds 22 characters, banks may truncate the string. - **dynamic**: Only the [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is used for payments with this payment method.
117
   * @return type
118
  **/
119
  @ApiModelProperty(value = "The type of transaction description you want to use: - **fixed**: The transaction description set in this request is used for all payments with this payment method. - **append**: The transaction description set in this request is used as a base for all payments with this payment method. The [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is appended to this base description. Note that if the combined length exceeds 22 characters, banks may truncate the string. - **dynamic**: Only the [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is used for payments with this payment method.")
120
  @JsonProperty(JSON_PROPERTY_TYPE)
121
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
122

123
  public TypeEnum getType() {
124
    return type;
×
125
  }
126

127

128
  @JsonProperty(JSON_PROPERTY_TYPE)
129
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
130
  public void setType(TypeEnum type) {
131
    this.type = type;
×
132
  }
×
133

134

135
  /**
136
   * Return true if this TransactionDescriptionInfo object is equal to o.
137
   */
138
  @Override
139
  public boolean equals(Object o) {
140
    if (this == o) {
×
141
      return true;
×
142
    }
143
    if (o == null || getClass() != o.getClass()) {
×
144
      return false;
×
145
    }
146
    TransactionDescriptionInfo transactionDescriptionInfo = (TransactionDescriptionInfo) o;
×
147
    return Objects.equals(this.doingBusinessAsName, transactionDescriptionInfo.doingBusinessAsName) &&
×
148
        Objects.equals(this.type, transactionDescriptionInfo.type);
×
149
  }
150

151
  @Override
152
  public int hashCode() {
153
    return Objects.hash(doingBusinessAsName, type);
×
154
  }
155

156
  @Override
157
  public String toString() {
158
    StringBuilder sb = new StringBuilder();
×
159
    sb.append("class TransactionDescriptionInfo {\n");
×
160
    sb.append("    doingBusinessAsName: ").append(toIndentedString(doingBusinessAsName)).append("\n");
×
161
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
162
    sb.append("}");
×
163
    return sb.toString();
×
164
  }
165

166
  /**
167
   * Convert the given object to string with each line indented by 4 spaces
168
   * (except the first line).
169
   */
170
  private String toIndentedString(Object o) {
171
    if (o == null) {
×
172
      return "null";
×
173
    }
174
    return o.toString().replace("\n", "\n    ");
×
175
  }
176

177
/**
178
   * Create an instance of TransactionDescriptionInfo given an JSON string
179
   *
180
   * @param jsonString JSON string
181
   * @return An instance of TransactionDescriptionInfo
182
   * @throws JsonProcessingException if the JSON string is invalid with respect to TransactionDescriptionInfo
183
   */
184
  public static TransactionDescriptionInfo fromJson(String jsonString) throws JsonProcessingException {
185
    return JSON.getMapper().readValue(jsonString, TransactionDescriptionInfo.class);
×
186
  }
187
/**
188
  * Convert an instance of TransactionDescriptionInfo to an JSON string
189
  *
190
  * @return JSON string
191
  */
192
  public String toJson() throws JsonProcessingException {
193
    return JSON.getMapper().writeValueAsString(this);
×
194
  }
195
}
196

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc