Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>ai.pluggy</groupId>
<artifactId>pluggy-java</artifactId>
<version>1.8.5</version>
<version>1.9.0</version>

<packaging>jar</packaging>

Expand Down
8 changes: 8 additions & 0 deletions src/main/java/ai/pluggy/client/response/Address.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,12 @@ public class Address {
String postalCode;
String primaryAddress;
AddressType type;
/** District / neighborhood (bairro). */
String district;
/** IBGE municipality code (7 digits). The first two digits identify the Federation Unit. */
String ibgeTownCode;
/** Country code in alpha3 ISO-3166 format (e.g. 'BRA'). */
String countryCode;
/** Geographic coordinates of the address. */
GeographicCoordinates geographicCoordinates;
}
21 changes: 21 additions & 0 deletions src/main/java/ai/pluggy/client/response/BusinessOtherDocument.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package ai.pluggy.client.response;

import java.util.Date;

import lombok.Builder;
import lombok.Data;

/**
* Additional document for businesses headquartered abroad and not required to register a CNPJ.
*/
@Data
@Builder
public class BusinessOtherDocument {

/** Type of the document (e.g. 'EIN'). */
String type;
String number;
/** Issuing country in alpha3 ISO-3166 format. */
String country;
Date expirationDate;
}
38 changes: 38 additions & 0 deletions src/main/java/ai/pluggy/client/response/BusinessParty.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package ai.pluggy.client.response;

import java.util.Date;

import lombok.Builder;
import lombok.Data;

/**
* Partner or administrator of a business.
*
* Partners with less than 25% shareholding may be omitted by the institution.
*/
@Data
@Builder
public class BusinessParty {

BusinessPartyType type;
BusinessPartyPersonType personType;
BusinessPartyDocumentType documentType;
String documentNumber;
/** Issuing country of the document, alpha3 ISO-3166. */
String documentCountry;
Date documentExpirationDate;
Date documentIssueDate;
String documentAdditionalInfo;
/** Civil name. Required when personType is NATURAL_PERSON. */
String civilName;
String socialName;
/** Company name. Required when personType is LEGAL_ENTITY. */
String companyName;
String tradeName;
Date startDate;
/**
* Shareholding fraction between 0 and 1 (e.g. 0.51 represents 51%, 1 represents 100%).
* Required when type is PARTNER and the shareholding is 25% or higher.
*/
Double shareholding;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package ai.pluggy.client.response;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum BusinessPartyDocumentType {
@SerializedName("CPF")
CPF("CPF"),
@SerializedName("CNPJ")
CNPJ("CNPJ"),
@SerializedName("PASSPORT")
PASSPORT("PASSPORT"),
@SerializedName("OTHER_TRAVEL_DOCUMENT")
OTHER_TRAVEL_DOCUMENT("OTHER_TRAVEL_DOCUMENT");

@Getter
private String value;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ai.pluggy.client.response;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum BusinessPartyPersonType {
@SerializedName("NATURAL_PERSON")
NATURAL_PERSON("NATURAL_PERSON"),
@SerializedName("LEGAL_ENTITY")
LEGAL_ENTITY("LEGAL_ENTITY");

@Getter
private String value;
}
16 changes: 16 additions & 0 deletions src/main/java/ai/pluggy/client/response/BusinessPartyType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ai.pluggy.client.response;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum BusinessPartyType {
@SerializedName("PARTNER")
PARTNER("PARTNER"),
@SerializedName("ADMINISTRATOR")
ADMINISTRATOR("ADMINISTRATOR");

@Getter
private String value;
}
17 changes: 17 additions & 0 deletions src/main/java/ai/pluggy/client/response/GeographicCoordinates.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package ai.pluggy.client.response;

import lombok.Builder;
import lombok.Data;

/**
* Geographic coordinates in decimal degrees, WGS84 reference system.
*/
@Data
@Builder
public class GeographicCoordinates {

/** Between -90 and 90. */
Double latitude;
/** Between -180 and 180. */
Double longitude;
}
23 changes: 23 additions & 0 deletions src/main/java/ai/pluggy/client/response/IdentityResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,27 @@ public class IdentityResponse {
Date createdAt;
Date updatedAt;
String companyName;
/** Social name of the natural person (PF-only). */
String socialName;
/** Sex of the natural person (PF-only). */
Sex sex;
/** Marital status of the natural person (PF-only). */
MaritalStatus maritalStatus;
/** Nationality of the natural person (PF-only). */
Nationality nationality;
/** Other identification documents the natural person holds (PF-only). */
List<OtherDocument> otherDocuments;
/** Passport metadata for the natural person (PF-only). */
Passport passport;
/** Date the business was incorporated (PJ-only). */
Date incorporationDate;
/** Partners and administrators of the business (PJ-only). */
List<BusinessParty> parties;
/**
* Additional documents for businesses headquartered abroad and not required to register a CNPJ
* (PJ-only).
*/
List<BusinessOtherDocument> businessOtherDocuments;
/** CNPJs of the financial institutions responsible for the customer cadastro. */
List<String> companiesCnpj;
}
13 changes: 13 additions & 0 deletions src/main/java/ai/pluggy/client/response/MaritalStatus.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package ai.pluggy.client.response;

import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class MaritalStatus {

MaritalStatusCode code;
/** Free-text complement. Populated when code is OTHER. */
String additionalInfo;
}
26 changes: 26 additions & 0 deletions src/main/java/ai/pluggy/client/response/MaritalStatusCode.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package ai.pluggy.client.response;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum MaritalStatusCode {
@SerializedName("SINGLE")
SINGLE("SINGLE"),
@SerializedName("MARRIED")
MARRIED("MARRIED"),
@SerializedName("WIDOWED")
WIDOWED("WIDOWED"),
@SerializedName("JUDICIALLY_SEPARATED")
JUDICIALLY_SEPARATED("JUDICIALLY_SEPARATED"),
@SerializedName("DIVORCED")
DIVORCED("DIVORCED"),
@SerializedName("STABLE_UNION")
STABLE_UNION("STABLE_UNION"),
@SerializedName("OTHER")
OTHER("OTHER");

@Getter
private String value;
}
14 changes: 14 additions & 0 deletions src/main/java/ai/pluggy/client/response/Nationality.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package ai.pluggy.client.response;

import java.util.List;

import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class Nationality {

Boolean hasBrazilianNationality;
List<OtherNationality> otherNationalities;
}
18 changes: 18 additions & 0 deletions src/main/java/ai/pluggy/client/response/NationalityDocument.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package ai.pluggy.client.response;

import java.util.Date;

import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class NationalityDocument {

String type;
String number;
String country;
Date issueDate;
Date expirationDate;
String additionalInfo;
}
20 changes: 20 additions & 0 deletions src/main/java/ai/pluggy/client/response/OtherDocument.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package ai.pluggy.client.response;

import java.util.Date;

import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class OtherDocument {

OtherDocumentType type;
/** Free-text complement. Populated when type is OTHER. */
String typeAdditionalInfo;
String number;
String checkDigit;
/** Free-text complement, used to record the issuing authority (e.g. 'SSP/SP') when relevant. */
String additionalInfo;
Date expirationDate;
}
22 changes: 22 additions & 0 deletions src/main/java/ai/pluggy/client/response/OtherDocumentType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ai.pluggy.client.response;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum OtherDocumentType {
@SerializedName("CNH")
CNH("CNH"),
@SerializedName("RG")
RG("RG"),
@SerializedName("NIF")
NIF("NIF"),
@SerializedName("RNE")
RNE("RNE"),
@SerializedName("OTHER")
OTHER("OTHER");

@Getter
private String value;
}
15 changes: 15 additions & 0 deletions src/main/java/ai/pluggy/client/response/OtherNationality.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package ai.pluggy.client.response;

import java.util.List;

import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class OtherNationality {

/** Country code in alpha3 ISO-3166 format. */
String countryCode;
List<NationalityDocument> documents;
}
17 changes: 17 additions & 0 deletions src/main/java/ai/pluggy/client/response/Passport.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package ai.pluggy.client.response;

import java.util.Date;

import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class Passport {

String number;
/** Issuing country in alpha3 ISO-3166 format. */
String country;
Date issueDate;
Date expirationDate;
}
8 changes: 8 additions & 0 deletions src/main/java/ai/pluggy/client/response/PhoneNumber.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@ public class PhoneNumber {

PhoneNumberType type;
String value;
/** International dialing code (DDI). Populated when different from '55'. */
String countryCallingCode;
/** Area code (DDD) of the phone. */
String areaCode;
/** Extension number, when part of the phone identification. */
String extension;
/** Additional info related to the source phone type. */
String additionalInfo;
}
18 changes: 18 additions & 0 deletions src/main/java/ai/pluggy/client/response/Sex.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package ai.pluggy.client.response;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum Sex {
@SerializedName("FEMALE")
FEMALE("FEMALE"),
@SerializedName("MALE")
MALE("MALE"),
@SerializedName("OTHER")
OTHER("OTHER");

@Getter
private String value;
}