README.md 1.13 KB
Newer Older
David Koch's avatar
David Koch committed
1
This is the API of Cars & Co to send a contract and payment information (JSON-file) to our workflow implementation.
David Koch's avatar
David Koch committed
2

David Koch's avatar
David Koch committed
3
## How to integrate the API?
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

Paste the repository and the dependency into your pom.xml:

      <repositories>
        <!-- Cars and Co Inc. repository -->
        <repository>
          <id>carsandco</id>   <url>http://camunda-carsandco.iwvi.uni-koblenz.de/mvn</url>
        </repository>
      </repositories>
      
      ...
      
      <dependencies>
        <dependency>
          <groupId>de.uniko.digicom.carsandco</groupId>
          <artifactId>carsandco-api</artifactId>
          <version>0.0.1-SNAPSHOT</version>
        </dependency>
      </dependencies>
David Koch's avatar
David Koch committed
23

David Koch's avatar
David Koch committed
24
25
## How to use the API?
In the CarsandCoApiClient.java there are two methods:
David Koch's avatar
David Koch committed
26
27
28
29

1. sendContract(RepairContract contract)
2. sendPaymentNotification(PaymentNotification note)

David Koch's avatar
David Koch committed
30
31
32
These functions take the defined object, convert it into JSON and send it to our endpoints via HTTP POST.
In order to use them, just create the corresponding object needed for those functions with the API and fill it with the required data.
All attributes are described with JavaDoc commentary.