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

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

11 Dec 2023 05:06PM CUT coverage: 12.835%. First build
#2934

push

web-flow
Merge 0111dd892 into d70611050

173 of 797 new or added lines in 39 files covered. (21.71%)

12464 of 97111 relevant lines covered (12.83%)

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/service/management/TerminalSettingsStoreLevelApi.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
package com.adyen.service.management;
13

14
import com.adyen.Client;
15
import com.adyen.Service;
16
import com.adyen.constants.ApiConstants;
17
import com.adyen.model.management.Logo;
18
import com.adyen.model.management.RestServiceError;
19
import com.adyen.model.management.TerminalSettings;
20
import com.adyen.model.RequestOptions;
21
import com.adyen.service.exception.ApiException;
22
import com.adyen.service.resource.Resource;
23

24
import java.io.IOException;
25
import java.util.HashMap;
26
import java.util.Map;
27

28
public class TerminalSettingsStoreLevelApi extends Service {
29

30
    public static final String API_VERSION = "3";
31

32
    protected String baseURL;
33

34
    /**
35
    *  constructor in {@link com.adyen.service.management package}.
36
    * @param client {@link Client } (required)
37
    */
38
    public TerminalSettingsStoreLevelApi(Client client) {
39
        super(client);
×
40
        this.baseURL = createBaseURL("https://management-test.adyen.com/v3");
×
41
    }
×
42

43
    /**
44
    *  constructor in {@link com.adyen.service.management package}.
45
    * Please use this constructor only if you would like to pass along your own url for routing or testing purposes. The latest API version is defined in this class as a constant.
46
    * @param client {@link Client } (required)
47
    * @param baseURL {@link String } (required)
48
    */
49
    public TerminalSettingsStoreLevelApi(Client client, String baseURL) {
50
        super(client);
×
51
        this.baseURL = baseURL;
×
52
    }
×
53

54
    /**
55
    * Get the terminal logo
56
    *
57
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
58
    * @param reference {@link String } The reference that identifies the store. (required)
59
    * @param model {@link String } The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. (required)
60
    * @return {@link Logo }
61
    * @throws ApiException if fails to make API call
62
    */
63
    public Logo getTerminalLogo(String merchantId, String reference, String model) throws ApiException, IOException {
64
        return getTerminalLogo(merchantId, reference, model,  null);
×
65
    }
66

67
    /**
68
    * Get the terminal logo
69
    *
70
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
71
    * @param reference {@link String } The reference that identifies the store. (required)
72
    * @param model {@link String } Query: The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. (required)
73
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
74
    * @return {@link Logo }
75
    * @throws ApiException if fails to make API call
76
    */
77
    public Logo getTerminalLogo(String merchantId, String reference, String model, RequestOptions requestOptions) throws ApiException, IOException {
78
        //Add path params
79
        Map<String, String> pathParams = new HashMap<>();
×
80
        if (merchantId == null) {
×
81
            throw new IllegalArgumentException("Please provide the merchantId path parameter");
×
82
        }
83
        pathParams.put("merchantId", merchantId);
×
84
        if (reference == null) {
×
85
            throw new IllegalArgumentException("Please provide the reference path parameter");
×
86
        }
87
        pathParams.put("reference", reference);
×
88
        //Add query params
89
        Map<String, String> queryParams = new HashMap<>();
×
90
        if (model != null) {
×
91
        queryParams.put("model", model);
×
92
        }
93

94
        String requestBody = null;
×
95
        Resource resource = new Resource(this, this.baseURL + "/merchants/{merchantId}/stores/{reference}/terminalLogos", null);
×
96
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams);
×
97
        return Logo.fromJson(jsonResult);
×
98
    }
99

100
    /**
101
    * Get the terminal logo
102
    *
103
    * @param storeId {@link String } The unique identifier of the store. (required)
104
    * @param model {@link String } The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. (required)
105
    * @return {@link Logo }
106
    * @throws ApiException if fails to make API call
107
    */
108
    public Logo getTerminalLogoByStoreId(String storeId, String model) throws ApiException, IOException {
109
        return getTerminalLogoByStoreId(storeId, model,  null);
×
110
    }
111

112
    /**
113
    * Get the terminal logo
114
    *
115
    * @param storeId {@link String } The unique identifier of the store. (required)
116
    * @param model {@link String } Query: The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. (required)
117
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
118
    * @return {@link Logo }
119
    * @throws ApiException if fails to make API call
120
    */
121
    public Logo getTerminalLogoByStoreId(String storeId, String model, RequestOptions requestOptions) throws ApiException, IOException {
122
        //Add path params
123
        Map<String, String> pathParams = new HashMap<>();
×
124
        if (storeId == null) {
×
125
            throw new IllegalArgumentException("Please provide the storeId path parameter");
×
126
        }
127
        pathParams.put("storeId", storeId);
×
128
        //Add query params
129
        Map<String, String> queryParams = new HashMap<>();
×
130
        if (model != null) {
×
131
        queryParams.put("model", model);
×
132
        }
133

134
        String requestBody = null;
×
135
        Resource resource = new Resource(this, this.baseURL + "/stores/{storeId}/terminalLogos", null);
×
136
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams);
×
137
        return Logo.fromJson(jsonResult);
×
138
    }
139

140
    /**
141
    * Get terminal settings
142
    *
143
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
144
    * @param reference {@link String } The reference that identifies the store. (required)
145
    * @return {@link TerminalSettings }
146
    * @throws ApiException if fails to make API call
147
    */
148
    public TerminalSettings getTerminalSettings(String merchantId, String reference) throws ApiException, IOException {
NEW
149
        return getTerminalSettings(merchantId, reference, null);
×
150
    }
151

152
    /**
153
    * Get terminal settings
154
    *
155
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
156
    * @param reference {@link String } The reference that identifies the store. (required)
157
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
158
    * @return {@link TerminalSettings }
159
    * @throws ApiException if fails to make API call
160
    */
161
    public TerminalSettings getTerminalSettings(String merchantId, String reference, RequestOptions requestOptions) throws ApiException, IOException {
162
        //Add path params
NEW
163
        Map<String, String> pathParams = new HashMap<>();
×
NEW
164
        if (merchantId == null) {
×
NEW
165
            throw new IllegalArgumentException("Please provide the merchantId path parameter");
×
166
        }
NEW
167
        pathParams.put("merchantId", merchantId);
×
NEW
168
        if (reference == null) {
×
NEW
169
            throw new IllegalArgumentException("Please provide the reference path parameter");
×
170
        }
NEW
171
        pathParams.put("reference", reference);
×
172

NEW
173
        String requestBody = null;
×
NEW
174
        Resource resource = new Resource(this, this.baseURL + "/merchants/{merchantId}/stores/{reference}/terminalSettings", null);
×
NEW
175
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams);
×
NEW
176
        return TerminalSettings.fromJson(jsonResult);
×
177
    }
178

179
    /**
180
    * Get terminal settings
181
    *
182
    * @param storeId {@link String } The unique identifier of the store. (required)
183
    * @return {@link TerminalSettings }
184
    * @throws ApiException if fails to make API call
185
    */
186
    public TerminalSettings getTerminalSettingsByStoreId(String storeId) throws ApiException, IOException {
187
        return getTerminalSettingsByStoreId(storeId, null);
×
188
    }
189

190
    /**
191
    * Get terminal settings
192
    *
193
    * @param storeId {@link String } The unique identifier of the store. (required)
194
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
195
    * @return {@link TerminalSettings }
196
    * @throws ApiException if fails to make API call
197
    */
198
    public TerminalSettings getTerminalSettingsByStoreId(String storeId, RequestOptions requestOptions) throws ApiException, IOException {
199
        //Add path params
200
        Map<String, String> pathParams = new HashMap<>();
×
201
        if (storeId == null) {
×
202
            throw new IllegalArgumentException("Please provide the storeId path parameter");
×
203
        }
204
        pathParams.put("storeId", storeId);
×
205

206
        String requestBody = null;
×
207
        Resource resource = new Resource(this, this.baseURL + "/stores/{storeId}/terminalSettings", null);
×
208
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams);
×
209
        return TerminalSettings.fromJson(jsonResult);
×
210
    }
211

212
    /**
213
    * Update the terminal logo
214
    *
215
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
216
    * @param reference {@link String } The reference that identifies the store. (required)
217
    * @param model {@link String } The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T (required)
218
    * @param logo {@link Logo }  (required)
219
    * @return {@link Logo }
220
    * @throws ApiException if fails to make API call
221
    */
222
    public Logo updateTerminalLogo(String merchantId, String reference, String model, Logo logo) throws ApiException, IOException {
223
        return updateTerminalLogo(merchantId, reference, model,  logo, null);
×
224
    }
225

226
    /**
227
    * Update the terminal logo
228
    *
229
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
230
    * @param reference {@link String } The reference that identifies the store. (required)
231
    * @param logo {@link Logo }  (required)
232
    * @param model {@link String } Query: The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T (required)
233
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
234
    * @return {@link Logo }
235
    * @throws ApiException if fails to make API call
236
    */
237
    public Logo updateTerminalLogo(String merchantId, String reference, String model, Logo logo, RequestOptions requestOptions) throws ApiException, IOException {
238
        //Add path params
239
        Map<String, String> pathParams = new HashMap<>();
×
240
        if (merchantId == null) {
×
241
            throw new IllegalArgumentException("Please provide the merchantId path parameter");
×
242
        }
243
        pathParams.put("merchantId", merchantId);
×
244
        if (reference == null) {
×
245
            throw new IllegalArgumentException("Please provide the reference path parameter");
×
246
        }
247
        pathParams.put("reference", reference);
×
248
        //Add query params
249
        Map<String, String> queryParams = new HashMap<>();
×
250
        if (model != null) {
×
251
        queryParams.put("model", model);
×
252
        }
253

254
        String requestBody = logo.toJson();
×
255
        Resource resource = new Resource(this, this.baseURL + "/merchants/{merchantId}/stores/{reference}/terminalLogos", null);
×
256
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams, queryParams);
×
257
        return Logo.fromJson(jsonResult);
×
258
    }
259

260
    /**
261
    * Update the terminal logo
262
    *
263
    * @param storeId {@link String } The unique identifier of the store. (required)
264
    * @param model {@link String } The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. (required)
265
    * @param logo {@link Logo }  (required)
266
    * @return {@link Logo }
267
    * @throws ApiException if fails to make API call
268
    */
269
    public Logo updateTerminalLogoByStoreId(String storeId, String model, Logo logo) throws ApiException, IOException {
270
        return updateTerminalLogoByStoreId(storeId, model,  logo, null);
×
271
    }
272

273
    /**
274
    * Update the terminal logo
275
    *
276
    * @param storeId {@link String } The unique identifier of the store. (required)
277
    * @param logo {@link Logo }  (required)
278
    * @param model {@link String } Query: The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. (required)
279
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
280
    * @return {@link Logo }
281
    * @throws ApiException if fails to make API call
282
    */
283
    public Logo updateTerminalLogoByStoreId(String storeId, String model, Logo logo, RequestOptions requestOptions) throws ApiException, IOException {
284
        //Add path params
285
        Map<String, String> pathParams = new HashMap<>();
×
286
        if (storeId == null) {
×
287
            throw new IllegalArgumentException("Please provide the storeId path parameter");
×
288
        }
289
        pathParams.put("storeId", storeId);
×
290
        //Add query params
291
        Map<String, String> queryParams = new HashMap<>();
×
292
        if (model != null) {
×
293
        queryParams.put("model", model);
×
294
        }
295

296
        String requestBody = logo.toJson();
×
297
        Resource resource = new Resource(this, this.baseURL + "/stores/{storeId}/terminalLogos", null);
×
298
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams, queryParams);
×
299
        return Logo.fromJson(jsonResult);
×
300
    }
301

302
    /**
303
    * Update terminal settings
304
    *
305
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
306
    * @param reference {@link String } The reference that identifies the store. (required)
307
    * @param terminalSettings {@link TerminalSettings }  (required)
308
    * @return {@link TerminalSettings }
309
    * @throws ApiException if fails to make API call
310
    */
311
    public TerminalSettings updateTerminalSettings(String merchantId, String reference, TerminalSettings terminalSettings) throws ApiException, IOException {
NEW
312
        return updateTerminalSettings(merchantId, reference, terminalSettings, null);
×
313
    }
314

315
    /**
316
    * Update terminal settings
317
    *
318
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
319
    * @param reference {@link String } The reference that identifies the store. (required)
320
    * @param terminalSettings {@link TerminalSettings }  (required)
321
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
322
    * @return {@link TerminalSettings }
323
    * @throws ApiException if fails to make API call
324
    */
325
    public TerminalSettings updateTerminalSettings(String merchantId, String reference, TerminalSettings terminalSettings, RequestOptions requestOptions) throws ApiException, IOException {
326
        //Add path params
NEW
327
        Map<String, String> pathParams = new HashMap<>();
×
NEW
328
        if (merchantId == null) {
×
NEW
329
            throw new IllegalArgumentException("Please provide the merchantId path parameter");
×
330
        }
NEW
331
        pathParams.put("merchantId", merchantId);
×
NEW
332
        if (reference == null) {
×
NEW
333
            throw new IllegalArgumentException("Please provide the reference path parameter");
×
334
        }
NEW
335
        pathParams.put("reference", reference);
×
336

NEW
337
        String requestBody = terminalSettings.toJson();
×
NEW
338
        Resource resource = new Resource(this, this.baseURL + "/merchants/{merchantId}/stores/{reference}/terminalSettings", null);
×
NEW
339
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams);
×
NEW
340
        return TerminalSettings.fromJson(jsonResult);
×
341
    }
342

343
    /**
344
    * Update terminal settings
345
    *
346
    * @param storeId {@link String } The unique identifier of the store. (required)
347
    * @param terminalSettings {@link TerminalSettings }  (required)
348
    * @return {@link TerminalSettings }
349
    * @throws ApiException if fails to make API call
350
    */
351
    public TerminalSettings updateTerminalSettingsByStoreId(String storeId, TerminalSettings terminalSettings) throws ApiException, IOException {
352
        return updateTerminalSettingsByStoreId(storeId, terminalSettings, null);
×
353
    }
354

355
    /**
356
    * Update terminal settings
357
    *
358
    * @param storeId {@link String } The unique identifier of the store. (required)
359
    * @param terminalSettings {@link TerminalSettings }  (required)
360
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
361
    * @return {@link TerminalSettings }
362
    * @throws ApiException if fails to make API call
363
    */
364
    public TerminalSettings updateTerminalSettingsByStoreId(String storeId, TerminalSettings terminalSettings, RequestOptions requestOptions) throws ApiException, IOException {
365
        //Add path params
366
        Map<String, String> pathParams = new HashMap<>();
×
367
        if (storeId == null) {
×
368
            throw new IllegalArgumentException("Please provide the storeId path parameter");
×
369
        }
370
        pathParams.put("storeId", storeId);
×
371

372
        String requestBody = terminalSettings.toJson();
×
373
        Resource resource = new Resource(this, this.baseURL + "/stores/{storeId}/terminalSettings", null);
×
374
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams);
×
375
        return TerminalSettings.fromJson(jsonResult);
×
376
    }
377
}
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