Skip to content

Commit d854c72

Browse files
committed
Add bankruptcyDate and endOfBankruptcyProceedingsDate attributes
1 parent 2936786 commit d854c72

File tree

187 files changed

+12421
-348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+12421
-348
lines changed

README.md

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,56 @@
11
# NIP24 Client for Java
22

3-
This is the official repository for NIP24 VIES Client for Java: https://nip24.pl
3+
This is the official repository for [NIP24](https://nip24.pl) Client for Java
44

5-
This library contains validators for VIES (VAT EU) and common Polish tax numbers like NIP, REGON and KRS. Validators for
6-
EU VAT ID and IBAN are also included. After registration at NIP24 Portal this library could be used for various
7-
on-line validations of Polish and EU companies. Please, visit our web page for more details.
5+
This library contains validators for common Polish tax numbers like NIP, REGON and KRS. Validators for EU VAT ID
6+
and IBAN are also included. After registration at [NIP24](https://nip24.pl) Portal this library could be used for
7+
various on-line validations of Polish and EU companies. Please, visit our web page for more details.
88

9-
# Documentation
9+
## Documentation
1010

11-
The documentation and samples are available at https://nip24.pl/dokumentacja/
11+
The documentation and samples are available [here](https://nip24.pl/dokumentacja/).
1212

13-
# License
13+
## Build
14+
15+
OpenJDK 11+ and Apache Maven 3.8+ are required to build this library. The Javadoc JAR and sources JAR
16+
will be built as well.
17+
18+
```bash
19+
git clone https://github.com/nip24pl/nip24-java-client.git
20+
cd nip24-java-client
21+
mvn package
22+
```
23+
24+
To use the built version locally in your project, install it into your local Maven repository.
25+
26+
```bash
27+
mvn install
28+
```
29+
30+
## How to use
31+
32+
Add the following dependency to your project's POM:
33+
34+
```xml
35+
<dependency>
36+
<groupId>pl.nip24</groupId>
37+
<artifactId>nip24-client</artifactId>
38+
<version>1.4.4</version>
39+
</dependency>
40+
```
41+
42+
The release version of the library is also published in our Maven repository. If you don't want to build the library
43+
yourself, you can use our published version from this location:
44+
45+
```xml
46+
<repository>
47+
<id>nip24</id>
48+
<url>https://www.nip24.pl/maven/releases</url>
49+
</repository>
50+
```
51+
52+
## License
1453

1554
This project is delivered under Apache License, Version 2.0:
1655

17-
- [![License (Apache 2.0)](https://img.shields.io/badge/license-Apache%20version%202.0-blue.svg?style=flat-square)](http://www.apache.org/licenses/LICENSE-2.0)
56+
- [![License (Apache 2.0)](https://img.shields.io/badge/license-Apache%20version%202.0-blue.svg?style=flat-square)](http://www.apache.org/licenses/LICENSE-2.0)

pom.xml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>pl.nip24</groupId>
77
<artifactId>nip24-client</artifactId>
8-
<version>1.4.2</version>
8+
<version>1.4.4</version>
99

1010
<name>nip24-java-client</name>
1111
<description>NIP24 Service Client for Java</description>
@@ -47,8 +47,8 @@
4747
<java.version>11</java.version>
4848
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4949

50-
<swagger.version>2.2.27</swagger.version>
51-
<jackson.version>2.18.2</jackson.version>
50+
<swagger.version>2.2.39</swagger.version>
51+
<jackson.version>2.20.0</jackson.version>
5252
</properties>
5353

5454
<build>
@@ -57,10 +57,9 @@
5757
<plugin>
5858
<groupId>org.apache.maven.plugins</groupId>
5959
<artifactId>maven-compiler-plugin</artifactId>
60-
<version>3.13.0</version>
60+
<version>3.14.0</version>
6161
<configuration>
62-
<source>${java.version}</source>
63-
<target>${java.version}</target>
62+
<release>${java.version}</release>
6463
</configuration>
6564
</plugin>
6665

@@ -83,7 +82,7 @@
8382
<plugin>
8483
<groupId>org.apache.maven.plugins</groupId>
8584
<artifactId>maven-javadoc-plugin</artifactId>
86-
<version>3.11.2</version>
85+
<version>3.12.0</version>
8786
<executions>
8887
<execution>
8988
<id>attach-javadocs</id>
@@ -104,7 +103,7 @@
104103
<dependency>
105104
<groupId>jakarta.xml.bind</groupId>
106105
<artifactId>jakarta.xml.bind-api</artifactId>
107-
<version>4.0.2</version>
106+
<version>4.0.4</version>
108107
</dependency>
109108

110109
<!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-annotations -->

src/main/java/pl/nip24/client/AllData.java

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ public class AllData extends InvoiceData {
5151
protected Date holdDate;
5252
protected Date renevalDate;
5353
protected Date lastUpdateDate;
54+
protected Date bankruptcyDate;
55+
protected Date endOfBankruptcyProceedingsDate;
5456
protected Date endDate;
5557

5658
protected String registryEntityCode;
@@ -407,7 +409,43 @@ public void setLastUpdateDate(Date lastUpdateDate)
407409
this.lastUpdateDate = lastUpdateDate;
408410
}
409411

410-
/**
412+
/**
413+
* Data orzeczenia o upadłości
414+
* @return data
415+
*/
416+
public Date getBankruptcyDate()
417+
{
418+
return bankruptcyDate;
419+
}
420+
421+
/**
422+
* Data orzeczenia o upadłości
423+
* @param bankruptcyDate data
424+
*/
425+
public void setBankruptcyDate(Date bankruptcyDate)
426+
{
427+
this.bankruptcyDate = bankruptcyDate;
428+
}
429+
430+
/**
431+
* Data zakończenia postępowania upadłościowego
432+
* @return data
433+
*/
434+
public Date getEndOfBankruptcyProceedingsDate()
435+
{
436+
return endOfBankruptcyProceedingsDate;
437+
}
438+
439+
/**
440+
* Data zakończenia postępowania upadłościowego
441+
* @param endOfBankruptcyProceedingsDate data
442+
*/
443+
public void setEndOfBankruptcyProceedingsDate(Date endOfBankruptcyProceedingsDate)
444+
{
445+
this.endOfBankruptcyProceedingsDate = endOfBankruptcyProceedingsDate;
446+
}
447+
448+
/**
411449
* Data zakończenia działalności
412450
* @return data
413451
*/
@@ -716,6 +754,8 @@ public String toString()
716754
+ ", holdDate = " + holdDate
717755
+ ", renevalDate = " + renevalDate
718756
+ ", lastUpdateDate = " + lastUpdateDate
757+
+ ", bankruptcyDate = " + bankruptcyDate
758+
+ ", endOfBankruptcyProceedingsDate = " + endOfBankruptcyProceedingsDate
719759
+ ", endDate = " + endDate
720760

721761
+ ", registryEntityCode = " + registryEntityCode

src/main/java/pl/nip24/client/EUVAT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class EUVAT {
3838
*/
3939
public static String normalize(String number)
4040
{
41-
if (number == null || number.length() == 0) {
41+
if (number == null || number.isEmpty()) {
4242
return null;
4343
}
4444

@@ -54,9 +54,9 @@ public static String normalize(String number)
5454
}
5555

5656
/**
57-
* Sprawdza poprawnoϾ numeru EU VAT
57+
* Sprawdza poprawność numeru EU VAT
5858
* @param number numer EU VAT
59-
* @return true jeżeli podany numer jest prawidłowy
59+
* @return true, jeżeli podany numer jest prawidłowy
6060
*/
6161
public static boolean isValid(String number)
6262
{

src/main/java/pl/nip24/client/Error.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public class Error {
124124
}
125125

126126
/**
127-
* Pobranie komunikatu błędu
127+
* Pobranie komunikatu o błędzie
128128
* @param code kod błędu
129129
* @return komunikat
130130
*/

src/main/java/pl/nip24/client/IBAN.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class IBAN {
3939
*/
4040
public static String normalize(String iban)
4141
{
42-
if (iban == null || iban.length() == 0) {
42+
if (iban == null || iban.isEmpty()) {
4343
return null;
4444
}
4545

@@ -56,7 +56,7 @@ public static String normalize(String iban)
5656
/**
5757
* Sprawdza poprawność numeru IBAN
5858
* @param iban numer IBAN
59-
* @return true jeżeli podany numer jest prawidłowy
59+
* @return true, jeżeli podany numer jest prawidłowy
6060
*/
6161
public static boolean isValid(String iban)
6262
{

src/main/java/pl/nip24/client/IBANStatus.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void setIBAN(String iban)
121121

122122
/**
123123
* Status rachunku
124-
* @return status rachunku (true - rachunek powiązany z podatnikiem, false - nie powiązany)
124+
* @return status rachunku (true - rachunek powiązany z podatnikiem, false - niepowiązany)
125125
*/
126126
public boolean isValid()
127127
{
@@ -130,7 +130,7 @@ public boolean isValid()
130130

131131
/**
132132
* Status rachunku
133-
* @param valid status rachunku (true - rachunek powiązany z podatnikiem, false - nie powiązany)
133+
* @param valid status rachunku (true - rachunek powiązany z podatnikiem, false - niepowiązany)
134134
*/
135135
public void setValid(boolean valid)
136136
{

src/main/java/pl/nip24/client/KRS.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class KRS {
3333
*/
3434
public static String normalize(String krs)
3535
{
36-
if (krs == null || krs.length() == 0) {
36+
if (krs == null || krs.isEmpty()) {
3737
return null;
3838
}
3939

@@ -56,14 +56,10 @@ public static String normalize(String krs)
5656
/**
5757
* Sprawdza poprawność numeru KRS
5858
* @param krs numer KRS
59-
* @return true jeżeli podany numer jest prawidłowy
59+
* @return true, jeżeli podany numer jest prawidłowy
6060
*/
6161
public static boolean isValid(String krs)
6262
{
63-
if ((krs = normalize(krs)) == null) {
64-
return false;
65-
}
66-
67-
return true;
68-
}
63+
return (normalize(krs) != null);
64+
}
6965
}

src/main/java/pl/nip24/client/NIP.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class NIP {
3333
*/
3434
public static String normalize(String nip)
3535
{
36-
if (nip == null || nip.length() == 0) {
36+
if (nip == null || nip.isEmpty()) {
3737
return null;
3838
}
3939

@@ -50,15 +50,15 @@ public static String normalize(String nip)
5050
/**
5151
* Sprawdza poprawność numeru NIP
5252
* @param nip numer NIP
53-
* @return true jeżeli podany numer jest prawidłowy
53+
* @return true, jeżeli podany numer jest prawidłowy
5454
*/
5555
public static boolean isValid(String nip)
5656
{
5757
if ((nip = normalize(nip)) == null) {
5858
return false;
5959
}
6060

61-
int w[] = {
61+
int[] w = {
6262
6, 5, 7, 2, 3, 4, 5, 6, 7
6363
};
6464

0 commit comments

Comments
 (0)