diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml
index ba8e570..800574a 100644
--- a/.github/workflows/maven-publish.yml
+++ b/.github/workflows/maven-publish.yml
@@ -3,7 +3,8 @@
name: Maven Package
on:
- push
+ release:
+ types: [published]
jobs:
build:
@@ -18,18 +19,20 @@ jobs:
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '8'
+ server-id: 'ossrh'
+ server-username: ${{ secrets.OSSRH_USERNAME }}
+ server-password: ${{ secrets.OSSRH_TOKEN }}
+ gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
+ gpg-passphrase : ${{ secrets.SIGN_KEY_PASS }}
- - name: install
- run : mvn install -P !build-extras -DskipTests=true -Dmaven.javadoc.skip=true -B -V
-
- name: Build with Maven
id: build
run: mvn -B package --file pom.xml
-
- - name: Release Maven package
- uses: samuelmeuli/action-maven-publish@v1
- with:
- gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
- gpg_passphrase: ${{ secrets.PASSPHRASE }}
- nexus_username: ${{ secrets.OSSRH_USERNAME }}
- nexus_password: ${{ secrets.OSSRH_TOKEN }}
+
+ - name: Publish with Maven
+ id: deploy
+ run: mvn -U -B clean deploy -P release -DskipTests=true
+ env:
+ SIGN_KEY_PASS: ${{ secrets.SIGN_KEY_PASS }}
+ OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
diff --git a/.travis.yml b/.travis.yml
index b62b7cc..70cb81a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,20 +1,17 @@
+#
+# Generated by: https://github.com/swagger-api/swagger-codegen.git
+#
language: java
-dist: trusty
jdk:
- - oraclejdk8
-
-sudo: false
-
-install:
- - mvn install -P !build-extras -DskipTests=true -Dmaven.javadoc.skip=true -B -V
-
+ - oraclejdk8
+ - oraclejdk7
+before_install:
+ # ensure gradlew has proper permission
+ - chmod a+x ./gradlew
script:
- - mvn test -P !build-extras -B
-
-cache:
- directories:
- - ~/.m2/repository
-
-after_success:
- - /bin/sh ./before_deploy.sh
- - /bin/sh ./deploy.sh
+ # test using maven
+ - mvn test
+ # uncomment below to test using gradle
+ # - gradle test
+ # uncomment below to test using sbt
+ # - sbt test
diff --git a/README.md b/README.md
index 02f11d5..251a00e 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ Add this dependency to your project's POM:
ch.postfinance
postfinancecheckout-java-sdk
- 6.0.0
+ 5.1.2
compile
```
@@ -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:6.0.0"
+compile "ch.postfinance:postfinancecheckout-java-sdk:5.1.2"
```
### Others
@@ -46,7 +46,7 @@ mvn clean package
Then manually install the following JARs:
-* `target/postfinancecheckout-java-sdk-6.0.0.jar`
+* `target/postfinancecheckout-java-sdk-5.1.2.jar`
* `target/lib/*.jar`
## Usage
diff --git a/before_deploy.sh b/before_deploy.sh
deleted file mode 100644
index 54da5dd..0000000
--- a/before_deploy.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-
-if [ -z "${TRAVIS_TAG}" ];
-then
- echo "[INFO] This is not tagged build. The TRAVIS_TAG is not set. Skipping before_deploy step.";
-
-else
- echo "[INFO] Running before_deploy script. Decrypting 'codesigning.asc.enc'..."
- openssl aes-256-cbc -K $encrypted_81c98acad902_key -iv $encrypted_81c98acad902_iv -in codesigning.asc.enc -out codesigning.asc -d && \
- gpg --fast-import codesigning.asc;
-fi
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 959e540..8b766bf 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'ch.postfinance'
-version = '6.0.0'
+version = '5.1.2'
buildscript {
repositories {
diff --git a/build.sbt b/build.sbt
index e1afec1..1b9c9c3 100644
--- a/build.sbt
+++ b/build.sbt
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "ch.postfinance",
name := "postfinancecheckout-java-sdk",
- version := "6.0.0",
+ version := "5.1.2",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
diff --git a/codesigning.asc.enc b/codesigning.asc.enc
deleted file mode 100644
index f95e325..0000000
Binary files a/codesigning.asc.enc and /dev/null differ
diff --git a/deploy.sh b/deploy.sh
deleted file mode 100644
index 7ea0df6..0000000
--- a/deploy.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-if [ -z "${TRAVIS_TAG}" ];
-then
- echo "[INFO] This is not tagged build. The TRAVIS_TAG is not set. Skipping deployment.";
-
-else
- echo "[INFO] Running deployment based on the mvn_settings.xml"
- mvn deploy -P sign,build-extras --settings mvn_settings.xml;
-fi
\ No newline at end of file
diff --git a/mvn_settings.xml b/mvn_settings.xml
deleted file mode 100644
index 046501c..0000000
--- a/mvn_settings.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- ossrh
- ${env.OSSRH_JIRA_USERNAME}
- ${env.OSSRH_JIRA_PASSWORD}
-
-
-
-
- ossrh
-
- true
-
-
- gpg
- ${env.GPG_KEY_NAME}
- ${env.GPG_PASSPHRASE}
-
-
-
-
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 9a74f5e..43c130c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
postfinancecheckout-java-sdk
jar
postfinancecheckout-java-sdk
- 6.0.0
+ 5.1.2
https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html
The SDK for simplifying the integration with PostFinance Checkout API.
@@ -219,12 +219,53 @@
-
- build-extras
-
- true
-
+
+ release
+
+
+
+ maven-release-plugin
+ 3.0.0
+
+ @{project.version}
+
+
+
+
+ maven-gpg-plugin
+ 3.0.1
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+ --pinentry-mode
+ loopback
+
+
+
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.13
+ true
+
+ ossrh
+ https://oss.sonatype.org/
+ true
+
+
+
+
org.apache.maven.plugins
@@ -252,6 +293,13 @@
+
+ maven-gpg-plugin
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+
diff --git a/src/main/java/ch/postfinance/sdk/DefaultHeaders.java b/src/main/java/ch/postfinance/sdk/DefaultHeaders.java
index fb28920..9f877ac 100644
--- a/src/main/java/ch/postfinance/sdk/DefaultHeaders.java
+++ b/src/main/java/ch/postfinance/sdk/DefaultHeaders.java
@@ -34,7 +34,7 @@ public void intercept(HttpRequest request) throws IOException {
private HttpHeaders getDefaultHeaders() {
HttpHeaders headers = new HttpHeaders();
- headers.put("x-meta-sdk-version", "6.0.0");
+ headers.put("x-meta-sdk-version", "5.1.2");
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"));
diff --git a/src/main/java/ch/postfinance/sdk/model/PaymentContract.java b/src/main/java/ch/postfinance/sdk/model/PaymentContract.java
index 6f296ae..0d13e3d 100644
--- a/src/main/java/ch/postfinance/sdk/model/PaymentContract.java
+++ b/src/main/java/ch/postfinance/sdk/model/PaymentContract.java
@@ -74,6 +74,10 @@ public class PaymentContract {
protected Long id = null;
+ @JsonProperty("lastModifiedDate")
+ protected OffsetDateTime lastModifiedDate = null;
+
+
@JsonProperty("rejectedOn")
protected OffsetDateTime rejectedOn = null;
@@ -183,6 +187,16 @@ public Long getId() {
}
+ /**
+ * The date and time when the object was last modified.
+ * @return lastModifiedDate
+ **/
+ @ApiModelProperty(value = "The date and time when the object was last modified.")
+ public OffsetDateTime getLastModifiedDate() {
+ return lastModifiedDate;
+ }
+
+
/**
*
* @return rejectedOn
@@ -271,6 +285,7 @@ public boolean equals(java.lang.Object o) {
Objects.equals(this.createdOn, paymentContract.createdOn) &&
Objects.equals(this.externalId, paymentContract.externalId) &&
Objects.equals(this.id, paymentContract.id) &&
+ Objects.equals(this.lastModifiedDate, paymentContract.lastModifiedDate) &&
Objects.equals(this.rejectedOn, paymentContract.rejectedOn) &&
Objects.equals(this.rejectionReason, paymentContract.rejectionReason) &&
Objects.equals(this.startTerminatingOn, paymentContract.startTerminatingOn) &&
@@ -282,7 +297,7 @@ public boolean equals(java.lang.Object o) {
@Override
public int hashCode() {
- return Objects.hash(account, activatedOn, contractIdentifier, contractType, createdBy, createdOn, externalId, id, rejectedOn, rejectionReason, startTerminatingOn, state, terminatedBy, terminatedOn, version);
+ return Objects.hash(account, activatedOn, contractIdentifier, contractType, createdBy, createdOn, externalId, id, lastModifiedDate, rejectedOn, rejectionReason, startTerminatingOn, state, terminatedBy, terminatedOn, version);
}
@@ -299,6 +314,7 @@ public String toString() {
sb.append(" createdOn: ").append(toIndentedString(createdOn)).append("\n");
sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" lastModifiedDate: ").append(toIndentedString(lastModifiedDate)).append("\n");
sb.append(" rejectedOn: ").append(toIndentedString(rejectedOn)).append("\n");
sb.append(" rejectionReason: ").append(toIndentedString(rejectionReason)).append("\n");
sb.append(" startTerminatingOn: ").append(toIndentedString(startTerminatingOn)).append("\n");