From 6eb644b297929acf6970e9deec8e69ea094fe59d Mon Sep 17 00:00:00 2001 From: Stuart Turner Date: Wed, 9 Oct 2024 15:30:09 -0500 Subject: [PATCH] Update to Plaid v1.575.0 --- plaid-openapi | 2 +- src/Plaid.OpenApiParser/Program.cs | 1 + src/Plaid/Accounts/PlaidClient.cs | 2 +- src/Plaid/Consent/ConsentEventsGetRequest.cs | 8 ++ src/Plaid/Consent/ConsentEventsGetResponse.cs | 14 ++++ src/Plaid/Consent/PlaidClient.cs | 13 +++ .../Converters/WebhookBaseConverter.Map.cs | 1 + src/Plaid/Cra/CraBankIncomeCreateRequest.cs | 2 +- src/Plaid/Cra/CraBaseReportCreateRequest.cs | 2 +- .../Cra/CraCheckReportBaseReportGetRequest.cs | 8 +- src/Plaid/Cra/CraCheckReportCreateRequest.cs | 10 +-- .../CraCheckReportIncomeInsightsGetRequest.cs | 8 +- ...CraCheckReportNetworkInsightsGetRequest.cs | 8 +- ...CraCheckReportPartnerInsightsGetRequest.cs | 8 +- .../Cra/CraMonitoringInsightsGetRequest.cs | 6 ++ src/Plaid/Cra/PlaidClient.cs | 3 +- .../DashboardUser/DashboardUserGetRequest.cs | 2 +- .../DashboardUser/DashboardUserGetResponse.cs | 4 +- src/Plaid/DashboardUser/PlaidClient.cs | 4 +- .../DepositSwitchAltCreateRequest.cs | 8 +- .../DepositSwitchAltCreateResponse.cs | 2 +- .../DepositSwitchCreateRequest.cs | 4 +- .../DepositSwitchCreateResponse.cs | 2 +- .../DepositSwitch/DepositSwitchGetRequest.cs | 2 +- .../DepositSwitch/DepositSwitchGetResponse.cs | 2 +- .../DepositSwitchTokenCreateRequest.cs | 2 +- .../DepositSwitchTokenCreateResponse.cs | 2 +- src/Plaid/Entity/Account.cs | 2 +- src/Plaid/Entity/AccountAssets.cs | 2 +- src/Plaid/Entity/AccountBalance.cs | 2 +- src/Plaid/Entity/AccountIdentity.cs | 2 +- .../Entity/AccountIdentityDocumentUpload.cs | 4 +- src/Plaid/Entity/AccountIdentityMatchScore.cs | 2 +- src/Plaid/Entity/AccountType.cs | 10 +-- src/Plaid/Entity/AssetReportAccountBalance.cs | 2 +- .../Entity/AssetReportCreateRequestOptions.cs | 2 +- src/Plaid/Entity/BaseReportAccount.cs | 8 +- src/Plaid/Entity/BaseReportAccountBalances.cs | 2 +- src/Plaid/Entity/BaseReportAccountInsights.cs | 6 +- src/Plaid/Entity/BaseReportAttributes.cs | 26 ++++++ src/Plaid/Entity/BaseReportWarning.cs | 2 +- src/Plaid/Entity/BaseReportWarningCode.cs | 8 +- src/Plaid/Entity/BeaconAuditTrail.cs | 2 +- src/Plaid/Entity/BeaconUserData.cs | 2 +- src/Plaid/Entity/BeaconUserRequestData.cs | 2 +- .../Entity/BeaconUserUpdateRequestData.cs | 2 +- src/Plaid/Entity/ConsentEvent.cs | 69 ++++++++++++++++ ...ckReportProduct.cs => ConsentEventCode.cs} | 20 ++--- src/Plaid/Entity/ConsentEventInitiator.cs | 38 +++++++++ src/Plaid/Entity/ConsentEventType.cs | 32 ++++++++ src/Plaid/Entity/ConsentedAccount.cs | 44 ++++++++++ src/Plaid/Entity/ConsentedDataScope.cs | 62 ++++++++++++++ .../ConsumerReportPermissiblePurpose.cs | 2 +- .../Entity/ConsumerReportUserIdentity.cs | 14 ++++ src/Plaid/Entity/CraBankIncomeSource.cs | 2 +- src/Plaid/Entity/CraMonitoringInsightsItem.cs | 2 +- src/Plaid/Entity/CreditBankIncomeCategory.cs | 32 ++++---- src/Plaid/Entity/CreditBankIncomeSource.cs | 2 +- src/Plaid/Entity/DashboardUser.cs | 4 +- src/Plaid/Entity/DataSources.cs | 32 ++++++++ src/Plaid/Entity/DepositSwitchAddressData.cs | 2 +- .../DepositSwitchCreateRequestOptions.cs | 2 +- .../Entity/DepositSwitchTargetAccount.cs | 2 +- src/Plaid/Entity/DepositSwitchTargetUser.cs | 4 +- src/Plaid/Entity/DocumentRiskSignal.cs | 4 +- src/Plaid/Entity/DocumentRiskSummary.cs | 2 +- src/Plaid/Entity/EntityScreeningHitEmails.cs | 2 +- src/Plaid/Entity/EntityWatchlistScreening.cs | 2 +- .../EntityWatchlistScreeningSearchTerms.cs | 2 +- .../Entity/EntityWatchlistSearchTerms.cs | 2 +- src/Plaid/Entity/HistoricalAnnualIncome.cs | 20 +++++ src/Plaid/Entity/IdentityDocumentUpload.cs | 6 +- .../Entity/IdentityDocumentUploadMetadata.cs | 12 +-- .../IdentityDocumentUploadRiskInsights.cs | 6 +- .../IdentityDocumentUploadRiskSignal.cs | 8 +- .../IdentityDocumentUploadRiskSummary.cs | 4 +- src/Plaid/Entity/IdentityVerification.cs | 2 +- .../IdentityVerificationCreateRequestUser.cs | 2 +- .../Entity/IdentityVerificationRequestUser.cs | 2 +- ...tityVerificationRetryRequestStepsObject.cs | 2 +- .../Entity/IdentityVerificationUserData.cs | 2 +- .../Entity/InvestmentsAuthDataSources.cs | 26 ++++++ src/Plaid/Entity/Issue.cs | 50 ++++++++++++ src/Plaid/Entity/IssuesStatus.cs | 50 ++++++++++++ src/Plaid/Entity/Item.cs | 24 +++++- src/Plaid/Entity/KYCCheckDetails.cs | 2 +- src/Plaid/Entity/LinkEventMetadata.cs | 4 +- src/Plaid/Entity/LinkSessionResults.cs | 8 +- src/Plaid/Entity/LinkTokenCreateIdentity.cs | 2 +- ...tConsumerReportPermissiblePurposeObject.cs | 8 ++ .../LinkTokenCreateRequestCraOptions.cs | 2 +- .../LinkTokenCreateRequestDepositSwitch.cs | 2 +- ...kTokenCreateRequestPaymentConfiguration.cs | 14 ++++ src/Plaid/Entity/LinkTokenInvestmentsAuth.cs | 2 +- src/Plaid/Entity/MonitoringIncomeInsights.cs | 6 ++ src/Plaid/Entity/MonitoringIncomeSource.cs | 8 +- src/Plaid/Entity/MonitoringInsightsStatus.cs | 44 ++++++++++ src/Plaid/Entity/MonitoringItemStatusCode.cs | 6 ++ src/Plaid/Entity/NumbersACATS.cs | 2 +- src/Plaid/Entity/NumbersAch.cs | 4 +- .../PaymentInitiationConsentProcessingMode.cs | 26 ++++++ src/Plaid/Entity/PrismCashScore.cs | 6 ++ src/Plaid/Entity/PrismFirstDetect.cs | 6 ++ src/Plaid/Entity/PrismInsights.cs | 6 ++ ...rocessorTokenCreateRequestProcessorEnum.cs | 6 ++ src/Plaid/Entity/Products.cs | 12 +-- src/Plaid/Entity/RequirementSubmission.cs | 26 ++++++ ...oxItemFireWebhookRequestWebhookCodeEnum.cs | 6 ++ src/Plaid/Entity/SelfieAnalysis.cs | 12 +++ .../Entity/SelfieAnalysisFacialAnalysis.cs | 80 +++++++++++++++++++ .../SelfieAnalysisFacialAnalysisOutcome.cs | 26 ++++++ .../Entity/SelfieAnalysisLivenessCheck.cs | 26 ++++++ src/Plaid/Entity/Transaction.cs | 2 +- src/Plaid/Entity/TransactionStream.cs | 6 ++ src/Plaid/Entity/Transfer.cs | 2 +- .../Entity/TransferPlatformPersonAddress.cs | 45 +++++++++++ .../Entity/TransferPlatformPersonIDNumber.cs | 20 +++++ .../Entity/TransferPlatformPersonName.cs | 20 +++++ ...UpdateEntityScreeningRequestSearchTerms.cs | 2 +- .../Entity/WatchlistScreeningAuditTrail.cs | 2 +- .../Entity/WatchlistScreeningIndividual.cs | 2 +- src/Plaid/Entity/WebhookCode.cs | 6 ++ src/Plaid/Identity/PlaidClient.cs | 4 +- .../IdentityVerificationCreateResponse.cs | 2 +- .../IdentityVerificationGetResponse.cs | 2 +- .../IdentityVerificationRetryRequest.cs | 2 +- .../IdentityVerificationRetryResponse.cs | 2 +- .../Investments/InvestmentsAuthGetResponse.cs | 6 ++ src/Plaid/Investments/PlaidClient.cs | 2 +- src/Plaid/Issues/IssuesGetRequest.cs | 14 ++++ src/Plaid/Issues/IssuesGetResponse.cs | 14 ++++ src/Plaid/Issues/IssuesSearchRequest.cs | 26 ++++++ src/Plaid/Issues/IssuesSearchResponse.cs | 14 ++++ src/Plaid/Issues/IssuesSubscribeRequest.cs | 20 +++++ src/Plaid/Issues/IssuesSubscribeResponse.cs | 8 ++ src/Plaid/Issues/PlaidClient.cs | 31 +++++++ src/Plaid/Link/LinkTokenCreateRequest.cs | 14 +++- ...tInitiationConsentPaymentExecuteRequest.cs | 6 ++ src/Plaid/Sandbox/PlaidClient.cs | 3 +- src/Plaid/Signal/SignalEvaluateResponse.cs | 2 +- src/Plaid/Transfer/PlaidClient.cs | 29 +++++-- src/Plaid/Transfer/TransferGetRequest.cs | 8 +- .../TransferLedgerDistributeRequest.cs | 12 +-- .../Transfer/TransferLedgerGetResponse.cs | 18 +++++ .../TransferPlatformPersonCreateRequest.cs | 56 +++++++++++++ .../TransferPlatformPersonCreateResponse.cs | 14 ++++ ...ransferPlatformRequirementSubmitRequest.cs | 20 +++++ ...ansferPlatformRequirementSubmitResponse.cs | 8 ++ src/Plaid/User/PlaidClient.cs | 18 +++++ src/Plaid/User/UserCreateRequest.cs | 6 ++ .../User/UserThirdPartyTokenCreateRequest.cs | 26 ++++++ .../User/UserThirdPartyTokenCreateResponse.cs | 14 ++++ .../User/UserThirdPartyTokenRemoveRequest.cs | 14 ++++ .../User/UserThirdPartyTokenRemoveResponse.cs | 14 ++++ .../WatchlistScreeningEntityCreateResponse.cs | 2 +- .../WatchlistScreeningEntityGetResponse.cs | 2 +- .../WatchlistScreeningEntityListRequest.cs | 2 +- .../WatchlistScreeningEntityUpdateRequest.cs | 2 +- .../WatchlistScreeningEntityUpdateResponse.cs | 2 +- ...chlistScreeningIndividualCreateResponse.cs | 2 +- ...WatchlistScreeningIndividualGetResponse.cs | 2 +- ...WatchlistScreeningIndividualListRequest.cs | 2 +- ...tchlistScreeningIndividualUpdateRequest.cs | 2 +- ...chlistScreeningIndividualUpdateResponse.cs | 2 +- .../Webhook/CraCheckReportReadyWebhook.cs | 2 +- .../DepositSwitchStateUpdateWebhook.cs | 2 +- .../IncomeVerificationStatusWebhook.cs | 2 +- .../Webhook/MonitoringInsightsWebhook.cs | 34 ++++++++ src/Plaid/Webhook/PendingDisconnectWebhook.cs | 2 +- .../Webhook/UserAccountRevokedWebhook.cs | 2 +- .../Webhook/UserPermissionRevokedWebhook.cs | 2 +- 171 files changed, 1564 insertions(+), 203 deletions(-) create mode 100644 src/Plaid/Consent/ConsentEventsGetRequest.cs create mode 100644 src/Plaid/Consent/ConsentEventsGetResponse.cs create mode 100644 src/Plaid/Consent/PlaidClient.cs create mode 100644 src/Plaid/Entity/BaseReportAttributes.cs create mode 100644 src/Plaid/Entity/ConsentEvent.cs rename src/Plaid/Entity/{CraCheckReportProduct.cs => ConsentEventCode.cs} (56%) create mode 100644 src/Plaid/Entity/ConsentEventInitiator.cs create mode 100644 src/Plaid/Entity/ConsentEventType.cs create mode 100644 src/Plaid/Entity/ConsentedAccount.cs create mode 100644 src/Plaid/Entity/ConsentedDataScope.cs create mode 100644 src/Plaid/Entity/DataSources.cs create mode 100644 src/Plaid/Entity/HistoricalAnnualIncome.cs create mode 100644 src/Plaid/Entity/InvestmentsAuthDataSources.cs create mode 100644 src/Plaid/Entity/Issue.cs create mode 100644 src/Plaid/Entity/IssuesStatus.cs create mode 100644 src/Plaid/Entity/LinkTokenCreateRequestConsumerReportPermissiblePurposeObject.cs create mode 100644 src/Plaid/Entity/LinkTokenCreateRequestPaymentConfiguration.cs create mode 100644 src/Plaid/Entity/MonitoringInsightsStatus.cs create mode 100644 src/Plaid/Entity/PaymentInitiationConsentProcessingMode.cs create mode 100644 src/Plaid/Entity/RequirementSubmission.cs create mode 100644 src/Plaid/Entity/SelfieAnalysisFacialAnalysis.cs create mode 100644 src/Plaid/Entity/SelfieAnalysisFacialAnalysisOutcome.cs create mode 100644 src/Plaid/Entity/SelfieAnalysisLivenessCheck.cs create mode 100644 src/Plaid/Entity/TransferPlatformPersonAddress.cs create mode 100644 src/Plaid/Entity/TransferPlatformPersonIDNumber.cs create mode 100644 src/Plaid/Entity/TransferPlatformPersonName.cs create mode 100644 src/Plaid/Issues/IssuesGetRequest.cs create mode 100644 src/Plaid/Issues/IssuesGetResponse.cs create mode 100644 src/Plaid/Issues/IssuesSearchRequest.cs create mode 100644 src/Plaid/Issues/IssuesSearchResponse.cs create mode 100644 src/Plaid/Issues/IssuesSubscribeRequest.cs create mode 100644 src/Plaid/Issues/IssuesSubscribeResponse.cs create mode 100644 src/Plaid/Issues/PlaidClient.cs create mode 100644 src/Plaid/Transfer/TransferPlatformPersonCreateRequest.cs create mode 100644 src/Plaid/Transfer/TransferPlatformPersonCreateResponse.cs create mode 100644 src/Plaid/Transfer/TransferPlatformRequirementSubmitRequest.cs create mode 100644 src/Plaid/Transfer/TransferPlatformRequirementSubmitResponse.cs create mode 100644 src/Plaid/User/UserThirdPartyTokenCreateRequest.cs create mode 100644 src/Plaid/User/UserThirdPartyTokenCreateResponse.cs create mode 100644 src/Plaid/User/UserThirdPartyTokenRemoveRequest.cs create mode 100644 src/Plaid/User/UserThirdPartyTokenRemoveResponse.cs create mode 100644 src/Plaid/Webhook/MonitoringInsightsWebhook.cs diff --git a/plaid-openapi b/plaid-openapi index 46d9a269..cffae023 160000 --- a/plaid-openapi +++ b/plaid-openapi @@ -1 +1 @@ -Subproject commit 46d9a2691011538bffbb1eb66161013aa4e844f2 +Subproject commit cffae0231e2cee04712d81c717ad9b1b5f4861ba diff --git a/src/Plaid.OpenApiParser/Program.cs b/src/Plaid.OpenApiParser/Program.cs index b349293c..8541c7ab 100644 --- a/src/Plaid.OpenApiParser/Program.cs +++ b/src/Plaid.OpenApiParser/Program.cs @@ -55,6 +55,7 @@ private static string GetBasePath() { ["ACHClass"] = "AchClass", ["APR"] = "Apr", + ["Consented Data Scope"] = "ConsentedDataScope", ["ISOCurrencyCode"] = "IsoCurrencyCode", ["ISO Currency Code"] = "WalletIsoCurrencyCode", ["NumbersACH"] = "NumbersAch", diff --git a/src/Plaid/Accounts/PlaidClient.cs b/src/Plaid/Accounts/PlaidClient.cs index d84ae711..c597d2ed 100644 --- a/src/Plaid/Accounts/PlaidClient.cs +++ b/src/Plaid/Accounts/PlaidClient.cs @@ -4,7 +4,7 @@ public sealed partial class PlaidClient { /// /// The /accounts/get endpoint can be used to retrieve a list of accounts associated with any linked Item. Plaid will only return active bank accounts — that is, accounts that are not closed and are capable of carrying a balance. - /// For items that went through the updated account selection pane, this endpoint only returns accounts that were permissioned by the user when they initially created the Item. If a user creates a new account after the initial link, you can capture this event through the NEW_ACCOUNTS_AVAILABLE webhook and then use Link's update mode to request that the user share this new account with you. + /// To return new accounts that were created after the user linked their Item, you can listen for the NEW_ACCOUNTS_AVAILABLE webhook and then use Link's update mode to request that the user share this new account with you. /// /accounts/get is free to use and retrieves cached information, rather than extracting fresh information from the institution. The balance returned will reflect the balance at the time of the last successful Item update. If the Item is enabled for a regularly updating product, such as Transactions, Investments, or Liabilities, the balance will typically update about once a day, as long as the Item is healthy. If the Item is enabled only for products that do not frequently update, such as Auth or Identity, balance data may be much older. /// For realtime balance information, use the paid endpoint /accounts/balance/get instead. /// diff --git a/src/Plaid/Consent/ConsentEventsGetRequest.cs b/src/Plaid/Consent/ConsentEventsGetRequest.cs new file mode 100644 index 00000000..8da2cefa --- /dev/null +++ b/src/Plaid/Consent/ConsentEventsGetRequest.cs @@ -0,0 +1,8 @@ +namespace Going.Plaid.Consent; + +/// +/// Request to list a historical log of item consent events. +/// +public partial class ConsentEventsGetRequest : RequestBase +{ +} diff --git a/src/Plaid/Consent/ConsentEventsGetResponse.cs b/src/Plaid/Consent/ConsentEventsGetResponse.cs new file mode 100644 index 00000000..a4bebd83 --- /dev/null +++ b/src/Plaid/Consent/ConsentEventsGetResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Consent; + +/// +/// Describes a historical log of item consent events. +/// +public record ConsentEventsGetResponse : ResponseBase +{ + /// + /// A list of consent events. + /// + [JsonPropertyName("consent_events")] + public IReadOnlyList ConsentEvents { get; init; } = default!; + +} diff --git a/src/Plaid/Consent/PlaidClient.cs b/src/Plaid/Consent/PlaidClient.cs new file mode 100644 index 00000000..c0108fd2 --- /dev/null +++ b/src/Plaid/Consent/PlaidClient.cs @@ -0,0 +1,13 @@ +namespace Going.Plaid; + +public sealed partial class PlaidClient +{ + /// + /// List a historical log of item consent events + /// + /// + public Task ConsentEventsGetAsync(Consent.ConsentEventsGetRequest request) => + PostAsync("/consent/events/get", request) + .ParseResponseAsync(); + +} diff --git a/src/Plaid/Converters/WebhookBaseConverter.Map.cs b/src/Plaid/Converters/WebhookBaseConverter.Map.cs index d03b7f68..5b165f42 100644 --- a/src/Plaid/Converters/WebhookBaseConverter.Map.cs +++ b/src/Plaid/Converters/WebhookBaseConverter.Map.cs @@ -75,6 +75,7 @@ public partial class WebhookBaseConverter : JsonConverter [(WebhookType.Link, WebhookCode.SessionFinished)] = typeof(LinkSessionFinishedWebhook), [(WebhookType.Auth, WebhookCode.SmsMicrodepositsVerification)] = typeof(HostedMMDVerificationWebhook), [(WebhookType.DashboardConfiguredAlert, WebhookCode.InstitutionStatusAlertTriggered)] = typeof(InstitutionStatusAlertWebhook), + [(WebhookType.CraMonitoring, WebhookCode.InsightsUpdated)] = typeof(MonitoringInsightsWebhook), [(WebhookType.Assets, WebhookCode.ProductReady)] = typeof(AssetsProductReadyWebhook), [(WebhookType.Assets, WebhookCode.Error)] = typeof(AssetsErrorWebhook), }; diff --git a/src/Plaid/Cra/CraBankIncomeCreateRequest.cs b/src/Plaid/Cra/CraBankIncomeCreateRequest.cs index badbbdeb..793b1054 100644 --- a/src/Plaid/Cra/CraBankIncomeCreateRequest.cs +++ b/src/Plaid/Cra/CraBankIncomeCreateRequest.cs @@ -24,7 +24,7 @@ public partial class CraBankIncomeCreateRequest : RequestBase public int? DaysRequested { get; set; } = default!; /// - /// This enum describes the reason you are generating a Consumer Report for this user. + /// Describes the reason you are generating a Consumer Report for this user. /// [JsonPropertyName("consumer_report_permissible_purpose")] public Entity.ConsumerReportPermissiblePurpose? ConsumerReportPermissiblePurpose { get; set; } = default!; diff --git a/src/Plaid/Cra/CraBaseReportCreateRequest.cs b/src/Plaid/Cra/CraBaseReportCreateRequest.cs index 8ae041c0..2038e88a 100644 --- a/src/Plaid/Cra/CraBaseReportCreateRequest.cs +++ b/src/Plaid/Cra/CraBaseReportCreateRequest.cs @@ -24,7 +24,7 @@ public partial class CraBaseReportCreateRequest : RequestBase public string? Webhook { get; set; } = default!; /// - /// This enum describes the reason you are generating a Consumer Report for this user. + /// Describes the reason you are generating a Consumer Report for this user. /// [JsonPropertyName("consumer_report_permissible_purpose")] public Entity.ConsumerReportPermissiblePurpose ConsumerReportPermissiblePurpose { get; set; } = default!; diff --git a/src/Plaid/Cra/CraCheckReportBaseReportGetRequest.cs b/src/Plaid/Cra/CraCheckReportBaseReportGetRequest.cs index 9c9be413..dc50d83b 100644 --- a/src/Plaid/Cra/CraCheckReportBaseReportGetRequest.cs +++ b/src/Plaid/Cra/CraCheckReportBaseReportGetRequest.cs @@ -9,7 +9,13 @@ public partial class CraCheckReportBaseReportGetRequest : RequestBase /// The user token associated with the User data is being requested for. /// [JsonPropertyName("user_token")] - public string UserToken { get; set; } = default!; + public string? UserToken { get; set; } = default!; + + /// + /// The third-party user token associated with the requested User data. + /// + [JsonPropertyName("third_party_user_token")] + public string? ThirdPartyUserToken { get; set; } = default!; /// /// The item IDs to include in the Base Report. If not provided, all items associated with the user will be included. diff --git a/src/Plaid/Cra/CraCheckReportCreateRequest.cs b/src/Plaid/Cra/CraCheckReportCreateRequest.cs index df070a93..5816f843 100644 --- a/src/Plaid/Cra/CraCheckReportCreateRequest.cs +++ b/src/Plaid/Cra/CraCheckReportCreateRequest.cs @@ -18,19 +18,13 @@ public partial class CraCheckReportCreateRequest : RequestBase public string Webhook { get; set; } = default!; /// - /// The number of days of data to request for the report. If requesting Income Insights, a minimum of 90 days is recommended in order to receive both historical and forecasted income. + /// The number of days of data to request for the report. Default value is 365; maximum is 731; minimum is 180. If a value lower than 180 is provided, a minimum of 180 days of history will be requested. /// [JsonPropertyName("days_requested")] public int DaysRequested { get; set; } = default!; /// - /// Products that will be retrieved in this report. This configuration will determine what data types to fetch from the user's financial institution. If omitted, the data types needed to support all products will be fetched. - /// - [JsonPropertyName("products")] - public IReadOnlyList? Products { get; set; } = default!; - - /// - /// This enum describes the reason you are generating a Consumer Report for this user. + /// Describes the reason you are generating a Consumer Report for this user. /// [JsonPropertyName("consumer_report_permissible_purpose")] public Entity.ConsumerReportPermissiblePurpose ConsumerReportPermissiblePurpose { get; set; } = default!; diff --git a/src/Plaid/Cra/CraCheckReportIncomeInsightsGetRequest.cs b/src/Plaid/Cra/CraCheckReportIncomeInsightsGetRequest.cs index 4df1f207..87518530 100644 --- a/src/Plaid/Cra/CraCheckReportIncomeInsightsGetRequest.cs +++ b/src/Plaid/Cra/CraCheckReportIncomeInsightsGetRequest.cs @@ -9,6 +9,12 @@ public partial class CraCheckReportIncomeInsightsGetRequest : RequestBase /// The user token associated with the User data is being requested for. /// [JsonPropertyName("user_token")] - public string UserToken { get; set; } = default!; + public string? UserToken { get; set; } = default!; + + /// + /// The third-party user token associated with the requested User data. + /// + [JsonPropertyName("third_party_user_token")] + public string? ThirdPartyUserToken { get; set; } = default!; } diff --git a/src/Plaid/Cra/CraCheckReportNetworkInsightsGetRequest.cs b/src/Plaid/Cra/CraCheckReportNetworkInsightsGetRequest.cs index 43acc298..f0eb5b75 100644 --- a/src/Plaid/Cra/CraCheckReportNetworkInsightsGetRequest.cs +++ b/src/Plaid/Cra/CraCheckReportNetworkInsightsGetRequest.cs @@ -9,6 +9,12 @@ public partial class CraCheckReportNetworkInsightsGetRequest : RequestBase /// The user token associated with the User data is being requested for. /// [JsonPropertyName("user_token")] - public string UserToken { get; set; } = default!; + public string? UserToken { get; set; } = default!; + + /// + /// The third-party user token associated with the requested User data. + /// + [JsonPropertyName("third_party_user_token")] + public string? ThirdPartyUserToken { get; set; } = default!; } diff --git a/src/Plaid/Cra/CraCheckReportPartnerInsightsGetRequest.cs b/src/Plaid/Cra/CraCheckReportPartnerInsightsGetRequest.cs index 963cb833..b6bd08f5 100644 --- a/src/Plaid/Cra/CraCheckReportPartnerInsightsGetRequest.cs +++ b/src/Plaid/Cra/CraCheckReportPartnerInsightsGetRequest.cs @@ -9,7 +9,13 @@ public partial class CraCheckReportPartnerInsightsGetRequest : RequestBase /// The user token associated with the User data is being requested for. /// [JsonPropertyName("user_token")] - public string UserToken { get; set; } = default!; + public string? UserToken { get; set; } = default!; + + /// + /// The third-party user token associated with the requested User data. + /// + [JsonPropertyName("third_party_user_token")] + public string? ThirdPartyUserToken { get; set; } = default!; /// /// Defines configuration options to generate Partner Insights diff --git a/src/Plaid/Cra/CraMonitoringInsightsGetRequest.cs b/src/Plaid/Cra/CraMonitoringInsightsGetRequest.cs index 5e6ba0bb..c6ec544f 100644 --- a/src/Plaid/Cra/CraMonitoringInsightsGetRequest.cs +++ b/src/Plaid/Cra/CraMonitoringInsightsGetRequest.cs @@ -11,4 +11,10 @@ public partial class CraMonitoringInsightsGetRequest : RequestBase [JsonPropertyName("user_token")] public string UserToken { get; set; } = default!; + /// + /// Describes the reason you are generating a Consumer Report for this user. + /// + [JsonPropertyName("consumer_report_permissible_purpose")] + public Entity.ConsumerReportPermissiblePurpose ConsumerReportPermissiblePurpose { get; set; } = default!; + } diff --git a/src/Plaid/Cra/PlaidClient.cs b/src/Plaid/Cra/PlaidClient.cs index 38b93608..f0b837b1 100644 --- a/src/Plaid/Cra/PlaidClient.cs +++ b/src/Plaid/Cra/PlaidClient.cs @@ -83,7 +83,8 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// /cra/check_report/create creates a Consumer Report powered by Plaid Check. Plaid Check automatically starts creating Consumer Report data after the user completes the Link process with a Plaid Check product, so you typically would only call this endpoint if you wish to generate an updated report, some time after the initial report was generated. + /// /cra/check_report/create creates a Consumer Report powered by Plaid Check. You can call this endpoint to create a new report if consumer_report_permissible_purpose was omitted during Link token creation. If you did provide a consumer_report_permissible_purpose during Link token creation, then Plaid Check will automatically begin creating a Consumer Report once the user completes the Link process, and it is not necessary to call /cra/check_report/create before retrieving the report. + /// /cra/check_report/create can also be used to refresh data in an existing report. A Consumer Report will last for 24 hours before expiring; you should call any /get endpoints on the report before it expires. If a report expires, you can call /cra/check_report/create again to re-generate it. Note that refreshing or regenerating a report is a billable event." /// /// public Task CraCheckReportCreateAsync(Cra.CraCheckReportCreateRequest request) => diff --git a/src/Plaid/DashboardUser/DashboardUserGetRequest.cs b/src/Plaid/DashboardUser/DashboardUserGetRequest.cs index ecd203b6..8ffddaa9 100644 --- a/src/Plaid/DashboardUser/DashboardUserGetRequest.cs +++ b/src/Plaid/DashboardUser/DashboardUserGetRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.DashboardUser; public partial class DashboardUserGetRequest : RequestBase { /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("dashboard_user_id")] public string DashboardUserId { get; set; } = default!; diff --git a/src/Plaid/DashboardUser/DashboardUserGetResponse.cs b/src/Plaid/DashboardUser/DashboardUserGetResponse.cs index c229567e..28eec3a5 100644 --- a/src/Plaid/DashboardUser/DashboardUserGetResponse.cs +++ b/src/Plaid/DashboardUser/DashboardUserGetResponse.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.DashboardUser; public record DashboardUserGetResponse : ResponseBase { /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("id")] public string Id { get; init; } = default!; @@ -18,7 +18,7 @@ public record DashboardUserGetResponse : ResponseBase public DateTimeOffset CreatedAt { get; init; } = default!; /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string EmailAddress { get; init; } = default!; diff --git a/src/Plaid/DashboardUser/PlaidClient.cs b/src/Plaid/DashboardUser/PlaidClient.cs index 8f8624e1..b26c7296 100644 --- a/src/Plaid/DashboardUser/PlaidClient.cs +++ b/src/Plaid/DashboardUser/PlaidClient.cs @@ -3,7 +3,7 @@ namespace Going.Plaid; public sealed partial class PlaidClient { /// - /// Retrieve information about a dashboard user. + /// The /dashboard_user/get endpoint provides details (such as email address) about a specific Dashboard user based on the dashboard_user_id field, which is returned in the audit_trail object of certain Monitor and Beacon endpoints. This can be used to identify the specific reviewer who performed a Dashboard action. /// /// public Task DashboardUserGetAsync(DashboardUser.DashboardUserGetRequest request) => @@ -11,7 +11,7 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// List all dashboard users associated with your account. + /// The /dashboard_user/list endpoint provides details (such as email address) all Dashboard users associated with your account. This can use used to audit or track the list of reviewers for Monitor, Beacon, and Identity Verification products. /// /// public Task DashboardUserListAsync(DashboardUser.DashboardUserListRequest request) => diff --git a/src/Plaid/DepositSwitch/DepositSwitchAltCreateRequest.cs b/src/Plaid/DepositSwitch/DepositSwitchAltCreateRequest.cs index f1d90fc0..06775ea3 100644 --- a/src/Plaid/DepositSwitch/DepositSwitchAltCreateRequest.cs +++ b/src/Plaid/DepositSwitch/DepositSwitchAltCreateRequest.cs @@ -1,24 +1,24 @@ namespace Going.Plaid.DepositSwitch; /// -/// DepositSwitchAltCreateRequest defines the request schema for /deposit_switch/alt/create +/// (Deprecated) DepositSwitchAltCreateRequest defines the request schema for /deposit_switch/alt/create /// public partial class DepositSwitchAltCreateRequest : RequestBase { /// - /// The deposit switch destination account + /// (Deprecated) The deposit switch destination account /// [JsonPropertyName("target_account")] public Entity.DepositSwitchTargetAccount TargetAccount { get; set; } = default!; /// - /// The deposit switch target user + /// (Deprecated) The deposit switch target user /// [JsonPropertyName("target_user")] public Entity.DepositSwitchTargetUser TargetUser { get; set; } = default!; /// - /// Options to configure the /deposit_switch/create request. If provided, cannot be null. + /// (Deprecated) Options to configure the /deposit_switch/create request. If provided, cannot be null. /// [JsonPropertyName("options")] public Entity.DepositSwitchCreateRequestOptions? Options { get; set; } = default!; diff --git a/src/Plaid/DepositSwitch/DepositSwitchAltCreateResponse.cs b/src/Plaid/DepositSwitch/DepositSwitchAltCreateResponse.cs index bdb27241..526f2dcc 100644 --- a/src/Plaid/DepositSwitch/DepositSwitchAltCreateResponse.cs +++ b/src/Plaid/DepositSwitch/DepositSwitchAltCreateResponse.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.DepositSwitch; /// -/// DepositSwitchAltCreateResponse defines the response schema for /deposit_switch/alt/create +/// (Deprecated) DepositSwitchAltCreateResponse defines the response schema for /deposit_switch/alt/create /// public record DepositSwitchAltCreateResponse : ResponseBase { diff --git a/src/Plaid/DepositSwitch/DepositSwitchCreateRequest.cs b/src/Plaid/DepositSwitch/DepositSwitchCreateRequest.cs index aab788d2..5784dcdd 100644 --- a/src/Plaid/DepositSwitch/DepositSwitchCreateRequest.cs +++ b/src/Plaid/DepositSwitch/DepositSwitchCreateRequest.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.DepositSwitch; /// -/// DepositSwitchCreateRequest defines the request schema for /deposit_switch/create +/// (Deprecated) DepositSwitchCreateRequest defines the request schema for /deposit_switch/create /// public partial class DepositSwitchCreateRequest : RequestBase { @@ -24,7 +24,7 @@ public partial class DepositSwitchCreateRequest : RequestBase public Entity.CountryCode? CountryCode { get; set; } = default!; /// - /// Options to configure the /deposit_switch/create request. If provided, cannot be null. + /// (Deprecated) Options to configure the /deposit_switch/create request. If provided, cannot be null. /// [JsonPropertyName("options")] public Entity.DepositSwitchCreateRequestOptions? Options { get; set; } = default!; diff --git a/src/Plaid/DepositSwitch/DepositSwitchCreateResponse.cs b/src/Plaid/DepositSwitch/DepositSwitchCreateResponse.cs index 3044b508..ce4518f0 100644 --- a/src/Plaid/DepositSwitch/DepositSwitchCreateResponse.cs +++ b/src/Plaid/DepositSwitch/DepositSwitchCreateResponse.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.DepositSwitch; /// -/// DepositSwitchCreateResponse defines the response schema for /deposit_switch/create +/// (Deprecated) DepositSwitchCreateResponse defines the response schema for /deposit_switch/create /// public record DepositSwitchCreateResponse : ResponseBase { diff --git a/src/Plaid/DepositSwitch/DepositSwitchGetRequest.cs b/src/Plaid/DepositSwitch/DepositSwitchGetRequest.cs index 4c3a2831..4cc3a692 100644 --- a/src/Plaid/DepositSwitch/DepositSwitchGetRequest.cs +++ b/src/Plaid/DepositSwitch/DepositSwitchGetRequest.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.DepositSwitch; /// -/// DepositSwitchGetRequest defines the request schema for /deposit_switch/get +/// (Deprecated) DepositSwitchGetRequest defines the request schema for /deposit_switch/get /// public partial class DepositSwitchGetRequest : RequestBase { diff --git a/src/Plaid/DepositSwitch/DepositSwitchGetResponse.cs b/src/Plaid/DepositSwitch/DepositSwitchGetResponse.cs index 917ea766..1afeec7a 100644 --- a/src/Plaid/DepositSwitch/DepositSwitchGetResponse.cs +++ b/src/Plaid/DepositSwitch/DepositSwitchGetResponse.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.DepositSwitch; /// -/// DepositSwitchGetResponse defines the response schema for /deposit_switch/get +/// (Deprecated) DepositSwitchGetResponse defines the response schema for /deposit_switch/get /// public record DepositSwitchGetResponse : ResponseBase { diff --git a/src/Plaid/DepositSwitch/DepositSwitchTokenCreateRequest.cs b/src/Plaid/DepositSwitch/DepositSwitchTokenCreateRequest.cs index 72dd184d..d10fb844 100644 --- a/src/Plaid/DepositSwitch/DepositSwitchTokenCreateRequest.cs +++ b/src/Plaid/DepositSwitch/DepositSwitchTokenCreateRequest.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.DepositSwitch; /// -/// DepositSwitchTokenCreateRequest defines the request schema for /deposit_switch/token/create +/// (Deprecated) DepositSwitchTokenCreateRequest defines the request schema for /deposit_switch/token/create /// public partial class DepositSwitchTokenCreateRequest : RequestBase { diff --git a/src/Plaid/DepositSwitch/DepositSwitchTokenCreateResponse.cs b/src/Plaid/DepositSwitch/DepositSwitchTokenCreateResponse.cs index 1a59dc01..63a1f227 100644 --- a/src/Plaid/DepositSwitch/DepositSwitchTokenCreateResponse.cs +++ b/src/Plaid/DepositSwitch/DepositSwitchTokenCreateResponse.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.DepositSwitch; /// -/// DepositSwitchTokenCreateResponse defines the response schema for /deposit_switch/token/create +/// (Deprecated) DepositSwitchTokenCreateResponse defines the response schema for /deposit_switch/token/create /// public record DepositSwitchTokenCreateResponse : ResponseBase { diff --git a/src/Plaid/Entity/Account.cs b/src/Plaid/Entity/Account.cs index 05debc48..8974605d 100644 --- a/src/Plaid/Entity/Account.cs +++ b/src/Plaid/Entity/Account.cs @@ -63,7 +63,7 @@ public record Account public Entity.VerificationInsights? VerificationInsights { get; init; } = default!; /// - /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently only supported for Chase Items. Because Chase accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify a Chase account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field may be populated for any account; in Production, it will only be populated for Chase accounts. + /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This field is currently supported only for Items at institutions that use Tokenized Account Numbers (i.e., Chase and PNC). Because these accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify an account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field may be populated for any account; in Production, it will only be populated for accounts at applicable institutions. /// [JsonPropertyName("persistent_account_id")] public string? PersistentAccountId { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountAssets.cs b/src/Plaid/Entity/AccountAssets.cs index 1b07216f..53e262e7 100644 --- a/src/Plaid/Entity/AccountAssets.cs +++ b/src/Plaid/Entity/AccountAssets.cs @@ -69,7 +69,7 @@ public record AccountAssets public Entity.HolderCategory? HolderCategory { get; init; } = default!; /// - /// The duration of transaction history available for this Item, typically defined as the time since the date of the earliest transaction in that account. + /// The duration of transaction history available within this report for this Item, typically defined as the time since the date of the earliest transaction in that account. /// [JsonPropertyName("days_available")] public decimal DaysAvailable { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountBalance.cs b/src/Plaid/Entity/AccountBalance.cs index a271aedb..043a59f5 100644 --- a/src/Plaid/Entity/AccountBalance.cs +++ b/src/Plaid/Entity/AccountBalance.cs @@ -51,7 +51,7 @@ public record AccountBalance /// /// Timestamp in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ) indicating the oldest acceptable balance when making a request to /accounts/balance/get. - /// This field is only used and expected when the institution is ins_128026 (Capital One) and the Item contains one or more accounts with a non-depository account type, in which case a value must be provided or an INVALID_REQUEST error with the code of INVALID_FIELD will be returned. For Capital One depository accounts as well as all other account types on all other institutions, this field is ignored. See account type schema for a full list of account types. + /// This field is only used and expected when the institution is ins_128026 (Capital One) and the Item contains one or more accounts with a non-depository account type, in which case a value must be provided or an INVALID_REQUEST error with the code of INVALID_FIELD will be returned. For Capital One depository accounts as well as all other account types on all other institutions, this field is ignored. See account type schema for a full list of account types. /// If the balance that is pulled is older than the given timestamp for Items with this field required, an INVALID_REQUEST error with the code of LAST_UPDATED_DATETIME_OUT_OF_RANGE will be returned with the most recent timestamp for the requested account contained in the response. /// [JsonPropertyName("last_updated_datetime")] diff --git a/src/Plaid/Entity/AccountIdentity.cs b/src/Plaid/Entity/AccountIdentity.cs index 00689955..8d5a735b 100644 --- a/src/Plaid/Entity/AccountIdentity.cs +++ b/src/Plaid/Entity/AccountIdentity.cs @@ -63,7 +63,7 @@ public record AccountIdentity public Entity.VerificationInsights? VerificationInsights { get; init; } = default!; /// - /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently only supported for Chase Items. Because Chase accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify a Chase account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field may be populated for any account; in Production, it will only be populated for Chase accounts. + /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This field is currently supported only for Items at institutions that use Tokenized Account Numbers (i.e., Chase and PNC). Because these accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify an account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field may be populated for any account; in Production, it will only be populated for accounts at applicable institutions. /// [JsonPropertyName("persistent_account_id")] public string? PersistentAccountId { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountIdentityDocumentUpload.cs b/src/Plaid/Entity/AccountIdentityDocumentUpload.cs index c0abf8c7..fd676322 100644 --- a/src/Plaid/Entity/AccountIdentityDocumentUpload.cs +++ b/src/Plaid/Entity/AccountIdentityDocumentUpload.cs @@ -63,7 +63,7 @@ public record AccountIdentityDocumentUpload public Entity.VerificationInsights? VerificationInsights { get; init; } = default!; /// - /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently only supported for Chase Items. Because Chase accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify a Chase account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field may be populated for any account; in Production, it will only be populated for Chase accounts. + /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This field is currently supported only for Items at institutions that use Tokenized Account Numbers (i.e., Chase and PNC). Because these accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify an account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field may be populated for any account; in Production, it will only be populated for accounts at applicable institutions. /// [JsonPropertyName("persistent_account_id")] public string? PersistentAccountId { get; init; } = default!; @@ -81,7 +81,7 @@ public record AccountIdentityDocumentUpload public IReadOnlyList? Owners { get; init; } = default!; /// - /// An array of document with which the Identity data is derived from. + /// Data about the documents that were uploaded as proof of account ownership. /// [JsonPropertyName("documents")] public IReadOnlyList? Documents { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountIdentityMatchScore.cs b/src/Plaid/Entity/AccountIdentityMatchScore.cs index 36a438c1..3f587eab 100644 --- a/src/Plaid/Entity/AccountIdentityMatchScore.cs +++ b/src/Plaid/Entity/AccountIdentityMatchScore.cs @@ -63,7 +63,7 @@ public record AccountIdentityMatchScore public Entity.VerificationInsights? VerificationInsights { get; init; } = default!; /// - /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently only supported for Chase Items. Because Chase accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify a Chase account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field may be populated for any account; in Production, it will only be populated for Chase accounts. + /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This field is currently supported only for Items at institutions that use Tokenized Account Numbers (i.e., Chase and PNC). Because these accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify an account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field may be populated for any account; in Production, it will only be populated for accounts at applicable institutions. /// [JsonPropertyName("persistent_account_id")] public string? PersistentAccountId { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountType.cs b/src/Plaid/Entity/AccountType.cs index e885f446..4673b240 100644 --- a/src/Plaid/Entity/AccountType.cs +++ b/src/Plaid/Entity/AccountType.cs @@ -6,31 +6,31 @@ namespace Going.Plaid.Entity; public enum AccountType { /// - /// An account type holding cash, in which funds are deposited. Supported products for depository accounts are: Auth (checking and savings subtypes only), Transfer, Balance, Signal, Income, Transactions, Identity, Payment Initiation, Assets, and Investments (cash management subtype only). + /// An account type holding cash, in which funds are deposited. /// [EnumMember(Value = "depository")] Depository, /// - /// A credit card type account. Supported products for credit accounts are: Balance, Transactions, Identity, Assets, and Liabilities. + /// A credit card type account. /// [EnumMember(Value = "credit")] Credit, /// - /// A loan type account. Supported products for loan accounts are: Balance, Liabilities (student and mortgage subtypes only), Identity. + /// A loan type account. /// [EnumMember(Value = "loan")] Loan, /// - /// An investment account. Supported products for investment accounts are: Balance, Assets, Investments, and Investment Transactions. In API versions 2018-05-22 and earlier, this type is called brokerage. + /// An investment account. In API versions 2018-05-22 and earlier, this type is called brokerage. /// [EnumMember(Value = "investment")] Investment, /// - /// Other or unknown account type. Supported products for other accounts are: Balance, Identity. + /// Other or unknown account type. /// [EnumMember(Value = "other")] Other, diff --git a/src/Plaid/Entity/AssetReportAccountBalance.cs b/src/Plaid/Entity/AssetReportAccountBalance.cs index 6a39dae7..62c9fe94 100644 --- a/src/Plaid/Entity/AssetReportAccountBalance.cs +++ b/src/Plaid/Entity/AssetReportAccountBalance.cs @@ -59,7 +59,7 @@ public record AssetReportAccountBalance /// /// Timestamp in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ) indicating the oldest acceptable balance when making a request to /accounts/balance/get. - /// This field is only used and expected when the institution is ins_128026 (Capital One) and the Item contains one or more accounts with a non-depository account type, in which case a value must be provided or an INVALID_REQUEST error with the code of INVALID_FIELD will be returned. For Capital One depository accounts as well as all other account types on all other institutions, this field is ignored. See account type schema for a full list of account types. + /// This field is only used and expected when the institution is ins_128026 (Capital One) and the Item contains one or more accounts with a non-depository account type, in which case a value must be provided or an INVALID_REQUEST error with the code of INVALID_FIELD will be returned. For Capital One depository accounts as well as all other account types on all other institutions, this field is ignored. See account type schema for a full list of account types. /// If the balance that is pulled is older than the given timestamp for Items with this field required, an INVALID_REQUEST error with the code of LAST_UPDATED_DATETIME_OUT_OF_RANGE will be returned with the most recent timestamp for the requested account contained in the response. /// [JsonPropertyName("last_updated_datetime")] diff --git a/src/Plaid/Entity/AssetReportCreateRequestOptions.cs b/src/Plaid/Entity/AssetReportCreateRequestOptions.cs index 4cb1dfa5..65be22d0 100644 --- a/src/Plaid/Entity/AssetReportCreateRequestOptions.cs +++ b/src/Plaid/Entity/AssetReportCreateRequestOptions.cs @@ -30,7 +30,7 @@ public class AssetReportCreateRequestOptions public IReadOnlyList? Products { get; set; } = default!; /// - /// Use this field to request a fast_asset report. When Fast Assets is requested, Plaid will create two versions of the Asset Report: first, the Fast Asset Report, which will contain only current identity and balance information, and later, the Full Asset Report, which will also contain historical balance information and transaction data. A PRODUCT_READY webhook will be fired for each Asset Report when it is ready, and the report_type field will indicate whether the webhook is firing for the full or fast Asset Report. To retrieve the Fast Asset Report, call /asset_report/get with fast_report set to true. There is no additional charge for using Fast Assets. + /// This field can be used to add additional options for the Asset Report. To fetch investments data (transactions, holdings, etc.) in the Asset Report, investments must be specified in add_ons. For Fast Assets, fast_assets must be specified in add_ons. /// [JsonPropertyName("add_ons")] public IReadOnlyList? AddOns { get; set; } = default!; diff --git a/src/Plaid/Entity/BaseReportAccount.cs b/src/Plaid/Entity/BaseReportAccount.cs index 5e2702af..37df3f46 100644 --- a/src/Plaid/Entity/BaseReportAccount.cs +++ b/src/Plaid/Entity/BaseReportAccount.cs @@ -56,7 +56,7 @@ public record BaseReportAccount public Entity.AccountSubtype? Subtype { get; init; } = default!; /// - /// The duration of transaction history available for this Item, typically defined as the time since the date of the earliest transaction in that account. Only returned by Base Report endpoints. + /// The duration of transaction history available within this report for this Item, typically defined as the time since the date of the earliest transaction in that account. Only returned by Base Report endpoints. /// [JsonPropertyName("days_available")] public decimal DaysAvailable { get; init; } = default!; @@ -91,4 +91,10 @@ public record BaseReportAccount [JsonPropertyName("account_insights")] public Entity.BaseReportAccountInsights? AccountInsights { get; init; } = default!; + /// + /// Calculated attributes derived from transaction-level data. + /// + [JsonPropertyName("attributes")] + public Entity.BaseReportAttributes? Attributes { get; init; } = default!; + } diff --git a/src/Plaid/Entity/BaseReportAccountBalances.cs b/src/Plaid/Entity/BaseReportAccountBalances.cs index 6ff62173..b5da7f3a 100644 --- a/src/Plaid/Entity/BaseReportAccountBalances.cs +++ b/src/Plaid/Entity/BaseReportAccountBalances.cs @@ -51,7 +51,7 @@ public record BaseReportAccountBalances /// /// Timestamp in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ) indicating the oldest acceptable balance when making a request to /accounts/balance/get. - /// This field is only used and expected when the institution is ins_128026 (Capital One) and the Item contains one or more accounts with a non-depository account type, in which case a value must be provided or an INVALID_REQUEST error with the code of INVALID_FIELD will be returned. For Capital One depository accounts as well as all other account types on all other institutions, this field is ignored. See account type schema for a full list of account types. + /// This field is only used and expected when the institution is ins_128026 (Capital One) and the Item contains one or more accounts with a non-depository account type, in which case a value must be provided or an INVALID_REQUEST error with the code of INVALID_FIELD will be returned. For Capital One depository accounts as well as all other account types on all other institutions, this field is ignored. See account type schema for a full list of account types. /// If the balance that is pulled is older than the given timestamp for Items with this field required, an INVALID_REQUEST error with the code of LAST_UPDATED_DATETIME_OUT_OF_RANGE will be returned with the most recent timestamp for the requested account contained in the response. /// [JsonPropertyName("last_updated_datetime")] diff --git a/src/Plaid/Entity/BaseReportAccountInsights.cs b/src/Plaid/Entity/BaseReportAccountInsights.cs index 81e472f5..e25fa5f0 100644 --- a/src/Plaid/Entity/BaseReportAccountInsights.cs +++ b/src/Plaid/Entity/BaseReportAccountInsights.cs @@ -36,7 +36,7 @@ public record BaseReportAccountInsights public IReadOnlyList? LongestGapBetweenTransactions { get; init; } = default!; /// - /// Customers must transition from longest_gap_between_transactions by September 30th 2024. Longest gap between sequential transactions in a time period. This array can include multiple time periods. + /// Customers must transition from longest_gap_between_transactions by October 31st 2024. Longest gap between sequential transactions in a time period. This array can include multiple time periods. /// [JsonPropertyName("longest_gaps_between_transactions")] public IReadOnlyList? LongestGapsBetweenTransactions { get; init; } = default!; @@ -54,7 +54,7 @@ public record BaseReportAccountInsights public IReadOnlyList? AverageInflowAmount { get; init; } = default!; /// - /// Customers must transition from average_inflow_amount by September 30th 2024. Average amount of debit transactions into the account in a time period. This array will be empty for non-depository accounts. This field only takes into account USD transactions from the account. + /// Customers must transition from average_inflow_amount by October 31st 2024. Average amount of debit transactions into the account in a time period. This array will be empty for non-depository accounts. This field only takes into account USD transactions from the account. /// [JsonPropertyName("average_inflow_amounts")] public IReadOnlyList? AverageInflowAmounts { get; init; } = default!; @@ -72,7 +72,7 @@ public record BaseReportAccountInsights public IReadOnlyList? AverageOutflowAmount { get; init; } = default!; /// - /// Customers must transition from average_outflow_amount by September 30th 2024. Average amount of transactions out of the account in a time period. This array will be empty for non-depository accounts. This field only takes into account USD transactions from the account. + /// Customers must transition from average_outflow_amount by October 31st 2024. Average amount of transactions out of the account in a time period. This array will be empty for non-depository accounts. This field only takes into account USD transactions from the account. /// [JsonPropertyName("average_outflow_amounts")] public IReadOnlyList? AverageOutflowAmounts { get; init; } = default!; diff --git a/src/Plaid/Entity/BaseReportAttributes.cs b/src/Plaid/Entity/BaseReportAttributes.cs new file mode 100644 index 00000000..4854fedc --- /dev/null +++ b/src/Plaid/Entity/BaseReportAttributes.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// Calculated attributes derived from transaction-level data. +/// +public record BaseReportAttributes +{ + /// + /// The number of NSF and overdraft fee transactions in the time range for the report in the given account. + /// + [JsonPropertyName("nsf_overdraft_transactions_count")] + public int? NsfOverdraftTransactionsCount { get; init; } = default!; + + /// + /// Our prediction on whether the account is a primary account. Only one account per account type across the items connected will have a value of true. + /// + [JsonPropertyName("is_primary_account")] + public bool? IsPrimaryAccount { get; init; } = default!; + + /// + /// Value ranging from 0-1. The higher the score, the more confident we are of the account being the primary account. + /// + [JsonPropertyName("primary_account_score")] + public decimal? PrimaryAccountScore { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/BaseReportWarning.cs b/src/Plaid/Entity/BaseReportWarning.cs index ddafc873..fb4ed23e 100644 --- a/src/Plaid/Entity/BaseReportWarning.cs +++ b/src/Plaid/Entity/BaseReportWarning.cs @@ -12,7 +12,7 @@ public record BaseReportWarning public string WarningType { get; init; } = default!; /// - /// The warning code identifies a specific kind of warning. OWNERS_UNAVAILABLE indicates that account-owner information is not available. TRANSACTIONS_UNAVAILABLE indicates that transactions information associated with Credit and Depository accounts are unavailable. + /// The warning code identifies a specific kind of warning. OWNERS_UNAVAILABLE indicates that account-owner information is not available. TRANSACTIONS_UNAVAILABLE indicates that transactions information associated with Credit and Depository accounts are unavailable. USER_FRAUD_ALERT indicates that the User has placed a fraud alert on their Plaid Check consumer report due to suspected fraud. /// [JsonPropertyName("warning_code")] public Entity.BaseReportWarningCode WarningCode { get; init; } = default!; diff --git a/src/Plaid/Entity/BaseReportWarningCode.cs b/src/Plaid/Entity/BaseReportWarningCode.cs index fb7ed9ff..3cabd436 100644 --- a/src/Plaid/Entity/BaseReportWarningCode.cs +++ b/src/Plaid/Entity/BaseReportWarningCode.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The warning code identifies a specific kind of warning. OWNERS_UNAVAILABLE indicates that account-owner information is not available. TRANSACTIONS_UNAVAILABLE indicates that transactions information associated with Credit and Depository accounts are unavailable. +/// The warning code identifies a specific kind of warning. OWNERS_UNAVAILABLE indicates that account-owner information is not available. TRANSACTIONS_UNAVAILABLE indicates that transactions information associated with Credit and Depository accounts are unavailable. USER_FRAUD_ALERT indicates that the User has placed a fraud alert on their Plaid Check consumer report due to suspected fraud. /// public enum BaseReportWarningCode { @@ -17,6 +17,12 @@ public enum BaseReportWarningCode [EnumMember(Value = "TRANSACTIONS_UNAVAILABLE")] TransactionsUnavailable, + /// + /// + /// + [EnumMember(Value = "USER_FRAUD_ALERT")] + UserFraudAlert, + /// /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. /// diff --git a/src/Plaid/Entity/BeaconAuditTrail.cs b/src/Plaid/Entity/BeaconAuditTrail.cs index 764b73d5..a01a59a3 100644 --- a/src/Plaid/Entity/BeaconAuditTrail.cs +++ b/src/Plaid/Entity/BeaconAuditTrail.cs @@ -12,7 +12,7 @@ public record BeaconAuditTrail public Entity.BeaconAuditTrailSource Source { get; init; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("dashboard_user_id")] public string? DashboardUserId { get; init; } = default!; diff --git a/src/Plaid/Entity/BeaconUserData.cs b/src/Plaid/Entity/BeaconUserData.cs index 2ed9d314..6a42ec9e 100644 --- a/src/Plaid/Entity/BeaconUserData.cs +++ b/src/Plaid/Entity/BeaconUserData.cs @@ -26,7 +26,7 @@ public record BeaconUserData public Entity.BeaconUserAddress Address { get; init; } = default!; /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; init; } = default!; diff --git a/src/Plaid/Entity/BeaconUserRequestData.cs b/src/Plaid/Entity/BeaconUserRequestData.cs index fec096f6..96a6b10b 100644 --- a/src/Plaid/Entity/BeaconUserRequestData.cs +++ b/src/Plaid/Entity/BeaconUserRequestData.cs @@ -25,7 +25,7 @@ public class BeaconUserRequestData public Entity.BeaconUserRequestAddress? Address { get; set; } = default!; /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; diff --git a/src/Plaid/Entity/BeaconUserUpdateRequestData.cs b/src/Plaid/Entity/BeaconUserUpdateRequestData.cs index 6f08a4cf..42ebd584 100644 --- a/src/Plaid/Entity/BeaconUserUpdateRequestData.cs +++ b/src/Plaid/Entity/BeaconUserUpdateRequestData.cs @@ -24,7 +24,7 @@ public class BeaconUserUpdateRequestData public Entity.BeaconUserRequestAddress? Address { get; set; } = default!; /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; diff --git a/src/Plaid/Entity/ConsentEvent.cs b/src/Plaid/Entity/ConsentEvent.cs new file mode 100644 index 00000000..cce8ed85 --- /dev/null +++ b/src/Plaid/Entity/ConsentEvent.cs @@ -0,0 +1,69 @@ +namespace Going.Plaid.Entity; + +/// +/// Describes a consent event. +/// +public record ConsentEvent +{ + /// + /// The Plaid Item ID. The item_id is always unique; linking the same account at the same institution twice will result in two Items with different item_id values. Like all Plaid identifiers, the item_id is case-sensitive. + /// + [JsonPropertyName("item_id")] + public string? ItemId { get; init; } = default!; + + /// + /// The date and time when the consent event occurred, in ISO 8601 format. + /// + [JsonPropertyName("created_at")] + public DateTimeOffset? CreatedAt { get; init; } = default!; + + /// + /// A broad categorization of the consent event. + /// + [JsonPropertyName("event_type")] + public Entity.ConsentEventType? EventType { get; init; } = default!; + + /// + /// Codes describing the object of a consent event. + /// + [JsonPropertyName("event_code")] + public Entity.ConsentEventCode? EventCode { get; init; } = default!; + + /// + /// Unique identifier for the institution associated with the Item. Field is null for Items created via Same Day Micro-deposits. + /// + [JsonPropertyName("institution_id")] + public string? InstitutionId { get; init; } = default!; + + /// + /// The full name of the institution associated with the Item. Field is null for Items created via Same Day Micro-deposits. + /// + [JsonPropertyName("institution_name")] + public string? InstitutionName { get; init; } = default!; + + /// + /// The entity that initiated collection of consent. + /// + [JsonPropertyName("initiator")] + public Entity.ConsentEventInitiator? Initiator { get; init; } = default!; + + /// + /// A list of strings containing the full list of use cases the end user has consented to for the Item. + /// See the full list of use cases. + /// + [JsonPropertyName("consented_use_cases")] + public IReadOnlyList? ConsentedUseCases { get; init; } = default!; + + /// + /// A list of strings containing the full list of data scopes the end user has consented to for the Item. These correspond to consented products; see the full mapping of data scopes and products. + /// + [JsonPropertyName("consented_data_scopes")] + public IReadOnlyList? ConsentedDataScopes { get; init; } = default!; + + /// + /// An array containing the accounts associated with the Item for which authorizations are granted. + /// + [JsonPropertyName("consented_accounts")] + public IReadOnlyList? ConsentedAccounts { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/CraCheckReportProduct.cs b/src/Plaid/Entity/ConsentEventCode.cs similarity index 56% rename from src/Plaid/Entity/CraCheckReportProduct.cs rename to src/Plaid/Entity/ConsentEventCode.cs index aed9b327..fdc51bd7 100644 --- a/src/Plaid/Entity/CraCheckReportProduct.cs +++ b/src/Plaid/Entity/ConsentEventCode.cs @@ -1,33 +1,33 @@ namespace Going.Plaid.Entity; /// -/// A product supported by Plaid Check. +/// Codes describing the object of a consent event. /// -public enum CraCheckReportProduct +public enum ConsentEventCode { /// /// /// - [EnumMember(Value = "cra_base_report")] - CraBaseReport, + [EnumMember(Value = "PLAID_END_USER_PRIVACY_POLICY")] + PlaidEndUserPrivacyPolicy, /// /// /// - [EnumMember(Value = "cra_income_insights")] - CraIncomeInsights, + [EnumMember(Value = "USE_CASES")] + UseCases, /// /// /// - [EnumMember(Value = "cra_partner_insights")] - CraPartnerInsights, + [EnumMember(Value = "DATA_SCOPES")] + DataScopes, /// /// /// - [EnumMember(Value = "cra_network_insights")] - CraNetworkInsights, + [EnumMember(Value = "ACCOUNT_SCOPES")] + AccountScopes, /// /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. diff --git a/src/Plaid/Entity/ConsentEventInitiator.cs b/src/Plaid/Entity/ConsentEventInitiator.cs new file mode 100644 index 00000000..9542b6a9 --- /dev/null +++ b/src/Plaid/Entity/ConsentEventInitiator.cs @@ -0,0 +1,38 @@ +namespace Going.Plaid.Entity; + +/// +/// The entity that initiated collection of consent. +/// +public enum ConsentEventInitiator +{ + /// + /// + /// + [EnumMember(Value = "PLAID")] + Plaid, + + /// + /// + /// + [EnumMember(Value = "DATA_PROVIDER")] + DataProvider, + + /// + /// + /// + [EnumMember(Value = "CUSTOMER")] + Customer, + + /// + /// + /// + [EnumMember(Value = "END_USER")] + EndUser, + + /// + /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. + /// + [EnumMember(Value = "undefined")] + Undefined, + +} diff --git a/src/Plaid/Entity/ConsentEventType.cs b/src/Plaid/Entity/ConsentEventType.cs new file mode 100644 index 00000000..94b9ff25 --- /dev/null +++ b/src/Plaid/Entity/ConsentEventType.cs @@ -0,0 +1,32 @@ +namespace Going.Plaid.Entity; + +/// +/// A broad categorization of the consent event. +/// +public enum ConsentEventType +{ + /// + /// + /// + [EnumMember(Value = "CONSENT_GRANTED")] + ConsentGranted, + + /// + /// + /// + [EnumMember(Value = "CONSENT_REVOKED")] + ConsentRevoked, + + /// + /// + /// + [EnumMember(Value = "CONSENT_UPDATED")] + ConsentUpdated, + + /// + /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. + /// + [EnumMember(Value = "undefined")] + Undefined, + +} diff --git a/src/Plaid/Entity/ConsentedAccount.cs b/src/Plaid/Entity/ConsentedAccount.cs new file mode 100644 index 00000000..d94771fb --- /dev/null +++ b/src/Plaid/Entity/ConsentedAccount.cs @@ -0,0 +1,44 @@ +namespace Going.Plaid.Entity; + +/// +/// A financial institution account. +/// +public record ConsentedAccount +{ + /// + /// Plaid’s unique identifier for the account. Like all Plaid identifiers, the account_id is case sensitive. + /// + [JsonPropertyName("account_id")] + public string? AccountId { get; init; } = default!; + + /// + /// The last 2-4 alphanumeric characters of an account's official account number + /// + [JsonPropertyName("mask")] + public string? Mask { get; init; } = default!; + + /// + /// The name of the account, either assigned by the user or by the financial institution itself + /// + [JsonPropertyName("name")] + public string? Name { get; init; } = default!; + + /// + /// The official name of the account as given by the financial institution + /// + [JsonPropertyName("official_name")] + public string? OfficialName { get; init; } = default!; + + /// + /// See the Account type schema for a full listing of account types and corresponding subtypes. + /// + [JsonPropertyName("type")] + public Entity.AccountType? Type { get; init; } = default!; + + /// + /// See the [Account type schema](https://plaid.com/docs/api/accounts/#account-type-schema) for a full listing of account types and corresponding subtypes. + /// + [JsonPropertyName("subtype")] + public Entity.AccountSubtype? Subtype { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/ConsentedDataScope.cs b/src/Plaid/Entity/ConsentedDataScope.cs new file mode 100644 index 00000000..16ca14ec --- /dev/null +++ b/src/Plaid/Entity/ConsentedDataScope.cs @@ -0,0 +1,62 @@ +namespace Going.Plaid.Entity; + +/// +/// A data scope for the products that a user can consent to in [Data Transparency Messaging](/docs/link/data-transparency-messaging-migration-guide) +/// +public enum ConsentedDataScope +{ + /// + /// + /// + [EnumMember(Value = "account_and_balance_info")] + AccountAndBalanceInfo, + + /// + /// + /// + [EnumMember(Value = "contact_info")] + ContactInfo, + + /// + /// + /// + [EnumMember(Value = "account_and_routing_numbers")] + AccountAndRoutingNumbers, + + /// + /// + /// + [EnumMember(Value = "transactions")] + Transactions, + + /// + /// + /// + [EnumMember(Value = "credit_and_loans")] + CreditAndLoans, + + /// + /// + /// + [EnumMember(Value = "investments")] + Investments, + + /// + /// + /// + [EnumMember(Value = "bank_statements")] + BankStatements, + + /// + /// + /// + [EnumMember(Value = "risk_info")] + RiskInfo, + + /// + /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. + /// + [EnumMember(Value = "undefined")] + Undefined, + +} diff --git a/src/Plaid/Entity/ConsumerReportPermissiblePurpose.cs b/src/Plaid/Entity/ConsumerReportPermissiblePurpose.cs index f9490fca..919da193 100644 --- a/src/Plaid/Entity/ConsumerReportPermissiblePurpose.cs +++ b/src/Plaid/Entity/ConsumerReportPermissiblePurpose.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// This enum describes the reason you are generating a Consumer Report for this user. +/// Describes the reason you are generating a Consumer Report for this user. /// public enum ConsumerReportPermissiblePurpose { diff --git a/src/Plaid/Entity/ConsumerReportUserIdentity.cs b/src/Plaid/Entity/ConsumerReportUserIdentity.cs index 9094aee4..8a26b4ef 100644 --- a/src/Plaid/Entity/ConsumerReportUserIdentity.cs +++ b/src/Plaid/Entity/ConsumerReportUserIdentity.cs @@ -29,6 +29,20 @@ public class ConsumerReportUserIdentity [JsonPropertyName("emails")] public IReadOnlyList Emails { get; set; } = default!; + /// + /// The last 4 digits of the user's social security number. + /// + [JsonPropertyName("ssn_last_4")] + public string? SsnLast4 { get; set; } = default!; + + /// + /// To be provided in the format "yyyy-mm-dd". + /// This field is required as of Oct 21, 2024 for any clients who became Plaid Check customers on or after Oct 1, 2024. + /// This field will be required for all Plaid Check customers as of Feb 1, 2025. + /// + [JsonPropertyName("date_of_birth")] + public DateOnly? DateOfBirth { get; set; } = default!; + /// /// Data about the components comprising an address. /// diff --git a/src/Plaid/Entity/CraBankIncomeSource.cs b/src/Plaid/Entity/CraBankIncomeSource.cs index a022a664..1b149442 100644 --- a/src/Plaid/Entity/CraBankIncomeSource.cs +++ b/src/Plaid/Entity/CraBankIncomeSource.cs @@ -24,7 +24,7 @@ public record CraBankIncomeSource public string? IncomeDescription { get; init; } = default!; /// - /// The income category. Note that the CASH value has been deprecated and is used only for existing legacy implementations. It has been replaced by the new categories CASH_DEPOSIT (representing cash or check deposits) and TRANSFER_FROM_APPLICATION (representing cash transfers originating from apps, such as Zelle or Venmo). + /// The income category. /// [JsonPropertyName("income_category")] public Entity.CreditBankIncomeCategory? IncomeCategory { get; init; } = default!; diff --git a/src/Plaid/Entity/CraMonitoringInsightsItem.cs b/src/Plaid/Entity/CraMonitoringInsightsItem.cs index 738022c3..d657880a 100644 --- a/src/Plaid/Entity/CraMonitoringInsightsItem.cs +++ b/src/Plaid/Entity/CraMonitoringInsightsItem.cs @@ -27,6 +27,6 @@ public record CraMonitoringInsightsItem /// An object representing the Monitoring Insights for the given Item /// [JsonPropertyName("insights")] - public Entity.MonitoringInsights Insights { get; init; } = default!; + public Entity.MonitoringInsights? Insights { get; init; } = default!; } diff --git a/src/Plaid/Entity/CreditBankIncomeCategory.cs b/src/Plaid/Entity/CreditBankIncomeCategory.cs index a2a2c3ec..2489907a 100644 --- a/src/Plaid/Entity/CreditBankIncomeCategory.cs +++ b/src/Plaid/Entity/CreditBankIncomeCategory.cs @@ -1,96 +1,96 @@ namespace Going.Plaid.Entity; /// -/// The income category. Note that the CASH value has been deprecated and is used only for existing legacy implementations. It has been replaced by the new categories CASH_DEPOSIT (representing cash or check deposits) and TRANSFER_FROM_APPLICATION (representing cash transfers originating from apps, such as Zelle or Venmo). +/// The income category. /// public enum CreditBankIncomeCategory { /// - /// + /// Payment from an employer to an earner or other form of permanent employment. /// [EnumMember(Value = "SALARY")] Salary, /// - /// + /// Unemployment benefits. In the UK, includes certain low-income benefits such as the Universal Credit. /// [EnumMember(Value = "UNEMPLOYMENT")] Unemployment, /// - /// + /// Deprecated and used only for existing legacy implementations. Has been replaced by CASH_DEPOSIT and TRANSFER_FROM_APPLICATION. /// [EnumMember(Value = "CASH")] Cash, /// - /// + /// Income earned as a gig economy worker, e.g. driving for Uber, Lyft, Postmates, DoorDash, etc. /// [EnumMember(Value = "GIG_ECONOMY")] GigEconomy, /// - /// + /// Income earned from a rental property. Income may be identified as rental when the payment is received through a rental platform, e.g. Airbnb; rent paid directly by the tenant to the property owner (e.g. via cash, check, or ACH) will typically not be classified as rental income. /// [EnumMember(Value = "RENTAL")] Rental, /// - /// + /// Child support payments received. /// [EnumMember(Value = "CHILD_SUPPORT")] ChildSupport, /// - /// + /// Veterans benefits. Income earned as salary for serving in the military (e.g. through DFAS) will be classified as SALARY rather than MILITARY. /// [EnumMember(Value = "MILITARY")] Military, /// - /// + /// Payments from private retirement systems, pensions, and government retirement programs, including Social Security retirement benefits. /// [EnumMember(Value = "RETIREMENT")] Retirement, /// - /// + /// Disability payments, including Social Security disability benefits. /// [EnumMember(Value = "LONG_TERM_DISABILITY")] LongTermDisability, /// - /// + /// Interest earned from a bank account. /// [EnumMember(Value = "BANK_INTEREST")] BankInterest, /// - /// + /// A cash or check deposit. /// [EnumMember(Value = "CASH_DEPOSIT")] CashDeposit, /// - /// + /// Deposits from a money transfer app, such as Venmo, Cash App, or Zelle. /// [EnumMember(Value = "TRANSFER_FROM_APPLICATION")] TransferFromApplication, /// - /// + /// A tax refund. /// [EnumMember(Value = "TAX_REFUND")] TaxRefund, /// - /// + /// Government benefits other than retirement, unemployment, child support, or disability. Currently used only in the UK, to represent benefits such as Cost of Living Payments. /// [EnumMember(Value = "BENEFIT_OTHER")] BenefitOther, /// - /// + /// Income that could not be categorized as any other income category. /// [EnumMember(Value = "OTHER")] Other, diff --git a/src/Plaid/Entity/CreditBankIncomeSource.cs b/src/Plaid/Entity/CreditBankIncomeSource.cs index d58f87ff..8721c8e8 100644 --- a/src/Plaid/Entity/CreditBankIncomeSource.cs +++ b/src/Plaid/Entity/CreditBankIncomeSource.cs @@ -18,7 +18,7 @@ public record CreditBankIncomeSource public string? IncomeDescription { get; init; } = default!; /// - /// The income category. Note that the CASH value has been deprecated and is used only for existing legacy implementations. It has been replaced by the new categories CASH_DEPOSIT (representing cash or check deposits) and TRANSFER_FROM_APPLICATION (representing cash transfers originating from apps, such as Zelle or Venmo). + /// The income category. /// [JsonPropertyName("income_category")] public Entity.CreditBankIncomeCategory? IncomeCategory { get; init; } = default!; diff --git a/src/Plaid/Entity/DashboardUser.cs b/src/Plaid/Entity/DashboardUser.cs index 645dbec9..0847f11f 100644 --- a/src/Plaid/Entity/DashboardUser.cs +++ b/src/Plaid/Entity/DashboardUser.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public record DashboardUser { /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("id")] public string Id { get; init; } = default!; @@ -18,7 +18,7 @@ public record DashboardUser public DateTimeOffset CreatedAt { get; init; } = default!; /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string EmailAddress { get; init; } = default!; diff --git a/src/Plaid/Entity/DataSources.cs b/src/Plaid/Entity/DataSources.cs new file mode 100644 index 00000000..59265a04 --- /dev/null +++ b/src/Plaid/Entity/DataSources.cs @@ -0,0 +1,32 @@ +namespace Going.Plaid.Entity; + +/// +/// A description of the source of data for a given product/data type. +/// +public enum DataSources +{ + /// + /// The institution supports this product, and the data was provided by the institution. + /// + [EnumMember(Value = "INSTITUTION")] + Institution, + + /// + /// The user manually provided the full account number, which was matched to the account mask provided by the institution. Only applicable to the numbers data type. + /// + [EnumMember(Value = "INSTITUTION_MASK")] + InstitutionMask, + + /// + /// The institution does not support this product, and the data was manually provided by the user. + /// + [EnumMember(Value = "USER")] + User, + + /// + /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. + /// + [EnumMember(Value = "undefined")] + Undefined, + +} diff --git a/src/Plaid/Entity/DepositSwitchAddressData.cs b/src/Plaid/Entity/DepositSwitchAddressData.cs index 6b1b712a..eaf0a6b6 100644 --- a/src/Plaid/Entity/DepositSwitchAddressData.cs +++ b/src/Plaid/Entity/DepositSwitchAddressData.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The user's address. +/// (Deprecated) The user's address. /// public class DepositSwitchAddressData { diff --git a/src/Plaid/Entity/DepositSwitchCreateRequestOptions.cs b/src/Plaid/Entity/DepositSwitchCreateRequestOptions.cs index 43faecc2..d9b93f3f 100644 --- a/src/Plaid/Entity/DepositSwitchCreateRequestOptions.cs +++ b/src/Plaid/Entity/DepositSwitchCreateRequestOptions.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// Options to configure the /deposit_switch/create request. If provided, cannot be null. +/// (Deprecated) Options to configure the /deposit_switch/create request. If provided, cannot be null. /// public class DepositSwitchCreateRequestOptions { diff --git a/src/Plaid/Entity/DepositSwitchTargetAccount.cs b/src/Plaid/Entity/DepositSwitchTargetAccount.cs index 1f8b51db..cd122de5 100644 --- a/src/Plaid/Entity/DepositSwitchTargetAccount.cs +++ b/src/Plaid/Entity/DepositSwitchTargetAccount.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The deposit switch destination account +/// (Deprecated) The deposit switch destination account /// public class DepositSwitchTargetAccount { diff --git a/src/Plaid/Entity/DepositSwitchTargetUser.cs b/src/Plaid/Entity/DepositSwitchTargetUser.cs index 19e8ce5c..b7ab5f99 100644 --- a/src/Plaid/Entity/DepositSwitchTargetUser.cs +++ b/src/Plaid/Entity/DepositSwitchTargetUser.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The deposit switch target user +/// (Deprecated) The deposit switch target user /// public class DepositSwitchTargetUser { @@ -30,7 +30,7 @@ public class DepositSwitchTargetUser public string Email { get; set; } = default!; /// - /// The user's address. + /// (Deprecated) The user's address. /// [JsonPropertyName("address")] public Entity.DepositSwitchAddressData? Address { get; set; } = default!; diff --git a/src/Plaid/Entity/DocumentRiskSignal.cs b/src/Plaid/Entity/DocumentRiskSignal.cs index e85b5a65..24596303 100644 --- a/src/Plaid/Entity/DocumentRiskSignal.cs +++ b/src/Plaid/Entity/DocumentRiskSignal.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public record DocumentRiskSignal { /// - /// The result from the risk signal check. + /// The type of risk found in the risk signal check. /// [JsonPropertyName("type")] public string? Type { get; init; } = default!; @@ -48,7 +48,7 @@ public record DocumentRiskSignal public string? SignalDescription { get; init; } = default!; /// - /// The relevant page associated with the risk signal + /// The relevant page associated with the risk signal. If the risk signal is not associated with a specific page, the value will be 0. /// [JsonPropertyName("page_number")] public int? PageNumber { get; init; } = default!; diff --git a/src/Plaid/Entity/DocumentRiskSummary.cs b/src/Plaid/Entity/DocumentRiskSummary.cs index 5a6ba4a8..0d76d7e4 100644 --- a/src/Plaid/Entity/DocumentRiskSummary.cs +++ b/src/Plaid/Entity/DocumentRiskSummary.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public record DocumentRiskSummary { /// - /// A number between 0 and 100, inclusive, where a score closer to 0 indicates a document is likely to be trustworthy and a score closer to 100 indicates a document is likely to be fraudulent + /// A number between 0 and 100, inclusive, where a score closer to 0 indicates a document is likely to be trustworthy and a score closer to 100 indicates a document is likely to be fraudulent. You can automatically reject documents with a high risk score, automatically accept documents with a low risk score, and manually review documents in between. We suggest starting with a threshold of 80 for auto-rejection and 20 for auto-acceptance. As you gather more data points on typical risk scores for your use case, you can tune these parameters to reduce the number of documents undergoing manual review. /// [JsonPropertyName("risk_score")] public decimal? RiskScore { get; init; } = default!; diff --git a/src/Plaid/Entity/EntityScreeningHitEmails.cs b/src/Plaid/Entity/EntityScreeningHitEmails.cs index 241feae7..752f47a2 100644 --- a/src/Plaid/Entity/EntityScreeningHitEmails.cs +++ b/src/Plaid/Entity/EntityScreeningHitEmails.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public record EntityScreeningHitEmails { /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string EmailAddress { get; init; } = default!; diff --git a/src/Plaid/Entity/EntityWatchlistScreening.cs b/src/Plaid/Entity/EntityWatchlistScreening.cs index 6ab01a57..ff3451b7 100644 --- a/src/Plaid/Entity/EntityWatchlistScreening.cs +++ b/src/Plaid/Entity/EntityWatchlistScreening.cs @@ -18,7 +18,7 @@ public record EntityWatchlistScreening public Entity.EntityWatchlistScreeningSearchTerms SearchTerms { get; init; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; init; } = default!; diff --git a/src/Plaid/Entity/EntityWatchlistScreeningSearchTerms.cs b/src/Plaid/Entity/EntityWatchlistScreeningSearchTerms.cs index 467d9440..0bf9b2fe 100644 --- a/src/Plaid/Entity/EntityWatchlistScreeningSearchTerms.cs +++ b/src/Plaid/Entity/EntityWatchlistScreeningSearchTerms.cs @@ -24,7 +24,7 @@ public record EntityWatchlistScreeningSearchTerms public string? DocumentNumber { get; init; } = default!; /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; init; } = default!; diff --git a/src/Plaid/Entity/EntityWatchlistSearchTerms.cs b/src/Plaid/Entity/EntityWatchlistSearchTerms.cs index e6fdc87b..781a9024 100644 --- a/src/Plaid/Entity/EntityWatchlistSearchTerms.cs +++ b/src/Plaid/Entity/EntityWatchlistSearchTerms.cs @@ -24,7 +24,7 @@ public class EntityWatchlistSearchTerms public string? DocumentNumber { get; set; } = default!; /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; diff --git a/src/Plaid/Entity/HistoricalAnnualIncome.cs b/src/Plaid/Entity/HistoricalAnnualIncome.cs new file mode 100644 index 00000000..6dd26b5f --- /dev/null +++ b/src/Plaid/Entity/HistoricalAnnualIncome.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing the historical annual income amount. +/// +public record HistoricalAnnualIncome +{ + /// + /// The historical annual income at the time of subscription + /// + [JsonPropertyName("baseline_amount")] + public decimal BaselineAmount { get; init; } = default!; + + /// + /// The current historical annual income + /// + [JsonPropertyName("current_amount")] + public decimal CurrentAmount { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/IdentityDocumentUpload.cs b/src/Plaid/Entity/IdentityDocumentUpload.cs index 1ad5f119..7a45aa90 100644 --- a/src/Plaid/Entity/IdentityDocumentUpload.cs +++ b/src/Plaid/Entity/IdentityDocumentUpload.cs @@ -6,19 +6,19 @@ namespace Going.Plaid.Entity; public record IdentityDocumentUpload { /// - /// + /// A UUID identifying the document. /// [JsonPropertyName("document_id")] public string? DocumentId { get; init; } = default!; /// - /// In closed beta. Object representing metadata pertaining to the document. + /// Metadata pertaining to the document. /// [JsonPropertyName("metadata")] public Entity.IdentityDocumentUploadMetadata? Metadata { get; init; } = default!; /// - /// In closed beta. Object representing fraud risk data of the document + /// Object representing fraud risk data of the uploaded document. Only provided when using Identity Document Upload with Fraud Risk enabled. /// [JsonPropertyName("risk_insights")] public Entity.IdentityDocumentUploadRiskInsights? RiskInsights { get; init; } = default!; diff --git a/src/Plaid/Entity/IdentityDocumentUploadMetadata.cs b/src/Plaid/Entity/IdentityDocumentUploadMetadata.cs index 9c87ad25..3fddfc4e 100644 --- a/src/Plaid/Entity/IdentityDocumentUploadMetadata.cs +++ b/src/Plaid/Entity/IdentityDocumentUploadMetadata.cs @@ -1,36 +1,36 @@ namespace Going.Plaid.Entity; /// -/// In closed beta. Object representing metadata pertaining to the document. +/// Metadata pertaining to the document. /// public record IdentityDocumentUploadMetadata { /// - /// String enumeration of the submitted document type. + /// The submitted document type. Currently, this will always be BANK_STATEMENT. /// [JsonPropertyName("document_type")] public string? DocumentType { get; init; } = default!; /// - /// Boolean field indicating if the uploaded document's account number matches the account number we have on file + /// Boolean field indicating whether the uploaded document's account number matches the account number we have on file. If false, it is not recommended to accept the uploaded identity data as accurate without further verification. /// [JsonPropertyName("is_account_number_match")] public bool? IsAccountNumberMatch { get; init; } = default!; /// - /// + /// The number of pages in the uploaded document. /// [JsonPropertyName("page_count")] public int? PageCount { get; init; } = default!; /// - /// + /// The timestamp when the document was last updated. /// [JsonPropertyName("last_updated")] public DateTimeOffset? LastUpdated { get; init; } = default!; /// - /// + /// The timestamp when the document was originally uploaded. /// [JsonPropertyName("uploaded_at")] public DateTimeOffset? UploadedAt { get; init; } = default!; diff --git a/src/Plaid/Entity/IdentityDocumentUploadRiskInsights.cs b/src/Plaid/Entity/IdentityDocumentUploadRiskInsights.cs index 0e61cf62..2d9a91f4 100644 --- a/src/Plaid/Entity/IdentityDocumentUploadRiskInsights.cs +++ b/src/Plaid/Entity/IdentityDocumentUploadRiskInsights.cs @@ -1,18 +1,18 @@ namespace Going.Plaid.Entity; /// -/// In closed beta. Object representing fraud risk data of the document +/// Object representing fraud risk data of the uploaded document. Only provided when using Identity Document Upload with Fraud Risk enabled. /// public record IdentityDocumentUploadRiskInsights { /// - /// Risk summary of an uploaded document + /// Risk summary of an uploaded document. /// [JsonPropertyName("risk_summary")] public Entity.IdentityDocumentUploadRiskSummary? RiskSummary { get; init; } = default!; /// - /// an array of risk signals + /// An array of risk signals. /// [JsonPropertyName("risk_signals")] public IReadOnlyList? RiskSignals { get; init; } = default!; diff --git a/src/Plaid/Entity/IdentityDocumentUploadRiskSignal.cs b/src/Plaid/Entity/IdentityDocumentUploadRiskSignal.cs index 3c73e0af..97387736 100644 --- a/src/Plaid/Entity/IdentityDocumentUploadRiskSignal.cs +++ b/src/Plaid/Entity/IdentityDocumentUploadRiskSignal.cs @@ -6,25 +6,25 @@ namespace Going.Plaid.Entity; public record IdentityDocumentUploadRiskSignal { /// - /// + /// The type of risk found. /// [JsonPropertyName("type")] public string? Type { get; init; } = default!; /// - /// + /// Indicates whether fraud risk was detected on the field. /// [JsonPropertyName("has_fraud_risk")] public bool? HasFraudRisk { get; init; } = default!; /// - /// + /// A human-readable explanation providing more detail about the specific risk signal. /// [JsonPropertyName("signal_description")] public string? SignalDescription { get; init; } = default!; /// - /// + /// The relevant page associated with the risk signal. If the risk signal is not associated with a specific page, the value will be 0. /// [JsonPropertyName("page_number")] public int? PageNumber { get; init; } = default!; diff --git a/src/Plaid/Entity/IdentityDocumentUploadRiskSummary.cs b/src/Plaid/Entity/IdentityDocumentUploadRiskSummary.cs index e3170753..b742fff8 100644 --- a/src/Plaid/Entity/IdentityDocumentUploadRiskSummary.cs +++ b/src/Plaid/Entity/IdentityDocumentUploadRiskSummary.cs @@ -1,12 +1,12 @@ namespace Going.Plaid.Entity; /// -/// Risk summary of an uploaded document +/// Risk summary of an uploaded document. /// public record IdentityDocumentUploadRiskSummary { /// - /// Integer value representing the risk score of the document + /// A number between 0 and 100, inclusive, where a score closer to 0 indicates a document is likely to be trustworthy and a score closer to 100 indicates a document is likely to be fraudulent. /// [JsonPropertyName("risk_score")] public int? RiskScore { get; init; } = default!; diff --git a/src/Plaid/Entity/IdentityVerification.cs b/src/Plaid/Entity/IdentityVerification.cs index bb267233..677f828f 100644 --- a/src/Plaid/Entity/IdentityVerification.cs +++ b/src/Plaid/Entity/IdentityVerification.cs @@ -89,7 +89,7 @@ public record IdentityVerification public Entity.SelfieCheck? SelfieCheck { get; init; } = default!; /// - /// Additional information for the kyc_check step. This field will be null unless steps.kyc_check has reached a terminal state of either success or failed. + /// Additional information for the kyc_check (Data Source Verification) step. This field will be null unless steps.kyc_check has reached a terminal state of either success or failed. /// [JsonPropertyName("kyc_check")] public Entity.KYCCheckDetails? KycCheck { get; init; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs b/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs index ccd4f09f..145980ae 100644 --- a/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs +++ b/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs @@ -16,7 +16,7 @@ namespace Going.Plaid.Entity; public class IdentityVerificationCreateRequestUser { /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationRequestUser.cs b/src/Plaid/Entity/IdentityVerificationRequestUser.cs index 670300b4..8fa136e7 100644 --- a/src/Plaid/Entity/IdentityVerificationRequestUser.cs +++ b/src/Plaid/Entity/IdentityVerificationRequestUser.cs @@ -15,7 +15,7 @@ namespace Going.Plaid.Entity; public class IdentityVerificationRequestUser { /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationRetryRequestStepsObject.cs b/src/Plaid/Entity/IdentityVerificationRetryRequestStepsObject.cs index 694e37ff..5faf0162 100644 --- a/src/Plaid/Entity/IdentityVerificationRetryRequestStepsObject.cs +++ b/src/Plaid/Entity/IdentityVerificationRetryRequestStepsObject.cs @@ -16,7 +16,7 @@ public class IdentityVerificationRetryRequestStepsObject public bool VerifySms { get; set; } = default!; /// - /// A boolean field specifying whether the new session should require or skip the kyc_check step. + /// A boolean field specifying whether the new session should require or skip the kyc_check (Data Source Verification) step. /// [JsonPropertyName("kyc_check")] public bool KycCheck { get; set; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationUserData.cs b/src/Plaid/Entity/IdentityVerificationUserData.cs index b6692b74..d838a215 100644 --- a/src/Plaid/Entity/IdentityVerificationUserData.cs +++ b/src/Plaid/Entity/IdentityVerificationUserData.cs @@ -24,7 +24,7 @@ public record IdentityVerificationUserData public string? IpAddress { get; init; } = default!; /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; init; } = default!; diff --git a/src/Plaid/Entity/InvestmentsAuthDataSources.cs b/src/Plaid/Entity/InvestmentsAuthDataSources.cs new file mode 100644 index 00000000..7fa9df32 --- /dev/null +++ b/src/Plaid/Entity/InvestmentsAuthDataSources.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// Object with metadata pertaining to the source of data for the account numbers, owners, and holdings that are returned. +/// +public record InvestmentsAuthDataSources +{ + /// + /// A description of the source of data for a given product/data type. + /// + [JsonPropertyName("numbers")] + public Entity.DataSources? Numbers { get; init; } = default!; + + /// + /// A description of the source of data for a given product/data type. + /// + [JsonPropertyName("owners")] + public Entity.DataSources? Owners { get; init; } = default!; + + /// + /// A description of the source of data for a given product/data type. + /// + [JsonPropertyName("holdings")] + public Entity.DataSources? Holdings { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/Issue.cs b/src/Plaid/Entity/Issue.cs new file mode 100644 index 00000000..8d73d284 --- /dev/null +++ b/src/Plaid/Entity/Issue.cs @@ -0,0 +1,50 @@ +namespace Going.Plaid.Entity; + +/// +/// Information on an issue encountered with financial institutions interactions with financial institutions during Linking. +/// +public record Issue +{ + /// + /// The unique identifier of the issue. + /// + [JsonPropertyName("issue_id")] + public string? IssueId { get; init; } = default!; + + /// + /// A list of names of the financial institutions affected. + /// + [JsonPropertyName("institution_names")] + public IReadOnlyList? InstitutionNames { get; init; } = default!; + + /// + /// A list of ids of the financial institutions affected. + /// + [JsonPropertyName("institution_ids")] + public IReadOnlyList? InstitutionIds { get; init; } = default!; + + /// + /// The creation time of the record tracking this issue. + /// + [JsonPropertyName("created_at")] + public DateTimeOffset? CreatedAt { get; init; } = default!; + + /// + /// A simple summary of the error for the end user. + /// + [JsonPropertyName("summary")] + public string? Summary { get; init; } = default!; + + /// + /// A more detailed description for the customer. + /// + [JsonPropertyName("detailed_description")] + public string? DetailedDescription { get; init; } = default!; + + /// + /// The current status of the issue. + /// + [JsonPropertyName("status")] + public Entity.IssuesStatus? Status { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/IssuesStatus.cs b/src/Plaid/Entity/IssuesStatus.cs new file mode 100644 index 00000000..8d18a6ea --- /dev/null +++ b/src/Plaid/Entity/IssuesStatus.cs @@ -0,0 +1,50 @@ +namespace Going.Plaid.Entity; + +/// +/// The current status of the issue. +/// +public enum IssuesStatus +{ + /// + /// + /// + [EnumMember(Value = "REPORTED")] + Reported, + + /// + /// + /// + [EnumMember(Value = "AWAITING_RESOLUTION")] + AwaitingResolution, + + /// + /// + /// + [EnumMember(Value = "FIX_IN_PROGRESS")] + FixInProgress, + + /// + /// + /// + [EnumMember(Value = "FIX_PENDING_VALIDATION")] + FixPendingValidation, + + /// + /// + /// + [EnumMember(Value = "CANNOT_FIX")] + CannotFix, + + /// + /// + /// + [EnumMember(Value = "RESOLVED")] + Resolved, + + /// + /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. + /// + [EnumMember(Value = "undefined")] + Undefined, + +} diff --git a/src/Plaid/Entity/Item.cs b/src/Plaid/Entity/Item.cs index 56424f81..8a9ad124 100644 --- a/src/Plaid/Entity/Item.cs +++ b/src/Plaid/Entity/Item.cs @@ -17,6 +17,12 @@ public record Item [JsonPropertyName("institution_id")] public string? InstitutionId { get; init; } = default!; + /// + /// The date and time when the Item was created, in ISO 8601 format. + /// + [JsonPropertyName("created_at")] + public DateTimeOffset? CreatedAt { get; init; } = default!; + /// /// The URL registered to receive webhooks for the Item. /// @@ -48,14 +54,26 @@ public record Item public IReadOnlyList? Products { get; init; } = default!; /// - /// A list of products that have gone through consent collection for the Item. If the session is not enrolled in Data Transparency Messaging, this field is not used. + /// A list of products that the user has consented to for the Item via Data Transparency Messaging. This will consist of all products where both of the following are true: the user has consented to the required data scopes for that product and you have Production access for that product. /// [JsonPropertyName("consented_products")] public IReadOnlyList? ConsentedProducts { get; init; } = default!; /// - /// The RFC 3339 timestamp after which the consent provided by the end user will expire. Upon consent expiration, the item will enter the ITEM_LOGIN_REQUIRED error state. To circumvent the ITEM_LOGIN_REQUIRED error and maintain continuous consent, the end user can reauthenticate via Link’s update mode in advance of the consent expiration time. - /// Note - This is only relevant for certain OAuth-based institutions. For all other institutions, this field will be null. + /// A list of use cases that the user has consented to for the Item via Data Transparency Messaging. + /// You can see the full list of use cases or update the list of use cases to request at any time via the Link Customization section of the Plaid Dashboard. + /// + [JsonPropertyName("consented_use_cases")] + public IReadOnlyList? ConsentedUseCases { get; init; } = default!; + + /// + /// A list of data scopes that the user has consented to for the Item via Data Transparency Messaging. These are based on the consented_products; see the full mapping of data scopes and products. + /// + [JsonPropertyName("consented_data_scopes")] + public IReadOnlyList? ConsentedDataScopes { get; init; } = default!; + + /// + /// The date and time at which the Item's access consent will expire, in ISO 8601 format /// [JsonPropertyName("consent_expiration_time")] public DateTimeOffset? ConsentExpirationTime { get; init; } = default!; diff --git a/src/Plaid/Entity/KYCCheckDetails.cs b/src/Plaid/Entity/KYCCheckDetails.cs index e0b116dd..b614213a 100644 --- a/src/Plaid/Entity/KYCCheckDetails.cs +++ b/src/Plaid/Entity/KYCCheckDetails.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// Additional information for the kyc_check step. This field will be null unless steps.kyc_check has reached a terminal state of either success or failed. +/// Additional information for the kyc_check (Data Source Verification) step. This field will be null unless steps.kyc_check has reached a terminal state of either success or failed. /// public record KYCCheckDetails { diff --git a/src/Plaid/Entity/LinkEventMetadata.cs b/src/Plaid/Entity/LinkEventMetadata.cs index ac87d51e..5eed6dde 100644 --- a/src/Plaid/Entity/LinkEventMetadata.cs +++ b/src/Plaid/Entity/LinkEventMetadata.cs @@ -51,10 +51,10 @@ public record LinkEventMetadata /// The request ID for the last request made by Link. This can be shared with Plaid Support to expedite investigation. Emitted by: all events. /// [JsonPropertyName("request_id")] - public string RequestId { get; init; } = default!; + public string? RequestId { get; init; } = default!; /// - /// If set, the user has encountered one of the following MFA types: code, device, questions, selections. Emitted by: SUBMIT_MFA and TRANSITION_VIEW when view_name is MFA. + /// If set, the user has encountered one of the following MFA types: code, device, questions, selections. Emitted by: SUBMIT_MFA and TRANSITION_VIEW when view_name is MFA. /// [JsonPropertyName("mfa_type")] public string? MfaType { get; init; } = default!; diff --git a/src/Plaid/Entity/LinkSessionResults.cs b/src/Plaid/Entity/LinkSessionResults.cs index 0ea0dfab..1aa89c51 100644 --- a/src/Plaid/Entity/LinkSessionResults.cs +++ b/src/Plaid/Entity/LinkSessionResults.cs @@ -9,25 +9,25 @@ public record LinkSessionResults /// The set of Item adds for the Link session. /// [JsonPropertyName("item_add_results")] - public IReadOnlyList? ItemAddResults { get; init; } = default!; + public IReadOnlyList ItemAddResults { get; init; } = default!; /// /// The set of Plaid Check Item adds for the Link session. /// [JsonPropertyName("cra_item_add_results")] - public IReadOnlyList? CraItemAddResults { get; init; } = default!; + public IReadOnlyList CraItemAddResults { get; init; } = default!; /// /// The set of bank income verifications for the Link session. /// [JsonPropertyName("bank_income_results")] - public IReadOnlyList? BankIncomeResults { get; init; } = default!; + public IReadOnlyList BankIncomeResults { get; init; } = default!; /// /// The set of payroll income verifications for the Link session. /// [JsonPropertyName("payroll_income_results")] - public IReadOnlyList? PayrollIncomeResults { get; init; } = default!; + public IReadOnlyList PayrollIncomeResults { get; init; } = default!; /// /// The details of a document income verification in Link diff --git a/src/Plaid/Entity/LinkTokenCreateIdentity.cs b/src/Plaid/Entity/LinkTokenCreateIdentity.cs index 3166bcf7..9357c41a 100644 --- a/src/Plaid/Entity/LinkTokenCreateIdentity.cs +++ b/src/Plaid/Entity/LinkTokenCreateIdentity.cs @@ -12,7 +12,7 @@ public class LinkTokenCreateIdentity public bool? IsDocumentUpload { get; set; } = default!; /// - /// An array of account_ids + /// An array of account_ids. Currently can only contain one account_id. Must be populated if using Document Upload. /// [JsonPropertyName("account_ids")] public IReadOnlyList? AccountIds { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenCreateRequestConsumerReportPermissiblePurposeObject.cs b/src/Plaid/Entity/LinkTokenCreateRequestConsumerReportPermissiblePurposeObject.cs new file mode 100644 index 00000000..676e30e1 --- /dev/null +++ b/src/Plaid/Entity/LinkTokenCreateRequestConsumerReportPermissiblePurposeObject.cs @@ -0,0 +1,8 @@ +namespace Going.Plaid.Entity; + +/// +/// +/// +public class LinkTokenCreateRequestConsumerReportPermissiblePurposeObject +{ +} diff --git a/src/Plaid/Entity/LinkTokenCreateRequestCraOptions.cs b/src/Plaid/Entity/LinkTokenCreateRequestCraOptions.cs index 9a87313b..023b1730 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestCraOptions.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestCraOptions.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public class LinkTokenCreateRequestCraOptions { /// - /// The number of days of history to include in Plaid Check products. If requesting Income Insights, a minimum of 90 days is recommended in order to receive both historical and forecasted income. + /// The number of days of history to include in Plaid Check products. Default value is 365; maximum is 730; minimum is 180. If a value lower than 180 is provided, a minimum of 180 days of history will be requested. /// [JsonPropertyName("days_requested")] public int DaysRequested { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenCreateRequestDepositSwitch.cs b/src/Plaid/Entity/LinkTokenCreateRequestDepositSwitch.cs index 77c82bb9..81d65200 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestDepositSwitch.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestDepositSwitch.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// Specifies options for initializing Link for use with the Deposit Switch (beta) product. This field is required if deposit_switch is included in the products array. +/// (Deprecated) Specifies options for initializing Link for use with the Deposit Switch (beta) product. This field is required if deposit_switch is included in the products array. /// public class LinkTokenCreateRequestDepositSwitch { diff --git a/src/Plaid/Entity/LinkTokenCreateRequestPaymentConfiguration.cs b/src/Plaid/Entity/LinkTokenCreateRequestPaymentConfiguration.cs new file mode 100644 index 00000000..97186c9d --- /dev/null +++ b/src/Plaid/Entity/LinkTokenCreateRequestPaymentConfiguration.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Entity; + +/// +/// Specifies options for initializing Link for use with the Pay By Bank flow. This is an optional field to configure the user experience, and currently requires the amount field to be set. +/// +public class LinkTokenCreateRequestPaymentConfiguration +{ + /// + /// The amount of the transfer (decimal string with two digits of precision e.g. "10.00"). + /// + [JsonPropertyName("amount")] + public string Amount { get; set; } = default!; + +} diff --git a/src/Plaid/Entity/LinkTokenInvestmentsAuth.cs b/src/Plaid/Entity/LinkTokenInvestmentsAuth.cs index 6754fbe0..7984529f 100644 --- a/src/Plaid/Entity/LinkTokenInvestmentsAuth.cs +++ b/src/Plaid/Entity/LinkTokenInvestmentsAuth.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// Configuration parameters for the Investments Auth Product +/// Configuration parameters for the Investments Move product /// public class LinkTokenInvestmentsAuth { diff --git a/src/Plaid/Entity/MonitoringIncomeInsights.cs b/src/Plaid/Entity/MonitoringIncomeInsights.cs index 8c840dfc..9241de15 100644 --- a/src/Plaid/Entity/MonitoringIncomeInsights.cs +++ b/src/Plaid/Entity/MonitoringIncomeInsights.cs @@ -23,6 +23,12 @@ public record MonitoringIncomeInsights [JsonPropertyName("forecasted_monthly_income")] public Entity.ForecastedMonthlyIncome ForecastedMonthlyIncome { get; init; } = default!; + /// + /// An object representing the historical annual income amount. + /// + [JsonPropertyName("historical_annual_income")] + public Entity.HistoricalAnnualIncome HistoricalAnnualIncome { get; init; } = default!; + /// /// The income sources for this Item. Each entry in the array is a single income source /// diff --git a/src/Plaid/Entity/MonitoringIncomeSource.cs b/src/Plaid/Entity/MonitoringIncomeSource.cs index a41dae89..83f0a796 100644 --- a/src/Plaid/Entity/MonitoringIncomeSource.cs +++ b/src/Plaid/Entity/MonitoringIncomeSource.cs @@ -18,7 +18,7 @@ public record MonitoringIncomeSource public string IncomeDescription { get; init; } = default!; /// - /// The income category. Note that the CASH value has been deprecated and is used only for existing legacy implementations. It has been replaced by the new categories CASH_DEPOSIT (representing cash or check deposits) and TRANSFER_FROM_APPLICATION (representing cash transfers originating from apps, such as Zelle or Venmo). + /// The income category. /// [JsonPropertyName("income_category")] public Entity.CreditBankIncomeCategory IncomeCategory { get; init; } = default!; @@ -29,10 +29,4 @@ public record MonitoringIncomeSource [JsonPropertyName("last_transaction_date")] public DateOnly LastTransactionDate { get; init; } = default!; - /// - /// This represents if the income source is believed to be missing any recent income - /// - [JsonPropertyName("is_missing_income")] - public bool IsMissingIncome { get; init; } = default!; - } diff --git a/src/Plaid/Entity/MonitoringInsightsStatus.cs b/src/Plaid/Entity/MonitoringInsightsStatus.cs new file mode 100644 index 00000000..a2512da4 --- /dev/null +++ b/src/Plaid/Entity/MonitoringInsightsStatus.cs @@ -0,0 +1,44 @@ +namespace Going.Plaid.Entity; + +/// +/// Enum for the status of the insights +/// +public enum MonitoringInsightsStatus +{ + /// + /// + /// + [EnumMember(Value = "AVAILABLE")] + Available, + + /// + /// + /// + [EnumMember(Value = "FAILED")] + Failed, + + /// + /// + /// + [EnumMember(Value = "PENDING")] + Pending, + + /// + /// + /// + [EnumMember(Value = "UNSUPPORTED")] + Unsupported, + + /// + /// + /// + [EnumMember(Value = "UNHEALTHY")] + Unhealthy, + + /// + /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. + /// + [EnumMember(Value = "undefined")] + Undefined, + +} diff --git a/src/Plaid/Entity/MonitoringItemStatusCode.cs b/src/Plaid/Entity/MonitoringItemStatusCode.cs index 15843493..3c7010e2 100644 --- a/src/Plaid/Entity/MonitoringItemStatusCode.cs +++ b/src/Plaid/Entity/MonitoringItemStatusCode.cs @@ -11,6 +11,12 @@ public enum MonitoringItemStatusCode [EnumMember(Value = "AVAILABLE")] Available, + /// + /// + /// + [EnumMember(Value = "FAILED")] + Failed, + /// /// /// diff --git a/src/Plaid/Entity/NumbersACATS.cs b/src/Plaid/Entity/NumbersACATS.cs index 3727ca12..7f0d9192 100644 --- a/src/Plaid/Entity/NumbersACATS.cs +++ b/src/Plaid/Entity/NumbersACATS.cs @@ -18,7 +18,7 @@ public record NumbersACATS public string Account { get; init; } = default!; /// - /// Identifiers for the clearinghouses that are assocciated with the account in order of relevance. This array will be empty if we can't provide any account level data. Institution level data can be retrieved from the institutions/get endpoints. + /// Identifiers for the clearinghouses that are associated with the account in order of relevance. This array will be empty if we can't provide any account level data. Institution level data can be retrieved from the institutions/get endpoints. /// [JsonPropertyName("dtc_numbers")] public IReadOnlyList DtcNumbers { get; init; } = default!; diff --git a/src/Plaid/Entity/NumbersAch.cs b/src/Plaid/Entity/NumbersAch.cs index efd6fa53..1ac049b6 100644 --- a/src/Plaid/Entity/NumbersAch.cs +++ b/src/Plaid/Entity/NumbersAch.cs @@ -13,13 +13,13 @@ public record NumbersAch /// /// The ACH account number for the account. - /// Note that when using OAuth with Chase Bank (ins_56), Chase will issue "tokenized" routing and account numbers, which are not the user's actual account and routing numbers. These tokenized account numbers (also known as TANs) should work identically to normal account and routing numbers for ACH and RTP transfers, but are not compatible with wire transfers. The digits returned in the mask field will continue to reflect the actual account number, rather than the tokenized account number; for this reason, when displaying account numbers to the user to help them identify their account in your UI, always use the mask rather than truncating the account number. If a user revokes their permissions to your app, the tokenized numbers will no longer work. To be alerted when this occurs, listen for the USER_PERMISSION_REVOKED and USER_ACCOUNT_REVOKED webhooks. + /// At certain institutions, including Chase and PNC, you will receive "tokenized" routing and account numbers, which are not the user's actual account and routing numbers. For important details on how this may impact your integration and on how to avoid fraud, user confusion, and ACH returns, see Tokenized account numbers. /// [JsonPropertyName("account")] public string Account { get; init; } = default!; /// - /// The ACH routing number for the account. If the institution is ins_56, this may be a tokenized routing number. For more information, see the description of the account field. + /// The ACH routing number for the account. This may be a tokenized routing number. For more information, see Tokenized account numbers. /// [JsonPropertyName("routing")] public string Routing { get; init; } = default!; diff --git a/src/Plaid/Entity/PaymentInitiationConsentProcessingMode.cs b/src/Plaid/Entity/PaymentInitiationConsentProcessingMode.cs new file mode 100644 index 00000000..e0459b79 --- /dev/null +++ b/src/Plaid/Entity/PaymentInitiationConsentProcessingMode.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// Decides the mode under which the payment processing should be performed, using IMMEDIATE as default. +/// +public enum PaymentInitiationConsentProcessingMode +{ + /// + /// Will accept a payment execution request and schedule it for processing, immediately returning the new payment_id. Listen for webhooks or use the /payment_initiation/payment/get endpoint to obtain updates on the payment status. This is ideal for non user-present flows. + /// + [EnumMember(Value = "ASYNC")] + Async, + + /// + /// Will immediately execute the payment, waiting for a response from the ASPSP before returning the result of the payment initiation. This is ideal for user-present flows. + /// + [EnumMember(Value = "IMMEDIATE")] + Immediate, + + /// + /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. + /// + [EnumMember(Value = "undefined")] + Undefined, + +} diff --git a/src/Plaid/Entity/PrismCashScore.cs b/src/Plaid/Entity/PrismCashScore.cs index 67dd88dc..2946d319 100644 --- a/src/Plaid/Entity/PrismCashScore.cs +++ b/src/Plaid/Entity/PrismCashScore.cs @@ -29,4 +29,10 @@ public record PrismCashScore [JsonPropertyName("metadata")] public Entity.PrismCashScoreMetadata? Metadata { get; init; } = default!; + /// + /// The error returned by Prism for this product. + /// + [JsonPropertyName("error_reason")] + public string? ErrorReason { get; init; } = default!; + } diff --git a/src/Plaid/Entity/PrismFirstDetect.cs b/src/Plaid/Entity/PrismFirstDetect.cs index e8e7b22f..6cac46f8 100644 --- a/src/Plaid/Entity/PrismFirstDetect.cs +++ b/src/Plaid/Entity/PrismFirstDetect.cs @@ -29,4 +29,10 @@ public record PrismFirstDetect [JsonPropertyName("metadata")] public Entity.PrismCashScoreMetadata? Metadata { get; init; } = default!; + /// + /// The error returned by Prism for this product. + /// + [JsonPropertyName("error_reason")] + public string? ErrorReason { get; init; } = default!; + } diff --git a/src/Plaid/Entity/PrismInsights.cs b/src/Plaid/Entity/PrismInsights.cs index 3ca86ce2..66fe08a0 100644 --- a/src/Plaid/Entity/PrismInsights.cs +++ b/src/Plaid/Entity/PrismInsights.cs @@ -17,4 +17,10 @@ public record PrismInsights [JsonPropertyName("result")] public Entity.PrismInsightsResult? Result { get; init; } = default!; + /// + /// The error returned by Prism for this product. + /// + [JsonPropertyName("error_reason")] + public string? ErrorReason { get; init; } = default!; + } diff --git a/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs b/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs index a530f092..65512d48 100644 --- a/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs +++ b/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs @@ -317,6 +317,12 @@ public enum ProcessorTokenCreateRequestProcessorEnum [EnumMember(Value = "esusu")] Esusu, + /// + /// + /// + [EnumMember(Value = "ansa")] + Ansa, + /// /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. /// diff --git a/src/Plaid/Entity/Products.cs b/src/Plaid/Entity/Products.cs index 75346b4c..776fd095 100644 --- a/src/Plaid/Entity/Products.cs +++ b/src/Plaid/Entity/Products.cs @@ -101,12 +101,6 @@ public enum Products [EnumMember(Value = "income_verification")] IncomeVerification, - /// - /// - /// - [EnumMember(Value = "deposit_switch")] - DepositSwitch, - /// /// /// @@ -191,6 +185,12 @@ public enum Products [EnumMember(Value = "layer")] Layer, + /// + /// + /// + [EnumMember(Value = "pay_by_bank")] + PayByBank, + /// /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. /// diff --git a/src/Plaid/Entity/RequirementSubmission.cs b/src/Plaid/Entity/RequirementSubmission.cs new file mode 100644 index 00000000..57ce2d4a --- /dev/null +++ b/src/Plaid/Entity/RequirementSubmission.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// A single requirement submission +/// +public class RequirementSubmission +{ + /// + /// The type of requirement being submitted + /// + [JsonPropertyName("requirement_type")] + public string RequirementType { get; set; } = default!; + + /// + /// The value of the requirement, which can be a string or an object depending on the requirement_type. If it is an object, the object should be JSON marshaled into a string. See the documentation on this endpoint for more information and examples. + /// + [JsonPropertyName("value")] + public string Value { get; set; } = default!; + + /// + /// The person_id of the person the requirement submission is related to. A person_id is returned by /transfer/platform/person/create. This field should not be included for requirements that are not related to a person. + /// + [JsonPropertyName("person_id")] + public string? PersonId { get; set; } = default!; + +} diff --git a/src/Plaid/Entity/SandboxItemFireWebhookRequestWebhookCodeEnum.cs b/src/Plaid/Entity/SandboxItemFireWebhookRequestWebhookCodeEnum.cs index 829d8ed6..bd4448c8 100644 --- a/src/Plaid/Entity/SandboxItemFireWebhookRequestWebhookCodeEnum.cs +++ b/src/Plaid/Entity/SandboxItemFireWebhookRequestWebhookCodeEnum.cs @@ -29,6 +29,12 @@ public enum SandboxItemFireWebhookRequestWebhookCodeEnum [EnumMember(Value = "AUTHORIZATION_GRANTED")] AuthorizationGranted, + /// + /// + /// + [EnumMember(Value = "PENDING_DISCONNECT")] + PendingDisconnect, + /// /// /// diff --git a/src/Plaid/Entity/SelfieAnalysis.cs b/src/Plaid/Entity/SelfieAnalysis.cs index 86c81d1a..f8d6ecf4 100644 --- a/src/Plaid/Entity/SelfieAnalysis.cs +++ b/src/Plaid/Entity/SelfieAnalysis.cs @@ -11,4 +11,16 @@ public record SelfieAnalysis [JsonPropertyName("document_comparison")] public Entity.SelfieAnalysisDocumentComparison DocumentComparison { get; init; } = default!; + /// + /// Assessment of whether the selfie capture is of a real human being, as opposed to a picture of a human on a screen, a picture of a paper cut out, someone wearing a mask, or a deepfake. + /// + [JsonPropertyName("liveness_check")] + public Entity.SelfieAnalysisLivenessCheck LivenessCheck { get; init; } = default!; + + /// + /// Analysis of the facial features of the selfie when compared to the face in the uploaded document, if one is present. + /// + [JsonPropertyName("facial_analysis")] + public Entity.SelfieAnalysisFacialAnalysis? FacialAnalysis { get; init; } = default!; + } diff --git a/src/Plaid/Entity/SelfieAnalysisFacialAnalysis.cs b/src/Plaid/Entity/SelfieAnalysisFacialAnalysis.cs new file mode 100644 index 00000000..f0aba0f6 --- /dev/null +++ b/src/Plaid/Entity/SelfieAnalysisFacialAnalysis.cs @@ -0,0 +1,80 @@ +namespace Going.Plaid.Entity; + +/// +/// Analysis of the facial features of the selfie when compared to the face in the uploaded document, if one is present. +/// +public record SelfieAnalysisFacialAnalysis +{ + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("left_eye")] + public Entity.SelfieAnalysisFacialAnalysisOutcome LeftEye { get; init; } = default!; + + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("right_eye")] + public Entity.SelfieAnalysisFacialAnalysisOutcome RightEye { get; init; } = default!; + + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("left_brow")] + public Entity.SelfieAnalysisFacialAnalysisOutcome LeftBrow { get; init; } = default!; + + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("right_brow")] + public Entity.SelfieAnalysisFacialAnalysisOutcome RightBrow { get; init; } = default!; + + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("forehead")] + public Entity.SelfieAnalysisFacialAnalysisOutcome Forehead { get; init; } = default!; + + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("middle_forehead")] + public Entity.SelfieAnalysisFacialAnalysisOutcome MiddleForehead { get; init; } = default!; + + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("nose")] + public Entity.SelfieAnalysisFacialAnalysisOutcome Nose { get; init; } = default!; + + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("philtrum")] + public Entity.SelfieAnalysisFacialAnalysisOutcome Philtrum { get; init; } = default!; + + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("mouth")] + public Entity.SelfieAnalysisFacialAnalysisOutcome Mouth { get; init; } = default!; + + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("jaw")] + public Entity.SelfieAnalysisFacialAnalysisOutcome Jaw { get; init; } = default!; + + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("left_cheek")] + public Entity.SelfieAnalysisFacialAnalysisOutcome LeftCheek { get; init; } = default!; + + /// + /// Outcome of the facial analysis for a specific facial feature. + /// + [JsonPropertyName("right_cheek")] + public Entity.SelfieAnalysisFacialAnalysisOutcome RightCheek { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/SelfieAnalysisFacialAnalysisOutcome.cs b/src/Plaid/Entity/SelfieAnalysisFacialAnalysisOutcome.cs new file mode 100644 index 00000000..40867f91 --- /dev/null +++ b/src/Plaid/Entity/SelfieAnalysisFacialAnalysisOutcome.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// Outcome of the facial analysis for a specific facial feature. +/// +public enum SelfieAnalysisFacialAnalysisOutcome +{ + /// + /// + /// + [EnumMember(Value = "success")] + Success, + + /// + /// + /// + [EnumMember(Value = "failed")] + Failed, + + /// + /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. + /// + [EnumMember(Value = "undefined")] + Undefined, + +} diff --git a/src/Plaid/Entity/SelfieAnalysisLivenessCheck.cs b/src/Plaid/Entity/SelfieAnalysisLivenessCheck.cs new file mode 100644 index 00000000..3598acef --- /dev/null +++ b/src/Plaid/Entity/SelfieAnalysisLivenessCheck.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// Assessment of whether the selfie capture is of a real human being, as opposed to a picture of a human on a screen, a picture of a paper cut out, someone wearing a mask, or a deepfake. +/// +public enum SelfieAnalysisLivenessCheck +{ + /// + /// + /// + [EnumMember(Value = "success")] + Success, + + /// + /// + /// + [EnumMember(Value = "failed")] + Failed, + + /// + /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. + /// + [EnumMember(Value = "undefined")] + Undefined, + +} diff --git a/src/Plaid/Entity/Transaction.cs b/src/Plaid/Entity/Transaction.cs index c69595b0..c79015e3 100644 --- a/src/Plaid/Entity/Transaction.cs +++ b/src/Plaid/Entity/Transaction.cs @@ -104,7 +104,7 @@ public record Transaction public string? PendingTransactionId { get; init; } = default!; /// - /// The name of the account owner. This field is not typically populated and only relevant when dealing with sub-accounts. + /// This field is not typically populated and only relevant when dealing with sub-accounts. A sub-account most commonly exists in cases where a single account is linked to multiple cards, each with its own card number and card holder name; each card will be considered a sub-account. If the account does have sub-accounts, this field will typically be some combination of the sub-account owner's name and/or the sub-account mask. The format of this field is not standardized and will vary based on institution. /// [JsonPropertyName("account_owner")] public string? AccountOwner { get; init; } = default!; diff --git a/src/Plaid/Entity/TransactionStream.cs b/src/Plaid/Entity/TransactionStream.cs index bb794e57..8428145a 100644 --- a/src/Plaid/Entity/TransactionStream.cs +++ b/src/Plaid/Entity/TransactionStream.cs @@ -55,6 +55,12 @@ public record TransactionStream [JsonPropertyName("last_date")] public DateOnly LastDate { get; init; } = default!; + /// + /// The predicted date of the next payment. This will only be set if the next payment date can be predicted. + /// + [JsonPropertyName("predicted_next_date")] + public DateOnly? PredictedNextDate { get; init; } = default!; + /// /// Describes the frequency of the transaction stream. /// diff --git a/src/Plaid/Entity/Transfer.cs b/src/Plaid/Entity/Transfer.cs index 57db2782..f01b8ca1 100644 --- a/src/Plaid/Entity/Transfer.cs +++ b/src/Plaid/Entity/Transfer.cs @@ -155,7 +155,7 @@ public record Transfer public DateOnly? UnauthorizedReturnWindow { get; init; } = default!; /// - /// The expected date when the full amount of the transfer settles at the consumers’ account, if the transfer is credit; or at the customer's business checking account, if the transfer is debit. Only set for ACH transfers and is null for non-ACH transfers. Only set for ACH transfers. This will be of the form YYYY-MM-DD. + /// The date when settlement will occur between Plaid and the receiving bank (RDFI). For ACH debits, this is the date funds will be pulled from the bank account being debited. For ACH credits, this is the date funds will be delivered to the bank account being credited. Only set for ACH transfers; null for non-ACH transfers. This will be of the form YYYY-MM-DD. /// [JsonPropertyName("expected_settlement_date")] public DateOnly? ExpectedSettlementDate { get; init; } = default!; diff --git a/src/Plaid/Entity/TransferPlatformPersonAddress.cs b/src/Plaid/Entity/TransferPlatformPersonAddress.cs new file mode 100644 index 00000000..acf6bc11 --- /dev/null +++ b/src/Plaid/Entity/TransferPlatformPersonAddress.cs @@ -0,0 +1,45 @@ +namespace Going.Plaid.Entity; + +/// +/// Home address of a person +/// +public class TransferPlatformPersonAddress +{ + /// + /// The full city name. + /// + [JsonPropertyName("city")] + public string City { get; set; } = default!; + + /// + /// Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form. + /// + [JsonPropertyName("country")] + public string Country { get; set; } = default!; + + /// + /// The postal code of the address. + /// + [JsonPropertyName("postal_code")] + public string PostalCode { get; set; } = default!; + + /// + /// An ISO 3166-2 subdivision code. + /// Related terms would be "state", "province", "prefecture", "zone", "subdivision", etc. + /// + [JsonPropertyName("region")] + public string Region { get; set; } = default!; + + /// + /// The primary street portion of an address. A string with at least one non-whitespace alphabetical character, with a max length of 80 characters. + /// + [JsonPropertyName("street")] + public string Street { get; set; } = default!; + + /// + /// Extra street information, like an apartment or suite number. If provided, a string with at least one non-whitespace character, with a max length of 50 characters. + /// + [JsonPropertyName("street2")] + public string? Street2 { get; set; } = default!; + +} diff --git a/src/Plaid/Entity/TransferPlatformPersonIDNumber.cs b/src/Plaid/Entity/TransferPlatformPersonIDNumber.cs new file mode 100644 index 00000000..3d336966 --- /dev/null +++ b/src/Plaid/Entity/TransferPlatformPersonIDNumber.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// ID number of the person +/// +public class TransferPlatformPersonIDNumber +{ + /// + /// Value of the person's ID Number. Alpha-numeric, with all formatting characters stripped. + /// + [JsonPropertyName("value")] + public string Value { get; set; } = default!; + + /// + /// A globally unique and human readable ID type, specific to the country and document category. For more context on this field, see [Hybrid Input Validation](https://plaid.com/docs/identity-verification/hybrid-input-validation). + /// + [JsonPropertyName("type")] + public Entity.IDNumberType Type { get; set; } = default!; + +} diff --git a/src/Plaid/Entity/TransferPlatformPersonName.cs b/src/Plaid/Entity/TransferPlatformPersonName.cs new file mode 100644 index 00000000..933065d9 --- /dev/null +++ b/src/Plaid/Entity/TransferPlatformPersonName.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// The person's legal name +/// +public class TransferPlatformPersonName +{ + /// + /// A string with at least one non-whitespace character, with a max length of 100 characters. + /// + [JsonPropertyName("given_name")] + public string GivenName { get; set; } = default!; + + /// + /// A string with at least one non-whitespace character, with a max length of 100 characters. + /// + [JsonPropertyName("family_name")] + public string FamilyName { get; set; } = default!; + +} diff --git a/src/Plaid/Entity/UpdateEntityScreeningRequestSearchTerms.cs b/src/Plaid/Entity/UpdateEntityScreeningRequestSearchTerms.cs index a126f8a3..0e1efa08 100644 --- a/src/Plaid/Entity/UpdateEntityScreeningRequestSearchTerms.cs +++ b/src/Plaid/Entity/UpdateEntityScreeningRequestSearchTerms.cs @@ -24,7 +24,7 @@ public class UpdateEntityScreeningRequestSearchTerms public string? DocumentNumber { get; set; } = default!; /// - /// A valid email address. Must not have leading or trailing spaces. + /// A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see RFC 3696. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; diff --git a/src/Plaid/Entity/WatchlistScreeningAuditTrail.cs b/src/Plaid/Entity/WatchlistScreeningAuditTrail.cs index a37f3527..2346e9e4 100644 --- a/src/Plaid/Entity/WatchlistScreeningAuditTrail.cs +++ b/src/Plaid/Entity/WatchlistScreeningAuditTrail.cs @@ -12,7 +12,7 @@ public record WatchlistScreeningAuditTrail public Entity.Source Source { get; init; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("dashboard_user_id")] public string? DashboardUserId { get; init; } = default!; diff --git a/src/Plaid/Entity/WatchlistScreeningIndividual.cs b/src/Plaid/Entity/WatchlistScreeningIndividual.cs index 8ca94899..aef0355d 100644 --- a/src/Plaid/Entity/WatchlistScreeningIndividual.cs +++ b/src/Plaid/Entity/WatchlistScreeningIndividual.cs @@ -18,7 +18,7 @@ public record WatchlistScreeningIndividual public Entity.WatchlistScreeningSearchTerms SearchTerms { get; init; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; init; } = default!; diff --git a/src/Plaid/Entity/WebhookCode.cs b/src/Plaid/Entity/WebhookCode.cs index 3dd16ac1..27e353a3 100644 --- a/src/Plaid/Entity/WebhookCode.cs +++ b/src/Plaid/Entity/WebhookCode.cs @@ -329,6 +329,12 @@ public enum WebhookCode [EnumMember(Value = "INSTITUTION_STATUS_ALERT_TRIGGERED")] InstitutionStatusAlertTriggered, + /// + /// + /// + [EnumMember(Value = "INSIGHTS_UPDATED")] + InsightsUpdated, + /// /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. /// diff --git a/src/Plaid/Identity/PlaidClient.cs b/src/Plaid/Identity/PlaidClient.cs index 4fddcea5..31a31389 100644 --- a/src/Plaid/Identity/PlaidClient.cs +++ b/src/Plaid/Identity/PlaidClient.cs @@ -12,9 +12,9 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// Use /identity/documents/uploads/get to retrieve document uploaded identity. + /// Use /identity/documents/uploads/get to retrieve identity details when using Identity Document Upload. /// - /// + /// public Task IdentityDocumentsUploadsGetAsync(Identity.IdentityDocumentsUploadsGetRequest request) => PostAsync("/identity/documents/uploads/get", request) .ParseResponseAsync(); diff --git a/src/Plaid/IdentityVerification/IdentityVerificationCreateResponse.cs b/src/Plaid/IdentityVerification/IdentityVerificationCreateResponse.cs index c6a8af2f..c1a59235 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationCreateResponse.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationCreateResponse.cs @@ -89,7 +89,7 @@ public record IdentityVerificationCreateResponse : ResponseBase public Entity.SelfieCheck? SelfieCheck { get; init; } = default!; /// - /// Additional information for the kyc_check step. This field will be null unless steps.kyc_check has reached a terminal state of either success or failed. + /// Additional information for the kyc_check (Data Source Verification) step. This field will be null unless steps.kyc_check has reached a terminal state of either success or failed. /// [JsonPropertyName("kyc_check")] public Entity.KYCCheckDetails? KycCheck { get; init; } = default!; diff --git a/src/Plaid/IdentityVerification/IdentityVerificationGetResponse.cs b/src/Plaid/IdentityVerification/IdentityVerificationGetResponse.cs index 11185192..027206a8 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationGetResponse.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationGetResponse.cs @@ -89,7 +89,7 @@ public record IdentityVerificationGetResponse : ResponseBase public Entity.SelfieCheck? SelfieCheck { get; init; } = default!; /// - /// Additional information for the kyc_check step. This field will be null unless steps.kyc_check has reached a terminal state of either success or failed. + /// Additional information for the kyc_check (Data Source Verification) step. This field will be null unless steps.kyc_check has reached a terminal state of either success or failed. /// [JsonPropertyName("kyc_check")] public Entity.KYCCheckDetails? KycCheck { get; init; } = default!; diff --git a/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs b/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs index c8576c96..4d0ff271 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs @@ -49,7 +49,7 @@ public partial class IdentityVerificationRetryRequest : RequestBase public Entity.IdentityVerificationRetryRequestStepsObject? Steps { get; set; } = default!; /// - /// A flag specifying whether you would like Plaid to expose a shareable URL for the verification being retried. + /// A flag specifying whether you would like Plaid to expose a shareable URL for the verification being retried. If a value for this flag is not specified, the is_shareable setting from the original verification attempt will be used. /// [JsonPropertyName("is_shareable")] public bool? IsShareable { get; set; } = default!; diff --git a/src/Plaid/IdentityVerification/IdentityVerificationRetryResponse.cs b/src/Plaid/IdentityVerification/IdentityVerificationRetryResponse.cs index fe7d844d..7706eec6 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationRetryResponse.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationRetryResponse.cs @@ -89,7 +89,7 @@ public record IdentityVerificationRetryResponse : ResponseBase public Entity.SelfieCheck? SelfieCheck { get; init; } = default!; /// - /// Additional information for the kyc_check step. This field will be null unless steps.kyc_check has reached a terminal state of either success or failed. + /// Additional information for the kyc_check (Data Source Verification) step. This field will be null unless steps.kyc_check has reached a terminal state of either success or failed. /// [JsonPropertyName("kyc_check")] public Entity.KYCCheckDetails? KycCheck { get; init; } = default!; diff --git a/src/Plaid/Investments/InvestmentsAuthGetResponse.cs b/src/Plaid/Investments/InvestmentsAuthGetResponse.cs index 2cddef46..8afc1b87 100644 --- a/src/Plaid/Investments/InvestmentsAuthGetResponse.cs +++ b/src/Plaid/Investments/InvestmentsAuthGetResponse.cs @@ -35,6 +35,12 @@ public record InvestmentsAuthGetResponse : ResponseBase [JsonPropertyName("numbers")] public Entity.InvestmentsAuthGetNumbers Numbers { get; init; } = default!; + /// + /// Object with metadata pertaining to the source of data for the account numbers, owners, and holdings that are returned. + /// + [JsonPropertyName("data_sources")] + public Entity.InvestmentsAuthDataSources DataSources { get; init; } = default!; + /// /// Metadata about the Item. /// diff --git a/src/Plaid/Investments/PlaidClient.cs b/src/Plaid/Investments/PlaidClient.cs index f688b61d..45d3e432 100644 --- a/src/Plaid/Investments/PlaidClient.cs +++ b/src/Plaid/Investments/PlaidClient.cs @@ -35,7 +35,7 @@ public sealed partial class PlaidClient /// /// The /investments/auth/get endpoint allows developers to receive user-authorized data to facilitate the transfer of holdings /// - /// + /// public Task InvestmentsAuthGetAsync(Investments.InvestmentsAuthGetRequest request) => PostAsync("/investments/auth/get", request) .ParseResponseAsync(); diff --git a/src/Plaid/Issues/IssuesGetRequest.cs b/src/Plaid/Issues/IssuesGetRequest.cs new file mode 100644 index 00000000..e38630ef --- /dev/null +++ b/src/Plaid/Issues/IssuesGetRequest.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Issues; + +/// +/// IssuesGetRequest defines the request schema for /issues/get. +/// +public partial class IssuesGetRequest : RequestBase +{ + /// + /// The unique identifier of the issue to retrieve. + /// + [JsonPropertyName("issue_id")] + public string IssueId { get; set; } = default!; + +} diff --git a/src/Plaid/Issues/IssuesGetResponse.cs b/src/Plaid/Issues/IssuesGetResponse.cs new file mode 100644 index 00000000..bab60475 --- /dev/null +++ b/src/Plaid/Issues/IssuesGetResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Issues; + +/// +/// IssuesGetResponse defines the response schema for /issues/get. +/// +public record IssuesGetResponse : ResponseBase +{ + /// + /// Information on an issue encountered with financial institutions interactions with financial institutions during Linking. + /// + [JsonPropertyName("issue")] + public Entity.Issue? Issue { get; init; } = default!; + +} diff --git a/src/Plaid/Issues/IssuesSearchRequest.cs b/src/Plaid/Issues/IssuesSearchRequest.cs new file mode 100644 index 00000000..03030ca8 --- /dev/null +++ b/src/Plaid/Issues/IssuesSearchRequest.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Issues; + +/// +/// IssuesSearchRequest defines the request schema for /issues/search. +/// +public partial class IssuesSearchRequest : RequestBase +{ + /// + /// A unique identifier for the Plaid Item. + /// + [JsonPropertyName("item_id")] + public string? ItemId { get; set; } = default!; + + /// + /// A unique identifier for the Link session. + /// + [JsonPropertyName("link_session_id")] + public string? LinkSessionId { get; set; } = default!; + + /// + /// The request_id for the Link session that might have had an institution connection issue. + /// + [JsonPropertyName("link_session_request_id")] + public string? LinkSessionRequestId { get; set; } = default!; + +} diff --git a/src/Plaid/Issues/IssuesSearchResponse.cs b/src/Plaid/Issues/IssuesSearchResponse.cs new file mode 100644 index 00000000..ad07173b --- /dev/null +++ b/src/Plaid/Issues/IssuesSearchResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Issues; + +/// +/// IssuesSearchResponse defines the response schema for /issues/search. +/// +public record IssuesSearchResponse : ResponseBase +{ + /// + /// A list of issues affecting the Item, session, or request passed in, conforming to the Issues data model. An empty list indicates that no matching issues were found. + /// + [JsonPropertyName("issues")] + public IReadOnlyList? Issues { get; init; } = default!; + +} diff --git a/src/Plaid/Issues/IssuesSubscribeRequest.cs b/src/Plaid/Issues/IssuesSubscribeRequest.cs new file mode 100644 index 00000000..f62695d6 --- /dev/null +++ b/src/Plaid/Issues/IssuesSubscribeRequest.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Issues; + +/// +/// IssuesSubscribeRequest defines the request schema for /issues/subscribe. +/// +public partial class IssuesSubscribeRequest : RequestBase +{ + /// + /// The unique identifier of the issue to subscribe to. + /// + [JsonPropertyName("issue_id")] + public string IssueId { get; set; } = default!; + + /// + /// The webhook URL where notifications should be sent when the issue status changes. + /// + [JsonPropertyName("webhook")] + public string? Webhook { get; set; } = default!; + +} diff --git a/src/Plaid/Issues/IssuesSubscribeResponse.cs b/src/Plaid/Issues/IssuesSubscribeResponse.cs new file mode 100644 index 00000000..894547ac --- /dev/null +++ b/src/Plaid/Issues/IssuesSubscribeResponse.cs @@ -0,0 +1,8 @@ +namespace Going.Plaid.Issues; + +/// +/// IssuesSubscribeResponse defines the response schema for /issues/subscribe. +/// +public record IssuesSubscribeResponse : ResponseBase +{ +} diff --git a/src/Plaid/Issues/PlaidClient.cs b/src/Plaid/Issues/PlaidClient.cs new file mode 100644 index 00000000..a7acdda6 --- /dev/null +++ b/src/Plaid/Issues/PlaidClient.cs @@ -0,0 +1,31 @@ +namespace Going.Plaid; + +public sealed partial class PlaidClient +{ + /// + /// Search for an issue associated with one of the following identifiers: item_id, link_session_id or Link session request_id. + /// This endpoint returns a list of Issue objects, with an empty list indicating that no issues are associated with the + /// provided identifier. At least one of the identifiers must be provided to perform the search. + /// + /// + public Task IssuesSearchAsync(Issues.IssuesSearchRequest request) => + PostAsync("/issues/search", request) + .ParseResponseAsync(); + + /// + /// Retrieve detailed information about a specific Issue. This endpoint returns a single Issue object. + /// + /// + public Task IssuesGetAsync(Issues.IssuesGetRequest request) => + PostAsync("/issues/get", request) + .ParseResponseAsync(); + + /// + /// Allows a user to subscribe to updates on a specific Issue using a POST method. Subscribers will receive webhook notifications when the issue status changes, particularly when resolved. + /// + /// + public Task IssuesSubscribeAsync(Issues.IssuesSubscribeRequest request) => + PostAsync("/issues/subscribe", request) + .ParseResponseAsync(); + +} diff --git a/src/Plaid/Link/LinkTokenCreateRequest.cs b/src/Plaid/Link/LinkTokenCreateRequest.cs index 4a137cda..c009e008 100644 --- a/src/Plaid/Link/LinkTokenCreateRequest.cs +++ b/src/Plaid/Link/LinkTokenCreateRequest.cs @@ -131,6 +131,12 @@ public partial class LinkTokenCreateRequest : RequestBase [JsonPropertyName("institution_id")] public string? InstitutionId { get; set; } = default!; + /// + /// Specifies options for initializing Link for use with the Pay By Bank flow. This is an optional field to configure the user experience, and currently requires the amount field to be set. + /// + [JsonPropertyName("payment_configuration")] + public Entity.LinkTokenCreateRequestPaymentConfiguration? PaymentConfiguration { get; set; } = default!; + /// /// Specifies options for initializing Link for use with the Payment Initiation (Europe) product. This field is required if payment_initiation is included in the products array. Either payment_id or consent_id must be provided. /// @@ -138,7 +144,7 @@ public partial class LinkTokenCreateRequest : RequestBase public Entity.LinkTokenCreateRequestPaymentInitiation? PaymentInitiation { get; set; } = default!; /// - /// Specifies options for initializing Link for use with the Deposit Switch (beta) product. This field is required if deposit_switch is included in the products array. + /// (Deprecated) Specifies options for initializing Link for use with the Deposit Switch (beta) product. This field is required if deposit_switch is included in the products array. /// [JsonPropertyName("deposit_switch")] public Entity.LinkTokenCreateRequestDepositSwitch? DepositSwitch { get; set; } = default!; @@ -174,10 +180,10 @@ public partial class LinkTokenCreateRequest : RequestBase public Entity.LinkTokenCreateRequestCraOptions? CraOptions { get; set; } = default!; /// - /// This enum describes the reason you are generating a Consumer Report for this user. + /// /// [JsonPropertyName("consumer_report_permissible_purpose")] - public Entity.ConsumerReportPermissiblePurpose? ConsumerReportPermissiblePurpose { get; set; } = default!; + public Entity.LinkTokenCreateRequestConsumerReportPermissiblePurposeObject? ConsumerReportPermissiblePurpose { get; set; } = default!; /// /// Specifies options for initializing Link for use with the Auth product. This field can be used to enable or disable extended Auth flows for the resulting Link session. Omitting any field will result in a default that can be configured by your account manager. The default behavior described in the documentation is the default behavior that will apply if you have not requested your account manager to apply a different default. @@ -222,7 +228,7 @@ public partial class LinkTokenCreateRequest : RequestBase public Entity.LinkTokenInvestments? Investments { get; set; } = default!; /// - /// Configuration parameters for the Investments Auth Product + /// Configuration parameters for the Investments Move product /// [JsonPropertyName("investments_auth")] public Entity.LinkTokenInvestmentsAuth? InvestmentsAuth { get; set; } = default!; diff --git a/src/Plaid/PaymentInitiation/PaymentInitiationConsentPaymentExecuteRequest.cs b/src/Plaid/PaymentInitiation/PaymentInitiationConsentPaymentExecuteRequest.cs index 10c8b80e..f6d2ad7f 100644 --- a/src/Plaid/PaymentInitiation/PaymentInitiationConsentPaymentExecuteRequest.cs +++ b/src/Plaid/PaymentInitiation/PaymentInitiationConsentPaymentExecuteRequest.cs @@ -39,4 +39,10 @@ public partial class PaymentInitiationConsentPaymentExecuteRequest : RequestBase [JsonPropertyName("scope")] public Entity.PaymentInitiationConsentPaymentExecuteRequestScopeObject? Scope { get; set; } = default!; + /// + /// Decides the mode under which the payment processing should be performed, using IMMEDIATE as default. + /// + [JsonPropertyName("processing_mode")] + public Entity.PaymentInitiationConsentProcessingMode? ProcessingMode { get; set; } = default!; + } diff --git a/src/Plaid/Sandbox/PlaidClient.cs b/src/Plaid/Sandbox/PlaidClient.cs index c4762ec6..811228a7 100644 --- a/src/Plaid/Sandbox/PlaidClient.cs +++ b/src/Plaid/Sandbox/PlaidClient.cs @@ -20,10 +20,11 @@ public sealed partial class PlaidClient /// /// The /sandbox/item/fire_webhook endpoint is used to test that code correctly handles webhooks. This endpoint can trigger the following webhooks: - /// DEFAULT_UPDATE: Webhook to be fired for a given Sandbox Item simulating a default update event for the respective product as specified with the webhook_type in the request body. Valid sandbox DEFAULT_UPDATE responses include: AUTH, IDENTITY, TRANSACTIONS, INVESTMENTS_TRANSACTIONS, LIABILITIES, HOLDINGS. If the Item does not support the product, a SANDBOX_PRODUCT_NOT_ENABLED error will result. + /// DEFAULT_UPDATE: Webhook to be fired for a given Sandbox Item simulating a default update event for the respective product as specified with the webhook_type in the request body. Valid Sandbox DEFAULT_UPDATE webhook types include: AUTH, IDENTITY, TRANSACTIONS, INVESTMENTS_TRANSACTIONS, LIABILITIES, HOLDINGS. If the Item does not support the product, a SANDBOX_PRODUCT_NOT_ENABLED error will result. /// NEW_ACCOUNTS_AVAILABLE: Fired to indicate that a new account is available on the Item and you can launch update mode to request access to it. /// SMS_MICRODEPOSITS_VERIFICATION: Fired when a given same day micro-deposit item is verified via SMS verification. /// LOGIN_REPAIRED: Fired when an Item recovers from the ITEM_LOGIN_REQUIRED without the user going through update mode in your app. + /// PENDING_DISCONNECT: Fired when an Item will stop working in the near future (e.g. due to a planned bank migration) and must be sent through update mode to continue working. /// RECURRING_TRANSACTIONS_UPDATE: Recurring Transactions webhook to be fired for a given Sandbox Item. If the Item does not support Recurring Transactions, a SANDBOX_PRODUCT_NOT_ENABLED error will result. /// SYNC_UPDATES_AVAILABLE: Transactions webhook to be fired for a given Sandbox Item. If the Item does not support Transactions, a SANDBOX_PRODUCT_NOT_ENABLED error will result. /// PRODUCT_READY: Assets webhook to be fired when a given asset report has been successfully generated. If the Item does not support Assets, a SANDBOX_PRODUCT_NOT_ENABLED error will result. diff --git a/src/Plaid/Signal/SignalEvaluateResponse.cs b/src/Plaid/Signal/SignalEvaluateResponse.cs index 1ddf6b03..de8330f5 100644 --- a/src/Plaid/Signal/SignalEvaluateResponse.cs +++ b/src/Plaid/Signal/SignalEvaluateResponse.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Signal; /// -/// SignalEvaluateResponse defines the response schema for /signal/income/evaluate +/// SignalEvaluateResponse defines the response schema for /signal/evaluate /// public record SignalEvaluateResponse : ResponseBase { diff --git a/src/Plaid/Transfer/PlaidClient.cs b/src/Plaid/Transfer/PlaidClient.cs index bb7361a9..cdedcac3 100644 --- a/src/Plaid/Transfer/PlaidClient.cs +++ b/src/Plaid/Transfer/PlaidClient.cs @@ -3,7 +3,7 @@ namespace Going.Plaid; public sealed partial class PlaidClient { /// - /// The /transfer/get endpoint fetches information about the transfer corresponding to the given transfer_id. + /// The /transfer/get endpoint fetches information about the transfer corresponding to the given transfer_id or authorization_id. One of transfer_id or authorization_id must be populated but not both. /// /// public Task TransferGetAsync(Transfer.TransferGetRequest request) => @@ -21,10 +21,11 @@ public sealed partial class PlaidClient /// /// Use the /transfer/authorization/create endpoint to authorize a transfer. This endpoint must be called prior to calling /transfer/create. The transfer authorization will expire if not used after one hour. (You can contact your account manager to change the default authorization lifetime.) /// There are four possible outcomes to calling this endpoint: - /// - If the authorization.decision in the response is declined, the proposed transfer has failed the risk check and you cannot proceed with the transfer. - /// - If the authorization.decision is user_action_required, additional user input is needed, usually to fix a broken bank connection, before Plaid can properly assess the risk. You need to launch Link in update mode to complete the required user action. When calling /link/token/create to get a new Link token, instead of providing access_token in the request, you should set transfer.authorization_id as the authorization.id. After the Link flow is completed, you may re-attempt the authorization. - /// - If the authorization.decision is approved, and the authorization.rationale_code is null, the transfer has passed the risk check and you can proceed to call /transfer/create. - /// - If the authorization.decision is approved and the authorization.rationale_code is non-null, the risk check could not be run: you may proceed with the transfer, but should perform your own risk evaluation. For more details, see the response schema. + /// - If the authorization.decision in the response is declined, the proposed transfer has failed the risk check and you cannot proceed with the transfer. + /// - If the authorization.decision is user_action_required, additional user input is needed, usually to fix a broken bank connection, before Plaid can properly assess the risk. You need to launch Link in update mode to complete the required user action. When calling /link/token/create to get a new Link token, instead of providing access_token in the request, you should set transfer.authorization_id as the authorization.id. After the Link flow is completed, you may re-attempt the authorization. + /// - If the authorization.decision is approved, and the authorization.rationale_code is null, the transfer has passed the risk check and you can proceed to call /transfer/create. + /// + /// - If the authorization.decision is approved and the authorization.rationale_code is non-null, the risk check could not be run: you may proceed with the transfer, but should perform your own risk evaluation. For more details, see the response schema. /// In Plaid's Sandbox environment the decisions will be returned as follows: /// - To approve a transfer with null rationale code, make an authorization request with an amount less than the available balance in the account. /// - To approve a transfer with the rationale code MANUALLY_VERIFIED_ITEM, create an Item in Link through the Same Day Micro-deposits flow. @@ -54,7 +55,7 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// Use the /transfer/capabilities/get endpoint to determine the RTP eligibility information of a transfer. To simulate RTP eligibility in Sandbox, log in using the username user_good and password pass_good and use the first two checking and savings accounts in the "First Platypus Bank" institution (ending in 0000 or 1111), which will return true. Any other account will return false. + /// Use the /transfer/capabilities/get endpoint to determine the RTP eligibility information of an account to be used with Transfer. This endpoint works on all Transfer-capable Items, including those created by /transfer/migrate_account. To simulate RTP eligibility in Sandbox, log in using the username user_good and password pass_good and use the first two checking and savings accounts in the "First Platypus Bank" institution (ending in 0000 or 1111), which will return true. Any other account will return false. /// /// public Task TransferCapabilitiesGetAsync(Transfer.TransferCapabilitiesGetRequest request) => @@ -237,6 +238,14 @@ public sealed partial class PlaidClient PostAsync("/transfer/repayment/return/list", request) .ParseResponseAsync(); + /// + /// The /transfer/platform/requirement/submit endpoint allows platforms to submit onboarding requirements for an originator as part of the Scaled Platform Transfer offering. + /// + /// + public Task TransferPlatformRequirementSubmitAsync(Transfer.TransferPlatformRequirementSubmitRequest request) => + PostAsync("/transfer/platform/requirement/submit", request) + .ParseResponseAsync(); + /// /// Use the /transfer/originator/create endpoint to create a new originator and return an originator_client_id. /// @@ -319,4 +328,12 @@ public sealed partial class PlaidClient PostAsync("/transfer/platform/originator/create", request) .ParseResponseAsync(); + /// + /// Use the /transfer/platform/person/create endpoint to create a person record associated with an originator and optionally submit person-specific requirements. + /// + /// + public Task TransferPlatformPersonCreateAsync(Transfer.TransferPlatformPersonCreateRequest request) => + PostAsync("/transfer/platform/person/create", request) + .ParseResponseAsync(); + } diff --git a/src/Plaid/Transfer/TransferGetRequest.cs b/src/Plaid/Transfer/TransferGetRequest.cs index db85d2ff..233c68a0 100644 --- a/src/Plaid/Transfer/TransferGetRequest.cs +++ b/src/Plaid/Transfer/TransferGetRequest.cs @@ -9,7 +9,13 @@ public partial class TransferGetRequest : RequestBase /// Plaid’s unique identifier for a transfer. /// [JsonPropertyName("transfer_id")] - public string TransferId { get; set; } = default!; + public string? TransferId { get; set; } = default!; + + /// + /// Plaid’s unique identifier for a transfer authorization. + /// + [JsonPropertyName("authorization_id")] + public string? AuthorizationId { get; set; } = default!; /// /// The Plaid client ID of the transfer originator. Should only be present if client_id is a third-party sender (TPS). diff --git a/src/Plaid/Transfer/TransferLedgerDistributeRequest.cs b/src/Plaid/Transfer/TransferLedgerDistributeRequest.cs index a2bc6eb6..ad2499fb 100644 --- a/src/Plaid/Transfer/TransferLedgerDistributeRequest.cs +++ b/src/Plaid/Transfer/TransferLedgerDistributeRequest.cs @@ -6,16 +6,16 @@ namespace Going.Plaid.Transfer; public partial class TransferLedgerDistributeRequest : RequestBase { /// - /// The client to pull money from. Must be the platform itself or its originator. One of from_client_id and to_client_id must be the platform's client_id. + /// The Ledger to pull money from. /// - [JsonPropertyName("from_client_id")] - public string FromClientId { get; set; } = default!; + [JsonPropertyName("from_ledger_id")] + public string FromLedgerId { get; set; } = default!; /// - /// The client to credit money to. Must be the platform itself or its originator. One of from_client_id and to_client_id must be the platform's client_id. + /// The Ledger to credit money to. /// - [JsonPropertyName("to_client_id")] - public string ToClientId { get; set; } = default!; + [JsonPropertyName("to_ledger_id")] + public string ToLedgerId { get; set; } = default!; /// /// The amount to move (decimal string with two digits of precision e.g. "10.00"). Amount must be positive. diff --git a/src/Plaid/Transfer/TransferLedgerGetResponse.cs b/src/Plaid/Transfer/TransferLedgerGetResponse.cs index 70946baf..aff7f0df 100644 --- a/src/Plaid/Transfer/TransferLedgerGetResponse.cs +++ b/src/Plaid/Transfer/TransferLedgerGetResponse.cs @@ -5,10 +5,28 @@ namespace Going.Plaid.Transfer; /// public record TransferLedgerGetResponse : ResponseBase { + /// + /// The unique identifier of the Ledger that was returned. + /// + [JsonPropertyName("ledger_id")] + public string LedgerId { get; init; } = default!; + /// /// Information about the balance of the ledger held with Plaid. /// [JsonPropertyName("balance")] public Entity.TransferLedgerBalance Balance { get; init; } = default!; + /// + /// The name of the Ledger + /// + [JsonPropertyName("name")] + public string Name { get; init; } = default!; + + /// + /// Whether this Ledger is the client's default ledger. + /// + [JsonPropertyName("is_default")] + public bool IsDefault { get; init; } = default!; + } diff --git a/src/Plaid/Transfer/TransferPlatformPersonCreateRequest.cs b/src/Plaid/Transfer/TransferPlatformPersonCreateRequest.cs new file mode 100644 index 00000000..eea60178 --- /dev/null +++ b/src/Plaid/Transfer/TransferPlatformPersonCreateRequest.cs @@ -0,0 +1,56 @@ +namespace Going.Plaid.Transfer; + +/// +/// Defines the response schema for /transfer/platform/person/create +/// +public partial class TransferPlatformPersonCreateRequest : RequestBase +{ + /// + /// The client ID of the originator + /// + [JsonPropertyName("originator_client_id")] + public string OriginatorClientId { get; set; } = default!; + + /// + /// The person's legal name + /// + [JsonPropertyName("name")] + public Entity.TransferPlatformPersonName? Name { get; set; } = default!; + + /// + /// A valid email address. Must not have leading or trailing spaces. + /// + [JsonPropertyName("email_address")] + public string? EmailAddress { get; set; } = default!; + + /// + /// A valid phone number in E.164 format. + /// + [JsonPropertyName("phone_number")] + public string? PhoneNumber { get; set; } = default!; + + /// + /// Home address of a person + /// + [JsonPropertyName("address")] + public Entity.TransferPlatformPersonAddress? Address { get; set; } = default!; + + /// + /// ID number of the person + /// + [JsonPropertyName("id_number")] + public Entity.TransferPlatformPersonIDNumber? IdNumber { get; set; } = default!; + + /// + /// The date of birth of the person. Formatted as YYYY-MM-DD. + /// + [JsonPropertyName("date_of_birth")] + public DateOnly? DateOfBirth { get; set; } = default!; + + /// + /// The relationship between this person and the originator they are related to. + /// + [JsonPropertyName("relationship_to_originator")] + public string? RelationshipToOriginator { get; set; } = default!; + +} diff --git a/src/Plaid/Transfer/TransferPlatformPersonCreateResponse.cs b/src/Plaid/Transfer/TransferPlatformPersonCreateResponse.cs new file mode 100644 index 00000000..04e00db6 --- /dev/null +++ b/src/Plaid/Transfer/TransferPlatformPersonCreateResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Transfer; + +/// +/// Defines the response schema for /transfer/platform/person/create +/// +public record TransferPlatformPersonCreateResponse : ResponseBase +{ + /// + /// An ID that should be used when submitting additional requirements that are associated with this person. + /// + [JsonPropertyName("person_id")] + public string PersonId { get; init; } = default!; + +} diff --git a/src/Plaid/Transfer/TransferPlatformRequirementSubmitRequest.cs b/src/Plaid/Transfer/TransferPlatformRequirementSubmitRequest.cs new file mode 100644 index 00000000..603cf294 --- /dev/null +++ b/src/Plaid/Transfer/TransferPlatformRequirementSubmitRequest.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Transfer; + +/// +/// Defines the request schema for /transfer/platform/requirement/submit +/// +public partial class TransferPlatformRequirementSubmitRequest : RequestBase +{ + /// + /// The client ID of the originator + /// + [JsonPropertyName("originator_client_id")] + public string OriginatorClientId { get; set; } = default!; + + /// + /// A list of requirement submissions that all relate to the originator. Must contain between 1 and 50 requirement submissions. + /// + [JsonPropertyName("requirement_submissions")] + public IReadOnlyList RequirementSubmissions { get; set; } = default!; + +} diff --git a/src/Plaid/Transfer/TransferPlatformRequirementSubmitResponse.cs b/src/Plaid/Transfer/TransferPlatformRequirementSubmitResponse.cs new file mode 100644 index 00000000..c7a8e3fd --- /dev/null +++ b/src/Plaid/Transfer/TransferPlatformRequirementSubmitResponse.cs @@ -0,0 +1,8 @@ +namespace Going.Plaid.Transfer; + +/// +/// Defines the response schema for /transfer/platform/requirement/submit +/// +public record TransferPlatformRequirementSubmitResponse : ResponseBase +{ +} diff --git a/src/Plaid/User/PlaidClient.cs b/src/Plaid/User/PlaidClient.cs index 5af64a3d..f66027c8 100644 --- a/src/Plaid/User/PlaidClient.cs +++ b/src/Plaid/User/PlaidClient.cs @@ -38,4 +38,22 @@ public sealed partial class PlaidClient PostAsync("/user/items/get", request) .ParseResponseAsync(); + /// + /// This endpoint is used to create a third-party user token. This token can be shared with and used by a specified third-party client to access data associated with the user through supported endpoints. + /// Ensure you store the third_party_user_token along with the user_token and third_party_client_id, as it is not possible to retrieve a previously created third_party_user_token. + /// + /// + public Task UserThirdPartyTokenCreateAsync(User.UserThirdPartyTokenCreateRequest request) => + PostAsync("/user/third_party_token/create", request) + .ParseResponseAsync(); + + /// + /// This endpoint is used to delete a third-party user token. Once removed, the token can longer be used to access data associated with the user. + /// Any subsequent calls to retrieve information using the same third-party user token will result in an error stating the third-party user token does not exist. + /// + /// + public Task UserThirdPartyTokenRemoveAsync(User.UserThirdPartyTokenRemoveRequest request) => + PostAsync("/user/third_party_token/remove", request) + .ParseResponseAsync(); + } diff --git a/src/Plaid/User/UserCreateRequest.cs b/src/Plaid/User/UserCreateRequest.cs index 9db21375..48521ec7 100644 --- a/src/Plaid/User/UserCreateRequest.cs +++ b/src/Plaid/User/UserCreateRequest.cs @@ -11,6 +11,12 @@ public partial class UserCreateRequest : RequestBase [JsonPropertyName("client_user_id")] public string ClientUserId { get; set; } = default!; + /// + /// A unique ID representing a CRA reseller's end customer. Maximum of 128 characters. + /// + [JsonPropertyName("end_customer")] + public string? EndCustomer { get; set; } = default!; + /// /// To create a Plaid Check Consumer Report for a user, this field must be present on the user token. If this field is not provided during user token creation, you can add it to the user later by calling /user/update. Once the field has been added to the user, you will be able to call /link/token/create with a non-empty consumer_report_permissible_purpose (which will automatically create a Plaid Check Consumer Report), or call /cra/check_report/create for that user. /// diff --git a/src/Plaid/User/UserThirdPartyTokenCreateRequest.cs b/src/Plaid/User/UserThirdPartyTokenCreateRequest.cs new file mode 100644 index 00000000..a76846f8 --- /dev/null +++ b/src/Plaid/User/UserThirdPartyTokenCreateRequest.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.User; + +/// +/// UserThirdPartyTokenCreateRequest defines the request schema for /user/third_party_token/create +/// +public partial class UserThirdPartyTokenCreateRequest : RequestBase +{ + /// + /// The user token associated with the User data is being requested for. + /// + [JsonPropertyName("user_token")] + public string UserToken { get; set; } = default!; + + /// + /// The Plaid API client_id of the third-party client the token will be shared with. The token will only be valid for the specified client. + /// + [JsonPropertyName("third_party_client_id")] + public string ThirdPartyClientId { get; set; } = default!; + + /// + /// The expiration date and time for the third-party user token in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). The expiration is restricted to a maximum of 24 hours from the token's creation time. If not provided, the token will automatically expire after 24 hours. + /// + [JsonPropertyName("expiration_time")] + public DateTimeOffset? ExpirationTime { get; set; } = default!; + +} diff --git a/src/Plaid/User/UserThirdPartyTokenCreateResponse.cs b/src/Plaid/User/UserThirdPartyTokenCreateResponse.cs new file mode 100644 index 00000000..c7fc748b --- /dev/null +++ b/src/Plaid/User/UserThirdPartyTokenCreateResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.User; + +/// +/// UserThirdPartyTokenCreateResponse defines the response schema for /user/third_party_token/create +/// +public record UserThirdPartyTokenCreateResponse : ResponseBase +{ + /// + /// The third-party user token associated with the requested User data. + /// + [JsonPropertyName("third_party_user_token")] + public string ThirdPartyUserToken { get; init; } = default!; + +} diff --git a/src/Plaid/User/UserThirdPartyTokenRemoveRequest.cs b/src/Plaid/User/UserThirdPartyTokenRemoveRequest.cs new file mode 100644 index 00000000..dd04cf91 --- /dev/null +++ b/src/Plaid/User/UserThirdPartyTokenRemoveRequest.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.User; + +/// +/// UserThirdPartyTokenCreateRequest defines the request schema for /user/third_party_token/remove +/// +public partial class UserThirdPartyTokenRemoveRequest : RequestBase +{ + /// + /// The third-party user token associated with the requested User data. + /// + [JsonPropertyName("third_party_user_token")] + public string ThirdPartyUserToken { get; set; } = default!; + +} diff --git a/src/Plaid/User/UserThirdPartyTokenRemoveResponse.cs b/src/Plaid/User/UserThirdPartyTokenRemoveResponse.cs new file mode 100644 index 00000000..9dac5f62 --- /dev/null +++ b/src/Plaid/User/UserThirdPartyTokenRemoveResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.User; + +/// +/// UserThirdPartyTokenCreateResponse defines the response schema for /user/third_party_token/remove +/// +public record UserThirdPartyTokenRemoveResponse : ResponseBase +{ + /// + /// true if the third-party user token was successfully removed. + /// + [JsonPropertyName("removed")] + public bool Removed { get; init; } = default!; + +} diff --git a/src/Plaid/WatchlistScreening/WatchlistScreeningEntityCreateResponse.cs b/src/Plaid/WatchlistScreening/WatchlistScreeningEntityCreateResponse.cs index f3c523e0..c7bdee4d 100644 --- a/src/Plaid/WatchlistScreening/WatchlistScreeningEntityCreateResponse.cs +++ b/src/Plaid/WatchlistScreening/WatchlistScreeningEntityCreateResponse.cs @@ -18,7 +18,7 @@ public record WatchlistScreeningEntityCreateResponse : ResponseBase public Entity.EntityWatchlistScreeningSearchTerms SearchTerms { get; init; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; init; } = default!; diff --git a/src/Plaid/WatchlistScreening/WatchlistScreeningEntityGetResponse.cs b/src/Plaid/WatchlistScreening/WatchlistScreeningEntityGetResponse.cs index 09c81fb2..7ee5603d 100644 --- a/src/Plaid/WatchlistScreening/WatchlistScreeningEntityGetResponse.cs +++ b/src/Plaid/WatchlistScreening/WatchlistScreeningEntityGetResponse.cs @@ -18,7 +18,7 @@ public record WatchlistScreeningEntityGetResponse : ResponseBase public Entity.EntityWatchlistScreeningSearchTerms SearchTerms { get; init; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; init; } = default!; diff --git a/src/Plaid/WatchlistScreening/WatchlistScreeningEntityListRequest.cs b/src/Plaid/WatchlistScreening/WatchlistScreeningEntityListRequest.cs index 164e236f..a51c15f8 100644 --- a/src/Plaid/WatchlistScreening/WatchlistScreeningEntityListRequest.cs +++ b/src/Plaid/WatchlistScreening/WatchlistScreeningEntityListRequest.cs @@ -24,7 +24,7 @@ public partial class WatchlistScreeningEntityListRequest : RequestBase public Entity.WatchlistScreeningStatus? Status { get; set; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; set; } = default!; diff --git a/src/Plaid/WatchlistScreening/WatchlistScreeningEntityUpdateRequest.cs b/src/Plaid/WatchlistScreening/WatchlistScreeningEntityUpdateRequest.cs index 80ad5062..8298c03b 100644 --- a/src/Plaid/WatchlistScreening/WatchlistScreeningEntityUpdateRequest.cs +++ b/src/Plaid/WatchlistScreening/WatchlistScreeningEntityUpdateRequest.cs @@ -18,7 +18,7 @@ public partial class WatchlistScreeningEntityUpdateRequest : RequestBase public Entity.UpdateEntityScreeningRequestSearchTerms? SearchTerms { get; set; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; set; } = default!; diff --git a/src/Plaid/WatchlistScreening/WatchlistScreeningEntityUpdateResponse.cs b/src/Plaid/WatchlistScreening/WatchlistScreeningEntityUpdateResponse.cs index 5ca555d7..9cc4e8e0 100644 --- a/src/Plaid/WatchlistScreening/WatchlistScreeningEntityUpdateResponse.cs +++ b/src/Plaid/WatchlistScreening/WatchlistScreeningEntityUpdateResponse.cs @@ -18,7 +18,7 @@ public record WatchlistScreeningEntityUpdateResponse : ResponseBase public Entity.EntityWatchlistScreeningSearchTerms SearchTerms { get; init; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; init; } = default!; diff --git a/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualCreateResponse.cs b/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualCreateResponse.cs index 1134d6c1..f8e8853b 100644 --- a/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualCreateResponse.cs +++ b/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualCreateResponse.cs @@ -18,7 +18,7 @@ public record WatchlistScreeningIndividualCreateResponse : ResponseBase public Entity.WatchlistScreeningSearchTerms SearchTerms { get; init; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; init; } = default!; diff --git a/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualGetResponse.cs b/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualGetResponse.cs index c92feacf..d7073147 100644 --- a/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualGetResponse.cs +++ b/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualGetResponse.cs @@ -18,7 +18,7 @@ public record WatchlistScreeningIndividualGetResponse : ResponseBase public Entity.WatchlistScreeningSearchTerms SearchTerms { get; init; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; init; } = default!; diff --git a/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualListRequest.cs b/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualListRequest.cs index a7f7fcef..406940b4 100644 --- a/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualListRequest.cs +++ b/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualListRequest.cs @@ -24,7 +24,7 @@ public partial class WatchlistScreeningIndividualListRequest : RequestBase public Entity.WatchlistScreeningStatus? Status { get; set; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; set; } = default!; diff --git a/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualUpdateRequest.cs b/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualUpdateRequest.cs index 58d24068..3a53a6d3 100644 --- a/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualUpdateRequest.cs +++ b/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualUpdateRequest.cs @@ -18,7 +18,7 @@ public partial class WatchlistScreeningIndividualUpdateRequest : RequestBase public Entity.UpdateIndividualScreeningRequestSearchTerms? SearchTerms { get; set; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; set; } = default!; diff --git a/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualUpdateResponse.cs b/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualUpdateResponse.cs index 8587a439..8435db07 100644 --- a/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualUpdateResponse.cs +++ b/src/Plaid/WatchlistScreening/WatchlistScreeningIndividualUpdateResponse.cs @@ -18,7 +18,7 @@ public record WatchlistScreeningIndividualUpdateResponse : ResponseBase public Entity.WatchlistScreeningSearchTerms SearchTerms { get; init; } = default!; /// - /// ID of the associated user. + /// ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use /dashboard_user/get. /// [JsonPropertyName("assignee")] public string? Assignee { get; init; } = default!; diff --git a/src/Plaid/Webhook/CraCheckReportReadyWebhook.cs b/src/Plaid/Webhook/CraCheckReportReadyWebhook.cs index e0e4af68..3ca1e141 100644 --- a/src/Plaid/Webhook/CraCheckReportReadyWebhook.cs +++ b/src/Plaid/Webhook/CraCheckReportReadyWebhook.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Webhook; /// -/// Fired when products for the Check Report are ready to be retrieved +/// Fired when the Check Report are ready to be retrieved. Once this webhook has fired, the report will be available to retrieve for 24 hours. /// public record CraCheckReportReadyWebhook : WebhookBase { diff --git a/src/Plaid/Webhook/DepositSwitchStateUpdateWebhook.cs b/src/Plaid/Webhook/DepositSwitchStateUpdateWebhook.cs index a88f9665..85411a41 100644 --- a/src/Plaid/Webhook/DepositSwitchStateUpdateWebhook.cs +++ b/src/Plaid/Webhook/DepositSwitchStateUpdateWebhook.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Webhook; /// -/// Fired when the status of a deposit switch request has changed. +/// (Deprecated) Fired when the status of a deposit switch request has changed. /// public record DepositSwitchStateUpdateWebhook : WebhookBase { diff --git a/src/Plaid/Webhook/IncomeVerificationStatusWebhook.cs b/src/Plaid/Webhook/IncomeVerificationStatusWebhook.cs index d65f27e7..e445111c 100644 --- a/src/Plaid/Webhook/IncomeVerificationStatusWebhook.cs +++ b/src/Plaid/Webhook/IncomeVerificationStatusWebhook.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Webhook; /// -/// Fired when the status of an income verification instance has changed. It will typically take several minutes for this webhook to fire after the end user has uploaded their documents in the Document Income flow. +/// Fired when the status of an income verification instance has changed. This webhook is fired for both the Document and Payroll Income flows, but not the Bank Income flow. It will typically take several minutes for this webhook to fire after the end user has uploaded their documents in the Document Income flow. /// public record IncomeVerificationStatusWebhook : WebhookBase { diff --git a/src/Plaid/Webhook/MonitoringInsightsWebhook.cs b/src/Plaid/Webhook/MonitoringInsightsWebhook.cs new file mode 100644 index 00000000..107333ce --- /dev/null +++ b/src/Plaid/Webhook/MonitoringInsightsWebhook.cs @@ -0,0 +1,34 @@ +namespace Going.Plaid.Webhook; + +/// +/// Every 14 days, the webhook will be fired per item enabled for Monitoring Insights. +/// +public record MonitoringInsightsWebhook : WebhookBase +{ + /// + [JsonPropertyName("webhook_type")] + public override WebhookType WebhookType => WebhookType.CraMonitoring; + + /// + [JsonPropertyName("webhook_code")] + public override WebhookCode WebhookCode => WebhookCode.InsightsUpdated; + + /// + /// Enum for the status of the insights + /// + [JsonPropertyName("status")] + public Entity.MonitoringInsightsStatus Status { get; init; } = default!; + + /// + /// The reason for why insights may not be AVAILABLE + /// + [JsonPropertyName("reason")] + public string? Reason { get; init; } = default!; + + /// + /// The user_id that the report is associated with + /// + [JsonPropertyName("user_id")] + public string UserId { get; init; } = default!; + +} diff --git a/src/Plaid/Webhook/PendingDisconnectWebhook.cs b/src/Plaid/Webhook/PendingDisconnectWebhook.cs index 018d27aa..2d630998 100644 --- a/src/Plaid/Webhook/PendingDisconnectWebhook.cs +++ b/src/Plaid/Webhook/PendingDisconnectWebhook.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Webhook; /// -/// Fired when an Item is expected to be disconnected. This can be resolved by having the user go through Link’s update mode. +/// Fired when an Item is expected to be disconnected. This can be resolved by having the user go through Link’s update mode. /// public record PendingDisconnectWebhook : WebhookBase { diff --git a/src/Plaid/Webhook/UserAccountRevokedWebhook.cs b/src/Plaid/Webhook/UserAccountRevokedWebhook.cs index b76f3cce..1e5d7b5e 100644 --- a/src/Plaid/Webhook/UserAccountRevokedWebhook.cs +++ b/src/Plaid/Webhook/UserAccountRevokedWebhook.cs @@ -2,7 +2,7 @@ namespace Going.Plaid.Webhook; /// /// The USER_ACCOUNT_REVOKED webhook is fired when an end user has revoked access to their account on the Data Provider's portal. This webhook is currently sent only for Chase Items, but may be sent in the future for other financial institutions that allow account-level permissions revocation through their portals. Upon receiving this webhook, it is recommended to delete any Plaid-derived data you have stored that is associated with the revoked account. -/// If you are using Auth and receive this webhook for a Chase Item, this webhook indicates that the TAN associated with the revoked account is no longer valid and cannot be used to create new transfers. You should not create new ACH transfers for the account that was revoked until access has been re-granted. +/// If you are using Auth and receive this webhook, this webhook indicates that the TAN associated with the revoked account is no longer valid and cannot be used to create new transfers. You should not create new ACH transfers for the account that was revoked until access has been re-granted. /// You can request the user to re-grant access to their account by sending them through update mode. Alternatively, they may re-grant access directly through the Data Provider's portal. /// After the user has re-granted access, Auth customers should call the auth endpoint again to obtain the new TAN. /// diff --git a/src/Plaid/Webhook/UserPermissionRevokedWebhook.cs b/src/Plaid/Webhook/UserPermissionRevokedWebhook.cs index e58659b4..c687bea4 100644 --- a/src/Plaid/Webhook/UserPermissionRevokedWebhook.cs +++ b/src/Plaid/Webhook/UserPermissionRevokedWebhook.cs @@ -2,7 +2,7 @@ namespace Going.Plaid.Webhook; /// /// The USER_PERMISSION_REVOKED webhook may be fired when an end user has revoked the permission that they previously granted to access an Item. If the end user revoked their permissions through Plaid (such as via the Plaid Portal or by contacting Plaid Support), the webhook will fire. If the end user revoked their permissions directly through the institution, this webhook may not always fire, since some institutions’ consent portals do not trigger this webhook. Once access to an Item has been revoked, it cannot be restored. If the user subsequently returns to your application, a new Item must be created for the user. Upon receiving this webhook, it is recommended to call /item/remove to delete the underlying Item and to delete any stored data from Plaid associated with the Item. -/// Note that when using ACH flows with Chase Items specifically, the account number provided by Plaid will no longer work for creating transfers once user permission has been revoked. If you receive this webhook for a Chase Item, you should not create any new ACH transfers for that Item, as they will be returned. +/// Note that when working with tokenized account numbers with Auth or Transfer, the account number provided by Plaid will no longer work for creating transfers once user permission has been revoked. /// public record UserPermissionRevokedWebhook : WebhookBase {