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

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

22 Sep 2023 11:24AM UTC coverage: 12.611%. First build
#2661

push

web-flow
Merge 251f6ff51 into 9e36e9c01

9262 of 9262 new or added lines in 142 files covered. (100.0%)

11033 of 87486 relevant lines covered (12.61%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformHopApi.java
1
/*
2
 * Hosted onboarding API
3
 * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead.  The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding.  ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example:   ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ```  Alternatively, you can use the username and password to connect to the API using basic authentication. For example:  ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).  ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.  For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ```
4
 *
5
 * The version of the OpenAPI document: 6
6
 * 
7
 *
8
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
 * https://openapi-generator.tech
10
 * Do not edit the class manually.
11
 */
12

13
package com.adyen.service.classicplatforms;
14

15
import com.adyen.Client;
16
import com.adyen.Service;
17
import com.adyen.constants.ApiConstants;
18
import com.adyen.model.marketpayhop.GetOnboardingUrlRequest;
19
import com.adyen.model.marketpayhop.GetOnboardingUrlResponse;
20
import com.adyen.model.marketpayhop.GetPciUrlRequest;
21
import com.adyen.model.marketpayhop.GetPciUrlResponse;
22
import com.adyen.model.marketpayhop.ServiceError;
23
import com.adyen.model.RequestOptions;
24
import com.adyen.service.exception.ApiException;
25
import com.adyen.service.resource.Resource;
26

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

31
public class ClassicPlatformHopApi extends Service {
32

33
    public static final String API_VERSION = "6";
34

35
    protected String baseURL;
36

37
    /**
38
    * Hosted Onboarding Page constructor in {@link com.adyen.service package}.
39
    * @param client {@link Client }  (required)
40
    */
41
    public ClassicPlatformHopApi(Client client) {
42
        super(client);
1✔
43
        this.baseURL = createBaseURL("https://cal-test.adyen.com/cal/services/Hop/v6");
1✔
44
    }
1✔
45

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

57
    /**
58
    * Get a link to a Adyen-hosted onboarding page
59
    *
60
    * @param getOnboardingUrlRequest {@link GetOnboardingUrlRequest }  (required)
61
    * @return {@link GetOnboardingUrlResponse }
62
    * @throws ApiException if fails to make API call
63
    */
64
    public GetOnboardingUrlResponse getOnboardingUrl(GetOnboardingUrlRequest getOnboardingUrlRequest) throws ApiException, IOException {
65
        return getOnboardingUrl(getOnboardingUrlRequest, null);
1✔
66
    }
67

68
    /**
69
    * Get a link to a Adyen-hosted onboarding page
70
    *
71
    * @param getOnboardingUrlRequest {@link GetOnboardingUrlRequest }  (required)
72
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
73
    * @return {@link GetOnboardingUrlResponse }
74
    * @throws ApiException if fails to make API call
75
    */
76
    public GetOnboardingUrlResponse getOnboardingUrl(GetOnboardingUrlRequest getOnboardingUrlRequest, RequestOptions requestOptions) throws ApiException, IOException {
77

78
        String requestBody = getOnboardingUrlRequest.toJson();
1✔
79
        Resource resource = new Resource(this, this.baseURL + "/getOnboardingUrl", null);
1✔
80
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null);
1✔
81
        return GetOnboardingUrlResponse.fromJson(jsonResult);
1✔
82
    }
83

84
    /**
85
    * Get a link to a PCI compliance questionnaire
86
    *
87
    * @param getPciUrlRequest {@link GetPciUrlRequest }  (required)
88
    * @return {@link GetPciUrlResponse }
89
    * @throws ApiException if fails to make API call
90
    */
91
    public GetPciUrlResponse getPciQuestionnaireUrl(GetPciUrlRequest getPciUrlRequest) throws ApiException, IOException {
92
        return getPciQuestionnaireUrl(getPciUrlRequest, null);
×
93
    }
94

95
    /**
96
    * Get a link to a PCI compliance questionnaire
97
    *
98
    * @param getPciUrlRequest {@link GetPciUrlRequest }  (required)
99
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
100
    * @return {@link GetPciUrlResponse }
101
    * @throws ApiException if fails to make API call
102
    */
103
    public GetPciUrlResponse getPciQuestionnaireUrl(GetPciUrlRequest getPciUrlRequest, RequestOptions requestOptions) throws ApiException, IOException {
104

105
        String requestBody = getPciUrlRequest.toJson();
×
106
        Resource resource = new Resource(this, this.baseURL + "/getPciQuestionnaireUrl", null);
×
107
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null);
×
108
        return GetPciUrlResponse.fromJson(jsonResult);
×
109
    }
110
}
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