Skip to content

Commit 12d2e79

Browse files
Release 8.0.0
1 parent 20519a7 commit 12d2e79

File tree

102 files changed

+1119
-1198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1119
-1198
lines changed

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[![Build Status](https://travis-ci.org/pfpayments/java-sdk.svg?branch=master)](https://travis-ci.org/pfpayments/java-sdk)
2-
31
# PostFinance Checkout Java Library
42

53
The PostFinance Checkout Java library wraps around the PostFinance Checkout API. This library facilitates your interaction with various services such as transactions, accounts, and subscriptions.
@@ -23,7 +21,7 @@ Add this dependency to your project's POM:
2321
<dependency>
2422
<groupId>ch.postfinance</groupId>
2523
<artifactId>postfinancecheckout-java-sdk</artifactId>
26-
<version>7.2.0</version>
24+
<version>8.0.0</version>
2725
<scope>compile</scope>
2826
</dependency>
2927
```
@@ -33,7 +31,7 @@ Add this dependency to your project's POM:
3331
Add this dependency to your project's build file:
3432

3533
```groovy
36-
compile "ch.postfinance:postfinancecheckout-java-sdk:7.2.0"
34+
compile "ch.postfinance:postfinancecheckout-java-sdk:8.0.0"
3735
```
3836

3937
### Others
@@ -46,7 +44,7 @@ mvn clean package
4644

4745
Then manually install the following JARs:
4846

49-
* `target/postfinancecheckout-java-sdk-7.2.0.jar`
47+
* `target/postfinancecheckout-java-sdk-8.0.0.jar`
5048
* `target/lib/*.jar`
5149

5250
## Usage

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'idea'
22
apply plugin: 'eclipse'
33

44
group = 'ch.postfinance'
5-
version = '7.2.0'
5+
version = '8.0.0'
66

77
buildscript {
88
repositories {

build.sbt

Lines changed: 0 additions & 24 deletions
This file was deleted.

pom.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>postfinancecheckout-java-sdk</artifactId>
66
<packaging>jar</packaging>
77
<name>postfinancecheckout-java-sdk</name>
8-
<version>7.2.0</version>
8+
<version>8.0.0</version>
99
<url>https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html</url>
1010
<description>The SDK for simplifying the integration with PostFinance Checkout API.</description>
1111
<scm>
@@ -82,12 +82,12 @@
8282
<artifactId>maven-surefire-plugin</artifactId>
8383
<version>2.12</version>
8484
<configuration>
85-
<systemProperties>
85+
<systemPropertyVariables>
8686
<property>
8787
<name>loggerPath</name>
8888
<value>conf/log4j.properties</value>
8989
</property>
90-
</systemProperties>
90+
</systemPropertyVariables>
9191
<argLine>-Xms512m -Xmx1500m</argLine>
9292
<parallel>methods</parallel>
9393
<forkMode>pertest</forkMode>
@@ -172,6 +172,10 @@
172172
<groupId>org.apache.maven.plugins</groupId>
173173
<artifactId>maven-javadoc-plugin</artifactId>
174174
<version>2.10.4</version>
175+
<configuration>
176+
<additionalparam>-Xdoclint:-missing</additionalparam>
177+
<quiet>true</quiet>
178+
</configuration>
175179
<executions>
176180
<execution>
177181
<id>attach-javadocs</id>

src/main/java/ch/postfinance/sdk/DefaultHeaders.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void intercept(HttpRequest request) throws IOException {
3434

3535
private HttpHeaders getDefaultHeaders() {
3636
HttpHeaders headers = new HttpHeaders();
37-
headers.put("x-meta-sdk-version", "7.2.0");
37+
headers.put("x-meta-sdk-version", "8.0.0");
3838
headers.put("x-meta-sdk-language", "java");
3939
headers.put("x-meta-sdk-provider", "PostFinance Checkout");
4040
headers.put("x-meta-sdk-language-version", System.getProperty("java.version"));

src/main/java/ch/postfinance/sdk/PostFinanceCheckoutSdkException.java renamed to src/main/java/ch/postfinance/sdk/exception/PostFinanceCheckoutSdkException.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
*/
1818

1919

20-
package ch.postfinance.sdk;
20+
package ch.postfinance.sdk.exception;
21+
22+
import ch.postfinance.sdk.ErrorCode;
2123

2224
/**
23-
* Exception thrown when the PostFinanceCheckout SDK API call results in an invalid response.
25+
* Exception thrown when the SDK API call results in an invalid response.
2426
*/
2527
public class PostFinanceCheckoutSdkException extends RuntimeException {
2628

@@ -33,10 +35,8 @@ public class PostFinanceCheckoutSdkException extends RuntimeException {
3335
/**
3436
* Constructor.
3537
*
36-
* @param code
37-
* the PostFinanceCheckout SDK error code
38-
* @param message
39-
* the exception message details
38+
* @param code SDK error code
39+
* @param message exception message details
4040
*/
4141
public PostFinanceCheckoutSdkException(ErrorCode code, String message) {
4242
super();
@@ -45,14 +45,14 @@ public PostFinanceCheckoutSdkException(ErrorCode code, String message) {
4545
}
4646

4747
/**
48-
* @return the PostFinanceCheckout SDK error code
48+
* @return SDK error code
4949
*/
5050
public ErrorCode getCode() {
5151
return this.code;
5252
}
5353

5454
/**
55-
* @return the PostFinanceCheckout SDK error message
55+
* @return SDK error message
5656
*/
5757
public String getMessage() {
5858
return this.message;

src/main/java/ch/postfinance/sdk/model/AbstractWebhookListenerUpdate.java

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838

3939
public class AbstractWebhookListenerUpdate {
4040

41+
@JsonProperty("enablePayloadSignatureAndState")
42+
protected Boolean enablePayloadSignatureAndState = null;
43+
44+
4145
@JsonProperty("entityStates")
4246
protected List<String> entityStates = null;
4347

@@ -55,6 +59,25 @@ public class AbstractWebhookListenerUpdate {
5559

5660

5761

62+
public AbstractWebhookListenerUpdate enablePayloadSignatureAndState(Boolean enablePayloadSignatureAndState) {
63+
this.enablePayloadSignatureAndState = enablePayloadSignatureAndState;
64+
return this;
65+
}
66+
67+
/**
68+
* Whether signature header and state property are enabled in webhook payload.
69+
* @return enablePayloadSignatureAndState
70+
**/
71+
@ApiModelProperty(value = "Whether signature header and state property are enabled in webhook payload.")
72+
public Boolean isEnablePayloadSignatureAndState() {
73+
return enablePayloadSignatureAndState;
74+
}
75+
76+
public void setEnablePayloadSignatureAndState(Boolean enablePayloadSignatureAndState) {
77+
this.enablePayloadSignatureAndState = enablePayloadSignatureAndState;
78+
}
79+
80+
5881
public AbstractWebhookListenerUpdate entityStates(List<String> entityStates) {
5982
this.entityStates = entityStates;
6083
return this;
@@ -149,15 +172,16 @@ public boolean equals(java.lang.Object o) {
149172
return false;
150173
}
151174
AbstractWebhookListenerUpdate abstractWebhookListenerUpdate = (AbstractWebhookListenerUpdate) o;
152-
return Objects.equals(this.entityStates, abstractWebhookListenerUpdate.entityStates) &&
175+
return Objects.equals(this.enablePayloadSignatureAndState, abstractWebhookListenerUpdate.enablePayloadSignatureAndState) &&
176+
Objects.equals(this.entityStates, abstractWebhookListenerUpdate.entityStates) &&
153177
Objects.equals(this.name, abstractWebhookListenerUpdate.name) &&
154178
Objects.equals(this.notifyEveryChange, abstractWebhookListenerUpdate.notifyEveryChange) &&
155179
Objects.equals(this.state, abstractWebhookListenerUpdate.state);
156180
}
157181

158182
@Override
159183
public int hashCode() {
160-
return Objects.hash(entityStates, name, notifyEveryChange, state);
184+
return Objects.hash(enablePayloadSignatureAndState, entityStates, name, notifyEveryChange, state);
161185
}
162186

163187

@@ -166,6 +190,7 @@ public String toString() {
166190
StringBuilder sb = new StringBuilder();
167191
sb.append("class AbstractWebhookListenerUpdate {\n");
168192

193+
sb.append(" enablePayloadSignatureAndState: ").append(toIndentedString(enablePayloadSignatureAndState)).append("\n");
169194
sb.append(" entityStates: ").append(toIndentedString(entityStates)).append("\n");
170195
sb.append(" name: ").append(toIndentedString(name)).append("\n");
171196
sb.append(" notifyEveryChange: ").append(toIndentedString(notifyEveryChange)).append("\n");

src/main/java/ch/postfinance/sdk/model/PaymentConnectorConfiguration.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ public class PaymentConnectorConfiguration {
6767
protected Long id = null;
6868

6969

70+
@JsonProperty("imagePath")
71+
protected String imagePath = null;
72+
73+
7074
@JsonProperty("linkedSpaceId")
7175
protected Long linkedSpaceId = null;
7276

@@ -160,6 +164,16 @@ public Long getId() {
160164
}
161165

162166

167+
/**
168+
*
169+
* @return imagePath
170+
**/
171+
@ApiModelProperty(value = "")
172+
public String getImagePath() {
173+
return imagePath;
174+
}
175+
176+
163177
/**
164178
* The ID of the space this object belongs to.
165179
* @return linkedSpaceId
@@ -256,6 +270,7 @@ public boolean equals(java.lang.Object o) {
256270
Objects.equals(this.enabledSalesChannels, paymentConnectorConfiguration.enabledSalesChannels) &&
257271
Objects.equals(this.enabledSpaceViews, paymentConnectorConfiguration.enabledSpaceViews) &&
258272
Objects.equals(this.id, paymentConnectorConfiguration.id) &&
273+
Objects.equals(this.imagePath, paymentConnectorConfiguration.imagePath) &&
259274
Objects.equals(this.linkedSpaceId, paymentConnectorConfiguration.linkedSpaceId) &&
260275
Objects.equals(this.name, paymentConnectorConfiguration.name) &&
261276
Objects.equals(this.paymentMethodConfiguration, paymentConnectorConfiguration.paymentMethodConfiguration) &&
@@ -268,7 +283,7 @@ public boolean equals(java.lang.Object o) {
268283

269284
@Override
270285
public int hashCode() {
271-
return Objects.hash(applicableForTransactionProcessing, conditions, connector, enabledSalesChannels, enabledSpaceViews, id, linkedSpaceId, name, paymentMethodConfiguration, plannedPurgeDate, priority, processorConfiguration, state, version);
286+
return Objects.hash(applicableForTransactionProcessing, conditions, connector, enabledSalesChannels, enabledSpaceViews, id, imagePath, linkedSpaceId, name, paymentMethodConfiguration, plannedPurgeDate, priority, processorConfiguration, state, version);
272287
}
273288

274289

@@ -283,6 +298,7 @@ public String toString() {
283298
sb.append(" enabledSalesChannels: ").append(toIndentedString(enabledSalesChannels)).append("\n");
284299
sb.append(" enabledSpaceViews: ").append(toIndentedString(enabledSpaceViews)).append("\n");
285300
sb.append(" id: ").append(toIndentedString(id)).append("\n");
301+
sb.append(" imagePath: ").append(toIndentedString(imagePath)).append("\n");
286302
sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n");
287303
sb.append(" name: ").append(toIndentedString(name)).append("\n");
288304
sb.append(" paymentMethodConfiguration: ").append(toIndentedString(paymentMethodConfiguration)).append("\n");

src/main/java/ch/postfinance/sdk/model/WebhookListener.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242

4343
public class WebhookListener {
4444

45+
@JsonProperty("enablePayloadSignatureAndState")
46+
protected Boolean enablePayloadSignatureAndState = null;
47+
48+
4549
@JsonProperty("entity")
4650
protected Long entity = null;
4751

@@ -87,6 +91,16 @@ public class WebhookListener {
8791

8892

8993

94+
/**
95+
* Whether signature header and state property are enabled in webhook payload.
96+
* @return enablePayloadSignatureAndState
97+
**/
98+
@ApiModelProperty(value = "Whether signature header and state property are enabled in webhook payload.")
99+
public Boolean isEnablePayloadSignatureAndState() {
100+
return enablePayloadSignatureAndState;
101+
}
102+
103+
90104
/**
91105
* The entity that is to be monitored.
92106
* @return entity
@@ -207,7 +221,8 @@ public boolean equals(java.lang.Object o) {
207221
return false;
208222
}
209223
WebhookListener webhookListener = (WebhookListener) o;
210-
return Objects.equals(this.entity, webhookListener.entity) &&
224+
return Objects.equals(this.enablePayloadSignatureAndState, webhookListener.enablePayloadSignatureAndState) &&
225+
Objects.equals(this.entity, webhookListener.entity) &&
211226
Objects.equals(this.entityStates, webhookListener.entityStates) &&
212227
Objects.equals(this.id, webhookListener.id) &&
213228
Objects.equals(this.identity, webhookListener.identity) &&
@@ -222,7 +237,7 @@ public boolean equals(java.lang.Object o) {
222237

223238
@Override
224239
public int hashCode() {
225-
return Objects.hash(entity, entityStates, id, identity, linkedSpaceId, name, notifyEveryChange, plannedPurgeDate, state, url, version);
240+
return Objects.hash(enablePayloadSignatureAndState, entity, entityStates, id, identity, linkedSpaceId, name, notifyEveryChange, plannedPurgeDate, state, url, version);
226241
}
227242

228243

@@ -231,6 +246,7 @@ public String toString() {
231246
StringBuilder sb = new StringBuilder();
232247
sb.append("class WebhookListener {\n");
233248

249+
sb.append(" enablePayloadSignatureAndState: ").append(toIndentedString(enablePayloadSignatureAndState)).append("\n");
234250
sb.append(" entity: ").append(toIndentedString(entity)).append("\n");
235251
sb.append(" entityStates: ").append(toIndentedString(entityStates)).append("\n");
236252
sb.append(" id: ").append(toIndentedString(id)).append("\n");

0 commit comments

Comments
 (0)