Skip to content

Commit

Permalink
Issue #526
Browse files Browse the repository at this point in the history
Aggiunto progetto client-api-netpay per le invocazioni verso le
API-Net@Pay.
  • Loading branch information
pintorig committed Sep 12, 2022
1 parent 4170583 commit 9082b9f
Show file tree
Hide file tree
Showing 7 changed files with 899 additions and 285 deletions.
6 changes: 6 additions & 0 deletions jars/client-api-netpay/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/target/
/bin/
/.classpath
/.project
/.settings/
pom.xml.versionsBackup
26 changes: 26 additions & 0 deletions jars/client-api-netpay/.swagger-codegen-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

**/impl/*
**/*Test.java
128 changes: 128 additions & 0 deletions jars/client-api-netpay/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>

<parent>
<artifactId>jars</artifactId>
<groupId>it.govpay</groupId>
<version>3.7.0</version>
</parent>

<artifactId>client-api-netpay</artifactId>
<packaging>jar</packaging>
<name>GovPay - jars - Client API Net@Pay</name>

<properties>
<rel-to-parent>../..</rel-to-parent>
</properties>

<dependencies>

<dependency>
<groupId>it.govpay</groupId>
<artifactId>orm-beans</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webflux</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-xml-provider</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>

<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>

<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>

</dependencies>

<build>
<filters>
<filter>${filter-file}</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>${openapi.tool.codegen.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<id>generate-sources-client-govpay-gde-v1</id>
<phase>generate-sources</phase>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/openapi.yaml</inputSpec>
<generatorName>java</generatorName>
<configOptions>
<booleanGetterPrefix>is</booleanGetterPrefix>
<dateLibrary>java8</dateLibrary>
<library>webclient</library>
<serializationLibrary>jackson</serializationLibrary>
<sourceFolder>target/generated-sources/java/</sourceFolder>
<apiPackage>it.govpay.netpay.v1.api</apiPackage>
<invokerPackage>it.govpay.netpay.v1.api.impl</invokerPackage>
<modelPackage>it.govpay.netpay.v1.model</modelPackage>
<useAnnotatedBasePath>true</useAnnotatedBasePath>
<useBeanValidation>false</useBeanValidation>
</configOptions>
<output>${project.basedir}/target</output>
<interfaceOnly>true</interfaceOnly>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<typeMappings>
<typeMapping>OffsetDateTime=java.time.LocalDateTime</typeMapping>
</typeMappings>
<importMappings>
<importMapping>java.time.OffsetDateTime=java.time.LocalDateTime</importMapping>
</importMappings>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package it.govpay.netpay.v1.verifica;

import it.govpay.model.ConnettoreNotificaPagamenti;
import it.govpay.netpay.v1.api.VerificaPendenzeApi;
import it.govpay.netpay.v1.api.impl.ApiClient;

public class VerificaClient {

private ConnettoreNotificaPagamenti connettore;
private ApiClient apiClient;
private VerificaPendenzeApi verificaPendenzeApi;

public VerificaClient(ConnettoreNotificaPagamenti connettore) {
this.connettore = connettore;

// configurazione del client verso Net@Pay
this.apiClient = new ApiClient();
this.apiClient.setUsername(this.connettore.getNetPayUsername());
this.apiClient.setPassword(this.connettore.getNetPayPassword());
this.apiClient.setBasePath(this.connettore.getNetPayURL());

this.verificaPendenzeApi = new VerificaPendenzeApi(this.apiClient);
}
}
Loading

0 comments on commit 9082b9f

Please sign in to comment.