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

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

11 Dec 2023 05:06PM UTC 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/legalentitymanagement/PciQuestionnairesApi.java
1
/*
2
 * Legal Entity 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.legalentitymanagement;
13

14
import com.adyen.Client;
15
import com.adyen.Service;
16
import com.adyen.constants.ApiConstants;
17
import com.adyen.model.legalentitymanagement.GeneratePciDescriptionRequest;
18
import com.adyen.model.legalentitymanagement.GeneratePciDescriptionResponse;
19
import com.adyen.model.legalentitymanagement.GetPciQuestionnaireInfosResponse;
20
import com.adyen.model.legalentitymanagement.GetPciQuestionnaireResponse;
21
import com.adyen.model.legalentitymanagement.PciSigningRequest;
22
import com.adyen.model.legalentitymanagement.PciSigningResponse;
23
import com.adyen.model.legalentitymanagement.ServiceError;
24
import com.adyen.model.RequestOptions;
25
import com.adyen.service.exception.ApiException;
26
import com.adyen.service.resource.Resource;
27

28
import java.io.IOException;
29
import java.util.HashMap;
30
import java.util.Map;
31

32
public class PciQuestionnairesApi extends Service {
33

34
    public static final String API_VERSION = "3";
35

36
    protected String baseURL;
37

38
    /**
39
    * PCI questionnaires constructor in {@link com.adyen.service.legalentitymanagement package}.
40
    * @param client {@link Client } (required)
41
    */
42
    public PciQuestionnairesApi(Client client) {
43
        super(client);
×
44
        this.baseURL = createBaseURL("https://kyc-test.adyen.com/lem/v3");
×
45
    }
×
46

47
    /**
48
    * PCI questionnaires constructor in {@link com.adyen.service.legalentitymanagement package}.
49
    * 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.
50
    * @param client {@link Client } (required)
51
    * @param baseURL {@link String } (required)
52
    */
53
    public PciQuestionnairesApi(Client client, String baseURL) {
54
        super(client);
×
55
        this.baseURL = baseURL;
×
56
    }
×
57

58
    /**
59
    * Generate PCI questionnaire
60
    *
61
    * @param id {@link String } The unique identifier of the legal entity to get PCI questionnaire information. (required)
62
    * @param generatePciDescriptionRequest {@link GeneratePciDescriptionRequest }  (required)
63
    * @return {@link GeneratePciDescriptionResponse }
64
    * @throws ApiException if fails to make API call
65
    */
66
    public GeneratePciDescriptionResponse generatePciQuestionnaire(String id, GeneratePciDescriptionRequest generatePciDescriptionRequest) throws ApiException, IOException {
NEW
67
        return generatePciQuestionnaire(id, generatePciDescriptionRequest, null);
×
68
    }
69

70
    /**
71
    * Generate PCI questionnaire
72
    *
73
    * @param id {@link String } The unique identifier of the legal entity to get PCI questionnaire information. (required)
74
    * @param generatePciDescriptionRequest {@link GeneratePciDescriptionRequest }  (required)
75
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
76
    * @return {@link GeneratePciDescriptionResponse }
77
    * @throws ApiException if fails to make API call
78
    */
79
    public GeneratePciDescriptionResponse generatePciQuestionnaire(String id, GeneratePciDescriptionRequest generatePciDescriptionRequest, RequestOptions requestOptions) throws ApiException, IOException {
80
        //Add path params
81
        Map<String, String> pathParams = new HashMap<>();
×
82
        if (id == null) {
×
83
            throw new IllegalArgumentException("Please provide the id path parameter");
×
84
        }
85
        pathParams.put("id", id);
×
86

NEW
87
        String requestBody = generatePciDescriptionRequest.toJson();
×
NEW
88
        Resource resource = new Resource(this, this.baseURL + "/legalEntities/{id}/pciQuestionnaires/generatePciTemplates", null);
×
NEW
89
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams);
×
NEW
90
        return GeneratePciDescriptionResponse.fromJson(jsonResult);
×
91
    }
92

93
    /**
94
    * Get PCI questionnaire
95
    *
96
    * @param id {@link String } The legal entity ID of the individual who signed the PCI questionnaire. (required)
97
    * @param pciid {@link String } The unique identifier of the signed PCI questionnaire. (required)
98
    * @return {@link GetPciQuestionnaireResponse }
99
    * @throws ApiException if fails to make API call
100
    */
101
    public GetPciQuestionnaireResponse getPciQuestionnaire(String id, String pciid) throws ApiException, IOException {
102
        return getPciQuestionnaire(id, pciid, null);
×
103
    }
104

105
    /**
106
    * Get PCI questionnaire
107
    *
108
    * @param id {@link String } The legal entity ID of the individual who signed the PCI questionnaire. (required)
109
    * @param pciid {@link String } The unique identifier of the signed PCI questionnaire. (required)
110
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
111
    * @return {@link GetPciQuestionnaireResponse }
112
    * @throws ApiException if fails to make API call
113
    */
114
    public GetPciQuestionnaireResponse getPciQuestionnaire(String id, String pciid, RequestOptions requestOptions) throws ApiException, IOException {
115
        //Add path params
116
        Map<String, String> pathParams = new HashMap<>();
×
117
        if (id == null) {
×
118
            throw new IllegalArgumentException("Please provide the id path parameter");
×
119
        }
120
        pathParams.put("id", id);
×
121
        if (pciid == null) {
×
122
            throw new IllegalArgumentException("Please provide the pciid path parameter");
×
123
        }
124
        pathParams.put("pciid", pciid);
×
125

126
        String requestBody = null;
×
127
        Resource resource = new Resource(this, this.baseURL + "/legalEntities/{id}/pciQuestionnaires/{pciid}", null);
×
128
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams);
×
129
        return GetPciQuestionnaireResponse.fromJson(jsonResult);
×
130
    }
131

132
    /**
133
    * Get PCI questionnaire details
134
    *
135
    * @param id {@link String } The unique identifier of the legal entity to get PCI questionnaire information. (required)
136
    * @return {@link GetPciQuestionnaireInfosResponse }
137
    * @throws ApiException if fails to make API call
138
    */
139
    public GetPciQuestionnaireInfosResponse getPciQuestionnaireDetails(String id) throws ApiException, IOException {
NEW
140
        return getPciQuestionnaireDetails(id, null);
×
141
    }
142

143
    /**
144
    * Get PCI questionnaire details
145
    *
146
    * @param id {@link String } The unique identifier of the legal entity to get PCI questionnaire information. (required)
147
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
148
    * @return {@link GetPciQuestionnaireInfosResponse }
149
    * @throws ApiException if fails to make API call
150
    */
151
    public GetPciQuestionnaireInfosResponse getPciQuestionnaireDetails(String id, RequestOptions requestOptions) throws ApiException, IOException {
152
        //Add path params
153
        Map<String, String> pathParams = new HashMap<>();
×
154
        if (id == null) {
×
155
            throw new IllegalArgumentException("Please provide the id path parameter");
×
156
        }
157
        pathParams.put("id", id);
×
158

NEW
159
        String requestBody = null;
×
NEW
160
        Resource resource = new Resource(this, this.baseURL + "/legalEntities/{id}/pciQuestionnaires", null);
×
NEW
161
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams);
×
NEW
162
        return GetPciQuestionnaireInfosResponse.fromJson(jsonResult);
×
163
    }
164

165
    /**
166
    * Sign PCI questionnaire
167
    *
168
    * @param id {@link String } The legal entity ID of the individual who signed the PCI questionnaire. (required)
169
    * @param pciSigningRequest {@link PciSigningRequest }  (required)
170
    * @return {@link PciSigningResponse }
171
    * @throws ApiException if fails to make API call
172
    */
173
    public PciSigningResponse signPciQuestionnaire(String id, PciSigningRequest pciSigningRequest) throws ApiException, IOException {
174
        return signPciQuestionnaire(id, pciSigningRequest, null);
×
175
    }
176

177
    /**
178
    * Sign PCI questionnaire
179
    *
180
    * @param id {@link String } The legal entity ID of the individual who signed the PCI questionnaire. (required)
181
    * @param pciSigningRequest {@link PciSigningRequest }  (required)
182
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
183
    * @return {@link PciSigningResponse }
184
    * @throws ApiException if fails to make API call
185
    */
186
    public PciSigningResponse signPciQuestionnaire(String id, PciSigningRequest pciSigningRequest, RequestOptions requestOptions) throws ApiException, IOException {
187
        //Add path params
188
        Map<String, String> pathParams = new HashMap<>();
×
189
        if (id == null) {
×
190
            throw new IllegalArgumentException("Please provide the id path parameter");
×
191
        }
192
        pathParams.put("id", id);
×
193

194
        String requestBody = pciSigningRequest.toJson();
×
195
        Resource resource = new Resource(this, this.baseURL + "/legalEntities/{id}/pciQuestionnaires/signPciTemplates", null);
×
196
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams);
×
197
        return PciSigningResponse.fromJson(jsonResult);
×
198
    }
199
}
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