• 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

79.31
/src/main/java/com/adyen/service/balanceplatform/PlatformApi.java
1
/*
2
 * Configuration API
3
 *
4
 * The version of the OpenAPI document: 2
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.balanceplatform;
13

14
import com.adyen.Client;
15
import com.adyen.Service;
16
import com.adyen.constants.ApiConstants;
17
import com.adyen.model.balanceplatform.BalancePlatform;
18
import com.adyen.model.balanceplatform.PaginatedAccountHoldersResponse;
19
import com.adyen.model.balanceplatform.RestServiceError;
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 PlatformApi extends Service {
29

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

32
    protected String baseURL;
33

34
    /**
35
    * Platform constructor in {@link com.adyen.service.balanceplatform package}.
36
    * @param client {@link Client } (required)
37
    */
38
    public PlatformApi(Client client) {
39
        super(client);
1✔
40
        this.baseURL = createBaseURL("https://balanceplatform-api-test.adyen.com/bcl/v2");
1✔
41
    }
1✔
42

43
    /**
44
    * Platform constructor in {@link com.adyen.service.balanceplatform 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 PlatformApi(Client client, String baseURL) {
50
        super(client);
×
51
        this.baseURL = baseURL;
×
52
    }
×
53

54
    /**
55
    * Get all account holders under a balance platform
56
    *
57
    * @param id {@link String } The unique identifier of the balance platform. (required)
58
    * @return {@link PaginatedAccountHoldersResponse }
59
    * @throws ApiException if fails to make API call
60
    */
61
    public PaginatedAccountHoldersResponse getAllAccountHoldersUnderBalancePlatform(String id) throws ApiException, IOException {
NEW
62
        return getAllAccountHoldersUnderBalancePlatform(id, null,  null,  null);
×
63
    }
64

65
    /**
66
    * Get all account holders under a balance platform
67
    *
68
    * @param id {@link String } The unique identifier of the balance platform. (required)
69
    * @param offset {@link Integer } Query: The number of items that you want to skip. (optional)
70
    * @param limit {@link Integer } Query: The number of items returned per page, maximum 100 items. By default, the response returns 10 items per page. (optional)
71
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
72
    * @return {@link PaginatedAccountHoldersResponse }
73
    * @throws ApiException if fails to make API call
74
    */
75
    public PaginatedAccountHoldersResponse getAllAccountHoldersUnderBalancePlatform(String id, Integer offset, Integer limit, RequestOptions requestOptions) throws ApiException, IOException {
76
        //Add path params
77
        Map<String, String> pathParams = new HashMap<>();
1✔
78
        if (id == null) {
1✔
79
            throw new IllegalArgumentException("Please provide the id path parameter");
×
80
        }
81
        pathParams.put("id", id);
1✔
82
        //Add query params
83
        Map<String, String> queryParams = new HashMap<>();
1✔
84
        if (offset != null) {
1✔
85
        queryParams.put("offset", offset.toString());
1✔
86
        }
87
        if (limit != null) {
1✔
88
        queryParams.put("limit", limit.toString());
1✔
89
        }
90

91
        String requestBody = null;
1✔
92
        Resource resource = new Resource(this, this.baseURL + "/balancePlatforms/{id}/accountHolders", null);
1✔
93
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams);
1✔
94
        return PaginatedAccountHoldersResponse.fromJson(jsonResult);
1✔
95
    }
96

97
    /**
98
    * Get a balance platform
99
    *
100
    * @param id {@link String } The unique identifier of the balance platform. (required)
101
    * @return {@link BalancePlatform }
102
    * @throws ApiException if fails to make API call
103
    */
104
    public BalancePlatform getBalancePlatform(String id) throws ApiException, IOException {
105
        return getBalancePlatform(id, null);
1✔
106
    }
107

108
    /**
109
    * Get a balance platform
110
    *
111
    * @param id {@link String } The unique identifier of the balance platform. (required)
112
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
113
    * @return {@link BalancePlatform }
114
    * @throws ApiException if fails to make API call
115
    */
116
    public BalancePlatform getBalancePlatform(String id, RequestOptions requestOptions) throws ApiException, IOException {
117
        //Add path params
118
        Map<String, String> pathParams = new HashMap<>();
1✔
119
        if (id == null) {
1✔
120
            throw new IllegalArgumentException("Please provide the id path parameter");
×
121
        }
122
        pathParams.put("id", id);
1✔
123

124
        String requestBody = null;
1✔
125
        Resource resource = new Resource(this, this.baseURL + "/balancePlatforms/{id}", null);
1✔
126
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams);
1✔
127
        return BalancePlatform.fromJson(jsonResult);
1✔
128
    }
129
}
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