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

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

08 Dec 2023 12:05PM UTC coverage: 12.838%. First build
#2905

push

web-flow
Merge caa3554a7 into ec0c20882

1 of 151 new or added lines in 12 files covered. (0.66%)

12463 of 97080 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/UpdateStoreRequest.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.StoreSplitConfiguration;
20
import com.adyen.model.management.UpdatableAddress;
21
import com.fasterxml.jackson.annotation.JsonInclude;
22
import com.fasterxml.jackson.annotation.JsonProperty;
23
import com.fasterxml.jackson.annotation.JsonCreator;
24
import com.fasterxml.jackson.annotation.JsonTypeName;
25
import com.fasterxml.jackson.annotation.JsonValue;
26
import io.swagger.annotations.ApiModel;
27
import io.swagger.annotations.ApiModelProperty;
28
import java.util.ArrayList;
29
import java.util.List;
30
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
31
import com.fasterxml.jackson.core.JsonProcessingException;
32

33

34
/**
35
 * UpdateStoreRequest
36
 */
37
@JsonPropertyOrder({
38
  UpdateStoreRequest.JSON_PROPERTY_ADDRESS,
39
  UpdateStoreRequest.JSON_PROPERTY_BUSINESS_LINE_IDS,
40
  UpdateStoreRequest.JSON_PROPERTY_DESCRIPTION,
41
  UpdateStoreRequest.JSON_PROPERTY_EXTERNAL_REFERENCE_ID,
42
  UpdateStoreRequest.JSON_PROPERTY_PHONE_NUMBER,
43
  UpdateStoreRequest.JSON_PROPERTY_SPLIT_CONFIGURATION,
44
  UpdateStoreRequest.JSON_PROPERTY_STATUS
45
})
46

47
public class UpdateStoreRequest {
48
  public static final String JSON_PROPERTY_ADDRESS = "address";
49
  private UpdatableAddress address;
50

51
  public static final String JSON_PROPERTY_BUSINESS_LINE_IDS = "businessLineIds";
52
  private List<String> businessLineIds = null;
×
53

54
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
55
  private String description;
56

57
  public static final String JSON_PROPERTY_EXTERNAL_REFERENCE_ID = "externalReferenceId";
58
  private String externalReferenceId;
59

60
  public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber";
61
  private String phoneNumber;
62

63
  public static final String JSON_PROPERTY_SPLIT_CONFIGURATION = "splitConfiguration";
64
  private StoreSplitConfiguration splitConfiguration;
65

66
  /**
67
   * The status of the store. Possible values are:  - **active**: This value is assigned automatically when a store is created.  - **inactive**: The maximum [transaction limits and number of Store-and-Forward transactions](https://docs.adyen.com/point-of-sale/determine-account-structure/configure-features#payment-features) for the store are set to 0. This blocks new transactions, but captures are still possible. - **closed**: The terminals of the store are reassigned to the merchant inventory, so they can&#39;t process payments.  You can change the status from **active** to **inactive**, and from **inactive** to **active** or **closed**.  Once **closed**, a store can&#39;t be reopened.
68
   */
69
  public enum StatusEnum {
×
70
    ACTIVE("active"),
×
71
    
72
    CLOSED("closed"),
×
73
    
74
    INACTIVE("inactive");
×
75

76
    private String value;
77

78
    StatusEnum(String value) {
×
79
      this.value = value;
×
80
    }
×
81

82
    @JsonValue
83
    public String getValue() {
84
      return value;
×
85
    }
86

87
    @Override
88
    public String toString() {
89
      return String.valueOf(value);
×
90
    }
91

92
    @JsonCreator
93
    public static StatusEnum fromValue(String value) {
94
      for (StatusEnum b : StatusEnum.values()) {
×
95
        if (b.value.equals(value)) {
×
96
          return b;
×
97
        }
98
      }
99
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
100
    }
101
  }
102

103
  public static final String JSON_PROPERTY_STATUS = "status";
104
  private StatusEnum status;
105

106
  public UpdateStoreRequest() { 
×
107
  }
×
108

109
  public UpdateStoreRequest address(UpdatableAddress address) {
110
    this.address = address;
×
111
    return this;
×
112
  }
113

114
   /**
115
   * Get address
116
   * @return address
117
  **/
118
  @ApiModelProperty(value = "")
119
  @JsonProperty(JSON_PROPERTY_ADDRESS)
120
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
121

122
  public UpdatableAddress getAddress() {
123
    return address;
×
124
  }
125

126

127
  @JsonProperty(JSON_PROPERTY_ADDRESS)
128
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
129
  public void setAddress(UpdatableAddress address) {
130
    this.address = address;
×
131
  }
×
132

133

134
  public UpdateStoreRequest businessLineIds(List<String> businessLineIds) {
135
    this.businessLineIds = businessLineIds;
×
136
    return this;
×
137
  }
138

139
  public UpdateStoreRequest addBusinessLineIdsItem(String businessLineIdsItem) {
140
    if (this.businessLineIds == null) {
×
141
      this.businessLineIds = new ArrayList<>();
×
142
    }
143
    this.businessLineIds.add(businessLineIdsItem);
×
144
    return this;
×
145
  }
146

147
   /**
148
   * The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines__resParam_id) that the store is associated with.
149
   * @return businessLineIds
150
  **/
151
  @ApiModelProperty(value = "The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines__resParam_id) that the store is associated with.")
152
  @JsonProperty(JSON_PROPERTY_BUSINESS_LINE_IDS)
153
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
154

155
  public List<String> getBusinessLineIds() {
156
    return businessLineIds;
×
157
  }
158

159

160
  @JsonProperty(JSON_PROPERTY_BUSINESS_LINE_IDS)
161
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
162
  public void setBusinessLineIds(List<String> businessLineIds) {
163
    this.businessLineIds = businessLineIds;
×
164
  }
×
165

166

167
  public UpdateStoreRequest description(String description) {
168
    this.description = description;
×
169
    return this;
×
170
  }
171

172
   /**
173
   * The description of the store.
174
   * @return description
175
  **/
176
  @ApiModelProperty(value = "The description of the store.")
177
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
178
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
179

180
  public String getDescription() {
181
    return description;
×
182
  }
183

184

185
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
186
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
187
  public void setDescription(String description) {
188
    this.description = description;
×
189
  }
×
190

191

192
  public UpdateStoreRequest externalReferenceId(String externalReferenceId) {
193
    this.externalReferenceId = externalReferenceId;
×
194
    return this;
×
195
  }
196

197
   /**
198
   * When using the Zip payment method: The location ID that Zip has assigned to your store.
199
   * @return externalReferenceId
200
  **/
201
  @ApiModelProperty(value = "When using the Zip payment method: The location ID that Zip has assigned to your store.")
202
  @JsonProperty(JSON_PROPERTY_EXTERNAL_REFERENCE_ID)
203
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
204

205
  public String getExternalReferenceId() {
206
    return externalReferenceId;
×
207
  }
208

209

210
  @JsonProperty(JSON_PROPERTY_EXTERNAL_REFERENCE_ID)
211
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
212
  public void setExternalReferenceId(String externalReferenceId) {
213
    this.externalReferenceId = externalReferenceId;
×
214
  }
×
215

216

217
  public UpdateStoreRequest phoneNumber(String phoneNumber) {
NEW
218
    this.phoneNumber = phoneNumber;
×
NEW
219
    return this;
×
220
  }
221

222
   /**
223
   * The phone number of the store, including &#39;+&#39; and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. 
224
   * @return phoneNumber
225
  **/
226
  @ApiModelProperty(value = "The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. ")
227
  @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
228
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
229

230
  public String getPhoneNumber() {
NEW
231
    return phoneNumber;
×
232
  }
233

234

235
  @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
236
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
237
  public void setPhoneNumber(String phoneNumber) {
NEW
238
    this.phoneNumber = phoneNumber;
×
NEW
239
  }
×
240

241

242
  public UpdateStoreRequest splitConfiguration(StoreSplitConfiguration splitConfiguration) {
243
    this.splitConfiguration = splitConfiguration;
×
244
    return this;
×
245
  }
246

247
   /**
248
   * Get splitConfiguration
249
   * @return splitConfiguration
250
  **/
251
  @ApiModelProperty(value = "")
252
  @JsonProperty(JSON_PROPERTY_SPLIT_CONFIGURATION)
253
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
254

255
  public StoreSplitConfiguration getSplitConfiguration() {
256
    return splitConfiguration;
×
257
  }
258

259

260
  @JsonProperty(JSON_PROPERTY_SPLIT_CONFIGURATION)
261
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
262
  public void setSplitConfiguration(StoreSplitConfiguration splitConfiguration) {
263
    this.splitConfiguration = splitConfiguration;
×
264
  }
×
265

266

267
  public UpdateStoreRequest status(StatusEnum status) {
268
    this.status = status;
×
269
    return this;
×
270
  }
271

272
   /**
273
   * The status of the store. Possible values are:  - **active**: This value is assigned automatically when a store is created.  - **inactive**: The maximum [transaction limits and number of Store-and-Forward transactions](https://docs.adyen.com/point-of-sale/determine-account-structure/configure-features#payment-features) for the store are set to 0. This blocks new transactions, but captures are still possible. - **closed**: The terminals of the store are reassigned to the merchant inventory, so they can&#39;t process payments.  You can change the status from **active** to **inactive**, and from **inactive** to **active** or **closed**.  Once **closed**, a store can&#39;t be reopened.
274
   * @return status
275
  **/
276
  @ApiModelProperty(value = "The status of the store. Possible values are:  - **active**: This value is assigned automatically when a store is created.  - **inactive**: The maximum [transaction limits and number of Store-and-Forward transactions](https://docs.adyen.com/point-of-sale/determine-account-structure/configure-features#payment-features) for the store are set to 0. This blocks new transactions, but captures are still possible. - **closed**: The terminals of the store are reassigned to the merchant inventory, so they can't process payments.  You can change the status from **active** to **inactive**, and from **inactive** to **active** or **closed**.  Once **closed**, a store can't be reopened.")
277
  @JsonProperty(JSON_PROPERTY_STATUS)
278
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
279

280
  public StatusEnum getStatus() {
281
    return status;
×
282
  }
283

284

285
  @JsonProperty(JSON_PROPERTY_STATUS)
286
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
287
  public void setStatus(StatusEnum status) {
288
    this.status = status;
×
289
  }
×
290

291

292
  /**
293
   * Return true if this UpdateStoreRequest object is equal to o.
294
   */
295
  @Override
296
  public boolean equals(Object o) {
297
    if (this == o) {
×
298
      return true;
×
299
    }
300
    if (o == null || getClass() != o.getClass()) {
×
301
      return false;
×
302
    }
303
    UpdateStoreRequest updateStoreRequest = (UpdateStoreRequest) o;
×
304
    return Objects.equals(this.address, updateStoreRequest.address) &&
×
305
        Objects.equals(this.businessLineIds, updateStoreRequest.businessLineIds) &&
×
306
        Objects.equals(this.description, updateStoreRequest.description) &&
×
307
        Objects.equals(this.externalReferenceId, updateStoreRequest.externalReferenceId) &&
×
NEW
308
        Objects.equals(this.phoneNumber, updateStoreRequest.phoneNumber) &&
×
309
        Objects.equals(this.splitConfiguration, updateStoreRequest.splitConfiguration) &&
×
310
        Objects.equals(this.status, updateStoreRequest.status);
×
311
  }
312

313
  @Override
314
  public int hashCode() {
NEW
315
    return Objects.hash(address, businessLineIds, description, externalReferenceId, phoneNumber, splitConfiguration, status);
×
316
  }
317

318
  @Override
319
  public String toString() {
320
    StringBuilder sb = new StringBuilder();
×
321
    sb.append("class UpdateStoreRequest {\n");
×
322
    sb.append("    address: ").append(toIndentedString(address)).append("\n");
×
323
    sb.append("    businessLineIds: ").append(toIndentedString(businessLineIds)).append("\n");
×
324
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
325
    sb.append("    externalReferenceId: ").append(toIndentedString(externalReferenceId)).append("\n");
×
NEW
326
    sb.append("    phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n");
×
327
    sb.append("    splitConfiguration: ").append(toIndentedString(splitConfiguration)).append("\n");
×
328
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
329
    sb.append("}");
×
330
    return sb.toString();
×
331
  }
332

333
  /**
334
   * Convert the given object to string with each line indented by 4 spaces
335
   * (except the first line).
336
   */
337
  private String toIndentedString(Object o) {
338
    if (o == null) {
×
339
      return "null";
×
340
    }
341
    return o.toString().replace("\n", "\n    ");
×
342
  }
343

344
/**
345
   * Create an instance of UpdateStoreRequest given an JSON string
346
   *
347
   * @param jsonString JSON string
348
   * @return An instance of UpdateStoreRequest
349
   * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateStoreRequest
350
   */
351
  public static UpdateStoreRequest fromJson(String jsonString) throws JsonProcessingException {
352
    return JSON.getMapper().readValue(jsonString, UpdateStoreRequest.class);
×
353
  }
354
/**
355
  * Convert an instance of UpdateStoreRequest to an JSON string
356
  *
357
  * @return JSON string
358
  */
359
  public String toJson() throws JsonProcessingException {
360
    return JSON.getMapper().writeValueAsString(this);
×
361
  }
362
}
363

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