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

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

18 Sep 2023 12:11PM UTC coverage: 13.219%. First build
#2658

push

web-flow
Merge 477a9da03 into ba706cfa8

1770 of 1770 new or added lines in 34 files covered. (100.0%)

10287 of 77817 relevant lines covered (13.22%)

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: 1
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 = "1";
32

33
    protected String baseURL;
34

35
    /**
36
    * Android files - company level 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/v1");
×
42
    }
×
43

44
    /**
45
    * Android files - company level 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 a list of Android apps
57
    *
58
    * @param companyId {@link String } The unique identifier of the company account. (required)
59
    * @return {@link AndroidAppsResponse }
60
    * @throws ApiException if fails to make API call
61
    */
62
    public AndroidAppsResponse listAndroidApps(String companyId) throws ApiException, IOException {
63
        return listAndroidApps(companyId, null,  null,  null,  null,  null);
×
64
    }
65

66
    /**
67
    * Get a list of Android apps
68
    *
69
    * @param companyId {@link String } The unique identifier of the company account. (required)
70
    * @param pageNumber {@link Integer } Query: The number of the page to fetch. (optional)
71
    * @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)
72
    * @param packageName {@link String } Query: The package name that uniquely identifies the Android app. (optional)
73
    * @param versionCode {@link Integer } Query: The version number of the app. (optional)
74
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
75
    * @return {@link AndroidAppsResponse }
76
    * @throws ApiException if fails to make API call
77
    */
78
    public AndroidAppsResponse listAndroidApps(String companyId, Integer pageNumber, Integer pageSize, String packageName, Integer versionCode, RequestOptions requestOptions) throws ApiException, IOException {
79
        //Add path params
80
        Map<String, String> pathParams = new HashMap<>();
×
81
        if (companyId == null) {
×
82
            throw new IllegalArgumentException("Please provide the companyId path parameter");
×
83
        }
84
        pathParams.put("companyId", companyId);
×
85
        //Add query params
86
        Map<String, String> queryParams = new HashMap<>();
×
87
        if (pageNumber != null) {
×
88
        queryParams.put("pageNumber", pageNumber.toString());
×
89
        }
90
        if (pageSize != null) {
×
91
        queryParams.put("pageSize", pageSize.toString());
×
92
        }
93
        if (packageName != null) {
×
94
        queryParams.put("packageName", packageName);
×
95
        }
96
        if (versionCode != null) {
×
97
        queryParams.put("versionCode", versionCode.toString());
×
98
        }
99

100
        String requestBody = null;
×
101
        Resource resource = new Resource(this, this.baseURL + "/companies/{companyId}/androidApps", null);
×
102
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams);
×
103
        return AndroidAppsResponse.fromJson(jsonResult);
×
104
    }
105

106
    /**
107
    * Get Android app
108
    *
109
    * @param companyId {@link String } The unique identifier of the company account. (required)
110
    * @param id {@link String } The unique identifier of the app. (required)
111
    * @return {@link AndroidApp }
112
    * @throws ApiException if fails to make API call
113
    */
114
    public AndroidApp getAndroidApp(String companyId, String id) throws ApiException, IOException {
115
        return getAndroidApp(companyId, id, null);
×
116
    }
117

118
    /**
119
    * Get Android app
120
    *
121
    * @param companyId {@link String } The unique identifier of the company account. (required)
122
    * @param id {@link String } The unique identifier of the app. (required)
123
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
124
    * @return {@link AndroidApp }
125
    * @throws ApiException if fails to make API call
126
    */
127
    public AndroidApp getAndroidApp(String companyId, String id, RequestOptions requestOptions) throws ApiException, IOException {
128
        //Add path params
129
        Map<String, String> pathParams = new HashMap<>();
×
130
        if (companyId == null) {
×
131
            throw new IllegalArgumentException("Please provide the companyId path parameter");
×
132
        }
133
        pathParams.put("companyId", companyId);
×
134
        if (id == null) {
×
135
            throw new IllegalArgumentException("Please provide the id path parameter");
×
136
        }
137
        pathParams.put("id", id);
×
138

139
        String requestBody = null;
×
140
        Resource resource = new Resource(this, this.baseURL + "/companies/{companyId}/androidApps/{id}", null);
×
141
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams);
×
142
        return AndroidApp.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
}
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

© 2026 Coveralls, Inc