Skip to content

Commit

Permalink
Release 4.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlo-vo committed Nov 24, 2022
1 parent 0025e6c commit 358da57
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 18 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>ch.postfinance</groupId>
<artifactId>postfinancecheckout-java-sdk</artifactId>
<version>4.0.11</version>
<version>4.0.15</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -33,7 +33,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
compile "ch.postfinance:postfinancecheckout-java-sdk:4.0.11"
compile "ch.postfinance:postfinancecheckout-java-sdk:4.0.15"
```

### Others
Expand All @@ -46,7 +46,7 @@ mvn clean package

Then manually install the following JARs:

* `target/postfinancecheckout-java-sdk-4.0.11.jar`
* `target/postfinancecheckout-java-sdk-4.0.15.jar`
* `target/lib/*.jar`

## Usage
Expand Down
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'idea'
apply plugin: 'eclipse'

group = 'ch.postfinance'
version = '4.0.11'
version = '4.0.15'

buildscript {
repositories {
Expand Down Expand Up @@ -95,8 +95,7 @@ if(hasProperty('target') && target == 'android') {

ext {
swagger_annotations_version = "1.5.17"
jackson_version = "2.13.4"
jackson_databind_version = "2.13.4.1"
jackson_version = "2.14.1"
google_api_client_version = "1.23.0"
jersey_common_version = "2.34"
jodatime_version = "2.9.9"
Expand All @@ -109,7 +108,7 @@ dependencies {
compile "org.glassfish.jersey.core:jersey-common:${jersey_common_version}"
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
testCompile "junit:junit:$junit_version"
Expand Down
10 changes: 5 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "ch.postfinance",
name := "postfinancecheckout-java-sdk",
version := "4.0.11",
version := "4.0.15",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand All @@ -12,10 +12,10 @@ lazy val root = (project in file(".")).
"io.swagger" % "swagger-annotations" % "1.5.17",
"com.google.api-client" % "google-api-client" % "1.23.0",
"org.glassfish.jersey.core" % "jersey-common" % "2.34",
"com.fasterxml.jackson.core" % "jackson-core" % "2.13.4" % "compile",
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.4" % "compile",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.13.4.1" % "compile",
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.13.4" % "compile",
"com.fasterxml.jackson.core" % "jackson-core" % "2.14.1" % "compile",
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.14.1" % "compile",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.14.1" % "compile",
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.14.1" % "compile",
"junit" % "junit" % "4.13.2" % "test",
"com.novocode" % "junit-interface" % "0.10" % "test"
)
Expand Down
7 changes: 3 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>postfinancecheckout-java-sdk</artifactId>
<packaging>jar</packaging>
<name>postfinancecheckout-java-sdk</name>
<version>4.0.11</version>
<version>4.0.15</version>
<url>https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html</url>
<description>The SDK for simplifying the integration with PostFinance Checkout API.</description>
<scm>
Expand Down Expand Up @@ -289,7 +289,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind-version}</version>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
Expand All @@ -310,8 +310,7 @@
<swagger-annotations-version>1.5.17</swagger-annotations-version>
<google-api-client-version>1.23.0</google-api-client-version>
<jersey-common-version>2.34</jersey-common-version>
<jackson-version>2.13.4</jackson-version>
<jackson-databind-version>2.13.4.1</jackson-databind-version>
<jackson-version>2.14.1</jackson-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.13.2</junit-version>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/postfinance/sdk/DefaultHeaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void intercept(HttpRequest request) throws IOException {

private HttpHeaders getDefaultHeaders() {
HttpHeaders headers = new HttpHeaders();
headers.put("x-meta-sdk-version", "4.0.11");
headers.put("x-meta-sdk-version", "4.0.15");
headers.put("x-meta-sdk-language", "java");
headers.put("x-meta-sdk-provider", "PostFinance Checkout");
headers.put("x-meta-sdk-language-version", System.getProperty("java.version"));
Expand Down
19 changes: 18 additions & 1 deletion src/main/java/ch/postfinance/sdk/model/ChargeAttempt.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import ch.postfinance.sdk.model.TokenVersion;
import ch.postfinance.sdk.model.TransactionAwareEntity;
import ch.postfinance.sdk.model.TransactionCompletionBehavior;
import ch.postfinance.sdk.model.WalletType;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
Expand Down Expand Up @@ -151,6 +152,10 @@ public class ChargeAttempt extends TransactionAwareEntity {
protected Integer version = null;


@JsonProperty("walletType")
protected WalletType walletType = null;



/**
*
Expand Down Expand Up @@ -402,6 +407,16 @@ public Integer getVersion() {
}


/**
*
* @return walletType
**/
@ApiModelProperty(value = "")
public WalletType getWalletType() {
return walletType;
}



@Override
public boolean equals(java.lang.Object o) {
Expand Down Expand Up @@ -440,12 +455,13 @@ public boolean equals(java.lang.Object o) {
Objects.equals(this.tokenVersion, chargeAttempt.tokenVersion) &&
Objects.equals(this.userFailureMessage, chargeAttempt.userFailureMessage) &&
Objects.equals(this.version, chargeAttempt.version) &&
Objects.equals(this.walletType, chargeAttempt.walletType) &&
super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(id, linkedSpaceId, linkedTransaction, charge, completionBehavior, connectorConfiguration, createdOn, customersPresence, environment, failedOn, failureReason, initializingTokenVersion, invocation, labels, language, nextUpdateOn, plannedPurgeDate, redirectionUrl, salesChannel, spaceViewId, state, succeededOn, terminal, timeZone, timeoutOn, tokenVersion, userFailureMessage, version, super.hashCode());
return Objects.hash(id, linkedSpaceId, linkedTransaction, charge, completionBehavior, connectorConfiguration, createdOn, customersPresence, environment, failedOn, failureReason, initializingTokenVersion, invocation, labels, language, nextUpdateOn, plannedPurgeDate, redirectionUrl, salesChannel, spaceViewId, state, succeededOn, terminal, timeZone, timeoutOn, tokenVersion, userFailureMessage, version, walletType, super.hashCode());
}


Expand Down Expand Up @@ -482,6 +498,7 @@ public String toString() {
sb.append(" tokenVersion: ").append(toIndentedString(tokenVersion)).append("\n");
sb.append(" userFailureMessage: ").append(toIndentedString(userFailureMessage)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" walletType: ").append(toIndentedString(walletType)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
64 changes: 64 additions & 0 deletions src/main/java/ch/postfinance/sdk/model/WalletType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/**
* PostFinance Checkout SDK
*
* This library allows to interact with the PostFinance Checkout payment service.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


package ch.postfinance.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import io.swagger.annotations.ApiModel;
import java.util.*;
import java.time.OffsetDateTime;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
*
*/
public enum WalletType {

APPLE_PAY("APPLE_PAY");

private String value;

WalletType(String value) {
this.value = value;
}

@JsonValue
public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

@JsonCreator
public static WalletType fromValue(String text) {
for (WalletType b : WalletType.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}

0 comments on commit 358da57

Please sign in to comment.