Skip to content

Commit ba706cf

Browse files
Merge pull request #1119 from Adyen/automation/release
Release v21.3.0
2 parents c4e7e00 + 78ffff0 commit ba706cf

39 files changed

+7221
-95
lines changed

Diff for: Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ openapi-generator-cli:=java -jar $(openapi-generator-jar)
55

66
generator:=java
77
library:=jersey3
8-
modelGen:=balancecontrol balanceplatform binlookup checkout dataprotection legalentitymanagement management payment payout posterminalmanagement recurring transfers storedvalue configurationwebhooks reportwebhooks transferwebhooks
8+
modelGen:=acswebhooks balancecontrol balanceplatform binlookup checkout dataprotection legalentitymanagement management payment payout posterminalmanagement recurring transfers storedvalue configurationwebhooks reportwebhooks transferwebhooks managementwebhooks
99
models:=src/main/java/com/adyen/model
1010
output:=target/out
1111

@@ -39,9 +39,12 @@ marketpay/configuration: spec=NotificationConfigurationService-v6
3939
marketpay/webhooks: spec=MarketPayNotificationService-v6
4040
hop: spec=HopService-v6
4141
# Balance Webhooks
42+
acswebhooks: spec=BalancePlatformAcsNotification-v1
4243
configurationwebhooks: spec=BalancePlatformConfigurationNotification-v1
4344
reportwebhooks: spec=BalancePlatformReportNotification-v1
4445
transferwebhooks: spec=BalancePlatformTransferNotification-v3
46+
# Management Webhooks
47+
managementwebhooks: spec=ManagementNotificationService-v1
4548

4649
$(modelGen): target/spec $(openapi-generator-jar)
4750
rm -rf $(models)/$@ $(output)

Diff for: README.md

+36-25
Large diffs are not rendered by default.

Diff for: pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.adyen</groupId>
55
<artifactId>adyen-java-api-library</artifactId>
66
<packaging>jar</packaging>
7-
<version>21.2.0</version>
7+
<version>21.3.0</version>
88
<name>Adyen Java API Library</name>
99
<description>Adyen API Client Library for Java</description>
1010
<url>https://github.com/adyen/adyen-java-api-library</url>
@@ -218,7 +218,7 @@
218218
<dependency>
219219
<groupId>org.mockito</groupId>
220220
<artifactId>mockito-core</artifactId>
221-
<version>5.4.0</version>
221+
<version>5.5.0</version>
222222
<scope>test</scope>
223223
</dependency>
224224
<dependency>

Diff for: src/main/java/com/adyen/Client.java

+1-11
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@
3030
public class Client {
3131
private ClientInterface httpClient;
3232
private Config config;
33-
public static final String ENDPOINT_CERT_LIVE = "https://palcert-live.adyen.com";
3433
public static final String LIB_NAME = "adyen-java-api-library";
35-
public static final String LIB_VERSION = "21.2.0";
36-
public static final String CHECKOUT_ENDPOINT_CERT_LIVE = "https://checkoutcert-live-%s.adyen.com/checkout";
34+
public static final String LIB_VERSION = "21.3.0";
3735
public static final String TERMINAL_API_ENDPOINT_TEST = "https://terminal-api-test.adyen.com";
3836
public static final String TERMINAL_API_ENDPOINT_LIVE = "https://terminal-api-live.adyen.com";
3937

@@ -65,14 +63,6 @@ public Client(KeyStore trustStore, KeyStore clientKeyStore, String clientKeyStor
6563
this.config.setClientKeyStorePassword(clientKeyStorePassword);
6664
this.config.setClientKeyStore(clientKeyStore);
6765
this.config.setTrustKeyStore(trustStore);
68-
this.config.setEndpoint(ENDPOINT_CERT_LIVE);
69-
70-
if (region != null) {
71-
this.config.setCheckoutEndpoint(String.format(CHECKOUT_ENDPOINT_CERT_LIVE, region.name().toLowerCase()));
72-
} else {
73-
// default to EU if not provided
74-
this.config.setCheckoutEndpoint(String.format(CHECKOUT_ENDPOINT_CERT_LIVE, Region.EU.name().toLowerCase()));
75-
}
7666
}
7767

7868
public Client(String username, String password, Environment environment, String liveEndpointUrlPrefix, String applicationName) {

Diff for: src/main/java/com/adyen/Config.java

-33
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535
public class Config {
3636
protected String username;
3737
protected String password;
38-
protected String merchantAccount;
3938
protected Environment environment;
40-
protected String endpoint;
4139

4240
/**
4341
* Application name: used as HTTP client User-Agent
@@ -47,9 +45,6 @@ public class Config {
4745
protected int connectionTimeoutMillis;
4846
protected int readTimeoutMillis;
4947

50-
//Checkout Specific
51-
protected String checkoutEndpoint;
52-
5348
//Terminal API Specific
5449
protected String terminalApiCloudEndpoint;
5550
protected String terminalApiLocalEndpoint;
@@ -81,14 +76,6 @@ public void setPassword(String password) {
8176
this.password = password;
8277
}
8378

84-
public String getMerchantAccount() {
85-
return merchantAccount;
86-
}
87-
88-
public void setMerchantAccount(String merchantAccount) {
89-
this.merchantAccount = merchantAccount;
90-
}
91-
9279
public Environment getEnvironment() {
9380
return environment;
9481
}
@@ -97,14 +84,6 @@ public void setEnvironment(Environment environment) {
9784
this.environment = environment;
9885
}
9986

100-
public String getEndpoint() {
101-
return endpoint;
102-
}
103-
104-
public void setEndpoint(String endpoint) {
105-
this.endpoint = endpoint;
106-
}
107-
10887
public String getApplicationName() {
10988
return applicationName;
11089
}
@@ -121,18 +100,6 @@ public void setApiKey(String apiKey) {
121100
this.apiKey = apiKey;
122101
}
123102

124-
public String getCheckoutEndpoint() {
125-
if (checkoutEndpoint == null || checkoutEndpoint.isEmpty()) {
126-
String message = "Please provide your unique live url prefix on the setEnvironment() call on the Client or provide checkoutEndpoint in your config object.";
127-
throw new IllegalArgumentException(message);
128-
}
129-
return checkoutEndpoint;
130-
}
131-
132-
public void setCheckoutEndpoint(String checkoutEndpoint) {
133-
this.checkoutEndpoint = checkoutEndpoint;
134-
}
135-
136103
public String getTerminalApiCloudEndpoint() {
137104
return terminalApiCloudEndpoint;
138105
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
/*
2+
* Authentication webhooks
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+
13+
package com.adyen.model.acswebhooks;
14+
15+
import java.util.Objects;
16+
import java.lang.reflect.Type;
17+
import java.util.Map;
18+
import jakarta.ws.rs.core.GenericType;
19+
20+
import com.fasterxml.jackson.annotation.JsonValue;
21+
22+
/**
23+
* Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
24+
*/
25+
26+
public abstract class AbstractOpenApiSchema {
27+
28+
// store the actual instance of the schema/object
29+
private Object instance;
30+
31+
// is nullable
32+
private Boolean isNullable;
33+
34+
// schema type (e.g. oneOf, anyOf)
35+
private final String schemaType;
36+
37+
public AbstractOpenApiSchema(String schemaType, Boolean isNullable) {
38+
this.schemaType = schemaType;
39+
this.isNullable = isNullable;
40+
}
41+
42+
/**
43+
* Get the list of oneOf/anyOf composed schemas allowed to be stored in this object
44+
*
45+
* @return an instance of the actual schema/object
46+
*/
47+
public abstract Map<String, GenericType> getSchemas();
48+
49+
/**
50+
* Get the actual instance
51+
*
52+
* @return an instance of the actual schema/object
53+
*/
54+
@JsonValue
55+
public Object getActualInstance() {return instance;}
56+
57+
/**
58+
* Set the actual instance
59+
*
60+
* @param instance the actual instance of the schema/object
61+
*/
62+
public void setActualInstance(Object instance) {this.instance = instance;}
63+
64+
/**
65+
* Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well
66+
*
67+
* @return an instance of the actual schema/object
68+
*/
69+
public Object getActualInstanceRecursively() {
70+
return getActualInstanceRecursively(this);
71+
}
72+
73+
private Object getActualInstanceRecursively(AbstractOpenApiSchema object) {
74+
if (object.getActualInstance() == null) {
75+
return null;
76+
} else if (object.getActualInstance() instanceof AbstractOpenApiSchema) {
77+
return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance());
78+
} else {
79+
return object.getActualInstance();
80+
}
81+
}
82+
83+
/**
84+
* Get the schema type (e.g. anyOf, oneOf)
85+
*
86+
* @return the schema type
87+
*/
88+
public String getSchemaType() {
89+
return schemaType;
90+
}
91+
92+
@Override
93+
public String toString() {
94+
StringBuilder sb = new StringBuilder();
95+
sb.append("class ").append(getClass()).append(" {\n");
96+
sb.append(" instance: ").append(toIndentedString(instance)).append("\n");
97+
sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n");
98+
sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n");
99+
sb.append("}");
100+
return sb.toString();
101+
}
102+
103+
/**
104+
* Convert the given object to string with each line indented by 4 spaces
105+
* (except the first line).
106+
*/
107+
private String toIndentedString(Object o) {
108+
if (o == null) {
109+
return "null";
110+
}
111+
return o.toString().replace("\n", "\n ");
112+
}
113+
114+
public boolean equals(Object o) {
115+
if (this == o) {
116+
return true;
117+
}
118+
if (o == null || getClass() != o.getClass()) {
119+
return false;
120+
}
121+
AbstractOpenApiSchema a = (AbstractOpenApiSchema) o;
122+
return Objects.equals(this.instance, a.instance) &&
123+
Objects.equals(this.isNullable, a.isNullable) &&
124+
Objects.equals(this.schemaType, a.schemaType);
125+
}
126+
127+
@Override
128+
public int hashCode() {
129+
return Objects.hash(instance, isNullable, schemaType);
130+
}
131+
132+
/**
133+
* Is nullable
134+
*
135+
* @return true if it's nullable
136+
*/
137+
public Boolean isNullable() {
138+
if (Boolean.TRUE.equals(isNullable)) {
139+
return Boolean.TRUE;
140+
} else {
141+
return Boolean.FALSE;
142+
}
143+
}
144+
145+
146+
147+
}

0 commit comments

Comments
 (0)