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

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

08 Nov 2023 09:16AM CUT coverage: 12.837%. First build
#2829

push

web-flow
Merge 828273160 into b96088175

114 of 864 new or added lines in 50 files covered. (13.19%)

12393 of 96543 relevant lines covered (12.84%)

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/TerminalAssignment.java
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.TerminalReassignmentTarget;
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
 * TerminalAssignment
33
 */
34
@JsonPropertyOrder({
35
  TerminalAssignment.JSON_PROPERTY_COMPANY_ID,
36
  TerminalAssignment.JSON_PROPERTY_MERCHANT_ID,
37
  TerminalAssignment.JSON_PROPERTY_REASSIGNMENT_TARGET,
38
  TerminalAssignment.JSON_PROPERTY_STATUS,
39
  TerminalAssignment.JSON_PROPERTY_STORE_ID
40
})
41

42
public class TerminalAssignment {
43
  public static final String JSON_PROPERTY_COMPANY_ID = "companyId";
44
  private String companyId;
45

46
  public static final String JSON_PROPERTY_MERCHANT_ID = "merchantId";
47
  private String merchantId;
48

49
  public static final String JSON_PROPERTY_REASSIGNMENT_TARGET = "reassignmentTarget";
50
  private TerminalReassignmentTarget reassignmentTarget;
51

52
  /**
53
   * The status of the reassignment. Possible values:   * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform.  * `deployed`: the terminal is deployed and reassigned.   * `inventory`: the terminal is in inventory and cannot process transactions.   * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions.  
54
   */
55
  public enum StatusEnum {
×
NEW
56
    BOARDED("boarded"),
×
57
    
58
    DEPLOYED("deployed"),
×
59
    
NEW
60
    INVENTORY("inventory"),
×
61
    
NEW
62
    REASSIGNMENTINPROGRESS("reassignmentInProgress");
×
63

64
    private String value;
65

66
    StatusEnum(String value) {
×
67
      this.value = value;
×
68
    }
×
69

70
    @JsonValue
71
    public String getValue() {
72
      return value;
×
73
    }
74

75
    @Override
76
    public String toString() {
77
      return String.valueOf(value);
×
78
    }
79

80
    @JsonCreator
81
    public static StatusEnum fromValue(String value) {
82
      for (StatusEnum b : StatusEnum.values()) {
×
83
        if (b.value.equals(value)) {
×
84
          return b;
×
85
        }
86
      }
87
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
88
    }
89
  }
90

91
  public static final String JSON_PROPERTY_STATUS = "status";
92
  private StatusEnum status;
93

94
  public static final String JSON_PROPERTY_STORE_ID = "storeId";
95
  private String storeId;
96

97
  public TerminalAssignment() { 
×
98
  }
×
99

100
  public TerminalAssignment companyId(String companyId) {
101
    this.companyId = companyId;
×
102
    return this;
×
103
  }
104

105
   /**
106
   * The unique identifier of the company account to which terminal is assigned.
107
   * @return companyId
108
  **/
109
  @ApiModelProperty(required = true, value = "The unique identifier of the company account to which terminal is assigned.")
110
  @JsonProperty(JSON_PROPERTY_COMPANY_ID)
111
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
112

113
  public String getCompanyId() {
114
    return companyId;
×
115
  }
116

117

118
  @JsonProperty(JSON_PROPERTY_COMPANY_ID)
119
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
120
  public void setCompanyId(String companyId) {
121
    this.companyId = companyId;
×
122
  }
×
123

124

125
  public TerminalAssignment merchantId(String merchantId) {
126
    this.merchantId = merchantId;
×
127
    return this;
×
128
  }
129

130
   /**
131
   * The unique identifier of the merchant account to which terminal is assigned.
132
   * @return merchantId
133
  **/
134
  @ApiModelProperty(value = "The unique identifier of the merchant account to which terminal is assigned.")
135
  @JsonProperty(JSON_PROPERTY_MERCHANT_ID)
136
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
137

138
  public String getMerchantId() {
139
    return merchantId;
×
140
  }
141

142

143
  @JsonProperty(JSON_PROPERTY_MERCHANT_ID)
144
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
145
  public void setMerchantId(String merchantId) {
146
    this.merchantId = merchantId;
×
147
  }
×
148

149

150
  public TerminalAssignment reassignmentTarget(TerminalReassignmentTarget reassignmentTarget) {
151
    this.reassignmentTarget = reassignmentTarget;
×
152
    return this;
×
153
  }
154

155
   /**
156
   * Get reassignmentTarget
157
   * @return reassignmentTarget
158
  **/
159
  @ApiModelProperty(value = "")
160
  @JsonProperty(JSON_PROPERTY_REASSIGNMENT_TARGET)
161
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
162

163
  public TerminalReassignmentTarget getReassignmentTarget() {
164
    return reassignmentTarget;
×
165
  }
166

167

168
  @JsonProperty(JSON_PROPERTY_REASSIGNMENT_TARGET)
169
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
170
  public void setReassignmentTarget(TerminalReassignmentTarget reassignmentTarget) {
171
    this.reassignmentTarget = reassignmentTarget;
×
172
  }
×
173

174

175
  public TerminalAssignment status(StatusEnum status) {
176
    this.status = status;
×
177
    return this;
×
178
  }
179

180
   /**
181
   * The status of the reassignment. Possible values:   * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform.  * `deployed`: the terminal is deployed and reassigned.   * `inventory`: the terminal is in inventory and cannot process transactions.   * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions.  
182
   * @return status
183
  **/
184
  @ApiModelProperty(required = true, value = "The status of the reassignment. Possible values:   * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform.  * `deployed`: the terminal is deployed and reassigned.   * `inventory`: the terminal is in inventory and cannot process transactions.   * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions.  ")
185
  @JsonProperty(JSON_PROPERTY_STATUS)
186
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
187

188
  public StatusEnum getStatus() {
189
    return status;
×
190
  }
191

192

193
  @JsonProperty(JSON_PROPERTY_STATUS)
194
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
195
  public void setStatus(StatusEnum status) {
196
    this.status = status;
×
197
  }
×
198

199

200
  public TerminalAssignment storeId(String storeId) {
201
    this.storeId = storeId;
×
202
    return this;
×
203
  }
204

205
   /**
206
   * The unique identifier of the store to which terminal is assigned.
207
   * @return storeId
208
  **/
209
  @ApiModelProperty(value = "The unique identifier of the store to which terminal is assigned.")
210
  @JsonProperty(JSON_PROPERTY_STORE_ID)
211
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
212

213
  public String getStoreId() {
214
    return storeId;
×
215
  }
216

217

218
  @JsonProperty(JSON_PROPERTY_STORE_ID)
219
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
220
  public void setStoreId(String storeId) {
221
    this.storeId = storeId;
×
222
  }
×
223

224

225
  /**
226
   * Return true if this TerminalAssignment object is equal to o.
227
   */
228
  @Override
229
  public boolean equals(Object o) {
230
    if (this == o) {
×
231
      return true;
×
232
    }
233
    if (o == null || getClass() != o.getClass()) {
×
234
      return false;
×
235
    }
236
    TerminalAssignment terminalAssignment = (TerminalAssignment) o;
×
237
    return Objects.equals(this.companyId, terminalAssignment.companyId) &&
×
238
        Objects.equals(this.merchantId, terminalAssignment.merchantId) &&
×
239
        Objects.equals(this.reassignmentTarget, terminalAssignment.reassignmentTarget) &&
×
240
        Objects.equals(this.status, terminalAssignment.status) &&
×
241
        Objects.equals(this.storeId, terminalAssignment.storeId);
×
242
  }
243

244
  @Override
245
  public int hashCode() {
246
    return Objects.hash(companyId, merchantId, reassignmentTarget, status, storeId);
×
247
  }
248

249
  @Override
250
  public String toString() {
251
    StringBuilder sb = new StringBuilder();
×
252
    sb.append("class TerminalAssignment {\n");
×
253
    sb.append("    companyId: ").append(toIndentedString(companyId)).append("\n");
×
254
    sb.append("    merchantId: ").append(toIndentedString(merchantId)).append("\n");
×
255
    sb.append("    reassignmentTarget: ").append(toIndentedString(reassignmentTarget)).append("\n");
×
256
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
257
    sb.append("    storeId: ").append(toIndentedString(storeId)).append("\n");
×
258
    sb.append("}");
×
259
    return sb.toString();
×
260
  }
261

262
  /**
263
   * Convert the given object to string with each line indented by 4 spaces
264
   * (except the first line).
265
   */
266
  private String toIndentedString(Object o) {
267
    if (o == null) {
×
268
      return "null";
×
269
    }
270
    return o.toString().replace("\n", "\n    ");
×
271
  }
272

273
/**
274
   * Create an instance of TerminalAssignment given an JSON string
275
   *
276
   * @param jsonString JSON string
277
   * @return An instance of TerminalAssignment
278
   * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalAssignment
279
   */
280
  public static TerminalAssignment fromJson(String jsonString) throws JsonProcessingException {
281
    return JSON.getMapper().readValue(jsonString, TerminalAssignment.class);
×
282
  }
283
/**
284
  * Convert an instance of TerminalAssignment to an JSON string
285
  *
286
  * @return JSON string
287
  */
288
  public String toJson() throws JsonProcessingException {
289
    return JSON.getMapper().writeValueAsString(this);
×
290
  }
291
}
292

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