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

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

23 Oct 2023 01:52PM UTC coverage: 12.821%. First build
#2748

push

web-flow
Merge c6d37d76d into c99ba89a9

2931 of 2931 new or added lines in 118 files covered. (100.0%)

12345 of 96286 relevant lines covered (12.82%)

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/TerminalSettingsMerchantLevelApi.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 TerminalSettingsMerchantLevelApi extends Service {
29

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

32
    protected String baseURL;
33

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

43
    /**
44
    * Terminal settings - merchant level 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 TerminalSettingsMerchantLevelApi(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 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)
59
    * @return {@link Logo }
60
    * @throws ApiException if fails to make API call
61
    */
62
    public Logo getTerminalLogo(String merchantId, String model) throws ApiException, IOException {
63
        return getTerminalLogo(merchantId, model,  null);
×
64
    }
65

66
    /**
67
    * Get the terminal logo
68
    *
69
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
70
    * @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)
71
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
72
    * @return {@link Logo }
73
    * @throws ApiException if fails to make API call
74
    */
75
    public Logo getTerminalLogo(String merchantId, String model, RequestOptions requestOptions) throws ApiException, IOException {
76
        //Add path params
77
        Map<String, String> pathParams = new HashMap<>();
×
78
        if (merchantId == null) {
×
79
            throw new IllegalArgumentException("Please provide the merchantId path parameter");
×
80
        }
81
        pathParams.put("merchantId", merchantId);
×
82
        //Add query params
83
        Map<String, String> queryParams = new HashMap<>();
×
84
        if (model != null) {
×
85
        queryParams.put("model", model);
×
86
        }
87

88
        String requestBody = null;
×
89
        Resource resource = new Resource(this, this.baseURL + "/merchants/{merchantId}/terminalLogos", null);
×
90
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams);
×
91
        return Logo.fromJson(jsonResult);
×
92
    }
93

94
    /**
95
    * Get terminal settings
96
    *
97
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
98
    * @return {@link TerminalSettings }
99
    * @throws ApiException if fails to make API call
100
    */
101
    public TerminalSettings getTerminalSettings(String merchantId) throws ApiException, IOException {
102
        return getTerminalSettings(merchantId, null);
×
103
    }
104

105
    /**
106
    * Get terminal settings
107
    *
108
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
109
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
110
    * @return {@link TerminalSettings }
111
    * @throws ApiException if fails to make API call
112
    */
113
    public TerminalSettings getTerminalSettings(String merchantId, RequestOptions requestOptions) throws ApiException, IOException {
114
        //Add path params
115
        Map<String, String> pathParams = new HashMap<>();
×
116
        if (merchantId == null) {
×
117
            throw new IllegalArgumentException("Please provide the merchantId path parameter");
×
118
        }
119
        pathParams.put("merchantId", merchantId);
×
120

121
        String requestBody = null;
×
122
        Resource resource = new Resource(this, this.baseURL + "/merchants/{merchantId}/terminalSettings", null);
×
123
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams);
×
124
        return TerminalSettings.fromJson(jsonResult);
×
125
    }
126

127
    /**
128
    * Update the terminal logo
129
    *
130
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
131
    * @param model {@link String } The terminal model. Allowed 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)
132
    * @param logo {@link Logo }  (required)
133
    * @return {@link Logo }
134
    * @throws ApiException if fails to make API call
135
    */
136
    public Logo updateTerminalLogo(String merchantId, String model, Logo logo) throws ApiException, IOException {
137
        return updateTerminalLogo(merchantId, model,  logo, null);
×
138
    }
139

140
    /**
141
    * Update the terminal logo
142
    *
143
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
144
    * @param logo {@link Logo }  (required)
145
    * @param model {@link String } Query: The terminal model. Allowed 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)
146
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
147
    * @return {@link Logo }
148
    * @throws ApiException if fails to make API call
149
    */
150
    public Logo updateTerminalLogo(String merchantId, String model, Logo logo, RequestOptions requestOptions) throws ApiException, IOException {
151
        //Add path params
152
        Map<String, String> pathParams = new HashMap<>();
×
153
        if (merchantId == null) {
×
154
            throw new IllegalArgumentException("Please provide the merchantId path parameter");
×
155
        }
156
        pathParams.put("merchantId", merchantId);
×
157
        //Add query params
158
        Map<String, String> queryParams = new HashMap<>();
×
159
        if (model != null) {
×
160
        queryParams.put("model", model);
×
161
        }
162

163
        String requestBody = logo.toJson();
×
164
        Resource resource = new Resource(this, this.baseURL + "/merchants/{merchantId}/terminalLogos", null);
×
165
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams, queryParams);
×
166
        return Logo.fromJson(jsonResult);
×
167
    }
168

169
    /**
170
    * Update terminal settings
171
    *
172
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
173
    * @param terminalSettings {@link TerminalSettings }  (required)
174
    * @return {@link TerminalSettings }
175
    * @throws ApiException if fails to make API call
176
    */
177
    public TerminalSettings updateTerminalSettings(String merchantId, TerminalSettings terminalSettings) throws ApiException, IOException {
178
        return updateTerminalSettings(merchantId, terminalSettings, null);
×
179
    }
180

181
    /**
182
    * Update terminal settings
183
    *
184
    * @param merchantId {@link String } The unique identifier of the merchant account. (required)
185
    * @param terminalSettings {@link TerminalSettings }  (required)
186
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
187
    * @return {@link TerminalSettings }
188
    * @throws ApiException if fails to make API call
189
    */
190
    public TerminalSettings updateTerminalSettings(String merchantId, TerminalSettings terminalSettings, RequestOptions requestOptions) throws ApiException, IOException {
191
        //Add path params
192
        Map<String, String> pathParams = new HashMap<>();
×
193
        if (merchantId == null) {
×
194
            throw new IllegalArgumentException("Please provide the merchantId path parameter");
×
195
        }
196
        pathParams.put("merchantId", merchantId);
×
197

198
        String requestBody = terminalSettings.toJson();
×
199
        Resource resource = new Resource(this, this.baseURL + "/merchants/{merchantId}/terminalSettings", null);
×
200
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams);
×
201
        return TerminalSettings.fromJson(jsonResult);
×
202
    }
203
}
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