develop #38
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
|
||||
example: 1
|
||||
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:
|
||||
"200":
|
||||
description: OK
|
||||
@ -53,7 +53,6 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
},
|
||||
{
|
||||
@ -70,7 +69,6 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
},
|
||||
],
|
||||
@ -98,7 +96,6 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 0,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"contractVersions":
|
||||
[
|
||||
{
|
||||
@ -152,7 +149,7 @@ paths:
|
||||
type: integer
|
||||
explode: 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
|
||||
name: billingDay
|
||||
schema:
|
||||
@ -206,7 +203,6 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"contractInvoices":
|
||||
[
|
||||
{
|
||||
@ -265,7 +261,6 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"contractInvoices":
|
||||
[
|
||||
{
|
||||
@ -351,7 +346,6 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"contractVersions":
|
||||
[
|
||||
{
|
||||
@ -429,7 +423,6 @@ paths:
|
||||
"productName": "HTM 20% korting 2024",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 2,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
},
|
||||
}
|
||||
responses:
|
||||
@ -878,6 +871,8 @@ paths:
|
||||
{ "contractStatusId": 3, "name": "suspended" },
|
||||
{ "contractStatusId": 4, "name": "cancelled" },
|
||||
{ "contractStatusId": 5, "name": "terminated" },
|
||||
{ "contractStatusId": 6, "name": "pending cancellation" },
|
||||
{ "contractStatusId": 7, "name": "pending termination" },
|
||||
],
|
||||
}
|
||||
/actiontypes:
|
||||
@ -892,7 +887,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ContractStatus"
|
||||
$ref: "#/components/schemas/ActionType"
|
||||
example:
|
||||
{
|
||||
"actionTypes":
|
||||
@ -957,10 +952,6 @@ components:
|
||||
highestInvoiceTerm:
|
||||
type: integer
|
||||
example: 1
|
||||
xSpit:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 1c345237-4d84-47f0-93c2-7b94338e3355
|
||||
contractVersions:
|
||||
type: array
|
||||
items:
|
||||
@ -1077,7 +1068,7 @@ components:
|
||||
example: 2
|
||||
name:
|
||||
type: string
|
||||
enum: [new, active, suspended, cancelled, terminated]
|
||||
enum: [new, active, suspended, cancelled, terminated, pending cancellation, pending termination]
|
||||
example: active
|
||||
ActionType:
|
||||
type: object
|
||||
|
||||
@ -43,7 +43,6 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
},
|
||||
{
|
||||
@ -59,7 +58,6 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
},
|
||||
]
|
||||
@ -128,7 +126,6 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"contractVersions":
|
||||
[
|
||||
{
|
||||
|
||||
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
|
||||
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
||||
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:
|
||||
tags:
|
||||
- Order Creation v2.1
|
||||
|
||||
@ -59,6 +59,12 @@ paths:
|
||||
"isTravelProduct": true,
|
||||
"name": "Kortingsabonnement"
|
||||
},
|
||||
"tokenTypes": [
|
||||
{
|
||||
"tokenTypeId": 1,
|
||||
"name": "EMV"
|
||||
}
|
||||
],
|
||||
"sellableTouchPointIds": null,
|
||||
"amountInclTax": null,
|
||||
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
|
||||
@ -83,6 +89,7 @@ paths:
|
||||
"isTravelProduct": false,
|
||||
"name": "Barcode"
|
||||
},
|
||||
"tokenTypes": null,
|
||||
"sellableTouchPointIds": [
|
||||
1,
|
||||
2,
|
||||
@ -112,6 +119,7 @@ paths:
|
||||
"isTravelProduct": false,
|
||||
"name": "Barcode"
|
||||
},
|
||||
"tokenTypes": null,
|
||||
"sellableTouchPointIds": [
|
||||
3,
|
||||
4
|
||||
@ -139,6 +147,12 @@ paths:
|
||||
"isTravelProduct": true,
|
||||
"name": "Kortingsabonnement"
|
||||
},
|
||||
"tokenTypes": [
|
||||
{
|
||||
"tokenTypeId": 1,
|
||||
"name": "EMV"
|
||||
}
|
||||
],
|
||||
"sellableTouchPointIds": null,
|
||||
"amountInclTax": null,
|
||||
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
|
||||
@ -154,6 +168,7 @@ paths:
|
||||
"isTravelProduct": false,
|
||||
"name": "Barcode"
|
||||
},
|
||||
"tokenTypes": null,
|
||||
"sellableTouchPointIds": [
|
||||
1,
|
||||
2,
|
||||
@ -174,6 +189,12 @@ paths:
|
||||
"isTravelProduct": true,
|
||||
"name": "Kortingsabonnement"
|
||||
},
|
||||
"tokenTypes": [
|
||||
{
|
||||
"tokenTypeId": 1,
|
||||
"name": "EMV"
|
||||
}
|
||||
],
|
||||
"sellableTouchPointIds": [
|
||||
1,
|
||||
2
|
||||
@ -192,6 +213,12 @@ paths:
|
||||
"isTravelProduct": true,
|
||||
"name": "Kortingsabonnement"
|
||||
},
|
||||
"tokenTypes": [
|
||||
{
|
||||
"tokenTypeId": 1,
|
||||
"name": "EMV"
|
||||
}
|
||||
],
|
||||
"sellableTouchPointIds": [
|
||||
3,
|
||||
4
|
||||
@ -219,6 +246,7 @@ paths:
|
||||
"isTravelProduct": false,
|
||||
"name": "Barcode"
|
||||
},
|
||||
"tokenTypes": null,
|
||||
"sellableTouchPointIds": [
|
||||
3,
|
||||
4
|
||||
@ -237,6 +265,12 @@ paths:
|
||||
"isTravelProduct": true,
|
||||
"name": "Kortingsabonnement"
|
||||
},
|
||||
"tokenTypes": [
|
||||
{
|
||||
"tokenTypeId": 1,
|
||||
"name": "EMV"
|
||||
}
|
||||
],
|
||||
"sellableTouchPointIds": [
|
||||
3,
|
||||
4
|
||||
@ -2074,6 +2108,20 @@ components:
|
||||
name:
|
||||
type: string
|
||||
example: Kortingsabonnement
|
||||
tokenTypes:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- tokenTypeId
|
||||
- name
|
||||
properties:
|
||||
tokenTypeId:
|
||||
type: integer
|
||||
example: 1
|
||||
name:
|
||||
type: string
|
||||
example: EMV
|
||||
sellableTouchPointIds:
|
||||
type: array
|
||||
items:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user