Compare commits
No commits in common. "ee8cdfc660bd1d72c49d4cd648976bc0f547c215" and "7c666aa351bc8943400ac1aca99699db65e8c269" have entirely different histories.
ee8cdfc660
...
7c666aa351
39
src/java/rabbitmq-poc/.gitignore
vendored
39
src/java/rabbitmq-poc/.gitignore
vendored
@ -1,39 +0,0 @@
|
||||
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
|
||||
@ -1,49 +0,0 @@
|
||||
<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>
|
||||
@ -1,40 +0,0 @@
|
||||
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) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,90 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
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);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
<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, 6 = pending cancellation, 7 = pending termination.
|
||||
description: Filter on possible contract status. 1 = new, 2 = active, 3 = suspended, 4 = cancelled, 5 = terminated.
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@ -53,6 +53,7 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
},
|
||||
{
|
||||
@ -69,6 +70,7 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
},
|
||||
],
|
||||
@ -96,6 +98,7 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 0,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"contractVersions":
|
||||
[
|
||||
{
|
||||
@ -149,7 +152,7 @@ paths:
|
||||
type: integer
|
||||
explode: false
|
||||
required: false
|
||||
description: Filter on possible contract status. 1 = new, 2 = active, 3 = suspended, 4 = cancelled, 5 = terminated, 6 = pending cancellation, 7 = pending termination.
|
||||
description: Filter on possible contract status. 1 = new, 2 = active, 3 = suspended, 4 = cancelled, 5 = terminated.
|
||||
- in: query
|
||||
name: billingDay
|
||||
schema:
|
||||
@ -203,6 +206,7 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"contractInvoices":
|
||||
[
|
||||
{
|
||||
@ -261,6 +265,7 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"contractInvoices":
|
||||
[
|
||||
{
|
||||
@ -346,6 +351,7 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"contractVersions":
|
||||
[
|
||||
{
|
||||
@ -423,6 +429,7 @@ paths:
|
||||
"productName": "HTM 20% korting 2024",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 2,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
},
|
||||
}
|
||||
responses:
|
||||
@ -871,8 +878,6 @@ paths:
|
||||
{ "contractStatusId": 3, "name": "suspended" },
|
||||
{ "contractStatusId": 4, "name": "cancelled" },
|
||||
{ "contractStatusId": 5, "name": "terminated" },
|
||||
{ "contractStatusId": 6, "name": "pending cancellation" },
|
||||
{ "contractStatusId": 7, "name": "pending termination" },
|
||||
],
|
||||
}
|
||||
/actiontypes:
|
||||
@ -887,7 +892,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ActionType"
|
||||
$ref: "#/components/schemas/ContractStatus"
|
||||
example:
|
||||
{
|
||||
"actionTypes":
|
||||
@ -952,6 +957,10 @@ components:
|
||||
highestInvoiceTerm:
|
||||
type: integer
|
||||
example: 1
|
||||
xSpit:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 1c345237-4d84-47f0-93c2-7b94338e3355
|
||||
contractVersions:
|
||||
type: array
|
||||
items:
|
||||
@ -1068,7 +1077,7 @@ components:
|
||||
example: 2
|
||||
name:
|
||||
type: string
|
||||
enum: [new, active, suspended, cancelled, terminated, pending cancellation, pending termination]
|
||||
enum: [new, active, suspended, cancelled, terminated]
|
||||
example: active
|
||||
ActionType:
|
||||
type: object
|
||||
|
||||
@ -43,6 +43,7 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
},
|
||||
{
|
||||
@ -58,6 +59,7 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
},
|
||||
]
|
||||
@ -126,6 +128,7 @@ paths:
|
||||
"termDuration": "P0Y1M0D",
|
||||
"billingDay": 15,
|
||||
"highestInvoiceTerm": 1,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"contractVersions":
|
||||
[
|
||||
{
|
||||
|
||||
@ -30,21 +30,11 @@ paths:
|
||||
schema:
|
||||
type: integer
|
||||
example: 1000001
|
||||
- name: customerStatusId
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
example: 1
|
||||
- name: debtorNumber
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
example: 100001
|
||||
- name: debtorStatusId
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
example: 1
|
||||
- name: birthname
|
||||
in: query
|
||||
schema:
|
||||
@ -231,10 +221,6 @@ paths:
|
||||
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
|
||||
"contractId": "56B17EF-C436-9043-B76C-481797WEB464F",
|
||||
"_links": {
|
||||
"self": {
|
||||
"href": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances/1",
|
||||
"method": "GET"
|
||||
},
|
||||
"get_order": {
|
||||
"href": "https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E",
|
||||
"method": "GET"
|
||||
@ -258,6 +244,9 @@ components:
|
||||
customerNumber:
|
||||
type: integer
|
||||
example: 1000001
|
||||
debtorNumber:
|
||||
type: string
|
||||
example: DB100001
|
||||
customerStatus:
|
||||
type: object
|
||||
properties:
|
||||
@ -267,18 +256,6 @@ components:
|
||||
name:
|
||||
type: string
|
||||
example: Active
|
||||
debtorNumber:
|
||||
type: string
|
||||
example: DB100001
|
||||
debtorStatus:
|
||||
type: object
|
||||
properties:
|
||||
debtorStatusId:
|
||||
type: integer
|
||||
example: 1
|
||||
name:
|
||||
type: string
|
||||
example: Active
|
||||
person:
|
||||
type: object
|
||||
properties:
|
||||
@ -343,16 +320,7 @@ components:
|
||||
_links:
|
||||
type: object
|
||||
properties:
|
||||
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:
|
||||
delete:
|
||||
type: object
|
||||
properties:
|
||||
href:
|
||||
@ -390,16 +358,7 @@ components:
|
||||
_links:
|
||||
type: object
|
||||
properties:
|
||||
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:
|
||||
delete:
|
||||
type: object
|
||||
properties:
|
||||
href:
|
||||
@ -411,25 +370,6 @@ components:
|
||||
_links:
|
||||
type: object
|
||||
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:
|
||||
type: object
|
||||
properties:
|
||||
@ -439,6 +379,9 @@ components:
|
||||
method:
|
||||
type: string
|
||||
example: PATCH
|
||||
templated:
|
||||
type: boolean
|
||||
example: true
|
||||
get_tokens:
|
||||
type: object
|
||||
properties:
|
||||
@ -448,6 +391,9 @@ components:
|
||||
method:
|
||||
type: string
|
||||
example: GET
|
||||
templated:
|
||||
type: boolean
|
||||
example: true
|
||||
create_token:
|
||||
type: object
|
||||
properties:
|
||||
@ -457,6 +403,65 @@ components:
|
||||
method:
|
||||
type: string
|
||||
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:
|
||||
type: object
|
||||
required:
|
||||
@ -501,18 +506,8 @@ components:
|
||||
_links:
|
||||
type: object
|
||||
properties:
|
||||
self:
|
||||
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:
|
||||
href:
|
||||
type: string
|
||||
@ -520,7 +515,10 @@ components:
|
||||
method:
|
||||
type: string
|
||||
example: PATCH
|
||||
replace_token:
|
||||
templated:
|
||||
type: boolean
|
||||
example: true
|
||||
replace:
|
||||
type: object
|
||||
properties:
|
||||
href:
|
||||
@ -529,7 +527,10 @@ components:
|
||||
method:
|
||||
type: string
|
||||
example: POST
|
||||
delete_token:
|
||||
templated:
|
||||
type: boolean
|
||||
example: true
|
||||
delete:
|
||||
type: object
|
||||
properties:
|
||||
href:
|
||||
@ -538,7 +539,7 @@ components:
|
||||
method:
|
||||
type: string
|
||||
example: DELETE
|
||||
get_productinstances:
|
||||
productInstances:
|
||||
type: object
|
||||
properties:
|
||||
href:
|
||||
@ -547,7 +548,7 @@ components:
|
||||
method:
|
||||
type: string
|
||||
example: GET
|
||||
get_trips:
|
||||
trips:
|
||||
type: object
|
||||
properties:
|
||||
href:
|
||||
@ -556,6 +557,41 @@ components:
|
||||
method:
|
||||
type: string
|
||||
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:
|
||||
type: object
|
||||
properties:
|
||||
@ -613,15 +649,6 @@ components:
|
||||
_links:
|
||||
type: object
|
||||
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:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
@ -1,285 +0,0 @@
|
||||
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
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -715,139 +715,6 @@ 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,12 +59,6 @@ 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",
|
||||
@ -89,7 +83,6 @@ paths:
|
||||
"isTravelProduct": false,
|
||||
"name": "Barcode"
|
||||
},
|
||||
"tokenTypes": null,
|
||||
"sellableTouchPointIds": [
|
||||
1,
|
||||
2,
|
||||
@ -119,7 +112,6 @@ paths:
|
||||
"isTravelProduct": false,
|
||||
"name": "Barcode"
|
||||
},
|
||||
"tokenTypes": null,
|
||||
"sellableTouchPointIds": [
|
||||
3,
|
||||
4
|
||||
@ -147,12 +139,6 @@ 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",
|
||||
@ -168,7 +154,6 @@ paths:
|
||||
"isTravelProduct": false,
|
||||
"name": "Barcode"
|
||||
},
|
||||
"tokenTypes": null,
|
||||
"sellableTouchPointIds": [
|
||||
1,
|
||||
2,
|
||||
@ -189,12 +174,6 @@ paths:
|
||||
"isTravelProduct": true,
|
||||
"name": "Kortingsabonnement"
|
||||
},
|
||||
"tokenTypes": [
|
||||
{
|
||||
"tokenTypeId": 1,
|
||||
"name": "EMV"
|
||||
}
|
||||
],
|
||||
"sellableTouchPointIds": [
|
||||
1,
|
||||
2
|
||||
@ -213,12 +192,6 @@ paths:
|
||||
"isTravelProduct": true,
|
||||
"name": "Kortingsabonnement"
|
||||
},
|
||||
"tokenTypes": [
|
||||
{
|
||||
"tokenTypeId": 1,
|
||||
"name": "EMV"
|
||||
}
|
||||
],
|
||||
"sellableTouchPointIds": [
|
||||
3,
|
||||
4
|
||||
@ -246,7 +219,6 @@ paths:
|
||||
"isTravelProduct": false,
|
||||
"name": "Barcode"
|
||||
},
|
||||
"tokenTypes": null,
|
||||
"sellableTouchPointIds": [
|
||||
3,
|
||||
4
|
||||
@ -265,12 +237,6 @@ paths:
|
||||
"isTravelProduct": true,
|
||||
"name": "Kortingsabonnement"
|
||||
},
|
||||
"tokenTypes": [
|
||||
{
|
||||
"tokenTypeId": 1,
|
||||
"name": "EMV"
|
||||
}
|
||||
],
|
||||
"sellableTouchPointIds": [
|
||||
3,
|
||||
4
|
||||
@ -2108,20 +2074,6 @@ 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