Compare commits
18 Commits
7c666aa351
...
ee8cdfc660
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee8cdfc660 | ||
|
|
53adc797a1 | ||
|
|
5c83fff7bf | ||
| 107d5fac84 | |||
| 013553fba2 | |||
| 9cde41bfc3 | |||
| 98babaeb91 | |||
| bfea9a5967 | |||
| 9e5e782192 | |||
| 2e0df0f57c | |||
| 8e2ad79b53 | |||
|
|
6d9712cdeb | ||
| 5306f34daf | |||
| f7a56f3e62 | |||
| 330c7d1e2b | |||
| 3b12204566 | |||
| e534d7161b | |||
|
|
b020a02c82 |
39
src/java/rabbitmq-poc/.gitignore
vendored
Normal file
39
src/java/rabbitmq-poc/.gitignore
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
.idea/modules.xml
|
||||||
|
.idea/jarRepositories.xml
|
||||||
|
.idea/compiler.xml
|
||||||
|
.idea/libraries/
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### Eclipse ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
### Mac OS ###
|
||||||
|
.DS_Store
|
||||||
49
src/java/rabbitmq-poc/pom.xml
Normal file
49
src/java/rabbitmq-poc/pom.xml
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>nl.ovpay</groupId>
|
||||||
|
<artifactId>rabbitmq</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>OVpay - RabbitMQ POC</name>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.rabbitmq</groupId>
|
||||||
|
<artifactId>amqp-client</artifactId>
|
||||||
|
<version>5.23.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Log4j Slf4j Logging -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-api</artifactId>
|
||||||
|
<version>2.23.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-core</artifactId>
|
||||||
|
<version>2.23.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-slf4j-impl</artifactId>
|
||||||
|
<version>2.23.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.json</groupId>
|
||||||
|
<artifactId>json</artifactId>
|
||||||
|
<version>20240303</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>11</source>
|
||||||
|
<target>11</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package nl.ovpay.queue;
|
||||||
|
|
||||||
|
import java.security.cert.X509Certificate;
|
||||||
|
import javax.net.ssl.TrustManager;
|
||||||
|
import javax.net.ssl.X509TrustManager;
|
||||||
|
|
||||||
|
public final class DummyX509TrustManager implements X509TrustManager {
|
||||||
|
|
||||||
|
private static DummyX509TrustManager INSTANCE;
|
||||||
|
|
||||||
|
private DummyX509TrustManager() {
|
||||||
|
// prevent instantiation
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DummyX509TrustManager getInstance() {
|
||||||
|
if (INSTANCE == null) {
|
||||||
|
INSTANCE = new DummyX509TrustManager();
|
||||||
|
}
|
||||||
|
return INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TrustManager[] getDummyArray() {
|
||||||
|
if (INSTANCE == null) {
|
||||||
|
INSTANCE = new DummyX509TrustManager();
|
||||||
|
}
|
||||||
|
return new TrustManager[] { INSTANCE };
|
||||||
|
}
|
||||||
|
|
||||||
|
public X509Certificate[] getAcceptedIssuers() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkClientTrusted(X509Certificate[] certs, String authType) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkServerTrusted(X509Certificate[] certs, String authType) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
package nl.ovpay.queue;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.security.KeyManagementException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.StringJoiner;
|
||||||
|
import javax.net.ssl.HttpsURLConnection;
|
||||||
|
import javax.net.ssl.SSLContext;
|
||||||
|
|
||||||
|
import org.json.JSONObject;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
public final class Helpers {
|
||||||
|
|
||||||
|
private static Logger LOGGER = LoggerFactory.getLogger(Helpers.class);
|
||||||
|
|
||||||
|
public static String getAlertId(String string) throws IOException {
|
||||||
|
return new JSONObject(string).get("alertId").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getXbot(String string) throws IOException {
|
||||||
|
return new JSONObject(string).get("xbot").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void getAlertDetails(String alertId, String xBot, String gboBearerToken) throws Exception {
|
||||||
|
SSLContext sc = SSLContext.getInstance("SSL");
|
||||||
|
sc.init(null, DummyX509TrustManager.getDummyArray(), new java.security.SecureRandom());
|
||||||
|
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
|
||||||
|
|
||||||
|
|
||||||
|
URL url = new URL("https://api.sbx.idbt.translink.nl/api/v3/id-media/tokens/xbot/" + xBot + "/alerts/" + alertId + "/details");
|
||||||
|
URLConnection con = url.openConnection();
|
||||||
|
HttpURLConnection http = (HttpURLConnection)con;
|
||||||
|
http.setRequestMethod("GET");
|
||||||
|
http.setDoOutput(true);
|
||||||
|
http.setRequestProperty("Authorization", "Bearer " + gboBearerToken);
|
||||||
|
http.connect();
|
||||||
|
|
||||||
|
try(InputStream is = http.getInputStream()) {
|
||||||
|
String response = new String(is.readAllBytes(), StandardCharsets.UTF_8);
|
||||||
|
LOGGER.info("GBO API 8851 alert details response for xBOT " + xBot + ": \n" + new JSONObject(response).toString(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getGboBearerToken() throws IOException, NoSuchAlgorithmException, KeyManagementException {
|
||||||
|
SSLContext sc = SSLContext.getInstance("SSL");
|
||||||
|
sc.init(null, DummyX509TrustManager.getDummyArray(), new java.security.SecureRandom());
|
||||||
|
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
|
||||||
|
|
||||||
|
URL url = new URL("https://api.sbx.idbt.translink.nl/api/v3/auth/oauth2/token");
|
||||||
|
URLConnection con = url.openConnection();
|
||||||
|
HttpURLConnection http = (HttpURLConnection)con;
|
||||||
|
http.setRequestMethod("POST");
|
||||||
|
http.setDoOutput(true);
|
||||||
|
|
||||||
|
Map<String,String> arguments = new HashMap<>();
|
||||||
|
arguments.put("client_id", "HTM-auth-client");
|
||||||
|
arguments.put("client_secret", "HTM-auth-827kJJ");
|
||||||
|
arguments.put("grant_type", "client_credentials");
|
||||||
|
StringJoiner sj = new StringJoiner("&");
|
||||||
|
for(Map.Entry<String,String> entry : arguments.entrySet())
|
||||||
|
sj.add(URLEncoder.encode(entry.getKey(), "UTF-8") + "="
|
||||||
|
+ URLEncoder.encode(entry.getValue(), "UTF-8"));
|
||||||
|
byte[] out = sj.toString().getBytes(StandardCharsets.UTF_8);
|
||||||
|
int length = out.length;
|
||||||
|
|
||||||
|
http.setFixedLengthStreamingMode(length);
|
||||||
|
http.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
|
||||||
|
http.connect();
|
||||||
|
try(OutputStream os = http.getOutputStream()) {
|
||||||
|
os.write(out);
|
||||||
|
}
|
||||||
|
try(InputStream is = http.getInputStream()) {
|
||||||
|
String response = new String(is.readAllBytes(), StandardCharsets.UTF_8);
|
||||||
|
JSONObject json = new JSONObject(response);
|
||||||
|
LOGGER.info("Got GBO bearer token: " + json.get("access_token"));
|
||||||
|
return json.get("access_token").toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
package nl.ovpay.queue;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.rabbitmq.client.AMQP;
|
||||||
|
import com.rabbitmq.client.Channel;
|
||||||
|
import com.rabbitmq.client.Connection;
|
||||||
|
import com.rabbitmq.client.ConnectionFactory;
|
||||||
|
import com.rabbitmq.client.DeliverCallback;
|
||||||
|
import com.rabbitmq.client.impl.ForgivingExceptionHandler;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
public class RabbitConnector {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(RabbitConnector.class);
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
ConnectionFactory factory = new ConnectionFactory();
|
||||||
|
factory.setVirtualHost("/");
|
||||||
|
factory.setAutomaticRecoveryEnabled(true);
|
||||||
|
factory.setPort(443);
|
||||||
|
factory.setHost("not.sbx.idbt.translink.nl");
|
||||||
|
factory.setUsername("BEID_3_ALERTS_nZs3");
|
||||||
|
factory.setPassword("VyubhPnczKgTB2zJ");
|
||||||
|
factory.useSslProtocol("TLSv1.2");
|
||||||
|
factory.setExceptionHandler(new ForgivingExceptionHandler());
|
||||||
|
Map<String, Object> configs = factory.getClientProperties();
|
||||||
|
LOGGER.info("Client properties: \n" + new JSONObject(configs).toString(2));
|
||||||
|
|
||||||
|
Connection connection = factory.newConnection();
|
||||||
|
Channel channel = connection.createChannel();
|
||||||
|
DeliverCallback deliverCallback = initDeliverCallback(channel);
|
||||||
|
|
||||||
|
AMQP.Queue.DeclareOk queue = channel.queueDeclarePassive("BEID_3.ALERTS");
|
||||||
|
LOGGER.info(
|
||||||
|
"Declared queue: " + queue.getQueue() + ", consumer count: " + queue.getConsumerCount() + ", message count: " +
|
||||||
|
queue.getMessageCount());
|
||||||
|
|
||||||
|
// Second parameter controls autoAck - false = no autoAck = messages are only deleted from queue after consumer acknowledges them
|
||||||
|
channel.basicConsume(queue.getQueue(), false, deliverCallback, consumerTag -> {});
|
||||||
|
LOGGER.info("Waiting for messages from the queue. To exit press CTRL+C");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static DeliverCallback initDeliverCallback(Channel channel) {
|
||||||
|
return (consumerTag, delivery) -> {
|
||||||
|
final String message = new String(delivery.getBody(), "UTF-8");
|
||||||
|
LOGGER.info("Received from message from the queue: \n " + new JSONObject(message).toString(2));
|
||||||
|
|
||||||
|
LOGGER.info("Acknowledging message with delivery tag: " + delivery.getEnvelope().getDeliveryTag());
|
||||||
|
channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
|
||||||
|
LOGGER.info("Successfully acknowledged message with delivery tag: " + delivery.getEnvelope().getDeliveryTag());
|
||||||
|
|
||||||
|
LOGGER.info("Getting alert details via GBO API 8851...");
|
||||||
|
try {
|
||||||
|
String alertId = Helpers.getAlertId(message);
|
||||||
|
String xBot = Helpers.getXbot(message);
|
||||||
|
String gboBearerToken = Helpers.getGboBearerToken();
|
||||||
|
|
||||||
|
Helpers.getAlertDetails(alertId, xBot, gboBearerToken);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
17
src/java/rabbitmq-poc/src/main/resources/log4j2.xml
Normal file
17
src/java/rabbitmq-poc/src/main/resources/log4j2.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<Configuration status="INFO">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="STDOUT-COLOR">
|
||||||
|
<PatternLayout
|
||||||
|
pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} | %highlight{%-5level} | %cyan{%-28c{1}} - %msg %blue{[%t]}%n"
|
||||||
|
disableAnsi="false"/>
|
||||||
|
</Console>
|
||||||
|
<Console name="STDOUT-NOCOLOR">
|
||||||
|
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5level | %-28c{1} - %msg [%t]%n"/>
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="INFO">
|
||||||
|
<AppenderRef ref="STDOUT-NOCOLOR"/>
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
||||||
@ -27,7 +27,7 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
example: 1
|
example: 1
|
||||||
required: false
|
required: false
|
||||||
description: Filter on possible contract status. 1 = new, 2 = active, 3 = suspended, 4 = cancelled, 5 = terminated.
|
description: Filter on possible contract status. 1 = new, 2 = active, 3 = suspended, 4 = cancelled, 5 = terminated, 6 = pending cancellation, 7 = pending termination.
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@ -53,7 +53,6 @@ paths:
|
|||||||
"termDuration": "P0Y1M0D",
|
"termDuration": "P0Y1M0D",
|
||||||
"billingDay": 15,
|
"billingDay": 15,
|
||||||
"highestInvoiceTerm": 1,
|
"highestInvoiceTerm": 1,
|
||||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
|
||||||
"created": "2024-08-01 15:01:00.000",
|
"created": "2024-08-01 15:01:00.000",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -70,7 +69,6 @@ paths:
|
|||||||
"termDuration": "P0Y1M0D",
|
"termDuration": "P0Y1M0D",
|
||||||
"billingDay": 15,
|
"billingDay": 15,
|
||||||
"highestInvoiceTerm": 1,
|
"highestInvoiceTerm": 1,
|
||||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
|
||||||
"created": "2024-08-01 15:01:00.000",
|
"created": "2024-08-01 15:01:00.000",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -98,7 +96,6 @@ paths:
|
|||||||
"termDuration": "P0Y1M0D",
|
"termDuration": "P0Y1M0D",
|
||||||
"billingDay": 15,
|
"billingDay": 15,
|
||||||
"highestInvoiceTerm": 0,
|
"highestInvoiceTerm": 0,
|
||||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
|
||||||
"contractVersions":
|
"contractVersions":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -152,7 +149,7 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
explode: false
|
explode: false
|
||||||
required: false
|
required: false
|
||||||
description: Filter on possible contract status. 1 = new, 2 = active, 3 = suspended, 4 = cancelled, 5 = terminated.
|
description: Filter on possible contract status. 1 = new, 2 = active, 3 = suspended, 4 = cancelled, 5 = terminated, 6 = pending cancellation, 7 = pending termination.
|
||||||
- in: query
|
- in: query
|
||||||
name: billingDay
|
name: billingDay
|
||||||
schema:
|
schema:
|
||||||
@ -206,7 +203,6 @@ paths:
|
|||||||
"termDuration": "P0Y1M0D",
|
"termDuration": "P0Y1M0D",
|
||||||
"billingDay": 15,
|
"billingDay": 15,
|
||||||
"highestInvoiceTerm": 1,
|
"highestInvoiceTerm": 1,
|
||||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
|
||||||
"contractInvoices":
|
"contractInvoices":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -265,7 +261,6 @@ paths:
|
|||||||
"termDuration": "P0Y1M0D",
|
"termDuration": "P0Y1M0D",
|
||||||
"billingDay": 15,
|
"billingDay": 15,
|
||||||
"highestInvoiceTerm": 1,
|
"highestInvoiceTerm": 1,
|
||||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
|
||||||
"contractInvoices":
|
"contractInvoices":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -351,7 +346,6 @@ paths:
|
|||||||
"termDuration": "P0Y1M0D",
|
"termDuration": "P0Y1M0D",
|
||||||
"billingDay": 15,
|
"billingDay": 15,
|
||||||
"highestInvoiceTerm": 1,
|
"highestInvoiceTerm": 1,
|
||||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
|
||||||
"contractVersions":
|
"contractVersions":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -429,7 +423,6 @@ paths:
|
|||||||
"productName": "HTM 20% korting 2024",
|
"productName": "HTM 20% korting 2024",
|
||||||
"billingDay": 15,
|
"billingDay": 15,
|
||||||
"highestInvoiceTerm": 2,
|
"highestInvoiceTerm": 2,
|
||||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
responses:
|
responses:
|
||||||
@ -878,6 +871,8 @@ paths:
|
|||||||
{ "contractStatusId": 3, "name": "suspended" },
|
{ "contractStatusId": 3, "name": "suspended" },
|
||||||
{ "contractStatusId": 4, "name": "cancelled" },
|
{ "contractStatusId": 4, "name": "cancelled" },
|
||||||
{ "contractStatusId": 5, "name": "terminated" },
|
{ "contractStatusId": 5, "name": "terminated" },
|
||||||
|
{ "contractStatusId": 6, "name": "pending cancellation" },
|
||||||
|
{ "contractStatusId": 7, "name": "pending termination" },
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
/actiontypes:
|
/actiontypes:
|
||||||
@ -892,7 +887,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/ContractStatus"
|
$ref: "#/components/schemas/ActionType"
|
||||||
example:
|
example:
|
||||||
{
|
{
|
||||||
"actionTypes":
|
"actionTypes":
|
||||||
@ -957,10 +952,6 @@ components:
|
|||||||
highestInvoiceTerm:
|
highestInvoiceTerm:
|
||||||
type: integer
|
type: integer
|
||||||
example: 1
|
example: 1
|
||||||
xSpit:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
example: 1c345237-4d84-47f0-93c2-7b94338e3355
|
|
||||||
contractVersions:
|
contractVersions:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -1077,7 +1068,7 @@ components:
|
|||||||
example: 2
|
example: 2
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
enum: [new, active, suspended, cancelled, terminated]
|
enum: [new, active, suspended, cancelled, terminated, pending cancellation, pending termination]
|
||||||
example: active
|
example: active
|
||||||
ActionType:
|
ActionType:
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
@ -43,7 +43,6 @@ paths:
|
|||||||
"termDuration": "P0Y1M0D",
|
"termDuration": "P0Y1M0D",
|
||||||
"billingDay": 15,
|
"billingDay": 15,
|
||||||
"highestInvoiceTerm": 1,
|
"highestInvoiceTerm": 1,
|
||||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
|
||||||
"created": "2024-08-01 15:01:00.000",
|
"created": "2024-08-01 15:01:00.000",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -59,7 +58,6 @@ paths:
|
|||||||
"termDuration": "P0Y1M0D",
|
"termDuration": "P0Y1M0D",
|
||||||
"billingDay": 15,
|
"billingDay": 15,
|
||||||
"highestInvoiceTerm": 1,
|
"highestInvoiceTerm": 1,
|
||||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
|
||||||
"created": "2024-08-01 15:01:00.000",
|
"created": "2024-08-01 15:01:00.000",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@ -128,7 +126,6 @@ paths:
|
|||||||
"termDuration": "P0Y1M0D",
|
"termDuration": "P0Y1M0D",
|
||||||
"billingDay": 15,
|
"billingDay": 15,
|
||||||
"highestInvoiceTerm": 1,
|
"highestInvoiceTerm": 1,
|
||||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
|
||||||
"contractVersions":
|
"contractVersions":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|||||||
@ -30,11 +30,21 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
example: 1000001
|
example: 1000001
|
||||||
|
- name: customerStatusId
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
- name: debtorNumber
|
- name: debtorNumber
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
example: 100001
|
example: 100001
|
||||||
|
- name: debtorStatusId
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
- name: birthname
|
- name: birthname
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
@ -221,6 +231,10 @@ paths:
|
|||||||
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
|
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
|
||||||
"contractId": "56B17EF-C436-9043-B76C-481797WEB464F",
|
"contractId": "56B17EF-C436-9043-B76C-481797WEB464F",
|
||||||
"_links": {
|
"_links": {
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances/1",
|
||||||
|
"method": "GET"
|
||||||
|
},
|
||||||
"get_order": {
|
"get_order": {
|
||||||
"href": "https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E",
|
"href": "https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E",
|
||||||
"method": "GET"
|
"method": "GET"
|
||||||
@ -244,9 +258,6 @@ components:
|
|||||||
customerNumber:
|
customerNumber:
|
||||||
type: integer
|
type: integer
|
||||||
example: 1000001
|
example: 1000001
|
||||||
debtorNumber:
|
|
||||||
type: string
|
|
||||||
example: DB100001
|
|
||||||
customerStatus:
|
customerStatus:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -256,6 +267,18 @@ components:
|
|||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
example: Active
|
example: Active
|
||||||
|
debtorNumber:
|
||||||
|
type: string
|
||||||
|
example: DB100001
|
||||||
|
debtorStatus:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
debtorStatusId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: Active
|
||||||
person:
|
person:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -320,7 +343,16 @@ components:
|
|||||||
_links:
|
_links:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
delete:
|
self:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/addresses/1
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
delete_address:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
href:
|
href:
|
||||||
@ -358,7 +390,16 @@ components:
|
|||||||
_links:
|
_links:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
delete:
|
self:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/phones/1
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
delete_phone:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
href:
|
href:
|
||||||
@ -370,6 +411,25 @@ components:
|
|||||||
_links:
|
_links:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
self:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
create_customer_status:
|
||||||
|
type: object
|
||||||
|
description: ONLY ALLOWED FOR SMP - Create a new customer status
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/statuses
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: POST
|
||||||
partial_edit:
|
partial_edit:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -379,9 +439,6 @@ components:
|
|||||||
method:
|
method:
|
||||||
type: string
|
type: string
|
||||||
example: PATCH
|
example: PATCH
|
||||||
templated:
|
|
||||||
type: boolean
|
|
||||||
example: true
|
|
||||||
get_tokens:
|
get_tokens:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -391,9 +448,6 @@ components:
|
|||||||
method:
|
method:
|
||||||
type: string
|
type: string
|
||||||
example: GET
|
example: GET
|
||||||
templated:
|
|
||||||
type: boolean
|
|
||||||
example: true
|
|
||||||
create_token:
|
create_token:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -403,65 +457,6 @@ components:
|
|||||||
method:
|
method:
|
||||||
type: string
|
type: string
|
||||||
example: POST
|
example: POST
|
||||||
templated:
|
|
||||||
type: boolean
|
|
||||||
example: true
|
|
||||||
_templates:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
partial_edit:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
method:
|
|
||||||
type: string
|
|
||||||
example: PATCH
|
|
||||||
properties:
|
|
||||||
example:
|
|
||||||
[
|
|
||||||
{ name: person, required: true, properties: [
|
|
||||||
{ name: prefix, required: false, type: string },
|
|
||||||
{ name: birthname, required: false, type: string },
|
|
||||||
{ name: surname, required: false, type: string },
|
|
||||||
{ name: suffix, required: false, type: string },
|
|
||||||
{ name: dateOfBirth, required: false, type: string },
|
|
||||||
{ name: emailAddress, required: false, type: string },
|
|
||||||
{ name: addresses, required: false, multi: true, properties: [
|
|
||||||
{ name: addressId, required: false, type: integer },
|
|
||||||
{ name: isPreferred, required: false, type: boolean },
|
|
||||||
{ name: addressTypeId, required: false, type: integer },
|
|
||||||
{ name: street, required: false, type: string },
|
|
||||||
{ name: houseNumber, required: false, type: integer },
|
|
||||||
{ name: houseNumberSuffix, required: false, type: string },
|
|
||||||
{ name: postalCode, required: false, type: string },
|
|
||||||
{ name: city, required: false, type: string },
|
|
||||||
{ name: country, required: false, type: string }
|
|
||||||
]},
|
|
||||||
{ name: phones, required: false, multi: true, properties: [
|
|
||||||
{ name: phoneId, required: false, type: integer },
|
|
||||||
{ name: isPreferred, required: false, type: boolean },
|
|
||||||
{ name: phoneTypeId, required: false, type: integer },
|
|
||||||
{ name: number, required: false, type: string },
|
|
||||||
{ name: countryCode, required: false, type: string }
|
|
||||||
]}
|
|
||||||
] }
|
|
||||||
]
|
|
||||||
create_token:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
method:
|
|
||||||
type: string
|
|
||||||
example: POST
|
|
||||||
properties:
|
|
||||||
example:
|
|
||||||
[
|
|
||||||
{ name: ovPayToken, required: true, properties: [
|
|
||||||
{ name: tokenTypeId, required: true, type: integer },
|
|
||||||
{ name: alias, required: true, type: string },
|
|
||||||
{ name: serviceReferenceId, required: false, type: string },
|
|
||||||
{ name: amount, required: false, type: integer },
|
|
||||||
]}
|
|
||||||
]
|
|
||||||
|
|
||||||
OvPayTokensResponse:
|
OvPayTokensResponse:
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
@ -506,8 +501,18 @@ components:
|
|||||||
_links:
|
_links:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
partial_edit:
|
self:
|
||||||
type: object
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
partial_edit:
|
||||||
|
type: object
|
||||||
|
description: External touchpoints are only allowed to change alias - SMP can also change tokenStatus
|
||||||
properties:
|
properties:
|
||||||
href:
|
href:
|
||||||
type: string
|
type: string
|
||||||
@ -515,10 +520,7 @@ components:
|
|||||||
method:
|
method:
|
||||||
type: string
|
type: string
|
||||||
example: PATCH
|
example: PATCH
|
||||||
templated:
|
replace_token:
|
||||||
type: boolean
|
|
||||||
example: true
|
|
||||||
replace:
|
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
href:
|
href:
|
||||||
@ -527,10 +529,7 @@ components:
|
|||||||
method:
|
method:
|
||||||
type: string
|
type: string
|
||||||
example: POST
|
example: POST
|
||||||
templated:
|
delete_token:
|
||||||
type: boolean
|
|
||||||
example: true
|
|
||||||
delete:
|
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
href:
|
href:
|
||||||
@ -539,7 +538,7 @@ components:
|
|||||||
method:
|
method:
|
||||||
type: string
|
type: string
|
||||||
example: DELETE
|
example: DELETE
|
||||||
productInstances:
|
get_productinstances:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
href:
|
href:
|
||||||
@ -548,7 +547,7 @@ components:
|
|||||||
method:
|
method:
|
||||||
type: string
|
type: string
|
||||||
example: GET
|
example: GET
|
||||||
trips:
|
get_trips:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
href:
|
href:
|
||||||
@ -557,41 +556,6 @@ components:
|
|||||||
method:
|
method:
|
||||||
type: string
|
type: string
|
||||||
example: GET
|
example: GET
|
||||||
_templates:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
partial_edit:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
method:
|
|
||||||
type: string
|
|
||||||
example: PATCH
|
|
||||||
properties:
|
|
||||||
example:
|
|
||||||
[
|
|
||||||
{ name: ovPayToken, required: true, properties: [
|
|
||||||
{ name: alias, required: false, type: string }
|
|
||||||
]}
|
|
||||||
]
|
|
||||||
replace:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
method:
|
|
||||||
type: string
|
|
||||||
example: POST
|
|
||||||
properties:
|
|
||||||
example:
|
|
||||||
[
|
|
||||||
{ name: ovPayToken, required: true, properties: [
|
|
||||||
{ name: newTokenId, required: false, type: integer },
|
|
||||||
{ name: tokenTypeId, required: false, type: integer },
|
|
||||||
{ name: alias, required: false, type: string },
|
|
||||||
{ name: serviceReferenceId, required: false, type: string },
|
|
||||||
{ name: amount, required: false, type: integer },
|
|
||||||
]}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
OvPayTokenProductInstancesResponse:
|
OvPayTokenProductInstancesResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -649,6 +613,15 @@ components:
|
|||||||
_links:
|
_links:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
self:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
get_order:
|
get_order:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
285
src/openapi/customers/customers-crud-v2.yaml
Normal file
285
src/openapi/customers/customers-crud-v2.yaml
Normal file
@ -0,0 +1,285 @@
|
|||||||
|
openapi: "3.0.3"
|
||||||
|
info:
|
||||||
|
title: ABT Customers CRUD APIs v2
|
||||||
|
version: "1.0"
|
||||||
|
description: CRUD APIs for ABT Customer database. These are NOT the functional APIs from Service Engine.
|
||||||
|
servers:
|
||||||
|
- url: https://api.integratielaag.nl/v1
|
||||||
|
paths:
|
||||||
|
/ovpaytokens:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Token
|
||||||
|
summary: Find OVpay tokens.
|
||||||
|
description: Find OVpay tokens.
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: ovPayTokenId
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 71
|
||||||
|
required: false
|
||||||
|
description: The id of the token.
|
||||||
|
- in: query
|
||||||
|
name: customerProfileId
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 12
|
||||||
|
required: false
|
||||||
|
description: The id of the customer profile.
|
||||||
|
- in: query
|
||||||
|
name: tokenTypeId
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
example: [1, 2]
|
||||||
|
explode: false
|
||||||
|
required: false
|
||||||
|
description: Filter on possible token types. 1 = EMV, 2 = OV-pas physical, 3 = OV-pas digital.
|
||||||
|
- in: query
|
||||||
|
name: xTat
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: 700b0516-bf8b-4e6e-bf16-13bfeb078e23
|
||||||
|
explode: false
|
||||||
|
required: false
|
||||||
|
description: The XTAT of the token.
|
||||||
|
- in: query
|
||||||
|
name: xBot
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: de1a9a7a-a777-4473-889c-44a3bb07daae
|
||||||
|
explode: false
|
||||||
|
required: false
|
||||||
|
description: The XBOT of the token.
|
||||||
|
- in: query
|
||||||
|
name: alias
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: Mijn OV-pas
|
||||||
|
required: false
|
||||||
|
description: The alias of the token.
|
||||||
|
- in: query
|
||||||
|
name: lastDigits
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 3301
|
||||||
|
required: false
|
||||||
|
description: The last digits of the token.
|
||||||
|
- in: query
|
||||||
|
name: ovpasNumber
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: 63AW974
|
||||||
|
required: false
|
||||||
|
description: Number of the OVpas.
|
||||||
|
- in: query
|
||||||
|
name: tokenStatusId
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
example: [1, 2]
|
||||||
|
explode: false
|
||||||
|
required: false
|
||||||
|
description: Filter on possible token statuses. 1 = expired, 2 = active, 3 = replaced, 4 = inactive, 5 = suspended, 6 = removed by customer.
|
||||||
|
- in: query
|
||||||
|
name: expirationDate
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
example: 2029-03-22T09:00:00
|
||||||
|
required: false
|
||||||
|
description: The expiration date of the token.
|
||||||
|
- in: query
|
||||||
|
name: replacedByTokenId
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 12
|
||||||
|
required: false
|
||||||
|
description: The id of the token that replaced this token.
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
example:
|
||||||
|
{
|
||||||
|
"ovPayTokens":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"ovPayTokenId": 71,
|
||||||
|
"customerProfileId": 12,
|
||||||
|
"tokenType":
|
||||||
|
{ "tokenTypeId": 2, "name": "OV-pas physical" },
|
||||||
|
"xTat": "700b0516-bf8b-4e6e-bf16-13bfeb078e23",
|
||||||
|
"xBot": "de1a9a7a-a777-4473-889c-44a3bb07daae",
|
||||||
|
"alias": "Mijn OV-pas",
|
||||||
|
"lastDigits": 3301,
|
||||||
|
"ovpasNumber": "63AW974",
|
||||||
|
"tokenStatus": { "tokenStatusId": 2, "name": "Active" },
|
||||||
|
"expirationDate": "2029-03-22T09:00:00",
|
||||||
|
"replacedByTokenId": 12,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"href": null,
|
||||||
|
}
|
||||||
|
/directdebitmandates:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Mandates
|
||||||
|
summary: Find direct debit mandates.
|
||||||
|
description: Find direct debit mandates.
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: directDebitMandateId
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 71
|
||||||
|
required: false
|
||||||
|
description: The id of the direct debit mandate.
|
||||||
|
- in: query
|
||||||
|
name: customerProfileId
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 12
|
||||||
|
required: false
|
||||||
|
description: The id of the customer related to the mandate.
|
||||||
|
- in: query
|
||||||
|
name: billingInformationId
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 51
|
||||||
|
required: false
|
||||||
|
description: The id of the billing information related to the mandate.
|
||||||
|
- in: query
|
||||||
|
name: directDebitMandateTypeId
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
example: [1, 2]
|
||||||
|
explode: false
|
||||||
|
required: false
|
||||||
|
description: The id of the direct debit mandate type. 1 = Paper contract, 2 = PIN transaction, 3 = SEPA eMandate, 4 = Digital signature, 5 = iDEAL transaction.
|
||||||
|
- in: query
|
||||||
|
name: mandateAddressId
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 21
|
||||||
|
required: false
|
||||||
|
description: The id of the address related to the mandate.
|
||||||
|
- in: query
|
||||||
|
name: createdBefore
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
example: 2020-12-31T23:59:59
|
||||||
|
required: false
|
||||||
|
description: Filter on created before.
|
||||||
|
- in: query
|
||||||
|
name: createdAfter
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
example: 2020-01-01T00:00:00
|
||||||
|
required: false
|
||||||
|
description: Filter on created after.
|
||||||
|
- in: query
|
||||||
|
name: mandateReference
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: CORE01
|
||||||
|
required: false
|
||||||
|
description: Filter on mandate reference.
|
||||||
|
- in: query
|
||||||
|
name: mandateState
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
example: [SIGNED, PREPARED]
|
||||||
|
explode: false
|
||||||
|
required: false
|
||||||
|
description: Filter on possible states of the mandate. SIGNED = signed, PREPARED = prepared, CANCELLED = cancelled.
|
||||||
|
- in: query
|
||||||
|
name: updatedBefore
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
example: 2020-12-31T23:59:59
|
||||||
|
required: false
|
||||||
|
description: Filter on updated before.
|
||||||
|
- in: query
|
||||||
|
name: updatedAfter
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
example: 2020-01-01T00:00:00
|
||||||
|
required: false
|
||||||
|
description: Filter on updated after.
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
example:
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"directDebitMandateId": 71,
|
||||||
|
"customerProfileId": 12,
|
||||||
|
"billingInformationId": 51,
|
||||||
|
"directDebitMandateType": {
|
||||||
|
"directDebitMandateTypeId": 1,
|
||||||
|
"name": "import",
|
||||||
|
"description": "import"
|
||||||
|
},
|
||||||
|
"mandateAddressId": 21,
|
||||||
|
"created": "2024-03-22T08:55:00",
|
||||||
|
"mandateReference": "CORE01",
|
||||||
|
"mandateState": "SINGED",
|
||||||
|
"updateTimestamp": "2024-03-22T08:55:00"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
components:
|
||||||
|
securitySchemes:
|
||||||
|
bearerToken:
|
||||||
|
type: http
|
||||||
|
scheme: bearer
|
||||||
|
bearerFormat: JWT
|
||||||
|
schemas:
|
||||||
|
unavailable:
|
||||||
|
type: object
|
||||||
|
rfc9457:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
format: url
|
||||||
|
example: https://example.com/probs/out-of-credit
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
example: You do not have enough credit.
|
||||||
|
detail:
|
||||||
|
type: string
|
||||||
|
example: Your current balance is 30, but that costs 50.
|
||||||
|
instance:
|
||||||
|
type: string
|
||||||
|
example: /account/12345/msgs/abc
|
||||||
|
balance:
|
||||||
|
type: string
|
||||||
|
example: 30
|
||||||
|
accounts:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
example:
|
||||||
|
- /account/12345
|
||||||
|
- /account/67890
|
||||||
5376
src/openapi/customers/customers.yaml
Normal file
5376
src/openapi/customers/customers.yaml
Normal file
File diff suppressed because it is too large
Load Diff
1047
src/openapi/customers/customers_reference-crud.yaml
Normal file
1047
src/openapi/customers/customers_reference-crud.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -715,6 +715,139 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
||||||
description: The JWT of the logged in customer (in case of a web shop).
|
description: The JWT of the logged in customer (in case of a web shop).
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: orderId
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: afce35b2-1dff-4ace-98d0-4b9ac405c87d
|
||||||
|
description: The order id.
|
||||||
|
- in: query
|
||||||
|
name: orderNumber
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: "ORD123456"
|
||||||
|
description: The order number.
|
||||||
|
- in: query
|
||||||
|
name: externalOrderId
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: 7bef22f6-70a3-4655-bc2a-c40c61581b32
|
||||||
|
description: The external order id.
|
||||||
|
- in: query
|
||||||
|
name: customerProfileId
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 42
|
||||||
|
description: The customer profile id.
|
||||||
|
- in: query
|
||||||
|
name: xTat
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: 7208e73e-87a6-46d9-bb6d-867ffc460c9b
|
||||||
|
description: xTat used in order fulfillment. Note that this is a joined parameter via PurchasedProduct.
|
||||||
|
tags:
|
||||||
|
- Order Retrieval v2.1
|
||||||
|
summary: Find orders.
|
||||||
|
description: Find orders.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
example:
|
||||||
|
{
|
||||||
|
"orders":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d",
|
||||||
|
"externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7",
|
||||||
|
"orderNumber": "123456",
|
||||||
|
"customerProfileId": 42,
|
||||||
|
"totalAmount": 121,
|
||||||
|
"touchPoint":
|
||||||
|
{
|
||||||
|
"salesTouchpointId": 3,
|
||||||
|
"name": "Website (Perplex)",
|
||||||
|
"isActive": true,
|
||||||
|
"retailerId": 1001,
|
||||||
|
},
|
||||||
|
"language":
|
||||||
|
{
|
||||||
|
"languageId": 1,
|
||||||
|
"name": "Nederlands",
|
||||||
|
"iso639Code": "nl-NL",
|
||||||
|
"ietfCode": "nl",
|
||||||
|
},
|
||||||
|
"billingAddressId": 1,
|
||||||
|
"shippingAddressId": 1,
|
||||||
|
"createdOn": "2024-03-22T09:00:00",
|
||||||
|
"lastUpdatedOn": "2024-03-22T09:00:00",
|
||||||
|
"order_OrderStatus":
|
||||||
|
{
|
||||||
|
"order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f",
|
||||||
|
"orderStatus":
|
||||||
|
{ "orderStatusId": 4, "name": "paid" },
|
||||||
|
"createdOn": "2024-03-22T09:00:00",
|
||||||
|
"description": "Order succesvol betaald",
|
||||||
|
},
|
||||||
|
"payments":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"createdOn": "2024-03-22T09:00:00",
|
||||||
|
"amountDebit": 121,
|
||||||
|
"paymentMethodId": 1,
|
||||||
|
"touchPointId": 1,
|
||||||
|
"isRefund": false,
|
||||||
|
"htmPaymentReference": "HTM-1234",
|
||||||
|
"pspPaymentReference": "Buckaroo-1234",
|
||||||
|
"paymentStatuses":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"createdOn": "2024-03-22T09:00:00",
|
||||||
|
"statusCode": "190",
|
||||||
|
"statusDescription": "Success",
|
||||||
|
"statusSubCode": "S001",
|
||||||
|
"statusSubDescription": "PaymentSuccessFul",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"mandateInput":
|
||||||
|
{
|
||||||
|
"directDebitMandateTypeId": 1,
|
||||||
|
"createdOn": "2024-03-22T09:00:00",
|
||||||
|
"bic": "RABONL2U",
|
||||||
|
"iban": "NL44RABO0123456789",
|
||||||
|
"ascription": "J. de Vries",
|
||||||
|
"place": "Den Haag",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"_links":
|
||||||
|
{
|
||||||
|
"self":
|
||||||
|
{
|
||||||
|
"href": "https://api.example.com/items/1",
|
||||||
|
"method": "GET",
|
||||||
|
"templated": true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"_links":
|
||||||
|
{
|
||||||
|
"self":
|
||||||
|
{
|
||||||
|
"href": "https://api.example.com/items",
|
||||||
|
"method": "GET",
|
||||||
|
"templated": true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"href": "string",
|
||||||
|
}
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Order Creation v2.1
|
- Order Creation v2.1
|
||||||
|
|||||||
@ -59,6 +59,12 @@ paths:
|
|||||||
"isTravelProduct": true,
|
"isTravelProduct": true,
|
||||||
"name": "Kortingsabonnement"
|
"name": "Kortingsabonnement"
|
||||||
},
|
},
|
||||||
|
"tokenTypes": [
|
||||||
|
{
|
||||||
|
"tokenTypeId": 1,
|
||||||
|
"name": "EMV"
|
||||||
|
}
|
||||||
|
],
|
||||||
"sellableTouchPointIds": null,
|
"sellableTouchPointIds": null,
|
||||||
"amountInclTax": null,
|
"amountInclTax": null,
|
||||||
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
|
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
|
||||||
@ -83,6 +89,7 @@ paths:
|
|||||||
"isTravelProduct": false,
|
"isTravelProduct": false,
|
||||||
"name": "Barcode"
|
"name": "Barcode"
|
||||||
},
|
},
|
||||||
|
"tokenTypes": null,
|
||||||
"sellableTouchPointIds": [
|
"sellableTouchPointIds": [
|
||||||
1,
|
1,
|
||||||
2,
|
2,
|
||||||
@ -112,6 +119,7 @@ paths:
|
|||||||
"isTravelProduct": false,
|
"isTravelProduct": false,
|
||||||
"name": "Barcode"
|
"name": "Barcode"
|
||||||
},
|
},
|
||||||
|
"tokenTypes": null,
|
||||||
"sellableTouchPointIds": [
|
"sellableTouchPointIds": [
|
||||||
3,
|
3,
|
||||||
4
|
4
|
||||||
@ -139,6 +147,12 @@ paths:
|
|||||||
"isTravelProduct": true,
|
"isTravelProduct": true,
|
||||||
"name": "Kortingsabonnement"
|
"name": "Kortingsabonnement"
|
||||||
},
|
},
|
||||||
|
"tokenTypes": [
|
||||||
|
{
|
||||||
|
"tokenTypeId": 1,
|
||||||
|
"name": "EMV"
|
||||||
|
}
|
||||||
|
],
|
||||||
"sellableTouchPointIds": null,
|
"sellableTouchPointIds": null,
|
||||||
"amountInclTax": null,
|
"amountInclTax": null,
|
||||||
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
|
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
|
||||||
@ -154,6 +168,7 @@ paths:
|
|||||||
"isTravelProduct": false,
|
"isTravelProduct": false,
|
||||||
"name": "Barcode"
|
"name": "Barcode"
|
||||||
},
|
},
|
||||||
|
"tokenTypes": null,
|
||||||
"sellableTouchPointIds": [
|
"sellableTouchPointIds": [
|
||||||
1,
|
1,
|
||||||
2,
|
2,
|
||||||
@ -174,6 +189,12 @@ paths:
|
|||||||
"isTravelProduct": true,
|
"isTravelProduct": true,
|
||||||
"name": "Kortingsabonnement"
|
"name": "Kortingsabonnement"
|
||||||
},
|
},
|
||||||
|
"tokenTypes": [
|
||||||
|
{
|
||||||
|
"tokenTypeId": 1,
|
||||||
|
"name": "EMV"
|
||||||
|
}
|
||||||
|
],
|
||||||
"sellableTouchPointIds": [
|
"sellableTouchPointIds": [
|
||||||
1,
|
1,
|
||||||
2
|
2
|
||||||
@ -192,6 +213,12 @@ paths:
|
|||||||
"isTravelProduct": true,
|
"isTravelProduct": true,
|
||||||
"name": "Kortingsabonnement"
|
"name": "Kortingsabonnement"
|
||||||
},
|
},
|
||||||
|
"tokenTypes": [
|
||||||
|
{
|
||||||
|
"tokenTypeId": 1,
|
||||||
|
"name": "EMV"
|
||||||
|
}
|
||||||
|
],
|
||||||
"sellableTouchPointIds": [
|
"sellableTouchPointIds": [
|
||||||
3,
|
3,
|
||||||
4
|
4
|
||||||
@ -219,6 +246,7 @@ paths:
|
|||||||
"isTravelProduct": false,
|
"isTravelProduct": false,
|
||||||
"name": "Barcode"
|
"name": "Barcode"
|
||||||
},
|
},
|
||||||
|
"tokenTypes": null,
|
||||||
"sellableTouchPointIds": [
|
"sellableTouchPointIds": [
|
||||||
3,
|
3,
|
||||||
4
|
4
|
||||||
@ -237,6 +265,12 @@ paths:
|
|||||||
"isTravelProduct": true,
|
"isTravelProduct": true,
|
||||||
"name": "Kortingsabonnement"
|
"name": "Kortingsabonnement"
|
||||||
},
|
},
|
||||||
|
"tokenTypes": [
|
||||||
|
{
|
||||||
|
"tokenTypeId": 1,
|
||||||
|
"name": "EMV"
|
||||||
|
}
|
||||||
|
],
|
||||||
"sellableTouchPointIds": [
|
"sellableTouchPointIds": [
|
||||||
3,
|
3,
|
||||||
4
|
4
|
||||||
@ -2074,6 +2108,20 @@ components:
|
|||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
example: Kortingsabonnement
|
example: Kortingsabonnement
|
||||||
|
tokenTypes:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- tokenTypeId
|
||||||
|
- name
|
||||||
|
properties:
|
||||||
|
tokenTypeId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: EMV
|
||||||
sellableTouchPointIds:
|
sellableTouchPointIds:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user