Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Release 6.18.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
IngenicoEPayments authored and jenkins committed Dec 11, 2020
1 parent 37514d2 commit e245459
Show file tree
Hide file tree
Showing 25 changed files with 815 additions and 120 deletions.
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.ingenico.connect.gateway</groupId>
<artifactId>connect-sdk-java</artifactId>
<version>6.17.0</version>
<version>6.18.0</version>
<packaging>jar</packaging>

<name>connect-sdk-java</name>
Expand Down Expand Up @@ -50,8 +50,8 @@
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>

<version.httpclient>4.5.6</version.httpclient>
<version.httpmime>4.5.6</version.httpmime>
<version.httpclient>4.5.13</version.httpclient>
<version.httpmime>4.5.13</version.httpmime>
</properties>

<build>
Expand Down Expand Up @@ -308,7 +308,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<version>2.8.6</version>
</dependency>

<dependency>
Expand All @@ -334,7 +334,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.List;
import java.util.Map;

import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Assert;
import org.junit.Test;
Expand Down Expand Up @@ -40,20 +41,20 @@ public void testMultipartFormDataUploadPostMultipartFormDataObjectWithResponse()
@SuppressWarnings("unchecked")
Map<String, Object> response = communicator.post("/post", null, null, multipart, Map.class, null);

Assert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> files = (Map<String, Object>) response.get("files");
Assert.assertEquals(1, files.size());
Assert.assertNotNull(files.get("file"));
Assert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
Assert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));
MatcherAssert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));

Assert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> form = (Map<String, Object>) response.get("form");
Assert.assertEquals(1, form.size());
Assert.assertNotNull(form.get("value"));
Assert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
Assert.assertEquals(form.get("value"), "Hello World");
} finally {
content.close();
Expand All @@ -80,20 +81,20 @@ public void testMultipartFormDataUploadPostMultipartFormDataRequestWithResponse(
@SuppressWarnings("unchecked")
Map<String, Object> response = communicator.post("/post", null, null, new MultipartFormDataObjectWrapper(multipart), Map.class, null);

Assert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> files = (Map<String, Object>) response.get("files");
Assert.assertEquals(1, files.size());
Assert.assertNotNull(files.get("file"));
Assert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
Assert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));
MatcherAssert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));

Assert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> form = (Map<String, Object>) response.get("form");
Assert.assertEquals(1, form.size());
Assert.assertNotNull(form.get("value"));
Assert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
Assert.assertEquals(form.get("value"), "Hello World");
} finally {
content.close();
Expand Down Expand Up @@ -124,20 +125,20 @@ public void handleBody(InputStream bodyStream, List<ResponseHeader> headers) thr
@SuppressWarnings("unchecked")
Map<String, Object> response = DefaultMarshaller.INSTANCE.unmarshal(bodyStream, Map.class);

Assert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> files = (Map<String, Object>) response.get("files");
Assert.assertEquals(1, files.size());
Assert.assertNotNull(files.get("file"));
Assert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
Assert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));
MatcherAssert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));

Assert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> form = (Map<String, Object>) response.get("form");
Assert.assertEquals(1, form.size());
Assert.assertNotNull(form.get("value"));
Assert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
Assert.assertEquals(form.get("value"), "Hello World");
}
}, null);
Expand Down Expand Up @@ -170,20 +171,20 @@ public void handleBody(InputStream bodyStream, List<ResponseHeader> headers) thr
@SuppressWarnings("unchecked")
Map<String, Object> response = DefaultMarshaller.INSTANCE.unmarshal(bodyStream, Map.class);

Assert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> files = (Map<String, Object>) response.get("files");
Assert.assertEquals(1, files.size());
Assert.assertNotNull(files.get("file"));
Assert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
Assert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));
MatcherAssert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));

Assert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> form = (Map<String, Object>) response.get("form");
Assert.assertEquals(1, form.size());
Assert.assertNotNull(form.get("value"));
Assert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
Assert.assertEquals(form.get("value"), "Hello World");
}
}, null);
Expand Down Expand Up @@ -212,20 +213,20 @@ public void testMultipartFormDataUploadPutMultipartFormDataObjectWithResponse()
@SuppressWarnings("unchecked")
Map<String, Object> response = communicator.put("/put", null, null, multipart, Map.class, null);

Assert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> files = (Map<String, Object>) response.get("files");
Assert.assertEquals(1, files.size());
Assert.assertNotNull(files.get("file"));
Assert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
Assert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));
MatcherAssert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));

Assert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> form = (Map<String, Object>) response.get("form");
Assert.assertEquals(1, form.size());
Assert.assertNotNull(form.get("value"));
Assert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
Assert.assertEquals(form.get("value"), "Hello World");
} finally {
content.close();
Expand All @@ -252,20 +253,20 @@ public void testMultipartFormDataUploadPutMultipartFormDataRequestWithResponse()
@SuppressWarnings("unchecked")
Map<String, Object> response = communicator.put("/put", null, null, new MultipartFormDataObjectWrapper(multipart), Map.class, null);

Assert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> files = (Map<String, Object>) response.get("files");
Assert.assertEquals(1, files.size());
Assert.assertNotNull(files.get("file"));
Assert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
Assert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));
MatcherAssert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));

Assert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> form = (Map<String, Object>) response.get("form");
Assert.assertEquals(1, form.size());
Assert.assertNotNull(form.get("value"));
Assert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
Assert.assertEquals(form.get("value"), "Hello World");
} finally {
content.close();
Expand Down Expand Up @@ -296,20 +297,20 @@ public void handleBody(InputStream bodyStream, List<ResponseHeader> headers) thr
@SuppressWarnings("unchecked")
Map<String, Object> response = DefaultMarshaller.INSTANCE.unmarshal(bodyStream, Map.class);

Assert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> files = (Map<String, Object>) response.get("files");
Assert.assertEquals(1, files.size());
Assert.assertNotNull(files.get("file"));
Assert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
Assert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));
MatcherAssert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));

Assert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> form = (Map<String, Object>) response.get("form");
Assert.assertEquals(1, form.size());
Assert.assertNotNull(form.get("value"));
Assert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
Assert.assertEquals(form.get("value"), "Hello World");
}
}, null);
Expand Down Expand Up @@ -342,20 +343,20 @@ public void handleBody(InputStream bodyStream, List<ResponseHeader> headers) thr
@SuppressWarnings("unchecked")
Map<String, Object> response = DefaultMarshaller.INSTANCE.unmarshal(bodyStream, Map.class);

Assert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("files"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> files = (Map<String, Object>) response.get("files");
Assert.assertEquals(1, files.size());
Assert.assertNotNull(files.get("file"));
Assert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
Assert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));
MatcherAssert.assertThat(files.get("file"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat((String) files.get("file"), Matchers.containsString("\nconnect.api.endpoint.host"));

Assert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
MatcherAssert.assertThat(response.get("form"), Matchers.instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> form = (Map<String, Object>) response.get("form");
Assert.assertEquals(1, form.size());
Assert.assertNotNull(form.get("value"));
Assert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
MatcherAssert.assertThat(form.get("value"), Matchers.instanceOf(String.class));
Assert.assertEquals(form.get("value"), "Hello World");
}
}, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

import com.ingenico.connect.gateway.sdk.java.Client;
import com.ingenico.connect.gateway.sdk.java.domain.product.Directory;
import com.ingenico.connect.gateway.sdk.java.domain.product.PaymentProducts;
import com.ingenico.connect.gateway.sdk.java.merchant.products.DirectoryParams;
import com.ingenico.connect.gateway.sdk.java.merchant.products.FindProductsParams;

public class PaymentProductsTest extends ItTest {

Expand All @@ -18,6 +20,27 @@ public class PaymentProductsTest extends ItTest {
@Test
public void test() throws URISyntaxException, IOException {

FindProductsParams params = new FindProductsParams();
params.setCountryCode("NL");
params.setCurrencyCode("EUR");

Client client = getClient();
try {
PaymentProducts response = client.merchant(getMerchantId()).products().find(params);

Assert.assertTrue(response.getPaymentProducts().size() > 0);

} finally {
client.close();
}
}

/**
* Smoke test for product directories service.
*/
@Test
public void testDirectories() throws URISyntaxException, IOException {

DirectoryParams params = new DirectoryParams();
params.setCountryCode("NL");
params.setCurrencyCode("EUR");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public class AdditionalOrderInputAirlineData {

private AirlineData airlineData = null;

private LodgingData lodgingData = null;

/**
* Object that holds airline specific data
*/
Expand All @@ -21,4 +23,18 @@ public AirlineData getAirlineData() {
public void setAirlineData(AirlineData value) {
this.airlineData = value;
}

/**
* Object that holds lodging specific data
*/
public LodgingData getLodgingData() {
return lodgingData;
}

/**
* Object that holds lodging specific data
*/
public void setLodgingData(LodgingData value) {
this.lodgingData = value;
}
}
Loading

0 comments on commit e245459

Please sign in to comment.