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

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

26 Mar 2024 10:51AM UTC coverage: 12.292%. First build
#3188

push

web-flow
Merge bb2b851b6 into 78d4e3259

0 of 187 new or added lines in 22 files covered. (0.0%)

12444 of 101236 relevant lines covered (12.29%)

0.12 hits per line

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

38.1
/src/main/java/com/adyen/service/checkout/UtilityApi.java
1
/*
2
 * Adyen Checkout API
3
 *
4
 * The version of the OpenAPI document: 71
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.checkout;
13

14
import com.adyen.Client;
15
import com.adyen.Service;
16
import com.adyen.constants.ApiConstants;
17
import com.adyen.model.checkout.ApplePaySessionRequest;
18
import com.adyen.model.checkout.ApplePaySessionResponse;
19
import com.adyen.model.checkout.PaypalUpdateOrderRequest;
20
import com.adyen.model.checkout.PaypalUpdateOrderResponse;
21
import com.adyen.model.checkout.ServiceError;
22
import com.adyen.model.checkout.UtilityRequest;
23
import com.adyen.model.checkout.UtilityResponse;
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 UtilityApi extends Service {
33

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

36
    protected String baseURL;
37

38
    /**
39
    * Utility constructor in {@link com.adyen.service.checkout package}.
40
    * @param client {@link Client } (required)
41
    */
42
    public UtilityApi(Client client) {
43
        super(client);
1✔
44
        this.baseURL = createBaseURL("https://checkout-test.adyen.com/v71");
1✔
45
    }
1✔
46

47
    /**
48
    * Utility constructor in {@link com.adyen.service.checkout 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 UtilityApi(Client client, String baseURL) {
54
        super(client);
×
55
        this.baseURL = baseURL;
×
56
    }
×
57

58
    /**
59
    * Get an Apple Pay session
60
    *
61
    * @param applePaySessionRequest {@link ApplePaySessionRequest }  (required)
62
    * @return {@link ApplePaySessionResponse }
63
    * @throws ApiException if fails to make API call
64
    */
65
    public ApplePaySessionResponse getApplePaySession(ApplePaySessionRequest applePaySessionRequest) throws ApiException, IOException {
66
        return getApplePaySession(applePaySessionRequest, null);
1✔
67
    }
68

69
    /**
70
    * Get an Apple Pay session
71
    *
72
    * @param applePaySessionRequest {@link ApplePaySessionRequest }  (required)
73
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
74
    * @return {@link ApplePaySessionResponse }
75
    * @throws ApiException if fails to make API call
76
    */
77
    public ApplePaySessionResponse getApplePaySession(ApplePaySessionRequest applePaySessionRequest, RequestOptions requestOptions) throws ApiException, IOException {
78

79
        String requestBody = applePaySessionRequest.toJson();
1✔
80
        Resource resource = new Resource(this, this.baseURL + "/applePay/sessions", null);
1✔
81
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null);
1✔
82
        return ApplePaySessionResponse.fromJson(jsonResult);
1✔
83
    }
84

85
    /**
86
    * Create originKey values for domains
87
    *
88
    * @param utilityRequest {@link UtilityRequest }  (required)
89
    * @return {@link UtilityResponse }
90
    * @throws ApiException if fails to make API call
91
    * @deprecated
92
    */
93
    @Deprecated
94
    public UtilityResponse originKeys(UtilityRequest utilityRequest) throws ApiException, IOException {
95
        return originKeys(utilityRequest, null);
×
96
    }
97

98
    /**
99
    * Create originKey values for domains
100
    *
101
    * @param utilityRequest {@link UtilityRequest }  (required)
102
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
103
    * @return {@link UtilityResponse }
104
    * @throws ApiException if fails to make API call
105
    * @deprecated
106
    */
107
   @Deprecated
108
    public UtilityResponse originKeys(UtilityRequest utilityRequest, RequestOptions requestOptions) throws ApiException, IOException {
109

110
        String requestBody = utilityRequest.toJson();
×
111
        Resource resource = new Resource(this, this.baseURL + "/originKeys", null);
×
112
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null);
×
113
        return UtilityResponse.fromJson(jsonResult);
×
114
    }
115

116
    /**
117
    * Updates the order for PayPal Express Checkout
118
    *
119
    * @param paypalUpdateOrderRequest {@link PaypalUpdateOrderRequest }  (required)
120
    * @return {@link PaypalUpdateOrderResponse }
121
    * @throws ApiException if fails to make API call
122
    */
123
    public PaypalUpdateOrderResponse updatesOrderForPaypalExpressCheckout(PaypalUpdateOrderRequest paypalUpdateOrderRequest) throws ApiException, IOException {
NEW
124
        return updatesOrderForPaypalExpressCheckout(paypalUpdateOrderRequest, null);
×
125
    }
126

127
    /**
128
    * Updates the order for PayPal Express Checkout
129
    *
130
    * @param paypalUpdateOrderRequest {@link PaypalUpdateOrderRequest }  (required)
131
    * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional)
132
    * @return {@link PaypalUpdateOrderResponse }
133
    * @throws ApiException if fails to make API call
134
    */
135
    public PaypalUpdateOrderResponse updatesOrderForPaypalExpressCheckout(PaypalUpdateOrderRequest paypalUpdateOrderRequest, RequestOptions requestOptions) throws ApiException, IOException {
136

NEW
137
        String requestBody = paypalUpdateOrderRequest.toJson();
×
NEW
138
        Resource resource = new Resource(this, this.baseURL + "/paypal/updateOrder", null);
×
NEW
139
        String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null);
×
NEW
140
        return PaypalUpdateOrderResponse.fromJson(jsonResult);
×
141
    }
142
}
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