diff --git a/README.md b/README.md index d34699d..8ae9c95 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Add this dependency to your project's POM: ch.postfinance postfinancecheckout-java-sdk - 5.0.0 + 5.1.0 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:5.0.0" +compile "ch.postfinance:postfinancecheckout-java-sdk:5.1.0" ``` ### Others @@ -46,7 +46,7 @@ mvn clean package Then manually install the following JARs: -* `target/postfinancecheckout-java-sdk-5.0.0.jar` +* `target/postfinancecheckout-java-sdk-5.1.0.jar` * `target/lib/*.jar` ## Usage diff --git a/build.gradle b/build.gradle index a736d2f..97a896e 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' group = 'ch.postfinance' -version = '5.0.0' +version = '5.1.0' buildscript { repositories { @@ -97,19 +97,19 @@ ext { swagger_annotations_version = "1.5.17" jackson_version = "2.14.1" google_api_client_version = "1.23.0" - jersey_common_version = "2.34" jodatime_version = "2.9.9" junit_version = "4.13.2" + httpclient_version = "4.5.14" } dependencies { compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "com.google.api-client:google-api-client:${google_api_client_version}" - 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_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + compile "org.apache.httpcomponents:httpclient:$httpclient_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" testCompile "junit:junit:$junit_version" } diff --git a/build.sbt b/build.sbt index 3118529..b213d08 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 := "5.0.0", + version := "5.1.0", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), @@ -15,6 +15,7 @@ lazy val root = (project in file(".")). "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", + "org.apache.httpcomponents" % "httpclient" % "4.5.14" % "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" diff --git a/pom.xml b/pom.xml index da428f2..6011970 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ postfinancecheckout-java-sdk jar postfinancecheckout-java-sdk - 5.0.0 + 5.1.0 https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html The SDK for simplifying the integration with PostFinance Checkout API. @@ -269,11 +269,11 @@ google-api-client ${google-api-client-version} - + - org.glassfish.jersey.core - jersey-common - ${jersey-common-version} + org.apache.httpcomponents + httpclient + ${apache-httpclient-version} @@ -309,8 +309,8 @@ UTF-8 1.5.17 1.23.0 - 2.34 2.14.1 + 4.5.14 1.0.0 4.13.2 diff --git a/src/main/java/ch/postfinance/sdk/DefaultHeaders.java b/src/main/java/ch/postfinance/sdk/DefaultHeaders.java index 66501c6..5e4f020 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", "5.0.0"); + headers.put("x-meta-sdk-version", "5.1.0"); 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/PostFinanceCheckoutSdkException.java b/src/main/java/ch/postfinance/sdk/PostFinanceCheckoutSdkException.java index 3374eff..7389f49 100644 --- a/src/main/java/ch/postfinance/sdk/PostFinanceCheckoutSdkException.java +++ b/src/main/java/ch/postfinance/sdk/PostFinanceCheckoutSdkException.java @@ -26,16 +26,36 @@ public class PostFinanceCheckoutSdkException extends RuntimeException { private static final long serialVersionUID = 1675383192982547616L; + private final ErrorCode code; + + private final String message; + /** * Constructor. * - * @param errorCode + * @param code * the PostFinanceCheckout SDK error code * @param message * the exception message details */ - public PostFinanceCheckoutSdkException(ErrorCode errorCode, String message) { - super(String.format("Error code: %d. %s", errorCode.getCode(), message)); + public PostFinanceCheckoutSdkException(ErrorCode code, String message) { + super(); + this.code = code; + this.message = String.format("Error code: %d. %s", code.getCode(), message); } + /** + * @return the PostFinanceCheckout SDK error code + */ + public ErrorCode getCode() { + return this.code; + } + + /** + * @return the PostFinanceCheckout SDK error message + */ + public String getMessage() { + return this.message; + } + } \ No newline at end of file diff --git a/src/main/java/ch/postfinance/sdk/URIBuilderUtil.java b/src/main/java/ch/postfinance/sdk/URIBuilderUtil.java new file mode 100644 index 0000000..198afc2 --- /dev/null +++ b/src/main/java/ch/postfinance/sdk/URIBuilderUtil.java @@ -0,0 +1,106 @@ +/** +* 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; + +import com.google.api.client.http.UriTemplate; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Collection; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import org.apache.http.client.utils.URIBuilder; + +/** + * Helper class for creating and modifying URIBuilder {@link URIBuilder} + */ +public final class URIBuilderUtil { + /** + * Create a new URIBuilder instance from url + * + * @throws IllegalArgumentException if url is not a valid URI template or is null. + * @param url to be used as URI + * @return a new {@link URIBuilder} + */ + public static URIBuilder create(String url) { + try { + return new URIBuilder(url); + } catch (URISyntaxException e) { + throw new IllegalArgumentException("Invalid URI: " + e.getLocalizedMessage()); + } + } + + /** + * Create a new {@link URIBuilder} instance from url with parameters + * + * @throws IllegalArgumentException if url is not a valid URI template or is null. + * @param url to be used as URI template + * @param pathParameters path parameters to be resolved in url + * @return a new {@link URIBuilder} + */ + public static URIBuilder create(String url, Map pathParameters) { + try { + return new URIBuilder(UriTemplate.expand(url, pathParameters, false)); + } catch (URISyntaxException e) { + throw new IllegalArgumentException("Invalid URI: " + e.getLocalizedMessage()); + } + } + + /** + * Build {@link URIBuilder} to {@link URI} + * + * @throws IllegalArgumentException if url is not a valid URI template or is null. + * @param uriBuilder {@link URIBuilder} to build + * @return a new {@link URI} + */ + public static URI build(URIBuilder uriBuilder) { + try { + return uriBuilder.build(); + } catch (URISyntaxException e) { + throw new IllegalArgumentException("Invalid URI: " + e.getLocalizedMessage()); + } + } + + /** + * Apply query parameter + * @param uriBuilder uri builder instance query parameters will applied to + * @param paramName query parameter name + * @param paramValue query parameter value + * @return uri builder with applied parameters + */ + public static URIBuilder applyQueryParam(URIBuilder uriBuilder, String paramName, Object paramValue) { + if (paramValue instanceof Collection) { + uriBuilder = applyCollection(uriBuilder, paramName, ((Collection) paramValue).toArray()); + } else if (paramValue instanceof Object[]) { + uriBuilder = applyCollection(uriBuilder, paramName, (Object[]) paramValue); + } else { + uriBuilder = uriBuilder.addParameter(paramName, paramValue.toString()); + } + return uriBuilder; + } + + private static URIBuilder applyCollection(URIBuilder uriBuilder, String paramName, Object[] paramValues) { + for (Object paramValue: paramValues) { + uriBuilder.addParameter(paramName, paramValue.toString()); + } + return uriBuilder; + } +} diff --git a/src/main/java/ch/postfinance/sdk/model/AbstractAccountUpdate.java b/src/main/java/ch/postfinance/sdk/model/AbstractAccountUpdate.java index 3bab4d4..ce71864 100644 --- a/src/main/java/ch/postfinance/sdk/model/AbstractAccountUpdate.java +++ b/src/main/java/ch/postfinance/sdk/model/AbstractAccountUpdate.java @@ -55,10 +55,10 @@ public AbstractAccountUpdate lastModifiedDate(OffsetDateTime lastModifiedDate) { } /** - * + * The date and time when the object was last modified. * @return lastModifiedDate **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The date and time when the object was last modified.") public OffsetDateTime getLastModifiedDate() { return lastModifiedDate; } diff --git a/src/main/java/ch/postfinance/sdk/model/AbstractApplicationUserUpdate.java b/src/main/java/ch/postfinance/sdk/model/AbstractApplicationUserUpdate.java index 03081ad..cfb0fe3 100644 --- a/src/main/java/ch/postfinance/sdk/model/AbstractApplicationUserUpdate.java +++ b/src/main/java/ch/postfinance/sdk/model/AbstractApplicationUserUpdate.java @@ -93,10 +93,10 @@ public AbstractApplicationUserUpdate state(CreationEntityState state) { } /** - * + * The object's current state. * @return state **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The object's current state.") public CreationEntityState getState() { return state; } diff --git a/src/main/java/ch/postfinance/sdk/model/AbstractCustomerActive.java b/src/main/java/ch/postfinance/sdk/model/AbstractCustomerActive.java index ac66bf3..d3e78af 100644 --- a/src/main/java/ch/postfinance/sdk/model/AbstractCustomerActive.java +++ b/src/main/java/ch/postfinance/sdk/model/AbstractCustomerActive.java @@ -149,10 +149,10 @@ public AbstractCustomerActive language(String language) { } /** - * + * The language that is linked to the object. * @return language **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The language that is linked to the object.") public String getLanguage() { return language; } diff --git a/src/main/java/ch/postfinance/sdk/model/AbstractHumanUserUpdate.java b/src/main/java/ch/postfinance/sdk/model/AbstractHumanUserUpdate.java index 8b58534..d4d1aa4 100644 --- a/src/main/java/ch/postfinance/sdk/model/AbstractHumanUserUpdate.java +++ b/src/main/java/ch/postfinance/sdk/model/AbstractHumanUserUpdate.java @@ -170,10 +170,10 @@ public AbstractHumanUserUpdate state(CreationEntityState state) { } /** - * + * The object's current state. * @return state **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The object's current state.") public CreationEntityState getState() { return state; } diff --git a/src/main/java/ch/postfinance/sdk/model/AbstractSpaceUpdate.java b/src/main/java/ch/postfinance/sdk/model/AbstractSpaceUpdate.java index 63b3c40..304c42a 100644 --- a/src/main/java/ch/postfinance/sdk/model/AbstractSpaceUpdate.java +++ b/src/main/java/ch/postfinance/sdk/model/AbstractSpaceUpdate.java @@ -79,10 +79,10 @@ public AbstractSpaceUpdate lastModifiedDate(OffsetDateTime lastModifiedDate) { } /** - * + * The date and time when the object was last modified. * @return lastModifiedDate **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The date and time when the object was last modified.") public OffsetDateTime getLastModifiedDate() { return lastModifiedDate; } @@ -174,10 +174,10 @@ public AbstractSpaceUpdate state(CreationEntityState state) { } /** - * + * The object's current state. * @return state **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The object's current state.") public CreationEntityState getState() { return state; } diff --git a/src/main/java/ch/postfinance/sdk/model/AbstractTokenUpdate.java b/src/main/java/ch/postfinance/sdk/model/AbstractTokenUpdate.java index 6f22f1e..b824470 100644 --- a/src/main/java/ch/postfinance/sdk/model/AbstractTokenUpdate.java +++ b/src/main/java/ch/postfinance/sdk/model/AbstractTokenUpdate.java @@ -123,10 +123,10 @@ public AbstractTokenUpdate language(String language) { } /** - * + * The language that is linked to the object. * @return language **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The language that is linked to the object.") public String getLanguage() { return language; } diff --git a/src/main/java/ch/postfinance/sdk/model/AbstractTransactionPending.java b/src/main/java/ch/postfinance/sdk/model/AbstractTransactionPending.java index b377cda..c987732 100644 --- a/src/main/java/ch/postfinance/sdk/model/AbstractTransactionPending.java +++ b/src/main/java/ch/postfinance/sdk/model/AbstractTransactionPending.java @@ -313,10 +313,10 @@ public AbstractTransactionPending language(String language) { } /** - * + * The language that is linked to the object. * @return language **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The language that is linked to the object.") public String getLanguage() { return language; } diff --git a/src/main/java/ch/postfinance/sdk/model/AbstractWebhookListenerUpdate.java b/src/main/java/ch/postfinance/sdk/model/AbstractWebhookListenerUpdate.java index 41f2995..c7cbe3a 100644 --- a/src/main/java/ch/postfinance/sdk/model/AbstractWebhookListenerUpdate.java +++ b/src/main/java/ch/postfinance/sdk/model/AbstractWebhookListenerUpdate.java @@ -126,10 +126,10 @@ public AbstractWebhookListenerUpdate state(CreationEntityState state) { } /** - * + * The object's current state. * @return state **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The object's current state.") public CreationEntityState getState() { return state; } diff --git a/src/main/java/ch/postfinance/sdk/model/AbstractWebhookUrlUpdate.java b/src/main/java/ch/postfinance/sdk/model/AbstractWebhookUrlUpdate.java index 2010fcb..8476106 100644 --- a/src/main/java/ch/postfinance/sdk/model/AbstractWebhookUrlUpdate.java +++ b/src/main/java/ch/postfinance/sdk/model/AbstractWebhookUrlUpdate.java @@ -74,10 +74,10 @@ public AbstractWebhookUrlUpdate state(CreationEntityState state) { } /** - * + * The object's current state. * @return state **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The object's current state.") public CreationEntityState getState() { return state; } diff --git a/src/main/java/ch/postfinance/sdk/model/Account.java b/src/main/java/ch/postfinance/sdk/model/Account.java index 749d688..7986aea 100644 --- a/src/main/java/ch/postfinance/sdk/model/Account.java +++ b/src/main/java/ch/postfinance/sdk/model/Account.java @@ -170,20 +170,20 @@ public OffsetDateTime getDeletedOn() { /** - * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * A unique identifier for the object. * @return id **/ - @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + @ApiModelProperty(value = "A unique identifier for the object.") public Long getId() { return id; } /** - * + * The date and time when the object was last modified. * @return lastModifiedDate **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The date and time when the object was last modified.") public OffsetDateTime getLastModifiedDate() { return lastModifiedDate; } @@ -210,10 +210,10 @@ public Account getParentAccount() { /** - * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed. * @return plannedPurgeDate **/ - @ApiModelProperty(value = "The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.") + @ApiModelProperty(value = "The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed.") public OffsetDateTime getPlannedPurgeDate() { return plannedPurgeDate; } @@ -240,10 +240,10 @@ public Long getScope() { /** - * + * The object's current state. * @return state **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The object's current state.") public AccountState getState() { return state; } @@ -270,10 +270,10 @@ public AccountType getType() { /** - * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * The version is used for optimistic locking and incremented whenever the object is updated. * @return version **/ - @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + @ApiModelProperty(value = "The version is used for optimistic locking and incremented whenever the object is updated.") public Integer getVersion() { return version; } diff --git a/src/main/java/ch/postfinance/sdk/model/AnalyticsQueryExecution.java b/src/main/java/ch/postfinance/sdk/model/AnalyticsQueryExecution.java index 89d5693..2046e1b 100644 --- a/src/main/java/ch/postfinance/sdk/model/AnalyticsQueryExecution.java +++ b/src/main/java/ch/postfinance/sdk/model/AnalyticsQueryExecution.java @@ -118,10 +118,10 @@ public FailureReason getFailureReason() { /** - * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * A unique identifier for the object. * @return id **/ - @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + @ApiModelProperty(value = "A unique identifier for the object.") public Long getId() { return id; } diff --git a/src/main/java/ch/postfinance/sdk/model/BankAccount.java b/src/main/java/ch/postfinance/sdk/model/BankAccount.java index 4ecc8ca..70889ef 100644 --- a/src/main/java/ch/postfinance/sdk/model/BankAccount.java +++ b/src/main/java/ch/postfinance/sdk/model/BankAccount.java @@ -82,10 +82,10 @@ public String getDescription() { /** - * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * A unique identifier for the object. * @return id **/ - @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + @ApiModelProperty(value = "A unique identifier for the object.") public Long getId() { return id; } @@ -102,30 +102,30 @@ public String getIdentifier() { /** - * The linked space id holds the ID of the space to which the entity belongs to. + * The ID of the space this object belongs to. * @return linkedSpaceId **/ - @ApiModelProperty(value = "The linked space id holds the ID of the space to which the entity belongs to.") + @ApiModelProperty(value = "The ID of the space this object belongs to.") public Long getLinkedSpaceId() { return linkedSpaceId; } /** - * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed. * @return plannedPurgeDate **/ - @ApiModelProperty(value = "The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.") + @ApiModelProperty(value = "The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed.") public OffsetDateTime getPlannedPurgeDate() { return plannedPurgeDate; } /** - * + * The object's current state. * @return state **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The object's current state.") public BankAccountState getState() { return state; } @@ -142,10 +142,10 @@ public Long getType() { /** - * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * The version is used for optimistic locking and incremented whenever the object is updated. * @return version **/ - @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + @ApiModelProperty(value = "The version is used for optimistic locking and incremented whenever the object is updated.") public Integer getVersion() { return version; } diff --git a/src/main/java/ch/postfinance/sdk/model/BankAccountType.java b/src/main/java/ch/postfinance/sdk/model/BankAccountType.java index d9be35a..c867588 100644 --- a/src/main/java/ch/postfinance/sdk/model/BankAccountType.java +++ b/src/main/java/ch/postfinance/sdk/model/BankAccountType.java @@ -57,20 +57,20 @@ public class BankAccountType { /** - * + * The description of the object translated into different languages. * @return description **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The description of the object translated into different languages.") public Map getDescription() { return description; } /** - * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * A unique identifier for the object. * @return id **/ - @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + @ApiModelProperty(value = "A unique identifier for the object.") public Long getId() { return id; } @@ -87,10 +87,10 @@ public Map getIdentifierName() { /** - * + * The name of the object translated into different languages. * @return name **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The name of the object translated into different languages.") public Map getName() { return name; } diff --git a/src/main/java/ch/postfinance/sdk/model/BankTransaction.java b/src/main/java/ch/postfinance/sdk/model/BankTransaction.java index 99600d3..384f09b 100644 --- a/src/main/java/ch/postfinance/sdk/model/BankTransaction.java +++ b/src/main/java/ch/postfinance/sdk/model/BankTransaction.java @@ -138,10 +138,10 @@ public Long getCreatedBy() { /** - * The created on date indicates the date on which the entity was stored into the database. + * The date and time when the object was created. * @return createdOn **/ - @ApiModelProperty(value = "The created on date indicates the date on which the entity was stored into the database.") + @ApiModelProperty(value = "The date and time when the object was created.") public OffsetDateTime getCreatedOn() { return createdOn; } @@ -178,30 +178,30 @@ public BankTransactionFlowDirection getFlowDirection() { /** - * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * A unique identifier for the object. * @return id **/ - @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + @ApiModelProperty(value = "A unique identifier for the object.") public Long getId() { return id; } /** - * The linked space id holds the ID of the space to which the entity belongs to. + * The ID of the space this object belongs to. * @return linkedSpaceId **/ - @ApiModelProperty(value = "The linked space id holds the ID of the space to which the entity belongs to.") + @ApiModelProperty(value = "The ID of the space this object belongs to.") public Long getLinkedSpaceId() { return linkedSpaceId; } /** - * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed. * @return plannedPurgeDate **/ - @ApiModelProperty(value = "The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.") + @ApiModelProperty(value = "The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed.") public OffsetDateTime getPlannedPurgeDate() { return plannedPurgeDate; } @@ -238,10 +238,10 @@ public Long getSource() { /** - * + * The object's current state. * @return state **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The object's current state.") public BankTransactionState getState() { return state; } @@ -288,10 +288,10 @@ public OffsetDateTime getValueDate() { /** - * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * The version is used for optimistic locking and incremented whenever the object is updated. * @return version **/ - @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + @ApiModelProperty(value = "The version is used for optimistic locking and incremented whenever the object is updated.") public Integer getVersion() { return version; } diff --git a/src/main/java/ch/postfinance/sdk/model/BankTransactionSource.java b/src/main/java/ch/postfinance/sdk/model/BankTransactionSource.java index 0d70bff..d9c3587 100644 --- a/src/main/java/ch/postfinance/sdk/model/BankTransactionSource.java +++ b/src/main/java/ch/postfinance/sdk/model/BankTransactionSource.java @@ -53,30 +53,30 @@ public class BankTransactionSource { /** - * + * The description of the object translated into different languages. * @return description **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The description of the object translated into different languages.") public Map getDescription() { return description; } /** - * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * A unique identifier for the object. * @return id **/ - @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + @ApiModelProperty(value = "A unique identifier for the object.") public Long getId() { return id; } /** - * + * The name of the object translated into different languages. * @return name **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The name of the object translated into different languages.") public Map getName() { return name; } diff --git a/src/main/java/ch/postfinance/sdk/model/BankTransactionType.java b/src/main/java/ch/postfinance/sdk/model/BankTransactionType.java index 5729799..a4c2508 100644 --- a/src/main/java/ch/postfinance/sdk/model/BankTransactionType.java +++ b/src/main/java/ch/postfinance/sdk/model/BankTransactionType.java @@ -53,30 +53,30 @@ public class BankTransactionType { /** - * + * The description of the object translated into different languages. * @return description **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The description of the object translated into different languages.") public Map getDescription() { return description; } /** - * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * A unique identifier for the object. * @return id **/ - @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + @ApiModelProperty(value = "A unique identifier for the object.") public Long getId() { return id; } /** - * + * The name of the object translated into different languages. * @return name **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The name of the object translated into different languages.") public Map getName() { return name; } diff --git a/src/main/java/ch/postfinance/sdk/model/Charge.java b/src/main/java/ch/postfinance/sdk/model/Charge.java index ffbf97e..4b4b537 100644 --- a/src/main/java/ch/postfinance/sdk/model/Charge.java +++ b/src/main/java/ch/postfinance/sdk/model/Charge.java @@ -112,20 +112,20 @@ public FailureReason getFailureReason() { /** - * + * The language that is linked to the object. * @return language **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The language that is linked to the object.") public String getLanguage() { return language; } /** - * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed. * @return plannedPurgeDate **/ - @ApiModelProperty(value = "The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.") + @ApiModelProperty(value = "The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed.") public OffsetDateTime getPlannedPurgeDate() { return plannedPurgeDate; } @@ -142,10 +142,10 @@ public Long getSpaceViewId() { /** - * + * The object's current state. * @return state **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The object's current state.") public ChargeState getState() { return state; } @@ -202,10 +202,10 @@ public String getUserFailureMessage() { /** - * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * The version is used for optimistic locking and incremented whenever the object is updated. * @return version **/ - @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + @ApiModelProperty(value = "The version is used for optimistic locking and incremented whenever the object is updated.") public Integer getVersion() { return version; } diff --git a/src/main/java/ch/postfinance/sdk/model/ChargeAttempt.java b/src/main/java/ch/postfinance/sdk/model/ChargeAttempt.java index 4ca7dbb..59a2d74 100644 --- a/src/main/java/ch/postfinance/sdk/model/ChargeAttempt.java +++ b/src/main/java/ch/postfinance/sdk/model/ChargeAttempt.java @@ -188,10 +188,10 @@ public PaymentConnectorConfiguration getConnectorConfiguration() { /** - * The created on date indicates the date on which the entity was stored into the database. + * The date and time when the object was created. * @return createdOn **/ - @ApiModelProperty(value = "The created on date indicates the date on which the entity was stored into the database.") + @ApiModelProperty(value = "The date and time when the object was created.") public OffsetDateTime getCreatedOn() { return createdOn; } @@ -268,10 +268,10 @@ public List