-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ItemResponse): add statusDetail. (#51)
* fix(ItemResponse): add statusDetail. * Versions
- Loading branch information
1 parent
84dd5c5
commit 501079a
Showing
6 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/ai/pluggy/client/response/ItemProductState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package ai.pluggy.client.response; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@Builder | ||
public class ItemProductState { | ||
/** Whether product was collected in this last execution or not */ | ||
boolean isUpdated; | ||
/** Date when product was last collected for this Item, null if it has never been. */ | ||
Date lastUpdatedAt; | ||
/** If product was not collected, this field will provide more detailed info about the reason. */ | ||
List<ItemProductStepWarning> warnings; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/ai/pluggy/client/response/ItemProductStepWarning.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package ai.pluggy.client.response; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@Builder | ||
public class ItemProductStepWarning { | ||
/** The specific warning code */ | ||
String code; | ||
/** Human readable message that explains the warning */ | ||
String message; | ||
/** Related error message exactly as found in the institution (if any). */ | ||
String providerMessage; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/java/ai/pluggy/client/response/ItemStatusDetail.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package ai.pluggy.client.response; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
/** | ||
* Only available when item.status is 'PARTIAL_SUCCESS'. | ||
* Provides fine-grained information, per product, about their latest collection state. | ||
* | ||
* If a product was not requested at all, its entry will be null. | ||
* If it was requested, it's entry will reflect if it has been collected or not. | ||
* If collected, isUpdated will be true, and lastUpdatedAt will be the Date when it happened | ||
* If not collected, isUpdated will be false, and lastUpdatedAt will be null it wasn't ever collected before, or the previous date if it was. | ||
*/ | ||
@Data | ||
@Builder | ||
public class ItemStatusDetail { | ||
/** Collection details for 'ACCOUNTS' product, or null if it was not requested at all. */ | ||
private ItemProductState accounts; | ||
/** Collection details for 'CREDIT_CARDS' product, or null if it was not requested at all. */ | ||
private ItemProductState creditCards; | ||
/** Collection details for account 'TRANSACTIONS' product, or null if it was not requested at all. */ | ||
private ItemProductState transactions; | ||
/** Collection details for 'INVESTMENTS' product, or null if it was not requested at all. */ | ||
private ItemProductState investments; | ||
/** Collection details for 'INVESTMENT_TRANSACTIONS' product, or null if it was not requested at all. */ | ||
private ItemProductState investmentTransactions; | ||
/** Collection details for 'IDENTITY' product, or null if it was not requested at all. */ | ||
private ItemProductState identity; | ||
/** Collection details for 'PAYMENT_DATA' product, or null if it was not requested at all. */ | ||
private ItemProductState paymentData; | ||
/** Collection details for 'INCOME_REPORT' product, or null if it was not requested at all. */ | ||
private ItemProductState incomeReports; | ||
/** Collection details for 'PORTFOLIO' product, or null if it was not requested at all. */ | ||
private ItemProductState portfolio; | ||
/** Collection details for 'LOAN' product, or null if it was not requested at all. */ | ||
private ItemProductState loans; | ||
/** Collection details for 'OPPORTUNITIES' product, or null if it was not requested at all. */ | ||
private ItemProductState opportunities; | ||
/** Collection details for 'BENEFIT' product, or null if it was not requested at all. */ | ||
private ItemProductState benefits; | ||
} |