Skip to content

Commit e0adc4f

Browse files
author
Thomas Hunziker
committed
Release 2.2.2
1 parent 95d4adb commit e0adc4f

14 files changed

+1438
-10
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add this dependency to your project's POM:
2323
<dependency>
2424
<groupId>com.postfinancecheckout</groupId>
2525
<artifactId>postfinancecheckout-java-sdk</artifactId>
26-
<version>2.2.1</version>
26+
<version>2.2.2</version>
2727
<scope>compile</scope>
2828
</dependency>
2929
```
@@ -33,7 +33,7 @@ Add this dependency to your project's POM:
3333
Add this dependency to your project's build file:
3434

3535
```groovy
36-
compile "com.postfinancecheckout:postfinancecheckout-java-sdk:2.2.1"
36+
compile "com.postfinancecheckout:postfinancecheckout-java-sdk:2.2.2"
3737
```
3838

3939
### Others
@@ -46,7 +46,7 @@ mvn clean package
4646

4747
Then manually install the following JARs:
4848

49-
* `target/postfinancecheckout-java-sdk-2.2.1.jar`
49+
* `target/postfinancecheckout-java-sdk-2.2.2.jar`
5050
* `target/lib/*.jar`
5151

5252
## 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 = 'com.postfinancecheckout'
5-
version = '2.2.1'
5+
version = '2.2.2'
66

77
buildscript {
88
repositories {

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
22
settings(
33
organization := "com.postfinancecheckout",
44
name := "postfinancecheckout-java-sdk",
5-
version := "2.2.1",
5+
version := "2.2.2",
66
scalaVersion := "2.11.4",
77
scalacOptions ++= Seq("-feature"),
88
javacOptions in compile ++= Seq("-Xlint:deprecation"),

pom.xml

Lines changed: 1 addition & 1 deletion
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>2.2.1</version>
8+
<version>2.2.2</version>
99
<url>https://www.postfinance.ch/checkout</url>
1010
<description>The SDK for simplifying the integration with PostFinance Checkout API.</description>
1111
<scm>

src/main/java/com/postfinancecheckout/sdk/ApiClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,14 @@ public RefundService getRefundService() {
332332
return this.refundService;
333333
}
334334

335+
private ShopifyTransactionService shopifyTransactionService;
336+
public ShopifyTransactionService getShopifyTransactionService() {
337+
if (this.shopifyTransactionService == null) {
338+
this.shopifyTransactionService = new ShopifyTransactionService(this);
339+
}
340+
return this.shopifyTransactionService;
341+
}
342+
335343
private SpaceService spaceService;
336344
public SpaceService getSpaceService() {
337345
if (this.spaceService == null) {
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/**
2+
* SDK
3+
*
4+
* This library allows to interact with the payment service.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
20+
package com.postfinancecheckout.sdk.model;
21+
22+
import java.util.Objects;
23+
import java.util.Arrays;
24+
import com.fasterxml.jackson.annotation.JsonProperty;
25+
import com.fasterxml.jackson.annotation.JsonCreator;
26+
import com.fasterxml.jackson.annotation.JsonValue;
27+
import com.postfinancecheckout.sdk.model.PaymentTerminalAddress;
28+
import io.swagger.annotations.ApiModel;
29+
import io.swagger.annotations.ApiModelProperty;
30+
import java.util.*;
31+
import java.time.OffsetDateTime;
32+
33+
/**
34+
*
35+
*/
36+
@ApiModel(description = "")
37+
38+
public class PaymentTerminalContactAddress extends PaymentTerminalAddress {
39+
40+
41+
42+
@Override
43+
public boolean equals(java.lang.Object o) {
44+
if (this == o) {
45+
return true;
46+
}
47+
if (o == null || getClass() != o.getClass()) {
48+
return false;
49+
}
50+
PaymentTerminalContactAddress paymentTerminalContactAddress = (PaymentTerminalContactAddress) o;
51+
return Objects.equals(this.city, paymentTerminalContactAddress.city) &&
52+
Objects.equals(this.country, paymentTerminalContactAddress.country) &&
53+
Objects.equals(this.dependentLocality, paymentTerminalContactAddress.dependentLocality) &&
54+
Objects.equals(this.emailAddress, paymentTerminalContactAddress.emailAddress) &&
55+
Objects.equals(this.familyName, paymentTerminalContactAddress.familyName) &&
56+
Objects.equals(this.givenName, paymentTerminalContactAddress.givenName) &&
57+
Objects.equals(this.mobilePhoneNumber, paymentTerminalContactAddress.mobilePhoneNumber) &&
58+
Objects.equals(this.organizationName, paymentTerminalContactAddress.organizationName) &&
59+
Objects.equals(this.phoneNumber, paymentTerminalContactAddress.phoneNumber) &&
60+
Objects.equals(this.postalState, paymentTerminalContactAddress.postalState) &&
61+
Objects.equals(this.postcode, paymentTerminalContactAddress.postcode) &&
62+
Objects.equals(this.salutation, paymentTerminalContactAddress.salutation) &&
63+
Objects.equals(this.sortingCode, paymentTerminalContactAddress.sortingCode) &&
64+
Objects.equals(this.street, paymentTerminalContactAddress.street) &&
65+
super.equals(o);
66+
}
67+
68+
@Override
69+
public int hashCode() {
70+
return Objects.hash(city, country, dependentLocality, emailAddress, familyName, givenName, mobilePhoneNumber, organizationName, phoneNumber, postalState, postcode, salutation, sortingCode, street, super.hashCode());
71+
}
72+
73+
74+
@Override
75+
public String toString() {
76+
StringBuilder sb = new StringBuilder();
77+
sb.append("class PaymentTerminalContactAddress {\n");
78+
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
79+
sb.append(" city: ").append(toIndentedString(city)).append("\n");
80+
sb.append(" country: ").append(toIndentedString(country)).append("\n");
81+
sb.append(" dependentLocality: ").append(toIndentedString(dependentLocality)).append("\n");
82+
sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n");
83+
sb.append(" familyName: ").append(toIndentedString(familyName)).append("\n");
84+
sb.append(" givenName: ").append(toIndentedString(givenName)).append("\n");
85+
sb.append(" mobilePhoneNumber: ").append(toIndentedString(mobilePhoneNumber)).append("\n");
86+
sb.append(" organizationName: ").append(toIndentedString(organizationName)).append("\n");
87+
sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n");
88+
sb.append(" postalState: ").append(toIndentedString(postalState)).append("\n");
89+
sb.append(" postcode: ").append(toIndentedString(postcode)).append("\n");
90+
sb.append(" salutation: ").append(toIndentedString(salutation)).append("\n");
91+
sb.append(" sortingCode: ").append(toIndentedString(sortingCode)).append("\n");
92+
sb.append(" street: ").append(toIndentedString(street)).append("\n");
93+
sb.append("}");
94+
return sb.toString();
95+
}
96+
97+
/**
98+
* Convert the given object to string with each line indented by 4 spaces
99+
* (except the first line).
100+
*/
101+
private String toIndentedString(java.lang.Object o) {
102+
if (o == null) {
103+
return "null";
104+
}
105+
return o.toString().replace("\n", "\n ");
106+
}
107+
108+
}
109+

src/main/java/com/postfinancecheckout/sdk/model/PaymentTerminalLocation.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.fasterxml.jackson.annotation.JsonValue;
2727
import com.postfinancecheckout.sdk.model.PaymentTerminalAddress;
2828
import com.postfinancecheckout.sdk.model.PaymentTerminalConfiguration;
29+
import com.postfinancecheckout.sdk.model.PaymentTerminalContactAddress;
2930
import com.postfinancecheckout.sdk.model.PaymentTerminalLocationState;
3031
import io.swagger.annotations.ApiModel;
3132
import io.swagger.annotations.ApiModelProperty;
@@ -40,6 +41,10 @@
4041

4142
public class PaymentTerminalLocation {
4243

44+
@JsonProperty("contactAddress")
45+
protected PaymentTerminalContactAddress contactAddress = null;
46+
47+
4348
@JsonProperty("defaultConfiguration")
4449
protected PaymentTerminalConfiguration defaultConfiguration = null;
4550

@@ -73,6 +78,16 @@ public class PaymentTerminalLocation {
7378

7479

7580

81+
/**
82+
*
83+
* @return contactAddress
84+
**/
85+
@ApiModelProperty(value = "")
86+
public PaymentTerminalContactAddress getContactAddress() {
87+
return contactAddress;
88+
}
89+
90+
7691
/**
7792
*
7893
* @return defaultConfiguration
@@ -163,7 +178,8 @@ public boolean equals(java.lang.Object o) {
163178
return false;
164179
}
165180
PaymentTerminalLocation paymentTerminalLocation = (PaymentTerminalLocation) o;
166-
return Objects.equals(this.defaultConfiguration, paymentTerminalLocation.defaultConfiguration) &&
181+
return Objects.equals(this.contactAddress, paymentTerminalLocation.contactAddress) &&
182+
Objects.equals(this.defaultConfiguration, paymentTerminalLocation.defaultConfiguration) &&
167183
Objects.equals(this.deliveryAddress, paymentTerminalLocation.deliveryAddress) &&
168184
Objects.equals(this.id, paymentTerminalLocation.id) &&
169185
Objects.equals(this.linkedSpaceId, paymentTerminalLocation.linkedSpaceId) &&
@@ -175,7 +191,7 @@ public boolean equals(java.lang.Object o) {
175191

176192
@Override
177193
public int hashCode() {
178-
return Objects.hash(defaultConfiguration, deliveryAddress, id, linkedSpaceId, name, plannedPurgeDate, state, version);
194+
return Objects.hash(contactAddress, defaultConfiguration, deliveryAddress, id, linkedSpaceId, name, plannedPurgeDate, state, version);
179195
}
180196

181197

@@ -184,6 +200,7 @@ public String toString() {
184200
StringBuilder sb = new StringBuilder();
185201
sb.append("class PaymentTerminalLocation {\n");
186202

203+
sb.append(" contactAddress: ").append(toIndentedString(contactAddress)).append("\n");
187204
sb.append(" defaultConfiguration: ").append(toIndentedString(defaultConfiguration)).append("\n");
188205
sb.append(" deliveryAddress: ").append(toIndentedString(deliveryAddress)).append("\n");
189206
sb.append(" id: ").append(toIndentedString(id)).append("\n");

src/main/java/com/postfinancecheckout/sdk/model/Refund.java

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ public class Refund {
153153
protected OffsetDateTime timeoutOn = null;
154154

155155

156+
@JsonProperty("totalAppliedFees")
157+
protected BigDecimal totalAppliedFees = null;
158+
159+
160+
@JsonProperty("totalSettledAmount")
161+
protected BigDecimal totalSettledAmount = null;
162+
163+
156164
@JsonProperty("transaction")
157165
protected Transaction transaction = null;
158166

@@ -430,6 +438,26 @@ public OffsetDateTime getTimeoutOn() {
430438
}
431439

432440

441+
/**
442+
* The total applied fees is the sum of all fees that have been applied so far.
443+
* @return totalAppliedFees
444+
**/
445+
@ApiModelProperty(value = "The total applied fees is the sum of all fees that have been applied so far.")
446+
public BigDecimal getTotalAppliedFees() {
447+
return totalAppliedFees;
448+
}
449+
450+
451+
/**
452+
* The total settled amount is the total amount which has been settled so far.
453+
* @return totalSettledAmount
454+
**/
455+
@ApiModelProperty(value = "The total settled amount is the total amount which has been settled so far.")
456+
public BigDecimal getTotalSettledAmount() {
457+
return totalSettledAmount;
458+
}
459+
460+
433461
/**
434462
*
435463
* @return transaction
@@ -506,6 +534,8 @@ public boolean equals(java.lang.Object o) {
506534
Objects.equals(this.taxes, refund.taxes) &&
507535
Objects.equals(this.timeZone, refund.timeZone) &&
508536
Objects.equals(this.timeoutOn, refund.timeoutOn) &&
537+
Objects.equals(this.totalAppliedFees, refund.totalAppliedFees) &&
538+
Objects.equals(this.totalSettledAmount, refund.totalSettledAmount) &&
509539
Objects.equals(this.transaction, refund.transaction) &&
510540
Objects.equals(this.type, refund.type) &&
511541
Objects.equals(this.updatedInvoice, refund.updatedInvoice) &&
@@ -514,7 +544,7 @@ public boolean equals(java.lang.Object o) {
514544

515545
@Override
516546
public int hashCode() {
517-
return Objects.hash(amount, baseLineItems, completion, createdBy, createdOn, environment, externalId, failedOn, failureReason, id, labels, language, lineItems, linkedSpaceId, merchantReference, nextUpdateOn, plannedPurgeDate, processingOn, processorReference, reducedLineItems, reductions, state, succeededOn, taxes, timeZone, timeoutOn, transaction, type, updatedInvoice, version);
547+
return Objects.hash(amount, baseLineItems, completion, createdBy, createdOn, environment, externalId, failedOn, failureReason, id, labels, language, lineItems, linkedSpaceId, merchantReference, nextUpdateOn, plannedPurgeDate, processingOn, processorReference, reducedLineItems, reductions, state, succeededOn, taxes, timeZone, timeoutOn, totalAppliedFees, totalSettledAmount, transaction, type, updatedInvoice, version);
518548
}
519549

520550

@@ -549,6 +579,8 @@ public String toString() {
549579
sb.append(" taxes: ").append(toIndentedString(taxes)).append("\n");
550580
sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n");
551581
sb.append(" timeoutOn: ").append(toIndentedString(timeoutOn)).append("\n");
582+
sb.append(" totalAppliedFees: ").append(toIndentedString(totalAppliedFees)).append("\n");
583+
sb.append(" totalSettledAmount: ").append(toIndentedString(totalSettledAmount)).append("\n");
552584
sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n");
553585
sb.append(" type: ").append(toIndentedString(type)).append("\n");
554586
sb.append(" updatedInvoice: ").append(toIndentedString(updatedInvoice)).append("\n");

0 commit comments

Comments
 (0)