• 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/AndroidFilesCompanyLevelApi.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.AndroidApp;
18
import com.adyen.model.management.AndroidAppsResponse;
19
import com.adyen.model.management.AndroidCertificatesResponse;
20
import com.adyen.model.management.RestServiceError;
21
import com.adyen.model.RequestOptions;
22
import com.adyen.service.exception.ApiException;
23
import com.adyen.service.resource.Resource;
24

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

29
public class AndroidFilesCompanyLevelApi extends Service {
30

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

33
    protected String baseURL;
34

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

44
    /**
45
    *  constructor in {@link com.adyen.service.management package}.
46
    * 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.
47
    * @param client {@link Client } (required)
48
    * @param baseURL {@link String } (required)
49
    */
50
    public AndroidFilesCompanyLevelApi(Client client, String baseURL) {
51
        super(client);
×
52
        this.baseURL = baseURL;
×
53
    }
×
54

55
    /**
56
    * Get Android app
57
    *
58
    * @param companyId {@link String } The unique identifier of the company account. (required)
59
    * @param id {@link String } The unique identifier of the app. (required)
60
    * @return {@link AndroidApp }
61
    * @throws ApiException if fails to make API call
62
    */
63
    public AndroidApp getAndroidApp(String companyId, String id) throws ApiException, IOException {
NEW
64
        return getAndroidApp(companyId, id, null);
×
65
    }
66

67
    /**
68
    * Get Android app
69
    *
70
    * @param companyId {@link String } The unique identifier of the company account. (required)
71
    * @param id {@link String } The unique identifier of the app. (required)
72
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
73
    * @return {@link AndroidApp }
74
    * @throws ApiException if fails to make API call
75
    */
76
    public AndroidApp getAndroidApp(String companyId, String id, RequestOptions requestOptions) throws ApiException, IOException {
77
        //Add path params
NEW
78
        Map<String, String> pathParams = new HashMap<>();
×
NEW
79
        if (companyId == null) {
×
NEW
80
            throw new IllegalArgumentException("Please provide the companyId path parameter");
×
81
        }
NEW
82
        pathParams.put("companyId", companyId);
×
NEW
83
        if (id == null) {
×
NEW
84
            throw new IllegalArgumentException("Please provide the id path parameter");
×
85
        }
NEW
86
        pathParams.put("id", id);
×
87

NEW
88
        String requestBody = null;
×
NEW
89
        Resource resource = new Resource(this, this.baseURL + "/companies/{companyId}/androidApps/{id}", null);
×
NEW
90
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams);
×
NEW
91
        return AndroidApp.fromJson(jsonResult);
×
92
    }
93

94
    /**
95
    * Get a list of Android apps
96
    *
97
    * @param companyId {@link String } The unique identifier of the company account. (required)
98
    * @return {@link AndroidAppsResponse }
99
    * @throws ApiException if fails to make API call
100
    */
101
    public AndroidAppsResponse listAndroidApps(String companyId) throws ApiException, IOException {
102
        return listAndroidApps(companyId, null,  null,  null,  null,  null);
×
103
    }
104

105
    /**
106
    * Get a list of Android apps
107
    *
108
    * @param companyId {@link String } The unique identifier of the company account. (required)
109
    * @param pageNumber {@link Integer } Query: The number of the page to fetch. (optional)
110
    * @param pageSize {@link Integer } Query: The number of items to have on a page, maximum 100. The default is 20 items on a page. (optional)
111
    * @param packageName {@link String } Query: The package name that uniquely identifies the Android app. (optional)
112
    * @param versionCode {@link Integer } Query: The version number of the app. (optional)
113
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
114
    * @return {@link AndroidAppsResponse }
115
    * @throws ApiException if fails to make API call
116
    */
117
    public AndroidAppsResponse listAndroidApps(String companyId, Integer pageNumber, Integer pageSize, String packageName, Integer versionCode, RequestOptions requestOptions) throws ApiException, IOException {
118
        //Add path params
119
        Map<String, String> pathParams = new HashMap<>();
×
120
        if (companyId == null) {
×
121
            throw new IllegalArgumentException("Please provide the companyId path parameter");
×
122
        }
123
        pathParams.put("companyId", companyId);
×
124
        //Add query params
125
        Map<String, String> queryParams = new HashMap<>();
×
126
        if (pageNumber != null) {
×
127
        queryParams.put("pageNumber", pageNumber.toString());
×
128
        }
129
        if (pageSize != null) {
×
130
        queryParams.put("pageSize", pageSize.toString());
×
131
        }
132
        if (packageName != null) {
×
133
        queryParams.put("packageName", packageName);
×
134
        }
135
        if (versionCode != null) {
×
136
        queryParams.put("versionCode", versionCode.toString());
×
137
        }
138

139
        String requestBody = null;
×
140
        Resource resource = new Resource(this, this.baseURL + "/companies/{companyId}/androidApps", null);
×
141
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams);
×
142
        return AndroidAppsResponse.fromJson(jsonResult);
×
143
    }
144

145
    /**
146
    * Get a list of Android certificates
147
    *
148
    * @param companyId {@link String } The unique identifier of the company account. (required)
149
    * @return {@link AndroidCertificatesResponse }
150
    * @throws ApiException if fails to make API call
151
    */
152
    public AndroidCertificatesResponse listAndroidCertificates(String companyId) throws ApiException, IOException {
153
        return listAndroidCertificates(companyId, null,  null,  null,  null);
×
154
    }
155

156
    /**
157
    * Get a list of Android certificates
158
    *
159
    * @param companyId {@link String } The unique identifier of the company account. (required)
160
    * @param pageNumber {@link Integer } Query: The number of the page to fetch. (optional)
161
    * @param pageSize {@link Integer } Query: The number of items to have on a page, maximum 100. The default is 20 items on a page. (optional)
162
    * @param certificateName {@link String } Query: The name of the certificate. (optional)
163
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
164
    * @return {@link AndroidCertificatesResponse }
165
    * @throws ApiException if fails to make API call
166
    */
167
    public AndroidCertificatesResponse listAndroidCertificates(String companyId, Integer pageNumber, Integer pageSize, String certificateName, RequestOptions requestOptions) throws ApiException, IOException {
168
        //Add path params
169
        Map<String, String> pathParams = new HashMap<>();
×
170
        if (companyId == null) {
×
171
            throw new IllegalArgumentException("Please provide the companyId path parameter");
×
172
        }
173
        pathParams.put("companyId", companyId);
×
174
        //Add query params
175
        Map<String, String> queryParams = new HashMap<>();
×
176
        if (pageNumber != null) {
×
177
        queryParams.put("pageNumber", pageNumber.toString());
×
178
        }
179
        if (pageSize != null) {
×
180
        queryParams.put("pageSize", pageSize.toString());
×
181
        }
182
        if (certificateName != null) {
×
183
        queryParams.put("certificateName", certificateName);
×
184
        }
185

186
        String requestBody = null;
×
187
        Resource resource = new Resource(this, this.baseURL + "/companies/{companyId}/androidCertificates", null);
×
188
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams);
×
189
        return AndroidCertificatesResponse.fromJson(jsonResult);
×
190
    }
191

192
    /**
193
    * Upload Android App
194
    *
195
    * @param companyId {@link String } The unique identifier of the company account. (required)
196
    * @throws ApiException if fails to make API call
197
    */
198
    public void uploadAndroidApp(String companyId) throws ApiException, IOException {
199
        uploadAndroidApp(companyId, null);
×
200
    }
×
201

202
    /**
203
    * Upload Android App
204
    *
205
    * @param companyId {@link String } The unique identifier of the company account. (required)
206
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
207
    * @throws ApiException if fails to make API call
208
    */
209
    public void uploadAndroidApp(String companyId, RequestOptions requestOptions) throws ApiException, IOException {
210
        //Add path params
211
        Map<String, String> pathParams = new HashMap<>();
×
212
        if (companyId == null) {
×
213
            throw new IllegalArgumentException("Please provide the companyId path parameter");
×
214
        }
215
        pathParams.put("companyId", companyId);
×
216

217
        String requestBody = null;
×
218
        Resource resource = new Resource(this, this.baseURL + "/companies/{companyId}/androidApps", null);
×
219
        resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams);
×
220
    }
×
221
}
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