Skip to content

Commit

Permalink
Release 4.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrowanwallee committed Aug 8, 2022
1 parent bdf40f8 commit 5e2302b
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 27 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>com.wallee</groupId>
<artifactId>wallee-java-sdk</artifactId>
<version>4.0.6</version>
<version>4.0.7</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 "com.wallee:wallee-java-sdk:4.0.6"
compile "com.wallee:wallee-java-sdk:4.0.7"
```

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

Then manually install the following JARs:

* `target/wallee-java-sdk-4.0.6.jar`
* `target/wallee-java-sdk-4.0.7.jar`
* `target/lib/*.jar`

## Usage
Expand Down
2 changes: 1 addition & 1 deletion 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 = 'com.wallee'
version = '4.0.6'
version = '4.0.7'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion 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 := "com.wallee",
name := "wallee-java-sdk",
version := "4.0.6",
version := "4.0.7",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>wallee-java-sdk</artifactId>
<packaging>jar</packaging>
<name>wallee-java-sdk</name>
<version>4.0.6</version>
<version>4.0.7</version>
<url>https://www.wallee.com</url>
<description>The SDK for simplifying the integration with wallee API.</description>
<scm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.fasterxml.jackson.annotation.JsonValue;
import com.wallee.sdk.model.AddressCreate;
import com.wallee.sdk.model.LineItemCreate;
import com.wallee.sdk.model.PaymentMethodBrand;
import com.wallee.sdk.model.TokenizationMode;
import com.wallee.sdk.model.TransactionCompletionBehavior;
import io.swagger.annotations.ApiModel;
Expand All @@ -45,7 +44,7 @@
public class AbstractTransactionPending {

@JsonProperty("allowedPaymentMethodBrands")
protected List<PaymentMethodBrand> allowedPaymentMethodBrands = null;
protected List<Long> allowedPaymentMethodBrands = null;


@JsonProperty("allowedPaymentMethodConfigurations")
Expand Down Expand Up @@ -121,12 +120,12 @@ public class AbstractTransactionPending {



public AbstractTransactionPending allowedPaymentMethodBrands(List<PaymentMethodBrand> allowedPaymentMethodBrands) {
public AbstractTransactionPending allowedPaymentMethodBrands(List<Long> allowedPaymentMethodBrands) {
this.allowedPaymentMethodBrands = allowedPaymentMethodBrands;
return this;
}

public AbstractTransactionPending addAllowedPaymentMethodBrandsItem(PaymentMethodBrand allowedPaymentMethodBrandsItem) {
public AbstractTransactionPending addAllowedPaymentMethodBrandsItem(Long allowedPaymentMethodBrandsItem) {
if (this.allowedPaymentMethodBrands == null) {
this.allowedPaymentMethodBrands = new ArrayList<>();
}
Expand All @@ -139,11 +138,11 @@ public AbstractTransactionPending addAllowedPaymentMethodBrandsItem(PaymentMetho
* @return allowedPaymentMethodBrands
**/
@ApiModelProperty(value = "")
public List<PaymentMethodBrand> getAllowedPaymentMethodBrands() {
public List<Long> getAllowedPaymentMethodBrands() {
return allowedPaymentMethodBrands;
}

public void setAllowedPaymentMethodBrands(List<PaymentMethodBrand> allowedPaymentMethodBrands) {
public void setAllowedPaymentMethodBrands(List<Long> allowedPaymentMethodBrands) {
this.allowedPaymentMethodBrands = allowedPaymentMethodBrands;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/**
* wallee SDK
*
* This library allows to interact with the wallee 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 com.wallee.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.wallee.sdk.model.InvoiceReimbursement;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.*;
import java.time.OffsetDateTime;

/**
*
*/
@ApiModel(description = "")

public class InvoiceReimbursementWithRefundReference extends InvoiceReimbursement {

@JsonProperty("refundMerchantReference")
protected String refundMerchantReference = null;



/**
*
* @return refundMerchantReference
**/
@ApiModelProperty(value = "")
public String getRefundMerchantReference() {
return refundMerchantReference;
}



@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InvoiceReimbursementWithRefundReference invoiceReimbursementWithRefundReference = (InvoiceReimbursementWithRefundReference) o;
return Objects.equals(this.amount, invoiceReimbursementWithRefundReference.amount) &&
Objects.equals(this.createdOn, invoiceReimbursementWithRefundReference.createdOn) &&
Objects.equals(this.currency, invoiceReimbursementWithRefundReference.currency) &&
Objects.equals(this.discardedBy, invoiceReimbursementWithRefundReference.discardedBy) &&
Objects.equals(this.discardedOn, invoiceReimbursementWithRefundReference.discardedOn) &&
Objects.equals(this.id, invoiceReimbursementWithRefundReference.id) &&
Objects.equals(this.linkedSpaceId, invoiceReimbursementWithRefundReference.linkedSpaceId) &&
Objects.equals(this.paymentConnectorConfiguration, invoiceReimbursementWithRefundReference.paymentConnectorConfiguration) &&
Objects.equals(this.paymentInitiationAdviceFile, invoiceReimbursementWithRefundReference.paymentInitiationAdviceFile) &&
Objects.equals(this.processedBy, invoiceReimbursementWithRefundReference.processedBy) &&
Objects.equals(this.processedOn, invoiceReimbursementWithRefundReference.processedOn) &&
Objects.equals(this.recipientCity, invoiceReimbursementWithRefundReference.recipientCity) &&
Objects.equals(this.recipientCountry, invoiceReimbursementWithRefundReference.recipientCountry) &&
Objects.equals(this.recipientFamilyName, invoiceReimbursementWithRefundReference.recipientFamilyName) &&
Objects.equals(this.recipientGivenName, invoiceReimbursementWithRefundReference.recipientGivenName) &&
Objects.equals(this.recipientIban, invoiceReimbursementWithRefundReference.recipientIban) &&
Objects.equals(this.recipientPostcode, invoiceReimbursementWithRefundReference.recipientPostcode) &&
Objects.equals(this.recipientStreet, invoiceReimbursementWithRefundReference.recipientStreet) &&
Objects.equals(this.senderIban, invoiceReimbursementWithRefundReference.senderIban) &&
Objects.equals(this.state, invoiceReimbursementWithRefundReference.state) &&
Objects.equals(this.version, invoiceReimbursementWithRefundReference.version) &&
Objects.equals(this.refundMerchantReference, invoiceReimbursementWithRefundReference.refundMerchantReference) &&
super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(amount, createdOn, currency, discardedBy, discardedOn, id, linkedSpaceId, paymentConnectorConfiguration, paymentInitiationAdviceFile, processedBy, processedOn, recipientCity, recipientCountry, recipientFamilyName, recipientGivenName, recipientIban, recipientPostcode, recipientStreet, senderIban, state, version, refundMerchantReference, super.hashCode());
}


@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InvoiceReimbursementWithRefundReference {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" createdOn: ").append(toIndentedString(createdOn)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" discardedBy: ").append(toIndentedString(discardedBy)).append("\n");
sb.append(" discardedOn: ").append(toIndentedString(discardedOn)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n");
sb.append(" paymentConnectorConfiguration: ").append(toIndentedString(paymentConnectorConfiguration)).append("\n");
sb.append(" paymentInitiationAdviceFile: ").append(toIndentedString(paymentInitiationAdviceFile)).append("\n");
sb.append(" processedBy: ").append(toIndentedString(processedBy)).append("\n");
sb.append(" processedOn: ").append(toIndentedString(processedOn)).append("\n");
sb.append(" recipientCity: ").append(toIndentedString(recipientCity)).append("\n");
sb.append(" recipientCountry: ").append(toIndentedString(recipientCountry)).append("\n");
sb.append(" recipientFamilyName: ").append(toIndentedString(recipientFamilyName)).append("\n");
sb.append(" recipientGivenName: ").append(toIndentedString(recipientGivenName)).append("\n");
sb.append(" recipientIban: ").append(toIndentedString(recipientIban)).append("\n");
sb.append(" recipientPostcode: ").append(toIndentedString(recipientPostcode)).append("\n");
sb.append(" recipientStreet: ").append(toIndentedString(recipientStreet)).append("\n");
sb.append(" senderIban: ").append(toIndentedString(senderIban)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" refundMerchantReference: ").append(toIndentedString(refundMerchantReference)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}

}

5 changes: 2 additions & 3 deletions src/main/java/com/wallee/sdk/model/Transaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import com.wallee.sdk.model.FailureReason;
import com.wallee.sdk.model.LineItem;
import com.wallee.sdk.model.PaymentConnectorConfiguration;
import com.wallee.sdk.model.PaymentMethodBrand;
import com.wallee.sdk.model.PaymentTerminal;
import com.wallee.sdk.model.Token;
import com.wallee.sdk.model.TokenizationMode;
Expand Down Expand Up @@ -67,7 +66,7 @@ public class Transaction {


@JsonProperty("allowedPaymentMethodBrands")
protected List<PaymentMethodBrand> allowedPaymentMethodBrands = null;
protected List<Long> allowedPaymentMethodBrands = null;


@JsonProperty("allowedPaymentMethodConfigurations")
Expand Down Expand Up @@ -364,7 +363,7 @@ public String getAcceptLanguageHeader() {
* @return allowedPaymentMethodBrands
**/
@ApiModelProperty(value = "")
public List<PaymentMethodBrand> getAllowedPaymentMethodBrands() {
public List<Long> getAllowedPaymentMethodBrands() {
return allowedPaymentMethodBrands;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.wallee.sdk.model.EntityQuery;
import com.wallee.sdk.model.EntityQueryFilter;
import com.wallee.sdk.model.InvoiceReimbursement;
import com.wallee.sdk.model.InvoiceReimbursementWithRefundReference;
import com.wallee.sdk.model.ServerError;

import com.fasterxml.jackson.core.type.TypeReference;
Expand Down Expand Up @@ -323,20 +324,20 @@ public HttpResponse readForHttpResponse(Long spaceId, Long id, Map<String, Objec
* <p><b>542</b> - This status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the client request.
* @param spaceId
* @param query The query restricts the invoice reimbursements which are returned by the search.
* @return List&lt;InvoiceReimbursement&gt;
* @return List&lt;InvoiceReimbursementWithRefundReference&gt;
* @throws IOException if an error occurs while attempting to invoke the API
* For more information visit this link.
* @see <a href="https://app-wallee.com/doc/api/web-service#invoice-reimbursement-service--search">Search Documentation</a>
**/
public List<InvoiceReimbursement> search(Long spaceId, EntityQuery query) throws IOException {
public List<InvoiceReimbursementWithRefundReference> search(Long spaceId, EntityQuery query) throws IOException {
HttpResponse response = searchForHttpResponse(spaceId, query);
String returnType = "List&lt;InvoiceReimbursement&gt;";
String returnType = "List&lt;InvoiceReimbursementWithRefundReference&gt;";
if(returnType.equals("String")){
return (List<InvoiceReimbursement>) (Object) response.parseAsString();
return (List<InvoiceReimbursementWithRefundReference>) (Object) response.parseAsString();
}
TypeReference typeRef = new TypeReference<List<InvoiceReimbursement>>() {};
return (List<InvoiceReimbursement>)apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
TypeReference typeRef = new TypeReference<List<InvoiceReimbursementWithRefundReference>>() {};
return (List<InvoiceReimbursementWithRefundReference>)apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}

/**
Expand All @@ -348,20 +349,20 @@ public List<InvoiceReimbursement> search(Long spaceId, EntityQuery query) throws
* @param spaceId
* @param query The query restricts the invoice reimbursements which are returned by the search.
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @return List&lt;InvoiceReimbursement&gt;
* @return List&lt;InvoiceReimbursementWithRefundReference&gt;
* @throws IOException if an error occurs while attempting to invoke the API
* For more information visit this link.
* @see <a href="https://app-wallee.com/doc/api/web-service#invoice-reimbursement-service--search">Search Documentation</a>
**/
public List<InvoiceReimbursement> search(Long spaceId, EntityQuery query, Map<String, Object> params) throws IOException {
public List<InvoiceReimbursementWithRefundReference> search(Long spaceId, EntityQuery query, Map<String, Object> params) throws IOException {
HttpResponse response = searchForHttpResponse(spaceId, query, params);
String returnType = "List&lt;InvoiceReimbursement&gt;";
String returnType = "List&lt;InvoiceReimbursementWithRefundReference&gt;";
if(returnType.equals("String")){
return (List<InvoiceReimbursement>) (Object) response.parseAsString();
return (List<InvoiceReimbursementWithRefundReference>) (Object) response.parseAsString();
}
TypeReference typeRef = new TypeReference<List<InvoiceReimbursement>>() {};
return (List<InvoiceReimbursement>)apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
TypeReference typeRef = new TypeReference<List<InvoiceReimbursementWithRefundReference>>() {};
return (List<InvoiceReimbursementWithRefundReference>)apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}

public HttpResponse searchForHttpResponse(Long spaceId, EntityQuery query) throws IOException {
Expand Down

0 comments on commit 5e2302b

Please sign in to comment.