diff --git a/plaid-openapi b/plaid-openapi index 5968169f..46d9a269 160000 --- a/plaid-openapi +++ b/plaid-openapi @@ -1 +1 @@ -Subproject commit 5968169f0112c3e0a02fb0788b9ad146709501a3 +Subproject commit 46d9a2691011538bffbb1eb66161013aa4e844f2 diff --git a/src/Plaid/Auth/PlaidClient.cs b/src/Plaid/Auth/PlaidClient.cs index 4dfaa487..86cbcf49 100644 --- a/src/Plaid/Auth/PlaidClient.cs +++ b/src/Plaid/Auth/PlaidClient.cs @@ -4,7 +4,6 @@ public sealed partial class PlaidClient { /// /// The /auth/get endpoint returns the bank account and bank identification numbers (such as routing numbers, for US accounts) associated with an Item's checking and savings accounts, along with high-level account data and balances when available. - /// Note: This request may take some time to complete if auth was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the data. /// Versioning note: In API version 2017-03-08, the schema of the numbers object returned by this endpoint is substantially different. For details, see Plaid API versioning. /// /// diff --git a/src/Plaid/Beacon/BeaconReportCreateRequest.cs b/src/Plaid/Beacon/BeaconReportCreateRequest.cs index affa7ce7..02ed5b7d 100644 --- a/src/Plaid/Beacon/BeaconReportCreateRequest.cs +++ b/src/Plaid/Beacon/BeaconReportCreateRequest.cs @@ -15,7 +15,7 @@ public partial class BeaconReportCreateRequest : RequestBase /// The type of Beacon Report. /// [JsonPropertyName("type")] - public Entity.BeaconReportType Type { get; set; } = default!; + public Entity.BeaconReportCreateType Type { get; set; } = default!; /// /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). diff --git a/src/Plaid/Beacon/BeaconReportCreateResponse.cs b/src/Plaid/Beacon/BeaconReportCreateResponse.cs index 85b396de..b9a41320 100644 --- a/src/Plaid/Beacon/BeaconReportCreateResponse.cs +++ b/src/Plaid/Beacon/BeaconReportCreateResponse.cs @@ -36,7 +36,13 @@ public record BeaconReportCreateResponse : ResponseBase /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). /// [JsonPropertyName("fraud_date")] - public DateOnly FraudDate { get; init; } = default!; + public DateOnly? FraudDate { get; init; } = default!; + + /// + /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). + /// + [JsonPropertyName("event_date")] + public DateOnly EventDate { get; init; } = default!; /// /// The amount and currency of the fraud or attempted fraud. diff --git a/src/Plaid/Beacon/BeaconReportGetResponse.cs b/src/Plaid/Beacon/BeaconReportGetResponse.cs index 85450c50..44eb2e49 100644 --- a/src/Plaid/Beacon/BeaconReportGetResponse.cs +++ b/src/Plaid/Beacon/BeaconReportGetResponse.cs @@ -36,7 +36,13 @@ public record BeaconReportGetResponse : ResponseBase /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). /// [JsonPropertyName("fraud_date")] - public DateOnly FraudDate { get; init; } = default!; + public DateOnly? FraudDate { get; init; } = default!; + + /// + /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). + /// + [JsonPropertyName("event_date")] + public DateOnly EventDate { get; init; } = default!; /// /// The amount and currency of the fraud or attempted fraud. diff --git a/src/Plaid/Beacon/BeaconUserCreateRequest.cs b/src/Plaid/Beacon/BeaconUserCreateRequest.cs index 29d42130..50d83d23 100644 --- a/src/Plaid/Beacon/BeaconUserCreateRequest.cs +++ b/src/Plaid/Beacon/BeaconUserCreateRequest.cs @@ -22,12 +22,13 @@ public partial class BeaconUserCreateRequest : RequestBase /// /// A Beacon User's data which is used to check against duplicate records and the Beacon Fraud Network. + /// In order to create a Beacon User, in addition to the name, _either_ the date_of_birth _or_ the depository_accounts field must be provided. /// [JsonPropertyName("user")] public Entity.BeaconUserRequestData User { get; set; } = default!; /// - /// Send this array of access tokens to link accounts to the Beacon User and have them evaluated for Account Insights. + /// Send this array of access tokens to link accounts to the Beacon User and have them evaluated for Account Insights. /// A maximum of 50 accounts total can be added to a single Beacon User. /// [JsonPropertyName("access_tokens")] diff --git a/src/Plaid/Beacon/PlaidClient.cs b/src/Plaid/Beacon/PlaidClient.cs index 018d267a..453820f2 100644 --- a/src/Plaid/Beacon/PlaidClient.cs +++ b/src/Plaid/Beacon/PlaidClient.cs @@ -65,7 +65,7 @@ public sealed partial class PlaidClient /// /// Use the /beacon/report_syndication/list endpoint to view all Beacon Reports that have been syndicated to a specific Beacon User. This endpoint returns Beacon Report Syndications which are references to Beacon Reports created either by you, or another Beacon customer, that matched the specified Beacon User. A Beacon User can have multiple active Beacon Report Syndications at once. The results from this endpoint are paginated; the next_cursor field will be populated if there is another page of results that can be retrieved. To fetch the next page, pass the next_cursor value as the cursor parameter in the next request. /// - /// + /// public Task BeaconReportSyndicationListAsync(Beacon.BeaconReportSyndicationListRequest request) => PostAsync("/beacon/report_syndication/list", request) .ParseResponseAsync(); @@ -81,7 +81,7 @@ public sealed partial class PlaidClient /// /// Returns a Beacon Report Syndication for a given Beacon Report Syndication id. /// - /// + /// public Task BeaconReportSyndicationGetAsync(Beacon.BeaconReportSyndicationGetRequest request) => PostAsync("/beacon/report_syndication/get", request) .ParseResponseAsync(); diff --git a/src/Plaid/Converters/WebhookBaseConverter.Map.cs b/src/Plaid/Converters/WebhookBaseConverter.Map.cs index 38a7808c..d03b7f68 100644 --- a/src/Plaid/Converters/WebhookBaseConverter.Map.cs +++ b/src/Plaid/Converters/WebhookBaseConverter.Map.cs @@ -25,6 +25,7 @@ public partial class WebhookBaseConverter : JsonConverter [(WebhookType.Identity, WebhookCode.DefaultUpdate)] = typeof(IdentityDefaultUpdateWebhook), [(WebhookType.Transactions, WebhookCode.HistoricalUpdate)] = typeof(HistoricalUpdateWebhook), [(WebhookType.Transactions, WebhookCode.InitialUpdate)] = typeof(InitialUpdateWebhook), + [(WebhookType.Issues, WebhookCode.IssueResolved)] = typeof(IssueResolvedWebhook), [(WebhookType.Auth, WebhookCode.DefaultUpdate)] = typeof(AuthDefaultUpdateWebhook), [(WebhookType.Auth, WebhookCode.AutomaticallyVerified)] = typeof(FallbackAuthMicrodepositAutoVerifiedWebhook), [(WebhookType.Auth, WebhookCode.VerificationExpired)] = typeof(FallbackAuthMicrodepositVerificationExpiredWebhook), @@ -45,6 +46,7 @@ public partial class WebhookBaseConverter : JsonConverter [(WebhookType.Holdings, WebhookCode.DefaultUpdate)] = typeof(HoldingsDefaultUpdateWebhook), [(WebhookType.Partner, WebhookCode.EndCustomerOauthStatusUpdated)] = typeof(PartnerEndCustomerOAuthStatusUpdatedWebhook), [(WebhookType.Liabilities, WebhookCode.DefaultUpdate)] = typeof(LiabilitiesDefaultUpdateWebhook), + [(WebhookType.Item, WebhookCode.PendingDisconnect)] = typeof(PendingDisconnectWebhook), [(WebhookType.PaymentInitiation, WebhookCode.PaymentStatusUpdate)] = typeof(PaymentStatusUpdateWebhook), [(WebhookType.Wallet, WebhookCode.WalletTransactionStatusUpdate)] = typeof(WalletTransactionStatusUpdateWebhook), [(WebhookType.Item, WebhookCode.UserPermissionRevoked)] = typeof(UserPermissionRevokedWebhook), diff --git a/src/Plaid/Cra/BaseReportCreateResponse.cs b/src/Plaid/Cra/BaseReportCreateResponse.cs deleted file mode 100644 index 9458cf08..00000000 --- a/src/Plaid/Cra/BaseReportCreateResponse.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Going.Plaid.Cra; - -/// -/// BaseReportCreateResponse defines the response schema for cra/base_report/create -/// -public record BaseReportCreateResponse : ResponseBase -{ -} diff --git a/src/Plaid/Cra/CraBankIncomeCreateRequest.cs b/src/Plaid/Cra/CraBankIncomeCreateRequest.cs index 0c00014e..badbbdeb 100644 --- a/src/Plaid/Cra/CraBankIncomeCreateRequest.cs +++ b/src/Plaid/Cra/CraBankIncomeCreateRequest.cs @@ -18,7 +18,7 @@ public partial class CraBankIncomeCreateRequest : RequestBase public string? Webhook { get; set; } = default!; /// - /// The number of days of data to request for the Bank Income product + /// The number of days of data to request /// [JsonPropertyName("days_requested")] public int? DaysRequested { get; set; } = default!; diff --git a/src/Plaid/Cra/BaseReportCreateRequest.cs b/src/Plaid/Cra/CraBaseReportCreateRequest.cs similarity index 85% rename from src/Plaid/Cra/BaseReportCreateRequest.cs rename to src/Plaid/Cra/CraBaseReportCreateRequest.cs index 0c367e72..8ae041c0 100644 --- a/src/Plaid/Cra/BaseReportCreateRequest.cs +++ b/src/Plaid/Cra/CraBaseReportCreateRequest.cs @@ -1,9 +1,9 @@ namespace Going.Plaid.Cra; /// -/// BaseReportCreateRequest defines the request schema for /cra/base_report/create +/// CraBaseReportCreateRequest defines the request schema for /cra/base_report/create /// -public partial class BaseReportCreateRequest : RequestBase +public partial class CraBaseReportCreateRequest : RequestBase { /// /// The user token associated with the User data is being requested for. diff --git a/src/Plaid/Cra/CraBaseReportCreateResponse.cs b/src/Plaid/Cra/CraBaseReportCreateResponse.cs new file mode 100644 index 00000000..813cf3cc --- /dev/null +++ b/src/Plaid/Cra/CraBaseReportCreateResponse.cs @@ -0,0 +1,8 @@ +namespace Going.Plaid.Cra; + +/// +/// CraBaseReportCreateResponse defines the response schema for cra/base_report/create +/// +public record CraBaseReportCreateResponse : ResponseBase +{ +} diff --git a/src/Plaid/Cra/BaseReportGetRequest.cs b/src/Plaid/Cra/CraBaseReportGetRequest.cs similarity index 62% rename from src/Plaid/Cra/BaseReportGetRequest.cs rename to src/Plaid/Cra/CraBaseReportGetRequest.cs index 2d06fa6b..add25eae 100644 --- a/src/Plaid/Cra/BaseReportGetRequest.cs +++ b/src/Plaid/Cra/CraBaseReportGetRequest.cs @@ -1,9 +1,9 @@ namespace Going.Plaid.Cra; /// -/// BaseReportGetRequest defines the request schema for /cra/base_report/get +/// CraBaseReportGetRequest defines the request schema for /cra/base_report/get /// -public partial class BaseReportGetRequest : RequestBase +public partial class CraBaseReportGetRequest : RequestBase { /// /// The user token associated with the User data is being requested for. diff --git a/src/Plaid/Cra/BaseReportGetResponse.cs b/src/Plaid/Cra/CraBaseReportGetResponse.cs similarity index 67% rename from src/Plaid/Cra/BaseReportGetResponse.cs rename to src/Plaid/Cra/CraBaseReportGetResponse.cs index 9f64fd44..f492de8c 100644 --- a/src/Plaid/Cra/BaseReportGetResponse.cs +++ b/src/Plaid/Cra/CraBaseReportGetResponse.cs @@ -1,9 +1,9 @@ namespace Going.Plaid.Cra; /// -/// BaseReportGetResponse defines the response schema for /cra/base_report/get +/// CraBaseReportGetResponse defines the response schema for /cra/base_report/get /// -public record BaseReportGetResponse : ResponseBase +public record CraBaseReportGetResponse : ResponseBase { /// /// An object representing a Base Report @@ -15,6 +15,6 @@ public record BaseReportGetResponse : ResponseBase /// If the Base Report generation was successful but identity information cannot be returned, this array will contain information about the errors causing identity information to be missing /// [JsonPropertyName("warnings")] - public IReadOnlyList? Warnings { get; init; } = default!; + public IReadOnlyList Warnings { get; init; } = default!; } diff --git a/src/Plaid/Cra/CraCheckReportBaseReportGetResponse.cs b/src/Plaid/Cra/CraCheckReportBaseReportGetResponse.cs index ecf2ff8c..c9b310c0 100644 --- a/src/Plaid/Cra/CraCheckReportBaseReportGetResponse.cs +++ b/src/Plaid/Cra/CraCheckReportBaseReportGetResponse.cs @@ -15,6 +15,6 @@ public record CraCheckReportBaseReportGetResponse : ResponseBase /// If the Base Report generation was successful but identity information cannot be returned, this array will contain information about the errors causing identity information to be missing /// [JsonPropertyName("warnings")] - public IReadOnlyList? Warnings { get; init; } = default!; + public IReadOnlyList Warnings { get; init; } = default!; } diff --git a/src/Plaid/Cra/CraCheckReportCreateRequest.cs b/src/Plaid/Cra/CraCheckReportCreateRequest.cs index bb7b9e7c..df070a93 100644 --- a/src/Plaid/Cra/CraCheckReportCreateRequest.cs +++ b/src/Plaid/Cra/CraCheckReportCreateRequest.cs @@ -18,10 +18,10 @@ public partial class CraCheckReportCreateRequest : RequestBase public string Webhook { get; set; } = default!; /// - /// The number of days of data to request for the report + /// 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. /// [JsonPropertyName("days_requested")] - public int? DaysRequested { get; set; } = default!; + 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. diff --git a/src/Plaid/Cra/CraCheckReportIncomeInsightsGetResponse.cs b/src/Plaid/Cra/CraCheckReportIncomeInsightsGetResponse.cs index 77d7617c..b6d8a633 100644 --- a/src/Plaid/Cra/CraCheckReportIncomeInsightsGetResponse.cs +++ b/src/Plaid/Cra/CraCheckReportIncomeInsightsGetResponse.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Cra; public record CraCheckReportIncomeInsightsGetResponse : ResponseBase { /// - /// The report of the Bank Income data for an end user. + /// The Check Income Insights Report for an end user. /// [JsonPropertyName("report")] public Entity.CraIncomeInsights? Report { get; init; } = default!; diff --git a/src/Plaid/Cra/CraCheckReportNetworkAttributesGetResponse.cs b/src/Plaid/Cra/CraCheckReportNetworkAttributesGetResponse.cs deleted file mode 100644 index 42d238c6..00000000 --- a/src/Plaid/Cra/CraCheckReportNetworkAttributesGetResponse.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Going.Plaid.Cra; - -/// -/// CraCheckReportNetworkAttributesGetResponse defines the response schema for /cra/check_report/network_attributes/get. -/// -public record CraCheckReportNetworkAttributesGetResponse : ResponseBase -{ - /// - /// Contains data for the CRA Network Attributes Report. - /// - [JsonPropertyName("report")] - public Entity.CraNetworkAttributesReport Report { get; init; } = default!; - -} diff --git a/src/Plaid/Cra/CraCheckReportNetworkAttributesGetRequest.cs b/src/Plaid/Cra/CraCheckReportNetworkInsightsGetRequest.cs similarity index 55% rename from src/Plaid/Cra/CraCheckReportNetworkAttributesGetRequest.cs rename to src/Plaid/Cra/CraCheckReportNetworkInsightsGetRequest.cs index 02baab16..43acc298 100644 --- a/src/Plaid/Cra/CraCheckReportNetworkAttributesGetRequest.cs +++ b/src/Plaid/Cra/CraCheckReportNetworkInsightsGetRequest.cs @@ -1,9 +1,9 @@ namespace Going.Plaid.Cra; /// -/// CraCheckReportNetworkAttributesGetRequest defines the request schema for /cra/check_report/network_attributes/get. +/// CraCheckReportNetworkInsightsGetRequest defines the request schema for /cra/check_report/network_attributes/get. /// -public partial class CraCheckReportNetworkAttributesGetRequest : RequestBase +public partial class CraCheckReportNetworkInsightsGetRequest : RequestBase { /// /// The user token associated with the User data is being requested for. diff --git a/src/Plaid/Cra/CraCheckReportNetworkInsightsGetResponse.cs b/src/Plaid/Cra/CraCheckReportNetworkInsightsGetResponse.cs new file mode 100644 index 00000000..26ceec42 --- /dev/null +++ b/src/Plaid/Cra/CraCheckReportNetworkInsightsGetResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Cra; + +/// +/// CraCheckReportNetworkInsightsGetResponse defines the response schema for /cra/check_report/network_attributes/get. +/// +public record CraCheckReportNetworkInsightsGetResponse : ResponseBase +{ + /// + /// Contains data for the CRA Network Attributes Report. + /// + [JsonPropertyName("report")] + public Entity.CraNetworkInsightsReport Report { get; init; } = default!; + +} diff --git a/src/Plaid/Cra/CraMonitoringInsightsGetRequest.cs b/src/Plaid/Cra/CraMonitoringInsightsGetRequest.cs new file mode 100644 index 00000000..5e6ba0bb --- /dev/null +++ b/src/Plaid/Cra/CraMonitoringInsightsGetRequest.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Cra; + +/// +/// CraMonitoringInsightsGetRequest defines the request schema for /cra/monitoring_insights/get +/// +public partial class CraMonitoringInsightsGetRequest : RequestBase +{ + /// + /// The user token associated with the User data is being requested for. + /// + [JsonPropertyName("user_token")] + public string UserToken { get; set; } = default!; + +} diff --git a/src/Plaid/Cra/CraMonitoringInsightsGetResponse.cs b/src/Plaid/Cra/CraMonitoringInsightsGetResponse.cs new file mode 100644 index 00000000..fbfc2fda --- /dev/null +++ b/src/Plaid/Cra/CraMonitoringInsightsGetResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Cra; + +/// +/// CraMonitoringInsightsGetResponse defines the response schema for cra/monitoring_insights/get +/// +public record CraMonitoringInsightsGetResponse : ResponseBase +{ + /// + /// An array of the Monitoring Insights Item + /// + [JsonPropertyName("items")] + public IReadOnlyList Items { get; init; } = default!; + +} diff --git a/src/Plaid/Cra/CraMonitoringInsightsSubscribeRequest.cs b/src/Plaid/Cra/CraMonitoringInsightsSubscribeRequest.cs new file mode 100644 index 00000000..78e54d06 --- /dev/null +++ b/src/Plaid/Cra/CraMonitoringInsightsSubscribeRequest.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Cra; + +/// +/// CraMonitoringInsightsSubscribeRequest defines the request schema for /cra/monitoring_insights/subscribe +/// +public partial class CraMonitoringInsightsSubscribeRequest : RequestBase +{ + /// + /// The user token associated with the User data is being requested for. + /// + [JsonPropertyName("user_token")] + public string UserToken { get; set; } = default!; + + /// + /// URL to which Plaid will send Monitoring Insights webhooks, for example when the requested Monitoring Insights is ready. + /// + [JsonPropertyName("webhook")] + public string Webhook { get; set; } = default!; + +} diff --git a/src/Plaid/Cra/CraMonitoringInsightsSubscribeResponse.cs b/src/Plaid/Cra/CraMonitoringInsightsSubscribeResponse.cs new file mode 100644 index 00000000..34ebe46c --- /dev/null +++ b/src/Plaid/Cra/CraMonitoringInsightsSubscribeResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Cra; + +/// +/// CraMonitoringInsightsSubscribeResponse defines the response schema for cra/monitoring_insights/subscribe +/// +public record CraMonitoringInsightsSubscribeResponse : ResponseBase +{ + /// + /// A unique identifier for the subscription, which can be used for troubleshooting + /// + [JsonPropertyName("subscription_id")] + public string SubscriptionId { get; init; } = default!; + +} diff --git a/src/Plaid/Cra/CraMonitoringInsightsUnsubscribeRequest.cs b/src/Plaid/Cra/CraMonitoringInsightsUnsubscribeRequest.cs new file mode 100644 index 00000000..f503b19a --- /dev/null +++ b/src/Plaid/Cra/CraMonitoringInsightsUnsubscribeRequest.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Cra; + +/// +/// CraMonitoringInsightsUnsubscribeRequest defines the request schema for /cra/monitoring_insights/unsubscribe +/// +public partial class CraMonitoringInsightsUnsubscribeRequest : RequestBase +{ + /// + /// A unique identifier for the subscription, which can be used for troubleshooting + /// + [JsonPropertyName("subscription_id")] + public string SubscriptionId { get; set; } = default!; + +} diff --git a/src/Plaid/Cra/CraMonitoringInsightsUnsubscribeResponse.cs b/src/Plaid/Cra/CraMonitoringInsightsUnsubscribeResponse.cs new file mode 100644 index 00000000..9e4058f5 --- /dev/null +++ b/src/Plaid/Cra/CraMonitoringInsightsUnsubscribeResponse.cs @@ -0,0 +1,8 @@ +namespace Going.Plaid.Cra; + +/// +/// CraMonitoringInsightsUnsubscribeResponse defines the response schema for cra/monitoring_insights/unsubscribe +/// +public record CraMonitoringInsightsUnsubscribeResponse : ResponseBase +{ +} diff --git a/src/Plaid/Cra/PlaidClient.cs b/src/Plaid/Cra/PlaidClient.cs index 9a3ce1fa..38b93608 100644 --- a/src/Plaid/Cra/PlaidClient.cs +++ b/src/Plaid/Cra/PlaidClient.cs @@ -3,20 +3,44 @@ namespace Going.Plaid; public sealed partial class PlaidClient { /// - /// This endpoint allows the customer to retrieve a Base Report. Customers should pass in the user_token created in /link/token/create. + /// This endpoint allows the customer to retrieve a Base Report. Customers should pass in the user_token created in /user/create. /// /// - public Task CraBaseReportGetAsync(Cra.BaseReportGetRequest request) => + public Task CraBaseReportGetAsync(Cra.CraBaseReportGetRequest request) => PostAsync("/cra/base_report/get", request) - .ParseResponseAsync(); + .ParseResponseAsync(); /// /// This endpoint allows the customer to create a Base Report by passing in a user token. The Base Report will be generated based on the most recently linked item from the user token. /// /// - public Task CraBaseReportCreateAsync(Cra.BaseReportCreateRequest request) => + public Task CraBaseReportCreateAsync(Cra.CraBaseReportCreateRequest request) => PostAsync("/cra/base_report/create", request) - .ParseResponseAsync(); + .ParseResponseAsync(); + + /// + /// This endpoint allows you to subscribe to insights for a user's linked CRA items, which are updated every 14 days. + /// + /// + public Task CraMonitoringInsightsSubscribeAsync(Cra.CraMonitoringInsightsSubscribeRequest request) => + PostAsync("/cra/monitoring_insights/subscribe", request) + .ParseResponseAsync(); + + /// + /// This endpoint allows you to unsubscribe from previously subscribed Monitoring Insights. + /// + /// + public Task CraMonitoringInsightsUnsubscribeAsync(Cra.CraMonitoringInsightsUnsubscribeRequest request) => + PostAsync("/cra/monitoring_insights/unsubscribe", request) + .ParseResponseAsync(); + + /// + /// This endpoint allows you to retrieve a Monitoring Insights report by passing in the user_token referred to in the webhook you received. + /// + /// + public Task CraMonitoringInsightsGetAsync(Cra.CraMonitoringInsightsGetRequest request) => + PostAsync("/cra/monitoring_insights/get", request) + .ParseResponseAsync(); /// /// /cra/bank_income/get returns the bank income report(s) for a specified user. @@ -67,7 +91,7 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// This endpoint allows you to retrieve the Partner Insights product for your user. You should call this endpoint after you've received the CHECK_REPORT_READY webhook, either after the Link session for the user or after calling /cra/check_report/create. If the most recent consumer report for the user doesn’t have sufficient data to generate the base report, or the consumer report has expired, you will receive an error indicating that you should create a new consumer report by calling /cra/check_report/create. + /// This endpoint allows you to retrieve the Partner Insights report for your user. You should call this endpoint after you've received the CHECK_REPORT_READY webhook, either after the Link session for the user or after calling /cra/check_report/create. If the most recent consumer report for the user doesn’t have sufficient data to generate the base report, or the consumer report has expired, you will receive an error indicating that you should create a new consumer report by calling /cra/check_report/create. /// If you did not initialize Link with the credit_partner_insights product or have generated a report using /cra/check_report/create, we will call our partners to generate the insights when you call this endpoint. In this case, you may optionally provide parameters under options to configure which insights you want to receive. /// /// @@ -76,13 +100,13 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// This endpoint allows you to retrieve the Network Attributes product for your user. You should call this endpoint after you've received the CHECK_REPORT_READY webhook, either after the Link session for the user or after calling /cra/check_report/create. If the most recent consumer report for the user doesn’t have sufficient data to generate the report, or the consumer report has expired, you will receive an error indicating that you should create a new consumer report by calling /cra/check_report/create. + /// This endpoint allows you to retrieve the Network Insights product for your user. You should call this endpoint after you've received the CHECK_REPORT_READY webhook, either after the Link session for the user or after calling /cra/check_report/create. If the most recent consumer report for the user doesn’t have sufficient data to generate the report, or the consumer report has expired, you will receive an error indicating that you should create a new consumer report by calling /cra/check_report/create. /// If you did not initialize Link with the cra_network_attributes product or have generated a report using /cra/check_report/create, we will generate the attributes when you call this endpoint. /// - /// - public Task CraCheckReportNetworkInsightsGetAsync(Cra.CraCheckReportNetworkAttributesGetRequest request) => + /// + public Task CraCheckReportNetworkInsightsGetAsync(Cra.CraCheckReportNetworkInsightsGetRequest request) => PostAsync("/cra/check_report/network_insights/get", request) - .ParseResponseAsync(); + .ParseResponseAsync(); /// /// /cra/loans/applications/register registers loan applications and decisions. diff --git a/src/Plaid/Credit/PlaidClient.cs b/src/Plaid/Credit/PlaidClient.cs index 9f9c4287..97525989 100644 --- a/src/Plaid/Credit/PlaidClient.cs +++ b/src/Plaid/Credit/PlaidClient.cs @@ -45,7 +45,7 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// /credit/bank_income/get returns the bank income report(s) for a specified user. + /// /credit/bank_income/get returns the bank income report(s) for a specified user. A single report corresponds to all institutions linked in a single Link session. To include multiple institutions in a single report, use Multi-Item Link. To return older reports, use the options.count field. /// /// public Task CreditBankIncomeGetAsync(Credit.CreditBankIncomeGetRequest request) => @@ -53,7 +53,7 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// /credit/bank_income/refresh refreshes the bank income report data for a specific user. + /// /credit/bank_income/refresh refreshes the most recent bank income report data for a specific user. If the most recent bank income report is no longer valid (i.e. deleted), the endpoint will refresh the most recent valid report instead. /// /// public Task CreditBankIncomeRefreshAsync(Credit.CreditBankIncomeRefreshRequest request) => diff --git a/src/Plaid/DashboardUser/DashboardUserGetResponse.cs b/src/Plaid/DashboardUser/DashboardUserGetResponse.cs index 3e932983..c229567e 100644 --- a/src/Plaid/DashboardUser/DashboardUserGetResponse.cs +++ b/src/Plaid/DashboardUser/DashboardUserGetResponse.cs @@ -18,7 +18,7 @@ public record DashboardUserGetResponse : ResponseBase public DateTimeOffset CreatedAt { get; init; } = default!; /// - /// A valid email address. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string EmailAddress { get; init; } = default!; diff --git a/src/Plaid/DashboardUser/PlaidClient.cs b/src/Plaid/DashboardUser/PlaidClient.cs index 68a57041..8f8624e1 100644 --- a/src/Plaid/DashboardUser/PlaidClient.cs +++ b/src/Plaid/DashboardUser/PlaidClient.cs @@ -5,7 +5,7 @@ public sealed partial class PlaidClient /// /// Retrieve information about a dashboard user. /// - /// + /// public Task DashboardUserGetAsync(DashboardUser.DashboardUserGetRequest request) => PostAsync("/dashboard_user/get", request) .ParseResponseAsync(); @@ -13,7 +13,7 @@ public sealed partial class PlaidClient /// /// List all dashboard users associated with your account. /// - /// + /// public Task DashboardUserListAsync(DashboardUser.DashboardUserListRequest request) => PostAsync("/dashboard_user/list", request) .ParseResponseAsync(); diff --git a/src/Plaid/Entity/Account.cs b/src/Plaid/Entity/Account.cs index 654a1f47..05debc48 100644 --- a/src/Plaid/Entity/Account.cs +++ b/src/Plaid/Entity/Account.cs @@ -69,7 +69,7 @@ public record Account public string? PersistentAccountId { get; init; } = default!; /// - /// Provides context as to whether the account is explicitly designated for business purposes in contrast to personal accounts. This label is orthogonal to existing account type/subtype labels (both “Business Checking” and “Personal Checking” would be labeled with a “depository” type and “checking” subtype) + /// Indicates the account's categorization as either a personal or a business account. This field is currently in beta; to request access, contact your account manager. /// [JsonPropertyName("holder_category")] public Entity.HolderCategory? HolderCategory { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountAssets.cs b/src/Plaid/Entity/AccountAssets.cs index fc374ad2..1b07216f 100644 --- a/src/Plaid/Entity/AccountAssets.cs +++ b/src/Plaid/Entity/AccountAssets.cs @@ -63,7 +63,7 @@ public record AccountAssets public string? PersistentAccountId { get; init; } = default!; /// - /// Provides context as to whether the account is explicitly designated for business purposes in contrast to personal accounts. This label is orthogonal to existing account type/subtype labels (both “Business Checking” and “Personal Checking” would be labeled with a “depository” type and “checking” subtype) + /// Indicates the account's categorization as either a personal or a business account. This field is currently in beta; to request access, contact your account manager. /// [JsonPropertyName("holder_category")] public Entity.HolderCategory? HolderCategory { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountIdentity.cs b/src/Plaid/Entity/AccountIdentity.cs index 95241296..00689955 100644 --- a/src/Plaid/Entity/AccountIdentity.cs +++ b/src/Plaid/Entity/AccountIdentity.cs @@ -69,7 +69,7 @@ public record AccountIdentity public string? PersistentAccountId { get; init; } = default!; /// - /// Provides context as to whether the account is explicitly designated for business purposes in contrast to personal accounts. This label is orthogonal to existing account type/subtype labels (both “Business Checking” and “Personal Checking” would be labeled with a “depository” type and “checking” subtype) + /// Indicates the account's categorization as either a personal or a business account. This field is currently in beta; to request access, contact your account manager. /// [JsonPropertyName("holder_category")] public Entity.HolderCategory? HolderCategory { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountIdentityDocumentUpload.cs b/src/Plaid/Entity/AccountIdentityDocumentUpload.cs index 7b61c7f1..c0abf8c7 100644 --- a/src/Plaid/Entity/AccountIdentityDocumentUpload.cs +++ b/src/Plaid/Entity/AccountIdentityDocumentUpload.cs @@ -69,7 +69,7 @@ public record AccountIdentityDocumentUpload public string? PersistentAccountId { get; init; } = default!; /// - /// Provides context as to whether the account is explicitly designated for business purposes in contrast to personal accounts. This label is orthogonal to existing account type/subtype labels (both “Business Checking” and “Personal Checking” would be labeled with a “depository” type and “checking” subtype) + /// Indicates the account's categorization as either a personal or a business account. This field is currently in beta; to request access, contact your account manager. /// [JsonPropertyName("holder_category")] public Entity.HolderCategory? HolderCategory { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountIdentityMatchScore.cs b/src/Plaid/Entity/AccountIdentityMatchScore.cs index 0d119ef8..36a438c1 100644 --- a/src/Plaid/Entity/AccountIdentityMatchScore.cs +++ b/src/Plaid/Entity/AccountIdentityMatchScore.cs @@ -69,7 +69,7 @@ public record AccountIdentityMatchScore public string? PersistentAccountId { get; init; } = default!; /// - /// Provides context as to whether the account is explicitly designated for business purposes in contrast to personal accounts. This label is orthogonal to existing account type/subtype labels (both “Business Checking” and “Personal Checking” would be labeled with a “depository” type and “checking” subtype) + /// Indicates the account's categorization as either a personal or a business account. This field is currently in beta; to request access, contact your account manager. /// [JsonPropertyName("holder_category")] public Entity.HolderCategory? HolderCategory { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountType.cs b/src/Plaid/Entity/AccountType.cs index e02d937f..e885f446 100644 --- a/src/Plaid/Entity/AccountType.cs +++ b/src/Plaid/Entity/AccountType.cs @@ -6,7 +6,7 @@ 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 types only), Transfer, Balance, Signal, Income, Transactions, Identity, Payment Initiation, Assets, and Investments (cash management type only). + /// 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). /// [EnumMember(Value = "depository")] Depository, @@ -18,19 +18,19 @@ public enum AccountType Credit, /// - /// A loan type account. Supported products for loan accounts are: Balance, Liabilities, Assets, and Transactions. + /// A loan type account. Supported products for loan accounts are: Balance, Liabilities (student and mortgage subtypes only), Identity. /// [EnumMember(Value = "loan")] Loan, /// - /// An investment account. Supported products for investment accounts are: Balance, Assets, and Investments. In API versions 2018-05-22 and earlier, this type is called brokerage. + /// 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. /// [EnumMember(Value = "investment")] Investment, /// - /// Other or unknown account type. Supported products for other accounts are: Balance, Transactions, Identity, and Assets. + /// Other or unknown account type. Supported products for other accounts are: Balance, Identity. /// [EnumMember(Value = "other")] Other, diff --git a/src/Plaid/Entity/AccountsBalanceGetResponsePaymentRiskAssessment.cs b/src/Plaid/Entity/AccountsBalanceGetResponsePaymentRiskAssessment.cs index d80b77b6..2b082b2e 100644 --- a/src/Plaid/Entity/AccountsBalanceGetResponsePaymentRiskAssessment.cs +++ b/src/Plaid/Entity/AccountsBalanceGetResponsePaymentRiskAssessment.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public record AccountsBalanceGetResponsePaymentRiskAssessment { /// - /// A five-tier risk assessment for the transaction, based on the probability distribution of ACH returns, + /// A five-tier risk assessment for the transaction, based on the probability distribution of ACH returns, measured by the incident rate. /// [JsonPropertyName("risk_level")] public Entity.BalancePlusRiskLevel RiskLevel { get; init; } = default!; diff --git a/src/Plaid/Entity/AssetReportCreateRequestOptions.cs b/src/Plaid/Entity/AssetReportCreateRequestOptions.cs index 7542135a..4cb1dfa5 100644 --- a/src/Plaid/Entity/AssetReportCreateRequestOptions.cs +++ b/src/Plaid/Entity/AssetReportCreateRequestOptions.cs @@ -41,4 +41,10 @@ public class AssetReportCreateRequestOptions [JsonPropertyName("user")] public Entity.AssetReportUser? User { get; set; } = default!; + /// + /// If set to false, only 1 item must be healthy at the time of report creation. The default value is true, which would require all items to be healthy at the time of report creation. + /// + [JsonPropertyName("require_all_items")] + public bool? RequireAllItems { get; set; } = default!; + } diff --git a/src/Plaid/Entity/BalancePlusRiskLevel.cs b/src/Plaid/Entity/BalancePlusRiskLevel.cs index 1e6bd19f..c4557aa5 100644 --- a/src/Plaid/Entity/BalancePlusRiskLevel.cs +++ b/src/Plaid/Entity/BalancePlusRiskLevel.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// A five-tier risk assessment for the transaction, based on the probability distribution of ACH returns, +/// A five-tier risk assessment for the transaction, based on the probability distribution of ACH returns, measured by the incident rate. /// public enum BalancePlusRiskLevel { @@ -12,7 +12,7 @@ public enum BalancePlusRiskLevel High, /// - /// The mean probability of ACH return risk is 15%-25%. + /// The mean probability of ACH return risk is 15%-40%. /// [EnumMember(Value = "MEDIUM_HIGH")] MediumHigh, diff --git a/src/Plaid/Entity/BaseReportAccount.cs b/src/Plaid/Entity/BaseReportAccount.cs index e1443179..5e2702af 100644 --- a/src/Plaid/Entity/BaseReportAccount.cs +++ b/src/Plaid/Entity/BaseReportAccount.cs @@ -19,6 +19,12 @@ public record BaseReportAccount [JsonPropertyName("balances")] public Entity.BaseReportAccountBalances Balances { get; init; } = default!; + /// + /// The information about previously submitted valid dispute statements by the consumer + /// + [JsonPropertyName("consumer_disputes")] + public IReadOnlyList ConsumerDisputes { get; init; } = default!; + /// /// The last 2-4 alphanumeric characters of an account's official account number. Note that the mask may be non-unique between an Item's accounts, and it may also not match the mask that the bank displays to the user. /// @@ -77,7 +83,7 @@ public record BaseReportAccount /// Calculated data about the historical balances on the account. Only returned by Base Report endpoints and currently not supported by brokerage or investment accounts. /// [JsonPropertyName("historical_balances")] - public IReadOnlyList? HistoricalBalances { get; init; } = default!; + public IReadOnlyList? HistoricalBalances { get; init; } = default!; /// /// Calculated insights derived from transaction-level data. diff --git a/src/Plaid/Entity/BaseReportAccountInsights.cs b/src/Plaid/Entity/BaseReportAccountInsights.cs index 3bba5696..81e472f5 100644 --- a/src/Plaid/Entity/BaseReportAccountInsights.cs +++ b/src/Plaid/Entity/BaseReportAccountInsights.cs @@ -30,35 +30,53 @@ public record BaseReportAccountInsights public decimal? AverageDaysBetweenTransactions { get; init; } = default!; /// - /// Longest gap between sequential transactions + /// Deprecated; use longest_gaps_between_transactions instead. Longest gap between sequential transactions /// [JsonPropertyName("longest_gap_between_transactions")] public IReadOnlyList? LongestGapBetweenTransactions { get; init; } = default!; /// - /// The number of debits into the account. This field will be null for non-depository accounts. + /// 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. + /// + [JsonPropertyName("longest_gaps_between_transactions")] + public IReadOnlyList? LongestGapsBetweenTransactions { get; init; } = default!; + + /// + /// The number of debits into the account. This array will be empty for non-depository accounts. /// [JsonPropertyName("number_of_inflows")] public IReadOnlyList? NumberOfInflows { get; init; } = default!; /// - /// Average amount of debit transactions into account. This field will be null for non-depository accounts. This field only takes into account USD transactions from the account. + /// Deprecated; use average_inflow_amounts instead. Average amount of debit transactions into the account. This array will be empty for non-depository accounts. This field only takes into account USD transactions from the account. /// [JsonPropertyName("average_inflow_amount")] public IReadOnlyList? AverageInflowAmount { get; init; } = default!; /// - /// The number of credit into the account. This field will be null for non-depository accounts. + /// 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. + /// + [JsonPropertyName("average_inflow_amounts")] + public IReadOnlyList? AverageInflowAmounts { get; init; } = default!; + + /// + /// The number of outflows from the account. This array will be empty for non-depository accounts. /// [JsonPropertyName("number_of_outflows")] public IReadOnlyList? NumberOfOutflows { get; init; } = default!; /// - /// Average amount of credit transactions into account. This field will be null for non-depository accounts. This field only takes into account USD transactions from the account. + /// Deprecated; use average_outflow_amounts instead. Average amount of transactions out of the account. This array will be empty for non-depository accounts. This field only takes into account USD transactions from the account. /// [JsonPropertyName("average_outflow_amount")] 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. + /// + [JsonPropertyName("average_outflow_amounts")] + public IReadOnlyList? AverageOutflowAmounts { get; init; } = default!; + /// /// Number of days with no transactions /// diff --git a/src/Plaid/Entity/BaseReportAverageFlowInsights.cs b/src/Plaid/Entity/BaseReportAverageFlowInsights.cs index 84b18fbc..4708546c 100644 --- a/src/Plaid/Entity/BaseReportAverageFlowInsights.cs +++ b/src/Plaid/Entity/BaseReportAverageFlowInsights.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// Average dollar amount of credit or debit transactions out of the account. This field will only added for depository accounts +/// Average dollar amount of credit or debit transactions out of the account. This field will only be included for depository accounts. /// public record BaseReportAverageFlowInsights { @@ -10,19 +10,19 @@ public record BaseReportAverageFlowInsights /// The date will be returned in an ISO 8601 format (YYYY-MM-DD). /// [JsonPropertyName("start_date")] - public DateOnly? StartDate { get; init; } = default!; + public DateOnly StartDate { get; init; } = default!; /// /// The end date of this time period. /// The date will be returned in an ISO 8601 format (YYYY-MM-DD). /// [JsonPropertyName("end_date")] - public DateOnly? EndDate { get; init; } = default!; + public DateOnly EndDate { get; init; } = default!; /// /// This contains an amount, denominated in the currency specified by either iso_currency_code or unofficial_currency_code /// [JsonPropertyName("total_amount")] - public Entity.CreditAmountWithCurrency? TotalAmount { get; init; } = default!; + public Entity.CreditAmountWithCurrency TotalAmount { get; init; } = default!; } diff --git a/src/Plaid/Entity/BaseReportAverageMonthlyBalances.cs b/src/Plaid/Entity/BaseReportAverageMonthlyBalances.cs index 0b2f37b9..98943993 100644 --- a/src/Plaid/Entity/BaseReportAverageMonthlyBalances.cs +++ b/src/Plaid/Entity/BaseReportAverageMonthlyBalances.cs @@ -10,19 +10,19 @@ public record BaseReportAverageMonthlyBalances /// The date will be returned in an ISO 8601 format (YYYY-MM-DD). /// [JsonPropertyName("start_date")] - public DateOnly? StartDate { get; init; } = default!; + public DateOnly StartDate { get; init; } = default!; /// /// The end date of this time period. /// The date will be returned in an ISO 8601 format (YYYY-MM-DD). /// [JsonPropertyName("end_date")] - public DateOnly? EndDate { get; init; } = default!; + public DateOnly EndDate { get; init; } = default!; /// /// This contains an amount, denominated in the currency specified by either iso_currency_code or unofficial_currency_code /// [JsonPropertyName("average_balance")] - public Entity.CreditAmountWithCurrency? AverageBalance { get; init; } = default!; + public Entity.CreditAmountWithCurrency AverageBalance { get; init; } = default!; } diff --git a/src/Plaid/Entity/BaseReportHistoricalBalance.cs b/src/Plaid/Entity/BaseReportHistoricalBalance.cs new file mode 100644 index 00000000..44a9a0ec --- /dev/null +++ b/src/Plaid/Entity/BaseReportHistoricalBalance.cs @@ -0,0 +1,34 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing a balance held by an account in the past +/// +public record BaseReportHistoricalBalance +{ + /// + /// The date of the calculated historical balance, in an ISO 8601 format (YYYY-MM-DD) + /// + [JsonPropertyName("date")] + public DateOnly Date { get; init; } = default!; + + /// + /// The total amount of funds in the account, calculated from the current balance in the balance object by subtracting inflows and adding back outflows according to the posted date of each transaction. + /// If the account has any pending transactions, historical balance amounts on or after the date of the earliest pending transaction may differ if retrieved in subsequent Asset Reports as a result of those pending transactions posting. + /// + [JsonPropertyName("current")] + public decimal Current { get; init; } = default!; + + /// + /// The ISO-4217 currency code of the balance. Always null if unofficial_currency_code is non-null. + /// + [JsonPropertyName("iso_currency_code")] + public string? IsoCurrencyCode { get; init; } = default!; + + /// + /// The unofficial currency code associated with the balance. Always null if iso_currency_code is non-null. + /// See the currency code schema for a full listing of supported unofficial_currency_codes. + /// + [JsonPropertyName("unofficial_currency_code")] + public string? UnofficialCurrencyCode { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/BaseReportNumberFlowInsights.cs b/src/Plaid/Entity/BaseReportNumberFlowInsights.cs index 4076a22a..0b8b9897 100644 --- a/src/Plaid/Entity/BaseReportNumberFlowInsights.cs +++ b/src/Plaid/Entity/BaseReportNumberFlowInsights.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The number of credits or debits out of the account. This field will only added for depository accounts +/// The number of credits or debits out of the account. This field will only be included for depository accounts. /// public record BaseReportNumberFlowInsights { @@ -10,19 +10,19 @@ public record BaseReportNumberFlowInsights /// The date will be returned in an ISO 8601 format (YYYY-MM-DD). /// [JsonPropertyName("start_date")] - public DateOnly? StartDate { get; init; } = default!; + public DateOnly StartDate { get; init; } = default!; /// /// The end date of this time period. /// The date will be returned in an ISO 8601 format (YYYY-MM-DD). /// [JsonPropertyName("end_date")] - public DateOnly? EndDate { get; init; } = default!; + public DateOnly EndDate { get; init; } = default!; /// /// The number of credits or debits out of the account for this time period. /// [JsonPropertyName("count")] - public int? Count { get; init; } = default!; + public int Count { get; init; } = default!; } diff --git a/src/Plaid/Entity/BaseReportTransaction.cs b/src/Plaid/Entity/BaseReportTransaction.cs index 159bf7e1..8933cfd1 100644 --- a/src/Plaid/Entity/BaseReportTransaction.cs +++ b/src/Plaid/Entity/BaseReportTransaction.cs @@ -107,6 +107,6 @@ public record BaseReportTransaction /// The ID of the category to which this transaction belongs. For a full list of categories, see /categories/get. /// [JsonPropertyName("category_id")] - public Entity.BaseReportTransactionCategoryIdObject? CategoryId { get; init; } = default!; + public string? CategoryId { get; init; } = default!; } diff --git a/src/Plaid/Entity/BaseReportTransactionCategoryIdObject.cs b/src/Plaid/Entity/BaseReportTransactionCategoryIdObject.cs deleted file mode 100644 index 1f9bac41..00000000 --- a/src/Plaid/Entity/BaseReportTransactionCategoryIdObject.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Going.Plaid.Entity; - -/// -/// The ID of the category to which this transaction belongs. For a full list of categories, see /categories/get. -/// -public record BaseReportTransactionCategoryIdObject -{ -} diff --git a/src/Plaid/Entity/BeaconReport.cs b/src/Plaid/Entity/BeaconReport.cs index ec229753..846f25c7 100644 --- a/src/Plaid/Entity/BeaconReport.cs +++ b/src/Plaid/Entity/BeaconReport.cs @@ -36,7 +36,13 @@ public record BeaconReport /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). /// [JsonPropertyName("fraud_date")] - public DateOnly FraudDate { get; init; } = default!; + public DateOnly? FraudDate { get; init; } = default!; + + /// + /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). + /// + [JsonPropertyName("event_date")] + public DateOnly EventDate { get; init; } = default!; /// /// The amount and currency of the fraud or attempted fraud. diff --git a/src/Plaid/Entity/BeaconReportCreateType.cs b/src/Plaid/Entity/BeaconReportCreateType.cs new file mode 100644 index 00000000..14c26b81 --- /dev/null +++ b/src/Plaid/Entity/BeaconReportCreateType.cs @@ -0,0 +1,50 @@ +namespace Going.Plaid.Entity; + +/// +/// The type of Beacon Report. +/// +public enum BeaconReportCreateType +{ + /// + /// If this is the same individual as the one who submitted the KYC. + /// + [EnumMember(Value = "first_party")] + FirstParty, + + /// + /// If this is a different individual from the one who submitted the KYC. + /// + [EnumMember(Value = "stolen")] + Stolen, + + /// + /// If this is an individual using fabricated information. + /// + [EnumMember(Value = "synthetic")] + Synthetic, + + /// + /// If this individual's account was compromised. + /// + [EnumMember(Value = "account_takeover")] + AccountTakeover, + + /// + /// + /// + [EnumMember(Value = "data_breach")] + DataBreach, + + /// + /// If you aren't sure who committed the fraud. + /// + [EnumMember(Value = "unknown")] + Unknown, + + /// + /// 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/BeaconReportSyndicationAnalysis.cs b/src/Plaid/Entity/BeaconReportSyndicationAnalysis.cs index 915a40eb..4e0b7a1c 100644 --- a/src/Plaid/Entity/BeaconReportSyndicationAnalysis.cs +++ b/src/Plaid/Entity/BeaconReportSyndicationAnalysis.cs @@ -47,4 +47,10 @@ public record BeaconReportSyndicationAnalysis [JsonPropertyName("phone_number")] public Entity.BeaconMatchSummaryCode PhoneNumber { get; init; } = default!; + /// + /// + /// + [JsonPropertyName("depository_accounts")] + public IReadOnlyList DepositoryAccounts { get; init; } = default!; + } diff --git a/src/Plaid/Entity/BeaconReportSyndicationOriginalReport.cs b/src/Plaid/Entity/BeaconReportSyndicationOriginalReport.cs index 9b1591b5..052536db 100644 --- a/src/Plaid/Entity/BeaconReportSyndicationOriginalReport.cs +++ b/src/Plaid/Entity/BeaconReportSyndicationOriginalReport.cs @@ -28,6 +28,12 @@ public record BeaconReportSyndicationOriginalReport /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). /// [JsonPropertyName("fraud_date")] - public DateOnly FraudDate { get; init; } = default!; + public DateOnly? FraudDate { get; init; } = default!; + + /// + /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). + /// + [JsonPropertyName("event_date")] + public DateOnly EventDate { get; init; } = default!; } diff --git a/src/Plaid/Entity/BeaconReportType.cs b/src/Plaid/Entity/BeaconReportType.cs index 8049ba13..792b7fea 100644 --- a/src/Plaid/Entity/BeaconReportType.cs +++ b/src/Plaid/Entity/BeaconReportType.cs @@ -29,6 +29,12 @@ public enum BeaconReportType [EnumMember(Value = "account_takeover")] AccountTakeover, + /// + /// If this individual's data was compromised in a breach. + /// + [EnumMember(Value = "data_breach")] + DataBreach, + /// /// If you aren't sure who committed the fraud. /// diff --git a/src/Plaid/Entity/BeaconSyndicatedReportDepositoryAccountMatchAnalysis.cs b/src/Plaid/Entity/BeaconSyndicatedReportDepositoryAccountMatchAnalysis.cs new file mode 100644 index 00000000..043dbe44 --- /dev/null +++ b/src/Plaid/Entity/BeaconSyndicatedReportDepositoryAccountMatchAnalysis.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// Analysis of whether this account matched between the originally reported Beacon User and the Beacon User that the report syndicated to. +/// +public record BeaconSyndicatedReportDepositoryAccountMatchAnalysis +{ + /// + /// The last 2-4 numeric characters of this account’s account number. + /// + [JsonPropertyName("account_mask")] + public string AccountMask { get; init; } = default!; + + /// + /// The routing number of the account. + /// + [JsonPropertyName("routing_number")] + public string RoutingNumber { get; init; } = default!; + + /// + /// An enum indicating the match type between two Beacon Users. + /// + [JsonPropertyName("match_status")] + public Entity.BeaconMatchSummaryCode MatchStatus { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/BeaconUserAddress.cs b/src/Plaid/Entity/BeaconUserAddress.cs index 66a87c3a..f1e6d303 100644 --- a/src/Plaid/Entity/BeaconUserAddress.cs +++ b/src/Plaid/Entity/BeaconUserAddress.cs @@ -14,7 +14,7 @@ public record BeaconUserAddress public string Street { get; init; } = 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 20 characters. + /// 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; init; } = default!; diff --git a/src/Plaid/Entity/BeaconUserData.cs b/src/Plaid/Entity/BeaconUserData.cs index 6f32ce6a..2ed9d314 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. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; init; } = default!; @@ -49,4 +49,10 @@ public record BeaconUserData [JsonPropertyName("ip_address")] public string? IpAddress { get; init; } = default!; + /// + /// + /// + [JsonPropertyName("depository_accounts")] + public IReadOnlyList DepositoryAccounts { get; init; } = default!; + } diff --git a/src/Plaid/Entity/BeaconUserDepositoryAccount.cs b/src/Plaid/Entity/BeaconUserDepositoryAccount.cs new file mode 100644 index 00000000..0232f858 --- /dev/null +++ b/src/Plaid/Entity/BeaconUserDepositoryAccount.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// Depository account information for the associated user. +/// +public record BeaconUserDepositoryAccount +{ + /// + /// The last 2-4 numeric characters of this account’s account number. + /// + [JsonPropertyName("account_mask")] + public string AccountMask { get; init; } = default!; + + /// + /// The routing number of the account. + /// + [JsonPropertyName("routing_number")] + public string RoutingNumber { get; init; } = default!; + + /// + /// An ISO8601 formatted timestamp. + /// + [JsonPropertyName("added_at")] + public DateTimeOffset AddedAt { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/BeaconUserRequestAddress.cs b/src/Plaid/Entity/BeaconUserRequestAddress.cs index 94aed70e..5bc7a32a 100644 --- a/src/Plaid/Entity/BeaconUserRequestAddress.cs +++ b/src/Plaid/Entity/BeaconUserRequestAddress.cs @@ -12,7 +12,7 @@ public class BeaconUserRequestAddress 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 20 characters. + /// 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/BeaconUserRequestData.cs b/src/Plaid/Entity/BeaconUserRequestData.cs index 50985d9c..fec096f6 100644 --- a/src/Plaid/Entity/BeaconUserRequestData.cs +++ b/src/Plaid/Entity/BeaconUserRequestData.cs @@ -2,6 +2,7 @@ namespace Going.Plaid.Entity; /// /// A Beacon User's data which is used to check against duplicate records and the Beacon Fraud Network. +/// In order to create a Beacon User, in addition to the name, _either_ the date_of_birth _or_ the depository_accounts field must be provided. /// public class BeaconUserRequestData { @@ -9,7 +10,7 @@ public class BeaconUserRequestData /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). /// [JsonPropertyName("date_of_birth")] - public DateOnly DateOfBirth { get; set; } = default!; + public DateOnly? DateOfBirth { get; set; } = default!; /// /// The full name for a given Beacon User. @@ -24,7 +25,7 @@ public class BeaconUserRequestData public Entity.BeaconUserRequestAddress? Address { get; set; } = default!; /// - /// A valid email address. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; @@ -47,4 +48,11 @@ public class BeaconUserRequestData [JsonPropertyName("ip_address")] public string? IpAddress { get; set; } = default!; + /// + /// Provide a list of bank accounts that are associated with this Beacon User. These accounts will be scanned across the Beacon Network and used to find duplicate records. + /// Note: These accounts will not have Bank Account Insights. To receive Bank Account Insights please supply access_tokens. + /// + [JsonPropertyName("depository_accounts")] + public IReadOnlyList? DepositoryAccounts { get; set; } = default!; + } diff --git a/src/Plaid/Entity/BeaconUserRequestDepositoryAccount.cs b/src/Plaid/Entity/BeaconUserRequestDepositoryAccount.cs new file mode 100644 index 00000000..2fbad9b6 --- /dev/null +++ b/src/Plaid/Entity/BeaconUserRequestDepositoryAccount.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// Depository account information for the associated user. +/// +public class BeaconUserRequestDepositoryAccount +{ + /// + /// Must be a valid US Bank Account Number + /// + [JsonPropertyName("account_number")] + public string AccountNumber { get; set; } = default!; + + /// + /// The routing number of the account. + /// + [JsonPropertyName("routing_number")] + public string RoutingNumber { get; set; } = default!; + +} diff --git a/src/Plaid/Entity/BeaconUserUpdateRequestData.cs b/src/Plaid/Entity/BeaconUserUpdateRequestData.cs index 3ef902da..6f08a4cf 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. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; @@ -47,4 +47,10 @@ public class BeaconUserUpdateRequestData [JsonPropertyName("ip_address")] public string? IpAddress { get; set; } = default!; + /// + /// + /// + [JsonPropertyName("depository_accounts")] + public IReadOnlyList? DepositoryAccounts { get; set; } = default!; + } diff --git a/src/Plaid/Entity/CashflowAttributesVersion.cs b/src/Plaid/Entity/CashflowAttributesVersion.cs new file mode 100644 index 00000000..591c628b --- /dev/null +++ b/src/Plaid/Entity/CashflowAttributesVersion.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// The versions of cashflow attributes +/// +public enum CashflowAttributesVersion +{ + /// + /// + /// + [EnumMember(Value = "v1.0")] + V10, + + /// + /// 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/ConsumerDispute.cs b/src/Plaid/Entity/ConsumerDispute.cs new file mode 100644 index 00000000..8a883601 --- /dev/null +++ b/src/Plaid/Entity/ConsumerDispute.cs @@ -0,0 +1,32 @@ +namespace Going.Plaid.Entity; + +/// +/// The information about a previously submitted valid dispute statement by the consumer +/// +public record ConsumerDispute +{ + /// + /// A unique identifier (UUID) of the consumer dispute that can be used for troubleshooting + /// + [JsonPropertyName("consumer_dispute_id")] + public string ConsumerDisputeId { get; init; } = default!; + + /// + /// Date of the disputed field (e.g. transaction date), in an ISO 8601 format (YYYY-MM-DD) + /// + [JsonPropertyName("dispute_field_create_date")] + public DateOnly DisputeFieldCreateDate { get; init; } = default!; + + /// + /// Type of data being disputed by the consumer + /// + [JsonPropertyName("category")] + public Entity.ConsumerReportCategory Category { get; init; } = default!; + + /// + /// Text content of dispute + /// + [JsonPropertyName("statement")] + public string Statement { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/ConsumerReportCategory.cs b/src/Plaid/Entity/ConsumerReportCategory.cs new file mode 100644 index 00000000..9c62232c --- /dev/null +++ b/src/Plaid/Entity/ConsumerReportCategory.cs @@ -0,0 +1,38 @@ +namespace Going.Plaid.Entity; + +/// +/// Type of data being disputed by the consumer +/// +public enum ConsumerReportCategory +{ + /// + /// + /// + [EnumMember(Value = "TRANSACTION")] + Transaction, + + /// + /// + /// + [EnumMember(Value = "BALANCE")] + Balance, + + /// + /// + /// + [EnumMember(Value = "IDENTITY")] + Identity, + + /// + /// + /// + [EnumMember(Value = "OTHER")] + Other, + + /// + /// 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/ConsumerReportUserIdentity.cs b/src/Plaid/Entity/ConsumerReportUserIdentity.cs index 0032142d..9094aee4 100644 --- a/src/Plaid/Entity/ConsumerReportUserIdentity.cs +++ b/src/Plaid/Entity/ConsumerReportUserIdentity.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// This object defines the user identity data collected for consumer report purposes. This field is required if you are planning on using the user token with Plaid Check products. +/// 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. /// public class ConsumerReportUserIdentity { @@ -18,7 +18,7 @@ public class ConsumerReportUserIdentity public string LastName { get; set; } = default!; /// - /// The user's phone numbers. The format of phone number will be validated and for better normalization, it is expected to be in E.164 format +{countrycode}{number}, for example +14151234567. + /// The user's phone number, in E.164 format: +{countrycode}{number}. For example: "+14157452130". Phone numbers provided in other formats will be parsed on a best-effort basis. Phone number input is validated against valid number ranges; number strings that do not match a real-world phone numbering scheme may cause the request to fail, even in the Sandbox test environment. /// [JsonPropertyName("phone_numbers")] public IReadOnlyList PhoneNumbers { get; set; } = default!; diff --git a/src/Plaid/Entity/CraBankIncome.cs b/src/Plaid/Entity/CraBankIncome.cs index 06abf206..9af65a09 100644 --- a/src/Plaid/Entity/CraBankIncome.cs +++ b/src/Plaid/Entity/CraBankIncome.cs @@ -1,24 +1,24 @@ namespace Going.Plaid.Entity; /// -/// The report of the Bank Income data for an end user. +/// The report of the Plaid Check Income Insights data for an end user. /// public record CraBankIncome { /// - /// The unique identifier associated with the Bank Income Report. + /// The unique identifier associated with the report. /// [JsonPropertyName("bank_income_id")] public string? BankIncomeId { get; init; } = default!; /// - /// The time when the Bank Income Report was generated. + /// The time when the report was generated. /// [JsonPropertyName("generated_time")] public DateTimeOffset? GeneratedTime { get; init; } = default!; /// - /// The number of days requested by the customer for the Bank Income Report. + /// The number of days requested by the customer for the report. /// [JsonPropertyName("days_requested")] public int? DaysRequested { get; init; } = default!; @@ -30,13 +30,13 @@ public record CraBankIncome public IReadOnlyList? Items { get; init; } = default!; /// - /// Summary for bank income across all income sources and items (max history of 730 days). + /// Summary for income across all income sources and items (max history of 730 days). /// [JsonPropertyName("bank_income_summary")] public Entity.CraBankIncomeSummary? BankIncomeSummary { get; init; } = default!; /// - /// If data from the Bank Income report was unable to be retrieved, the warnings will contain information about the error that caused the data to be incomplete. + /// If data from the report was unable to be retrieved, the warnings object will contain information about the error that caused the data to be incomplete. /// [JsonPropertyName("warnings")] public IReadOnlyList? Warnings { get; init; } = default!; diff --git a/src/Plaid/Entity/CraBankIncomeItem.cs b/src/Plaid/Entity/CraBankIncomeItem.cs index 34115888..d73c5643 100644 --- a/src/Plaid/Entity/CraBankIncomeItem.cs +++ b/src/Plaid/Entity/CraBankIncomeItem.cs @@ -12,7 +12,7 @@ public record CraBankIncomeItem public string? ItemId { get; init; } = default!; /// - /// The Item's accounts that have Bank Income data. + /// The Item's accounts that have bank income data. /// [JsonPropertyName("bank_income_accounts")] public IReadOnlyList BankIncomeAccounts { get; init; } = default!; diff --git a/src/Plaid/Entity/CraBankIncomeSummary.cs b/src/Plaid/Entity/CraBankIncomeSummary.cs index a49b6275..3145b288 100644 --- a/src/Plaid/Entity/CraBankIncomeSummary.cs +++ b/src/Plaid/Entity/CraBankIncomeSummary.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// Summary for bank income across all income sources and items (max history of 730 days). +/// Summary for income across all income sources and items (max history of 730 days). /// public record CraBankIncomeSummary { diff --git a/src/Plaid/Entity/CraBankIncomeTransaction.cs b/src/Plaid/Entity/CraBankIncomeTransaction.cs index 8bbf2b8e..7f726cbd 100644 --- a/src/Plaid/Entity/CraBankIncomeTransaction.cs +++ b/src/Plaid/Entity/CraBankIncomeTransaction.cs @@ -9,7 +9,7 @@ public record CraBankIncomeTransaction /// The unique ID of the transaction. Like all Plaid identifiers, the transaction_id is case sensitive. /// [JsonPropertyName("transaction_id")] - public string? TransactionId { get; init; } = default!; + public string TransactionId { get; init; } = default!; /// /// The settled value of the transaction, denominated in the transaction's currency as stated in iso_currency_code or unofficial_currency_code. @@ -17,14 +17,14 @@ public record CraBankIncomeTransaction /// For example, credit card purchases are positive; credit card payment, direct deposits, and refunds are negative. /// [JsonPropertyName("amount")] - public decimal? Amount { get; init; } = default!; + public decimal Amount { get; init; } = default!; /// /// For pending transactions, the date that the transaction occurred; for posted transactions, the date that the transaction posted. /// Both dates are returned in an ISO 8601 format (YYYY-MM-DD). /// [JsonPropertyName("date")] - public DateOnly? Date { get; init; } = default!; + public DateOnly Date { get; init; } = default!; /// /// The merchant name or transaction description. @@ -43,7 +43,7 @@ public record CraBankIncomeTransaction /// Pending transaction details (name, type, amount, category ID) may change before they are settled. /// [JsonPropertyName("pending")] - public bool? Pending { get; init; } = default!; + public bool Pending { get; init; } = default!; /// /// The check number of the transaction. This field is only populated for check transactions. diff --git a/src/Plaid/Entity/CraBankIncomeWarning.cs b/src/Plaid/Entity/CraBankIncomeWarning.cs index b7087294..0a5990d5 100644 --- a/src/Plaid/Entity/CraBankIncomeWarning.cs +++ b/src/Plaid/Entity/CraBankIncomeWarning.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The warning associated with the data that was unavailable for the Bank Income Report. +/// The warning associated with the data that was unavailable. /// public record CraBankIncomeWarning { diff --git a/src/Plaid/Entity/CraCheckReportPartnerInsightsGetOptions.cs b/src/Plaid/Entity/CraCheckReportPartnerInsightsGetOptions.cs index 73fe3b39..16a71615 100644 --- a/src/Plaid/Entity/CraCheckReportPartnerInsightsGetOptions.cs +++ b/src/Plaid/Entity/CraCheckReportPartnerInsightsGetOptions.cs @@ -11,4 +11,10 @@ public class CraCheckReportPartnerInsightsGetOptions [JsonPropertyName("prism_products")] public IReadOnlyList? PrismProducts { get; set; } = default!; + /// + /// The versions of Prism products to evaluate + /// + [JsonPropertyName("prism_versions")] + public Entity.PrismVersions? PrismVersions { get; set; } = default!; + } diff --git a/src/Plaid/Entity/CraIncomeInsights.cs b/src/Plaid/Entity/CraIncomeInsights.cs index c6ede206..9505442e 100644 --- a/src/Plaid/Entity/CraIncomeInsights.cs +++ b/src/Plaid/Entity/CraIncomeInsights.cs @@ -1,24 +1,24 @@ namespace Going.Plaid.Entity; /// -/// The report of the Bank Income data for an end user. +/// The Check Income Insights Report for an end user. /// public record CraIncomeInsights { /// - /// The unique identifier associated with the Bank Income Report. + /// The unique identifier associated with the Check Income Insights Report. /// [JsonPropertyName("report_id")] public string? ReportId { get; init; } = default!; /// - /// The time when the Bank Income Report was generated. + /// The time when the Check Income Insights Report was generated. /// [JsonPropertyName("generated_time")] public DateTimeOffset? GeneratedTime { get; init; } = default!; /// - /// The number of days requested by the customer for the Bank Income Report. + /// The number of days requested by the customer for the Check Income Insights Report. /// [JsonPropertyName("days_requested")] public int? DaysRequested { get; init; } = default!; @@ -30,13 +30,13 @@ public record CraIncomeInsights public IReadOnlyList? Items { get; init; } = default!; /// - /// Summary for bank income across all income sources and items (max history of 730 days). + /// Summary for income across all income sources and items (max history of 730 days). /// [JsonPropertyName("bank_income_summary")] public Entity.CraBankIncomeSummary? BankIncomeSummary { get; init; } = default!; /// - /// If data from the Bank Income report was unable to be retrieved, the warnings will contain information about the error that caused the data to be incomplete. + /// If data from the report was unable to be retrieved, the warnings object will contain information about the error that caused the data to be incomplete. /// [JsonPropertyName("warnings")] public IReadOnlyList? Warnings { get; init; } = default!; diff --git a/src/Plaid/Entity/CraMonitoringInsightsItem.cs b/src/Plaid/Entity/CraMonitoringInsightsItem.cs new file mode 100644 index 00000000..738022c3 --- /dev/null +++ b/src/Plaid/Entity/CraMonitoringInsightsItem.cs @@ -0,0 +1,32 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing a Monitoring Insights Item +/// +public record CraMonitoringInsightsItem +{ + /// + /// The date and time when the specific insights were generated (per-item), in ISO 8601 format (e.g. "2018-04-12T03:32:11Z"). + /// + [JsonPropertyName("date_generated")] + public DateTimeOffset DateGenerated { get; init; } = default!; + + /// + /// The item_id of the Item associated with the insights + /// + [JsonPropertyName("item_id")] + public string ItemId { get; init; } = default!; + + /// + /// An object representing the status of the Monitoring Insights Item and potential reasons in case of non-available statuses + /// + [JsonPropertyName("status")] + public Entity.MonitoringInsightsItemStatus Status { get; init; } = default!; + + /// + /// An object representing the Monitoring Insights for the given Item + /// + [JsonPropertyName("insights")] + public Entity.MonitoringInsights Insights { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/CraNetworkAttributesItem.cs b/src/Plaid/Entity/CraNetworkInsightsItem.cs similarity index 94% rename from src/Plaid/Entity/CraNetworkAttributesItem.cs rename to src/Plaid/Entity/CraNetworkInsightsItem.cs index 16b90cab..1419ff44 100644 --- a/src/Plaid/Entity/CraNetworkAttributesItem.cs +++ b/src/Plaid/Entity/CraNetworkInsightsItem.cs @@ -3,7 +3,7 @@ namespace Going.Plaid.Entity; /// /// Contains data about the connected Item. /// -public record CraNetworkAttributesItem +public record CraNetworkInsightsItem { /// /// The ID for the institution the user linked. diff --git a/src/Plaid/Entity/CraNetworkAttributesReport.cs b/src/Plaid/Entity/CraNetworkInsightsReport.cs similarity index 80% rename from src/Plaid/Entity/CraNetworkAttributesReport.cs rename to src/Plaid/Entity/CraNetworkInsightsReport.cs index 166473d5..7713e47b 100644 --- a/src/Plaid/Entity/CraNetworkAttributesReport.cs +++ b/src/Plaid/Entity/CraNetworkInsightsReport.cs @@ -3,7 +3,7 @@ namespace Going.Plaid.Entity; /// /// Contains data for the CRA Network Attributes Report. /// -public record CraNetworkAttributesReport +public record CraNetworkInsightsReport { /// /// The unique identifier associated with the Network Attributes report object. @@ -21,12 +21,12 @@ public record CraNetworkAttributesReport /// A map of network attributes, where the key is a string, and the value is a float, int, or boolean. /// [JsonPropertyName("network_attributes")] - public Entity.NetworkAttributes NetworkAttributes { get; init; } = default!; + public Entity.NetworkInsights NetworkAttributes { get; init; } = default!; /// /// The Items the end user connected in Link. /// [JsonPropertyName("items")] - public IReadOnlyList Items { get; init; } = default!; + public IReadOnlyList Items { get; init; } = default!; } diff --git a/src/Plaid/Entity/CreditAmountWithCurrency.cs b/src/Plaid/Entity/CreditAmountWithCurrency.cs index 647fd436..bfb834fb 100644 --- a/src/Plaid/Entity/CreditAmountWithCurrency.cs +++ b/src/Plaid/Entity/CreditAmountWithCurrency.cs @@ -9,7 +9,7 @@ public record CreditAmountWithCurrency /// Value of amount with up to 2 decimal places. /// [JsonPropertyName("amount")] - public decimal? Amount { get; init; } = default!; + public decimal Amount { get; init; } = default!; /// /// The ISO 4217 currency code of the amount or balance. diff --git a/src/Plaid/Entity/CreditBankIncome.cs b/src/Plaid/Entity/CreditBankIncome.cs index 1effa005..779e13fc 100644 --- a/src/Plaid/Entity/CreditBankIncome.cs +++ b/src/Plaid/Entity/CreditBankIncome.cs @@ -12,13 +12,13 @@ public record CreditBankIncome public string? BankIncomeId { get; init; } = default!; /// - /// The time when the Bank Income Report was generated. + /// The time when the report was generated. /// [JsonPropertyName("generated_time")] public DateTimeOffset? GeneratedTime { get; init; } = default!; /// - /// The number of days requested by the customer for the Bank Income Report. + /// The number of days requested by the customer for the report. /// [JsonPropertyName("days_requested")] public int? DaysRequested { get; init; } = default!; @@ -36,7 +36,7 @@ public record CreditBankIncome public Entity.CreditBankIncomeSummary? BankIncomeSummary { get; init; } = default!; /// - /// If data from the Bank Income report was unable to be retrieved, the warnings will contain information about the error that caused the data to be incomplete. + /// If data from the report was unable to be retrieved, the warnings will contain information about the error that caused the data to be incomplete. /// [JsonPropertyName("warnings")] public IReadOnlyList? Warnings { get; init; } = default!; diff --git a/src/Plaid/Entity/DashboardUser.cs b/src/Plaid/Entity/DashboardUser.cs index 14664fd7..645dbec9 100644 --- a/src/Plaid/Entity/DashboardUser.cs +++ b/src/Plaid/Entity/DashboardUser.cs @@ -18,7 +18,7 @@ public record DashboardUser public DateTimeOffset CreatedAt { get; init; } = default!; /// - /// A valid email address. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string EmailAddress { get; init; } = default!; diff --git a/src/Plaid/Entity/EntityDocument.cs b/src/Plaid/Entity/EntityDocument.cs index cca63d41..2b3a8159 100644 --- a/src/Plaid/Entity/EntityDocument.cs +++ b/src/Plaid/Entity/EntityDocument.cs @@ -12,7 +12,7 @@ public record EntityDocument public Entity.EntityDocumentType Type { get; init; } = default!; /// - /// The numeric or alphanumeric identifier associated with this document. + /// The numeric or alphanumeric identifier associated with this document. Must be between 4 and 32 characters long, and cannot have leading or trailing spaces. /// [JsonPropertyName("number")] public string Number { get; init; } = default!; diff --git a/src/Plaid/Entity/EntityScreeningHitEmails.cs b/src/Plaid/Entity/EntityScreeningHitEmails.cs index 63328b30..241feae7 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. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string EmailAddress { get; init; } = default!; diff --git a/src/Plaid/Entity/EntityWatchlistScreeningSearchTerms.cs b/src/Plaid/Entity/EntityWatchlistScreeningSearchTerms.cs index 583fe143..467d9440 100644 --- a/src/Plaid/Entity/EntityWatchlistScreeningSearchTerms.cs +++ b/src/Plaid/Entity/EntityWatchlistScreeningSearchTerms.cs @@ -12,19 +12,19 @@ public record EntityWatchlistScreeningSearchTerms public string EntityWatchlistProgramId { get; init; } = default!; /// - /// The name of the organization being screened. + /// The name of the organization being screened. Must have at least one alphabetical character, have a maximum length of 100 characters, and not include leading or trailing spaces. /// [JsonPropertyName("legal_name")] public string LegalName { get; init; } = default!; /// - /// The numeric or alphanumeric identifier associated with this document. + /// The numeric or alphanumeric identifier associated with this document. Must be between 4 and 32 characters long, and cannot have leading or trailing spaces. /// [JsonPropertyName("document_number")] public string? DocumentNumber { get; init; } = default!; /// - /// A valid email address. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; init; } = default!; diff --git a/src/Plaid/Entity/EntityWatchlistSearchTerms.cs b/src/Plaid/Entity/EntityWatchlistSearchTerms.cs index 1dd32724..e6fdc87b 100644 --- a/src/Plaid/Entity/EntityWatchlistSearchTerms.cs +++ b/src/Plaid/Entity/EntityWatchlistSearchTerms.cs @@ -12,19 +12,19 @@ public class EntityWatchlistSearchTerms public string EntityWatchlistProgramId { get; set; } = default!; /// - /// The name of the organization being screened. + /// The name of the organization being screened. Must have at least one alphabetical character, have a maximum length of 100 characters, and not include leading or trailing spaces. /// [JsonPropertyName("legal_name")] public string LegalName { get; set; } = default!; /// - /// The numeric or alphanumeric identifier associated with this document. + /// The numeric or alphanumeric identifier associated with this document. Must be between 4 and 32 characters long, and cannot have leading or trailing spaces. /// [JsonPropertyName("document_number")] public string? DocumentNumber { get; set; } = default!; /// - /// A valid email address. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; diff --git a/src/Plaid/Entity/ForecastedMonthlyIncome.cs b/src/Plaid/Entity/ForecastedMonthlyIncome.cs new file mode 100644 index 00000000..6ddeda38 --- /dev/null +++ b/src/Plaid/Entity/ForecastedMonthlyIncome.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing the predicted average monthly net income amount. This amount reflects the funds deposited into the account and may not include any withheld income such as taxes or other payroll deductions +/// +public record ForecastedMonthlyIncome +{ + /// + /// The forecasted monthly income at the time of subscription + /// + [JsonPropertyName("baseline_amount")] + public decimal BaselineAmount { get; init; } = default!; + + /// + /// The current forecasted monthly income + /// + [JsonPropertyName("current_amount")] + public decimal CurrentAmount { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/HolderCategory.cs b/src/Plaid/Entity/HolderCategory.cs index 83fa99d0..ba86c8b3 100644 --- a/src/Plaid/Entity/HolderCategory.cs +++ b/src/Plaid/Entity/HolderCategory.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// Provides context as to whether the account is explicitly designated for business purposes in contrast to personal accounts. This label is orthogonal to existing account type/subtype labels (both “Business Checking” and “Personal Checking” would be labeled with a “depository” type and “checking” subtype) +/// Indicates the account's categorization as either a personal or a business account. This field is currently in beta; to request access, contact your account manager. /// public enum HolderCategory { diff --git a/src/Plaid/Entity/IdentityMatchUser.cs b/src/Plaid/Entity/IdentityMatchUser.cs index 33eefe04..ddbd4390 100644 --- a/src/Plaid/Entity/IdentityMatchUser.cs +++ b/src/Plaid/Entity/IdentityMatchUser.cs @@ -12,7 +12,7 @@ public class IdentityMatchUser public string? LegalName { get; set; } = default!; /// - /// The user's phone number, in E.164 format: +{countrycode}{number}. For example: "+14151234567". Phone numbers provided in other formats will be parsed on a best-effort basis. + /// The user's phone number, in E.164 format: +{countrycode}{number}. For example: "+14157452130". Phone numbers provided in other formats will be parsed on a best-effort basis. Phone number input is validated against valid number ranges; number strings that do not match a real-world phone numbering scheme may cause the request to fail, even in the Sandbox test environment. /// [JsonPropertyName("phone_number")] public string? PhoneNumber { get; set; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationAutofillAddress.cs b/src/Plaid/Entity/IdentityVerificationAutofillAddress.cs index edf15226..9e0dabec 100644 --- a/src/Plaid/Entity/IdentityVerificationAutofillAddress.cs +++ b/src/Plaid/Entity/IdentityVerificationAutofillAddress.cs @@ -14,7 +14,7 @@ public record IdentityVerificationAutofillAddress public string Street { get; init; } = 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 20 characters. + /// 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; init; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs b/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs index 3f1e9201..ccd4f09f 100644 --- a/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs +++ b/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs @@ -16,13 +16,13 @@ namespace Going.Plaid.Entity; public class IdentityVerificationCreateRequestUser { /// - /// A valid email address. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; /// - /// A phone number in E.164 format. + /// A valid phone number in E.164 format. /// [JsonPropertyName("phone_number")] public string? PhoneNumber { get; set; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationDocumentNameResponse.cs b/src/Plaid/Entity/IdentityVerificationDocumentNameResponse.cs new file mode 100644 index 00000000..0b549eb5 --- /dev/null +++ b/src/Plaid/Entity/IdentityVerificationDocumentNameResponse.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// The individual's name extracted from the document. +/// +public record IdentityVerificationDocumentNameResponse +{ + /// + /// A string with at least one non-whitespace character, with a max length of 100 characters. + /// + [JsonPropertyName("given_name")] + public string GivenName { get; init; } = default!; + + /// + /// A string with at least one non-whitespace character, with a max length of 100 characters. + /// + [JsonPropertyName("family_name")] + public string FamilyName { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/IdentityVerificationRequestUser.cs b/src/Plaid/Entity/IdentityVerificationRequestUser.cs index 39421583..670300b4 100644 --- a/src/Plaid/Entity/IdentityVerificationRequestUser.cs +++ b/src/Plaid/Entity/IdentityVerificationRequestUser.cs @@ -15,13 +15,13 @@ namespace Going.Plaid.Entity; public class IdentityVerificationRequestUser { /// - /// A valid email address. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; /// - /// A phone number in E.164 format. + /// A valid phone number in E.164 format. /// [JsonPropertyName("phone_number")] public string? PhoneNumber { get; set; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationUserAddress.cs b/src/Plaid/Entity/IdentityVerificationUserAddress.cs index 157c23d5..74c1de8f 100644 --- a/src/Plaid/Entity/IdentityVerificationUserAddress.cs +++ b/src/Plaid/Entity/IdentityVerificationUserAddress.cs @@ -14,7 +14,7 @@ public record IdentityVerificationUserAddress public string? Street { get; init; } = 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 20 characters. + /// 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; init; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationUserData.cs b/src/Plaid/Entity/IdentityVerificationUserData.cs index 77bf945e..b6692b74 100644 --- a/src/Plaid/Entity/IdentityVerificationUserData.cs +++ b/src/Plaid/Entity/IdentityVerificationUserData.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public record IdentityVerificationUserData { /// - /// A phone number in E.164 format. + /// A valid phone number in E.164 format. /// [JsonPropertyName("phone_number")] public string? PhoneNumber { get; init; } = default!; @@ -24,7 +24,7 @@ public record IdentityVerificationUserData public string? IpAddress { get; init; } = default!; /// - /// A valid email address. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; init; } = default!; diff --git a/src/Plaid/Entity/IncomeSourcesCounts.cs b/src/Plaid/Entity/IncomeSourcesCounts.cs new file mode 100644 index 00000000..008233bf --- /dev/null +++ b/src/Plaid/Entity/IncomeSourcesCounts.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing insights about the number of income sources +/// +public record IncomeSourcesCounts +{ + /// + /// The number of income sources detected at the subscription date + /// + [JsonPropertyName("baseline_count")] + public decimal BaselineCount { get; init; } = default!; + + /// + /// The number of income sources currently detected + /// + [JsonPropertyName("current_count")] + public decimal CurrentCount { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/InvestmentsTransactionsGetRequestOptions.cs b/src/Plaid/Entity/InvestmentsTransactionsGetRequestOptions.cs index 200bdeaf..7453ccdf 100644 --- a/src/Plaid/Entity/InvestmentsTransactionsGetRequestOptions.cs +++ b/src/Plaid/Entity/InvestmentsTransactionsGetRequestOptions.cs @@ -24,7 +24,7 @@ public class InvestmentsTransactionsGetRequestOptions public int? Offset { get; set; } = default!; /// - /// If the Item was not initialized with the investments product via the products array when calling /link/token/create, and async_update is set to true, the initial Investments extraction will happen asynchronously. Plaid will subsequently fire a HISTORICAL_UPDATE webhook when the extraction completes. When false, Plaid will wait to return a response until extraction completion and no HISTORICAL_UPDATE webhook will fire. Note that while the extraction is happening asynchronously, calls to /investments/transactions/get and /investments/refresh will return PRODUCT_NOT_READY errors until the extraction completes. + /// If the Item was not initialized with the investments product via the products, required_if_supported_products, or optional_products array when calling /link/token/create, and async_update is set to true, the initial Investments extraction will happen asynchronously. Plaid will subsequently fire a HISTORICAL_UPDATE webhook when the extraction completes. When false, Plaid will wait to return a response until extraction completion and no HISTORICAL_UPDATE webhook will fire. Note that while the extraction is happening asynchronously, calls to /investments/transactions/get and /investments/refresh will return PRODUCT_NOT_READY errors until the extraction completes. /// [JsonPropertyName("async_update")] public bool? AsyncUpdate { get; set; } = default!; diff --git a/src/Plaid/Entity/KYCCheckAddressSummary.cs b/src/Plaid/Entity/KYCCheckAddressSummary.cs index 99302f4a..0cadf5f7 100644 --- a/src/Plaid/Entity/KYCCheckAddressSummary.cs +++ b/src/Plaid/Entity/KYCCheckAddressSummary.cs @@ -23,4 +23,34 @@ public record KYCCheckAddressSummary [JsonPropertyName("type")] public Entity.AddressPurposeLabel Type { get; init; } = default!; + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("street")] + public Entity.MatchSummaryCode? Street { get; init; } = default!; + + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("city")] + public Entity.MatchSummaryCode? City { get; init; } = default!; + + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("region")] + public Entity.MatchSummaryCode? Region { get; init; } = default!; + + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("postal_code")] + public Entity.MatchSummaryCode? PostalCode { get; init; } = default!; + + /// + /// Result summary object specifying how the address field matched for fields that are only present on an international KYC check. + /// + [JsonPropertyName("international_details")] + public Entity.KYCCheckDetailsInternationalAddress? InternationalDetails { get; init; } = default!; + } diff --git a/src/Plaid/Entity/KYCCheckDateOfBirthSummary.cs b/src/Plaid/Entity/KYCCheckDateOfBirthSummary.cs index 91863eae..b379a2b1 100644 --- a/src/Plaid/Entity/KYCCheckDateOfBirthSummary.cs +++ b/src/Plaid/Entity/KYCCheckDateOfBirthSummary.cs @@ -11,4 +11,22 @@ public record KYCCheckDateOfBirthSummary [JsonPropertyName("summary")] public Entity.MatchSummaryCode Summary { get; init; } = default!; + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("day")] + public Entity.MatchSummaryCode? Day { get; init; } = default!; + + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("month")] + public Entity.MatchSummaryCode? Month { get; init; } = default!; + + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("year")] + public Entity.MatchSummaryCode? Year { get; init; } = default!; + } diff --git a/src/Plaid/Entity/KYCCheckDetailsInternationalAddress.cs b/src/Plaid/Entity/KYCCheckDetailsInternationalAddress.cs new file mode 100644 index 00000000..f589b1fd --- /dev/null +++ b/src/Plaid/Entity/KYCCheckDetailsInternationalAddress.cs @@ -0,0 +1,44 @@ +namespace Going.Plaid.Entity; + +/// +/// Result summary object specifying how the address field matched for fields that are only present on an international KYC check. +/// +public record KYCCheckDetailsInternationalAddress +{ + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("building")] + public Entity.MatchSummaryCode Building { get; init; } = default!; + + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("county")] + public Entity.MatchSummaryCode County { get; init; } = default!; + + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("district")] + public Entity.MatchSummaryCode District { get; init; } = default!; + + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("house_number")] + public Entity.MatchSummaryCode HouseNumber { get; init; } = default!; + + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("subpremise")] + public Entity.MatchSummaryCode Subpremise { get; init; } = default!; + + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("thoroughfare")] + public Entity.MatchSummaryCode Thoroughfare { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/KYCCheckNameSummary.cs b/src/Plaid/Entity/KYCCheckNameSummary.cs index d3a49b1c..25c8bb8b 100644 --- a/src/Plaid/Entity/KYCCheckNameSummary.cs +++ b/src/Plaid/Entity/KYCCheckNameSummary.cs @@ -11,4 +11,16 @@ public record KYCCheckNameSummary [JsonPropertyName("summary")] public Entity.MatchSummaryCode Summary { get; init; } = default!; + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("given_name")] + public Entity.MatchSummaryCode? GivenName { get; init; } = default!; + + /// + /// An enum indicating the match type between data provided by user and data checked against an external data source. + /// + [JsonPropertyName("family_name")] + public Entity.MatchSummaryCode? FamilyName { get; init; } = default!; + } diff --git a/src/Plaid/Entity/LinkEventName.cs b/src/Plaid/Entity/LinkEventName.cs index 8bfbe1e4..189e3a92 100644 --- a/src/Plaid/Entity/LinkEventName.cs +++ b/src/Plaid/Entity/LinkEventName.cs @@ -41,6 +41,12 @@ public enum LinkEventName [EnumMember(Value = "HANDOFF")] Handoff, + /// + /// + /// + [EnumMember(Value = "ISSUE_FOLLOWED")] + IssueFollowed, + /// /// /// diff --git a/src/Plaid/Entity/LinkSessionCraItemAddResult.cs b/src/Plaid/Entity/LinkSessionCraItemAddResult.cs new file mode 100644 index 00000000..003f4425 --- /dev/null +++ b/src/Plaid/Entity/LinkSessionCraItemAddResult.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// The details of a Plaid Check Item add in Link. +/// +public record LinkSessionCraItemAddResult +{ + /// + /// The Plaid Check 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. The item_id is case-sensitive. + /// + [JsonPropertyName("item_id")] + public string ItemId { get; init; } = default!; + + /// + /// A list of accounts attached to the connected Item. If Account Select is enabled via the developer dashboard, accounts will only include selected accounts. + /// + [JsonPropertyName("accounts")] + public IReadOnlyList Accounts { get; init; } = default!; + + /// + /// An institution object. If the Item was created via Same-Day or Instant micro-deposit verification, will be null. + /// + [JsonPropertyName("institution")] + public Entity.LinkSessionSuccessMetadataInstitution? Institution { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/LinkSessionExitDeprecated.cs b/src/Plaid/Entity/LinkSessionExitDeprecated.cs index 91441938..5b428540 100644 --- a/src/Plaid/Entity/LinkSessionExitDeprecated.cs +++ b/src/Plaid/Entity/LinkSessionExitDeprecated.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// An object representing an onExit callback from Link. +/// An object representing an onExit callback from Link. This field has been deprecated in favor of exit, for improved naming consistency. /// public record LinkSessionExitDeprecated { diff --git a/src/Plaid/Entity/LinkSessionResults.cs b/src/Plaid/Entity/LinkSessionResults.cs index 076ad977..0ea0dfab 100644 --- a/src/Plaid/Entity/LinkSessionResults.cs +++ b/src/Plaid/Entity/LinkSessionResults.cs @@ -11,6 +11,12 @@ public record LinkSessionResults [JsonPropertyName("item_add_results")] 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!; + /// /// The set of bank income verifications for the Link session. /// diff --git a/src/Plaid/Entity/LinkSessionSuccess.cs b/src/Plaid/Entity/LinkSessionSuccess.cs index 28384df2..3b4457b6 100644 --- a/src/Plaid/Entity/LinkSessionSuccess.cs +++ b/src/Plaid/Entity/LinkSessionSuccess.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// An object representing an onSuccess callback from Link. +/// An object representing an onSuccess callback from Link. This object has been deprecated in favor of the newer results.item_add_result, which can support multiple public tokens in a single Link session. /// public record LinkSessionSuccess { diff --git a/src/Plaid/Entity/LinkTokenCreateHostedLink.cs b/src/Plaid/Entity/LinkTokenCreateHostedLink.cs index 20b22ec4..186ec3d9 100644 --- a/src/Plaid/Entity/LinkTokenCreateHostedLink.cs +++ b/src/Plaid/Entity/LinkTokenCreateHostedLink.cs @@ -18,7 +18,7 @@ public class LinkTokenCreateHostedLink public string? CompletionRedirectUri { get; set; } = default!; /// - /// How many seconds the link will be valid for. Must be positive. Cannot be longer than 21 days. The default lifetime is 4 hours. + /// How many seconds the link will be valid for. Must be positive. Cannot be longer than 21 days. The default lifetime is 7 days for links delivered by email, 1 day for links delivered via SMS, and 30 minutes for links not sent via Plaid Link delivery. This parameter will override the value of all three link types. /// [JsonPropertyName("url_lifetime_seconds")] public int? UrlLifetimeSeconds { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenCreateRequestCraOptions.cs b/src/Plaid/Entity/LinkTokenCreateRequestCraOptions.cs index c44558f6..9a87313b 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 maximum integer number of days of history to include in Plaid Check products + /// 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. /// [JsonPropertyName("days_requested")] public int DaysRequested { get; set; } = default!; @@ -23,4 +23,10 @@ public class LinkTokenCreateRequestCraOptions [JsonPropertyName("base_report")] public Entity.LinkTokenCreateRequestCraOptionsBaseReport? BaseReport { get; set; } = default!; + /// + /// Specifies options for initializing Link for use with the Cashflow Insights product. + /// + [JsonPropertyName("cashflow_insights")] + public Entity.LinkTokenCreateRequestCraOptionsCashflowInsights? CashflowInsights { get; set; } = default!; + } diff --git a/src/Plaid/Entity/LinkTokenCreateRequestCraOptionsCashflowInsights.cs b/src/Plaid/Entity/LinkTokenCreateRequestCraOptionsCashflowInsights.cs new file mode 100644 index 00000000..bf3167d9 --- /dev/null +++ b/src/Plaid/Entity/LinkTokenCreateRequestCraOptionsCashflowInsights.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// Specifies options for initializing Link for use with the Cashflow Insights product. +/// +public class LinkTokenCreateRequestCraOptionsCashflowInsights +{ + /// + /// The version of the Plaid Check score to return + /// + [JsonPropertyName("plaid_check_score_version")] + public string? PlaidCheckScoreVersion { get; set; } = default!; + + /// + /// The versions of cashflow attributes + /// + [JsonPropertyName("attributes_version")] + public Entity.CashflowAttributesVersion? AttributesVersion { get; set; } = default!; + +} diff --git a/src/Plaid/Entity/LinkTokenCreateRequestCraOptionsPartnerInsights.cs b/src/Plaid/Entity/LinkTokenCreateRequestCraOptionsPartnerInsights.cs index 6610ac3f..3f541add 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestCraOptionsPartnerInsights.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestCraOptionsPartnerInsights.cs @@ -11,4 +11,10 @@ public class LinkTokenCreateRequestCraOptionsPartnerInsights [JsonPropertyName("prism_products")] public IReadOnlyList? PrismProducts { get; set; } = default!; + /// + /// The versions of Prism products to evaluate + /// + [JsonPropertyName("prism_versions")] + public Entity.PrismVersions? PrismVersions { get; set; } = default!; + } diff --git a/src/Plaid/Entity/LinkTokenCreateRequestCreditPartnerInsights.cs b/src/Plaid/Entity/LinkTokenCreateRequestCreditPartnerInsights.cs index 9dff804e..be0eec56 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestCreditPartnerInsights.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestCreditPartnerInsights.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public class LinkTokenCreateRequestCreditPartnerInsights { /// - /// The maximum integer number of days of history to compute Crdit Partner Insights. Defaults to 180 if not specified + /// The maximum integer number of days of history to compute Credit Partner Insights. Defaults to 180 if not specified /// [JsonPropertyName("days_requested")] public int? DaysRequested { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenCreateRequestIncomeVerification.cs b/src/Plaid/Entity/LinkTokenCreateRequestIncomeVerification.cs index 80e2249d..af5736d0 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestIncomeVerification.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestIncomeVerification.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public class LinkTokenCreateRequestIncomeVerification { /// - /// The income_verification_id of the verification instance, as provided by /income/verification/create. + /// The income_verification_id of the verification instance, as provided by /income/verification/create. Replaced by the user token. /// [JsonPropertyName("income_verification_id")] public string? IncomeVerificationId { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenCreateRequestIncomeVerificationBankIncome.cs b/src/Plaid/Entity/LinkTokenCreateRequestIncomeVerificationBankIncome.cs index c0e96f88..d63e51a1 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestIncomeVerificationBankIncome.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestIncomeVerificationBankIncome.cs @@ -12,7 +12,7 @@ public class LinkTokenCreateRequestIncomeVerificationBankIncome public int DaysRequested { get; set; } = default!; /// - /// Whether to enable multiple Items to be added in the Link session + /// Whether to enable multiple Items to be added in the Link session. This setting is deprecated and has been replaced by the more general enable_multi_item_link setting, which supports all products. /// [JsonPropertyName("enable_multiple_items")] public bool? EnableMultipleItems { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenCreateRequestStatements.cs b/src/Plaid/Entity/LinkTokenCreateRequestStatements.cs index 2a195263..6f624cb7 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestStatements.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestStatements.cs @@ -6,13 +6,13 @@ namespace Going.Plaid.Entity; public class LinkTokenCreateRequestStatements { /// - /// The start date for statements, in ISO 8601 “YYYY-MM-DD” format, e.g. "2020-10-30". + /// The start date for statements, in ISO 8601 "YYYY-MM-DD" format, e.g. "2020-10-30". /// [JsonPropertyName("start_date")] public DateOnly StartDate { get; set; } = default!; /// - /// The end date for statements, in ISO 8601 “YYYY-MM-DD” format, e.g. "2020-10-30". You can request up to two years of data. + /// The end date for statements, in ISO 8601 "YYYY-MM-DD" format, e.g. "2020-10-30". You can request up to two years of data. /// [JsonPropertyName("end_date")] public DateOnly EndDate { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenCreateRequestUpdate.cs b/src/Plaid/Entity/LinkTokenCreateRequestUpdate.cs index a624dea1..cd6c751e 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestUpdate.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestUpdate.cs @@ -11,10 +11,22 @@ public class LinkTokenCreateRequestUpdate [JsonPropertyName("account_selection_enabled")] public bool? AccountSelectionEnabled { get; set; } = default!; + /// + /// By default, Plaid will enable the reauthorization flow during update mode for an Item enabled for Data Transparency Messaging if the Item expires within six months. During a reauthorization flow, an end user will review Plaid's end user privacy policy, use case and data scope consents, and account access consents; they may also be required to log in to their financial institution's OAuth flow. After the end user successfully completes the reauthorization flow, the Item's expiration date will be extended to 12 months from the time that the reauthorization took place. This field allows you to optionally override the default reauthorization scheduling logic to either forcibly enable or disable the reauthorization flow for a given update mode session. This field does not impact the flow for Items at institutions in the EU or UK. + /// + [JsonPropertyName("reauthorization_enabled")] + public bool? ReauthorizationEnabled { get; set; } = default!; + /// /// If true, a user_token must also be provided, and Link will open in update mode for the given user. /// [JsonPropertyName("user")] public bool? User { get; set; } = default!; + /// + /// An array of item_ids associated with the user to be updated in update mode. If empty or null, this field will default to initializing update mode for the most recent unhealthy Item associated with the user. A user_token must also be provided to use this field. + /// + [JsonPropertyName("item_ids")] + public IReadOnlyList? ItemIds { get; set; } = default!; + } diff --git a/src/Plaid/Entity/LinkTokenCreateRequestUserAddressObject.cs b/src/Plaid/Entity/LinkTokenCreateRequestUserAddressObject.cs index 26b9e1cd..9197930b 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestUserAddressObject.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestUserAddressObject.cs @@ -12,7 +12,7 @@ public class LinkTokenCreateRequestUserAddressObject 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 20 characters. + /// 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/LinkTokenGetSessionsResponse.cs b/src/Plaid/Entity/LinkTokenGetSessionsResponse.cs index dae79ec1..96cc881a 100644 --- a/src/Plaid/Entity/LinkTokenGetSessionsResponse.cs +++ b/src/Plaid/Entity/LinkTokenGetSessionsResponse.cs @@ -24,13 +24,13 @@ public record LinkTokenGetSessionsResponse public DateTimeOffset? FinishedAt { get; init; } = default!; /// - /// An object representing an onSuccess callback from Link. + /// An object representing an onSuccess callback from Link. This object has been deprecated in favor of the newer results.item_add_result, which can support multiple public tokens in a single Link session. /// [JsonPropertyName("on_success")] public Entity.LinkSessionSuccess? OnSuccess { get; init; } = default!; /// - /// An object representing an onExit callback from Link. + /// An object representing an onExit callback from Link. This field has been deprecated in favor of exit, for improved naming consistency. /// [JsonPropertyName("on_exit")] public Entity.LinkSessionExitDeprecated? OnExit { get; init; } = default!; diff --git a/src/Plaid/Entity/LinkTokenInvestmentsAuth.cs b/src/Plaid/Entity/LinkTokenInvestmentsAuth.cs index 5a3f9c47..6754fbe0 100644 --- a/src/Plaid/Entity/LinkTokenInvestmentsAuth.cs +++ b/src/Plaid/Entity/LinkTokenInvestmentsAuth.cs @@ -17,4 +17,10 @@ public class LinkTokenInvestmentsAuth [JsonPropertyName("masked_number_match_enabled")] public bool? MaskedNumberMatchEnabled { get; set; } = default!; + /// + /// If true, show institutions that use the stated account number fallback flow. + /// + [JsonPropertyName("stated_account_number_enabled")] + public bool? StatedAccountNumberEnabled { get; set; } = default!; + } diff --git a/src/Plaid/Entity/LinkTokenTransactions.cs b/src/Plaid/Entity/LinkTokenTransactions.cs index 13a8c673..d2c52d4b 100644 --- a/src/Plaid/Entity/LinkTokenTransactions.cs +++ b/src/Plaid/Entity/LinkTokenTransactions.cs @@ -6,8 +6,8 @@ namespace Going.Plaid.Entity; public class LinkTokenTransactions { /// - /// The maximum number of days of transaction history to request for the Transactions product. For developer accounts created after December 3, 2023, if no value is specified, this will default to 90 days. For developer accounts created on December 3, 2023 or earlier, if no value is specified, this will default to 730 days until June 24, 2024, at which point it will default to 90 days. - /// We strongly recommend that customers utilizing Recurring Transactions request at least 180 days of history for optimal results. + /// The maximum number of days of transaction history to request for the Transactions product. The more transaction history is requested, the longer the historical update poll will take. The default value is 90 days. If a value under 30 is provided, a minimum of 30 days of history will be requested. Once Transactions has been added to an Item, this value cannot be updated. + /// Customers using Recurring Transactions should request at least 180 days of history for optimal results. /// [JsonPropertyName("days_requested")] public int? DaysRequested { get; set; } = default!; diff --git a/src/Plaid/Entity/LoanPaymentsCounts.cs b/src/Plaid/Entity/LoanPaymentsCounts.cs new file mode 100644 index 00000000..5a0e6f16 --- /dev/null +++ b/src/Plaid/Entity/LoanPaymentsCounts.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing the insights in the number of loan payments +/// +public record LoanPaymentsCounts +{ + /// + /// The number of loan payments made in the 30 days before the subscription date + /// + [JsonPropertyName("baseline_count")] + public decimal BaselineCount { get; init; } = default!; + + /// + /// The current number of loan payments made in the last 30 days + /// + [JsonPropertyName("current_count")] + public decimal CurrentCount { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/LoanPaymentsMerchantCounts.cs b/src/Plaid/Entity/LoanPaymentsMerchantCounts.cs new file mode 100644 index 00000000..a9b8632b --- /dev/null +++ b/src/Plaid/Entity/LoanPaymentsMerchantCounts.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing the insights in the number of unique loan payment merchants +/// +public record LoanPaymentsMerchantCounts +{ + /// + /// The number of unique loan payment merchants detected in the 30 days before the subscription date + /// + [JsonPropertyName("baseline_count")] + public decimal BaselineCount { get; init; } = default!; + + /// + /// The current number of unique loan payment merchants detected in the last 30 days + /// + [JsonPropertyName("current_count")] + public decimal CurrentCount { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/MonitoringIncomeInsights.cs b/src/Plaid/Entity/MonitoringIncomeInsights.cs new file mode 100644 index 00000000..8c840dfc --- /dev/null +++ b/src/Plaid/Entity/MonitoringIncomeInsights.cs @@ -0,0 +1,32 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing the income subcategory of the report +/// +public record MonitoringIncomeInsights +{ + /// + /// An object representing the insights about the total monthly income + /// + [JsonPropertyName("total_monthly_income")] + public Entity.TotalMonthlyIncomeInsights TotalMonthlyIncome { get; init; } = default!; + + /// + /// An object representing insights about the number of income sources + /// + [JsonPropertyName("income_sources_counts")] + public Entity.IncomeSourcesCounts IncomeSourcesCounts { get; init; } = default!; + + /// + /// An object representing the predicted average monthly net income amount. This amount reflects the funds deposited into the account and may not include any withheld income such as taxes or other payroll deductions + /// + [JsonPropertyName("forecasted_monthly_income")] + public Entity.ForecastedMonthlyIncome ForecastedMonthlyIncome { get; init; } = default!; + + /// + /// The income sources for this Item. Each entry in the array is a single income source + /// + [JsonPropertyName("income_sources")] + public IReadOnlyList IncomeSources { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/MonitoringIncomeSource.cs b/src/Plaid/Entity/MonitoringIncomeSource.cs new file mode 100644 index 00000000..a41dae89 --- /dev/null +++ b/src/Plaid/Entity/MonitoringIncomeSource.cs @@ -0,0 +1,38 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing an income source +/// +public record MonitoringIncomeSource +{ + /// + /// A unique identifier for an income source + /// + [JsonPropertyName("income_source_id")] + public string IncomeSourceId { get; init; } = default!; + + /// + /// The most common name or original description for the underlying income transactions + /// + [JsonPropertyName("income_description")] + 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). + /// + [JsonPropertyName("income_category")] + public Entity.CreditBankIncomeCategory IncomeCategory { get; init; } = default!; + + /// + /// The last detected transaction date for this income source + /// + [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/MonitoringInsights.cs b/src/Plaid/Entity/MonitoringInsights.cs new file mode 100644 index 00000000..efc64c9a --- /dev/null +++ b/src/Plaid/Entity/MonitoringInsights.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing the Monitoring Insights for the given Item +/// +public record MonitoringInsights +{ + /// + /// An object representing the income subcategory of the report + /// + [JsonPropertyName("income")] + public Entity.MonitoringIncomeInsights Income { get; init; } = default!; + + /// + /// An object representing the loan exposure subcategory of the report + /// + [JsonPropertyName("loans")] + public Entity.MonitoringLoanInsights Loans { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/MonitoringInsightsItemStatus.cs b/src/Plaid/Entity/MonitoringInsightsItemStatus.cs new file mode 100644 index 00000000..9bf195d6 --- /dev/null +++ b/src/Plaid/Entity/MonitoringInsightsItemStatus.cs @@ -0,0 +1,21 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing the status of the Monitoring Insights Item and potential reasons in case of non-available statuses +/// +public record MonitoringInsightsItemStatus +{ + /// + /// Enum for the status of the Item's insights + /// + [JsonPropertyName("status_code")] + public Entity.MonitoringItemStatusCode StatusCode { get; init; } = default!; + + /// + /// A reason for why a Monitoring Insights Report is not available. + /// This field will only be populated when the status_code is not AVAILABLE + /// + [JsonPropertyName("reason")] + public string? Reason { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/MonitoringItemStatusCode.cs b/src/Plaid/Entity/MonitoringItemStatusCode.cs new file mode 100644 index 00000000..15843493 --- /dev/null +++ b/src/Plaid/Entity/MonitoringItemStatusCode.cs @@ -0,0 +1,38 @@ +namespace Going.Plaid.Entity; + +/// +/// Enum for the status of the Item's insights +/// +public enum MonitoringItemStatusCode +{ + /// + /// + /// + [EnumMember(Value = "AVAILABLE")] + Available, + + /// + /// + /// + [EnumMember(Value = "PENDING")] + Pending, + + /// + /// + /// + [EnumMember(Value = "ITEM_NOT_SUPPORTED")] + ItemNotSupported, + + /// + /// + /// + [EnumMember(Value = "ITEM_LOGIN_REQUIRED")] + ItemLoginRequired, + + /// + /// 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/MonitoringLoanInsights.cs b/src/Plaid/Entity/MonitoringLoanInsights.cs new file mode 100644 index 00000000..e3d55cae --- /dev/null +++ b/src/Plaid/Entity/MonitoringLoanInsights.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing the loan exposure subcategory of the report +/// +public record MonitoringLoanInsights +{ + /// + /// An object representing the insights in the number of loan payments + /// + [JsonPropertyName("loan_payments_counts")] + public Entity.LoanPaymentsCounts LoanPaymentsCounts { get; init; } = default!; + + /// + /// The number of loan disbursements detected in the last 30 days + /// + [JsonPropertyName("loan_disbursements_count")] + public decimal LoanDisbursementsCount { get; init; } = default!; + + /// + /// An object representing the insights in the number of unique loan payment merchants + /// + [JsonPropertyName("loan_payment_merchants_counts")] + public Entity.LoanPaymentsMerchantCounts LoanPaymentMerchantsCounts { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/NameMatchScore.cs b/src/Plaid/Entity/NameMatchScore.cs index 1b128492..7cd42e45 100644 --- a/src/Plaid/Entity/NameMatchScore.cs +++ b/src/Plaid/Entity/NameMatchScore.cs @@ -24,7 +24,7 @@ public record NameMatchScore public bool? IsNicknameMatch { get; init; } = default!; /// - /// Is true if the name on either of the names that was matched for the score contained strings indicative of a business name, such as "CORP", "LLC", "INC", or "LTD". A true result generally indicates the entity is a business. However, a false result does not mean the entity is not a business, as some businesses do not use these strings in the names used for their financial institution accounts. + /// Is true if the name on either of the names that was matched for the score contained strings indicative of a business name, such as "CORP", "LLC", "INC", or "LTD". A true result generally indicates that an account's name is a business name. However, a false result does not mean the account name is not a business name, as some businesses do not use these strings in the names used for their financial institution accounts. /// [JsonPropertyName("is_business_name_detected")] public bool? IsBusinessNameDetected { get; init; } = default!; diff --git a/src/Plaid/Entity/NetworkAttributes.cs b/src/Plaid/Entity/NetworkInsights.cs similarity index 84% rename from src/Plaid/Entity/NetworkAttributes.cs rename to src/Plaid/Entity/NetworkInsights.cs index 0a3a9d0b..1660e31c 100644 --- a/src/Plaid/Entity/NetworkAttributes.cs +++ b/src/Plaid/Entity/NetworkInsights.cs @@ -3,6 +3,6 @@ namespace Going.Plaid.Entity; /// /// A map of network attributes, where the key is a string, and the value is a float, int, or boolean. /// -public record NetworkAttributes +public record NetworkInsights { } diff --git a/src/Plaid/Entity/NetworkInsightsItem.cs b/src/Plaid/Entity/NetworkInsightsItem.cs new file mode 100644 index 00000000..4e872b36 --- /dev/null +++ b/src/Plaid/Entity/NetworkInsightsItem.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// Contains data about the connected Item. +/// +public record NetworkInsightsItem +{ + /// + /// The ID for the institution the user linked. + /// + [JsonPropertyName("institution_id")] + public string InstitutionId { get; init; } = default!; + + /// + /// The name of the institution the user linked. + /// + [JsonPropertyName("institution_name")] + public string InstitutionName { get; init; } = default!; + + /// + /// The identifier for the Item. + /// + [JsonPropertyName("item_id")] + public string ItemId { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/NetworkInsightsReport.cs b/src/Plaid/Entity/NetworkInsightsReport.cs new file mode 100644 index 00000000..d2089cdd --- /dev/null +++ b/src/Plaid/Entity/NetworkInsightsReport.cs @@ -0,0 +1,32 @@ +namespace Going.Plaid.Entity; + +/// +/// Contains data for the Network Insights Report. +/// +public record NetworkInsightsReport +{ + /// + /// The unique identifier associated with the Network Insights report object. + /// + [JsonPropertyName("report_id")] + public string ReportId { get; init; } = default!; + + /// + /// The time when the Network Insights Report was generated. + /// + [JsonPropertyName("generated_time")] + public DateTimeOffset GeneratedTime { get; init; } = default!; + + /// + /// A map of network attributes, where the key is a string, and the value is a float, int, or boolean. + /// + [JsonPropertyName("network_attributes")] + public Entity.NetworkInsights NetworkAttributes { get; init; } = default!; + + /// + /// A list of Items associated with the provided access_tokens. + /// + [JsonPropertyName("items")] + public IReadOnlyList Items { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/NumbersAch.cs b/src/Plaid/Entity/NumbersAch.cs index c8f1b1fb..efd6fa53 100644 --- a/src/Plaid/Entity/NumbersAch.cs +++ b/src/Plaid/Entity/NumbersAch.cs @@ -13,7 +13,7 @@ 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. 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. + /// 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. /// [JsonPropertyName("account")] public string Account { get; init; } = default!; diff --git a/src/Plaid/Entity/PSLFStatus.cs b/src/Plaid/Entity/PSLFStatus.cs index 3018a411..0f93fe1b 100644 --- a/src/Plaid/Entity/PSLFStatus.cs +++ b/src/Plaid/Entity/PSLFStatus.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// Information about the student's eligibility in the Public Service Loan Forgiveness program. This is only returned if the institution is FedLoan (ins_116527). +/// Information about the student's eligibility in the Public Service Loan Forgiveness program. This is only returned if the institution is FedLoan (ins_116527). Since FedLoan no longer services student loans, this field is no longer returned. /// public record PSLFStatus { diff --git a/src/Plaid/Entity/PendingDisconnectWebhookReason.cs b/src/Plaid/Entity/PendingDisconnectWebhookReason.cs new file mode 100644 index 00000000..51f7c0bb --- /dev/null +++ b/src/Plaid/Entity/PendingDisconnectWebhookReason.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// Reason why the item is about to be disconnected. +/// +public enum PendingDisconnectWebhookReason +{ + /// + /// When an institution migrates to API or a different integration, the PENDING_DISCONNECT webhook will be fired 7 days before the existing Item is scheduled for disconnection. It is recommended to send all Items associated with a given institution through update mode if any Item triggers a PENDING_DISCONNECT webhook with a reason of INSTITUTION_MIGRATION. + /// + [EnumMember(Value = "INSTITUTION_MIGRATION")] + InstitutionMigration, + + /// + /// 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/PhysicalDocumentExtractedData.cs b/src/Plaid/Entity/PhysicalDocumentExtractedData.cs index 7d3fd582..97602ae6 100644 --- a/src/Plaid/Entity/PhysicalDocumentExtractedData.cs +++ b/src/Plaid/Entity/PhysicalDocumentExtractedData.cs @@ -51,4 +51,10 @@ public record PhysicalDocumentExtractedData [JsonPropertyName("address")] public Entity.IdentityVerificationDocumentAddressResponse? Address { get; init; } = default!; + /// + /// The individual's name extracted from the document. + /// + [JsonPropertyName("name")] + public Entity.IdentityVerificationDocumentNameResponse? Name { get; init; } = default!; + } diff --git a/src/Plaid/Entity/PrismCashScoreVersion.cs b/src/Plaid/Entity/PrismCashScoreVersion.cs new file mode 100644 index 00000000..42619f45 --- /dev/null +++ b/src/Plaid/Entity/PrismCashScoreVersion.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// The version of Prism CashScore. If not specified, will default to v3. +/// +public enum PrismCashScoreVersion +{ + /// + /// + /// + [EnumMember(Value = "3")] + _3, + + /// + /// 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/PrismFirstDetectVersion.cs b/src/Plaid/Entity/PrismFirstDetectVersion.cs new file mode 100644 index 00000000..d92624b0 --- /dev/null +++ b/src/Plaid/Entity/PrismFirstDetectVersion.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// The version of Prism FirstDetect. If not specified, will default to v3. +/// +public enum PrismFirstDetectVersion +{ + /// + /// + /// + [EnumMember(Value = "3")] + _3, + + /// + /// 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/PrismInsightsVersion.cs b/src/Plaid/Entity/PrismInsightsVersion.cs new file mode 100644 index 00000000..fd1e6197 --- /dev/null +++ b/src/Plaid/Entity/PrismInsightsVersion.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// The version of Prism Insights. If not specified, will default to v3. +/// +public enum PrismInsightsVersion +{ + /// + /// + /// + [EnumMember(Value = "3")] + _3, + + /// + /// 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/PrismVersions.cs b/src/Plaid/Entity/PrismVersions.cs new file mode 100644 index 00000000..a5522a05 --- /dev/null +++ b/src/Plaid/Entity/PrismVersions.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// The versions of Prism products to evaluate +/// +public class PrismVersions +{ + /// + /// The version of Prism FirstDetect. If not specified, will default to v3. + /// + [JsonPropertyName("firstdetect")] + public Entity.PrismFirstDetectVersion? Firstdetect { get; set; } = default!; + + /// + /// The version of Prism CashScore. If not specified, will default to v3. + /// + [JsonPropertyName("cashscore")] + public Entity.PrismCashScoreVersion? Cashscore { get; set; } = default!; + + /// + /// The version of Prism Insights. If not specified, will default to v3. + /// + [JsonPropertyName("insights")] + public Entity.PrismInsightsVersion? Insights { get; set; } = default!; + +} diff --git a/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs b/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs index 54d95e59..a530f092 100644 --- a/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs +++ b/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs @@ -299,6 +299,24 @@ public enum ProcessorTokenCreateRequestProcessorEnum [EnumMember(Value = "paynote")] Paynote, + /// + /// + /// + [EnumMember(Value = "stake")] + Stake, + + /// + /// + /// + [EnumMember(Value = "wedbush")] + Wedbush, + + /// + /// + /// + [EnumMember(Value = "esusu")] + Esusu, + /// /// 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 9b050d09..75346b4c 100644 --- a/src/Plaid/Entity/Products.cs +++ b/src/Plaid/Entity/Products.cs @@ -179,6 +179,12 @@ public enum Products [EnumMember(Value = "cra_partner_insights")] CraPartnerInsights, + /// + /// + /// + [EnumMember(Value = "cra_cashflow_insights")] + CraCashflowInsights, + /// /// /// diff --git a/src/Plaid/Entity/ProfileNetworkStatusGetNetworkStatus.cs b/src/Plaid/Entity/ProfileNetworkStatusGetNetworkStatus.cs new file mode 100644 index 00000000..1fa0afb9 --- /dev/null +++ b/src/Plaid/Entity/ProfileNetworkStatusGetNetworkStatus.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// Enum representing the overall network status of the user +/// +public enum ProfileNetworkStatusGetNetworkStatus +{ + /// + /// + /// + [EnumMember(Value = "UNKNOWN")] + Unknown, + + /// + /// + /// + [EnumMember(Value = "RETURNING_USER")] + ReturningUser, + + /// + /// 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/ProfileNetworkStatusGetUser.cs b/src/Plaid/Entity/ProfileNetworkStatusGetUser.cs new file mode 100644 index 00000000..ad6bf030 --- /dev/null +++ b/src/Plaid/Entity/ProfileNetworkStatusGetUser.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Entity; + +/// +/// An object specifying information about the end user for the network status check +/// +public class ProfileNetworkStatusGetUser +{ + /// + /// The user's phone number in E.164 format + /// + [JsonPropertyName("phone_number")] + public string PhoneNumber { get; set; } = default!; + +} diff --git a/src/Plaid/Entity/RiskSignalDocumentReference.cs b/src/Plaid/Entity/RiskSignalDocumentReference.cs index 1f827734..c83d8b1c 100644 --- a/src/Plaid/Entity/RiskSignalDocumentReference.cs +++ b/src/Plaid/Entity/RiskSignalDocumentReference.cs @@ -29,4 +29,10 @@ public record RiskSignalDocumentReference [JsonPropertyName("document_type")] public Entity.RiskSignalDocumentType? DocumentType { get; init; } = default!; + /// + /// The file type for risk signal analysis + /// + [JsonPropertyName("file_type")] + public Entity.RiskSignalFileType? FileType { get; init; } = default!; + } diff --git a/src/Plaid/Entity/RiskSignalFileType.cs b/src/Plaid/Entity/RiskSignalFileType.cs new file mode 100644 index 00000000..0969ac74 --- /dev/null +++ b/src/Plaid/Entity/RiskSignalFileType.cs @@ -0,0 +1,62 @@ +namespace Going.Plaid.Entity; + +/// +/// The file type for risk signal analysis +/// +public enum RiskSignalFileType +{ + /// + /// + /// + [EnumMember(Value = "UNKNOWN")] + Unknown, + + /// + /// + /// + [EnumMember(Value = "IMAGE_PDF")] + ImagePdf, + + /// + /// + /// + [EnumMember(Value = "SCAN_OCR")] + ScanOcr, + + /// + /// + /// + [EnumMember(Value = "TRUE_PDF")] + TruePdf, + + /// + /// + /// + [EnumMember(Value = "IMAGE")] + Image, + + /// + /// + /// + [EnumMember(Value = "MIXED_PAGE_PDF")] + MixedPagePdf, + + /// + /// + /// + [EnumMember(Value = "EMPTY_PDF")] + EmptyPdf, + + /// + /// + /// + [EnumMember(Value = "FLATTENED_PDF")] + FlattenedPdf, + + /// + /// 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/SandboxItemFireWebhookRequestWebhookCodeEnum.cs b/src/Plaid/Entity/SandboxItemFireWebhookRequestWebhookCodeEnum.cs index ee30d9b2..829d8ed6 100644 --- a/src/Plaid/Entity/SandboxItemFireWebhookRequestWebhookCodeEnum.cs +++ b/src/Plaid/Entity/SandboxItemFireWebhookRequestWebhookCodeEnum.cs @@ -35,6 +35,12 @@ public enum SandboxItemFireWebhookRequestWebhookCodeEnum [EnumMember(Value = "RECURRING_TRANSACTIONS_UPDATE")] RecurringTransactionsUpdate, + /// + /// + /// + [EnumMember(Value = "LOGIN_REPAIRED")] + LoginRepaired, + /// /// /// diff --git a/src/Plaid/Entity/Security.cs b/src/Plaid/Entity/Security.cs index 00d41f06..387fd33e 100644 --- a/src/Plaid/Entity/Security.cs +++ b/src/Plaid/Entity/Security.cs @@ -121,6 +121,20 @@ public record Security [JsonPropertyName("market_identifier_code")] public string? MarketIdentifierCode { get; init; } = default!; + /// + /// The sector classification of the security, such as Finance, Health Technology, etc. + /// For a complete list of possible values, please refer to the "Sectors and Industries" spreadsheet. + /// + [JsonPropertyName("sector")] + public string? Sector { get; init; } = default!; + + /// + /// The industry classification of the security, such as Biotechnology, Airlines, etc. + /// For a complete list of possible values, please refer to the "Sectors and Industries" spreadsheet. + /// + [JsonPropertyName("industry")] + public string? Industry { get; init; } = default!; + /// /// Details about the option security. /// For the Sandbox environment, this data is currently only available if the item is using a custom configuration object, and the ticker field of the custom security follows the OCC Option Symbol standard with no spaces. diff --git a/src/Plaid/Entity/SimulatedTransferSweep.cs b/src/Plaid/Entity/SimulatedTransferSweep.cs index 2cdcb439..0654942a 100644 --- a/src/Plaid/Entity/SimulatedTransferSweep.cs +++ b/src/Plaid/Entity/SimulatedTransferSweep.cs @@ -18,6 +18,12 @@ public record SimulatedTransferSweep [JsonPropertyName("funding_account_id")] public string? FundingAccountId { get; init; } = default!; + /// + /// Plaid’s unique identifier for a Plaid Ledger Balance. + /// + [JsonPropertyName("ledger_id")] + public string? LedgerId { get; init; } = default!; + /// /// The datetime when the sweep occurred, in RFC 3339 format. /// diff --git a/src/Plaid/Entity/StatusBreakdown.cs b/src/Plaid/Entity/StatusBreakdown.cs index 27729ef4..ddfad9c9 100644 --- a/src/Plaid/Entity/StatusBreakdown.cs +++ b/src/Plaid/Entity/StatusBreakdown.cs @@ -24,7 +24,7 @@ public record StatusBreakdown public decimal ErrorInstitution { get; init; } = default!; /// - /// The refresh_interval may be DELAYED or STOPPED even when the success rate is high. This value is only returned for Transactions status breakdowns. + /// How frequently data for subscription products like Investments, Transactions, and Liabilities, is being refreshed, relative to the institution's normal scheduling. The refresh_interval may be DELAYED or STOPPED even when the success rate is high. /// [JsonPropertyName("refresh_interval")] public Entity.StatusBreakdownRefreshIntervalEnum? RefreshInterval { get; init; } = default!; diff --git a/src/Plaid/Entity/StatusBreakdownRefreshIntervalEnum.cs b/src/Plaid/Entity/StatusBreakdownRefreshIntervalEnum.cs index 6c1f7e83..21bc09b7 100644 --- a/src/Plaid/Entity/StatusBreakdownRefreshIntervalEnum.cs +++ b/src/Plaid/Entity/StatusBreakdownRefreshIntervalEnum.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The refresh_interval may be DELAYED or STOPPED even when the success rate is high. This value is only returned for Transactions status breakdowns. +/// How frequently data for subscription products like Investments, Transactions, and Liabilities, is being refreshed, relative to the institution's normal scheduling. The refresh_interval may be DELAYED or STOPPED even when the success rate is high. /// public enum StatusBreakdownRefreshIntervalEnum { diff --git a/src/Plaid/Entity/StudentLoan.cs b/src/Plaid/Entity/StudentLoan.cs index 50453c97..fca6d6c0 100644 --- a/src/Plaid/Entity/StudentLoan.cs +++ b/src/Plaid/Entity/StudentLoan.cs @@ -79,8 +79,8 @@ public record StudentLoan /// /// The minimum payment due for the next billing cycle. There are some exceptions: - /// Some institutions require a minimum payment across all loans associated with an account number. Our API presents that same minimum payment amount on each loan. The institutions that do this are: Great Lakes ( ins_116861), Firstmark (ins_116295), Commonbond Firstmark Services (ins_116950), EdFinancial Services (ins_116304), Granite State (ins_116308), and Oklahoma Student Loan Authority (ins_116945). - /// Firstmark (ins_116295 ), EdFinancial Services (ins_116304), and Navient (ins_116248) will display as $0 if there is an autopay program in effect. + /// Some institutions require a minimum payment across all loans associated with an account number. Our API presents that same minimum payment amount on each loan. The institutions that do this are: Great Lakes ( ins_116861), Firstmark (ins_116295), Commonbond Firstmark Services (ins_116950), Granite State (ins_116308), and Oklahoma Student Loan Authority (ins_116945). + /// Firstmark (ins_116295 ) and Navient (ins_116248) will display as $0 if there is an autopay program in effect. /// [JsonPropertyName("minimum_payment_amount")] public decimal? MinimumPaymentAmount { get; init; } = default!; @@ -116,7 +116,7 @@ public record StudentLoan public string? PaymentReferenceNumber { get; init; } = default!; /// - /// Information about the student's eligibility in the Public Service Loan Forgiveness program. This is only returned if the institution is FedLoan (ins_116527). + /// Information about the student's eligibility in the Public Service Loan Forgiveness program. This is only returned if the institution is FedLoan (ins_116527). Since FedLoan no longer services student loans, this field is no longer returned. /// [JsonPropertyName("pslf_status")] public Entity.PSLFStatus PslfStatus { get; init; } = default!; diff --git a/src/Plaid/Entity/TOSAcceptanceMetadata.cs b/src/Plaid/Entity/TOSAcceptanceMetadata.cs new file mode 100644 index 00000000..9c044a68 --- /dev/null +++ b/src/Plaid/Entity/TOSAcceptanceMetadata.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// Metadata related to the acceptance of Terms of Service +/// +public class TOSAcceptanceMetadata +{ + /// + /// Indicates whether the TOS agreement was accepted + /// + [JsonPropertyName("agreement_accepted")] + public bool AgreementAccepted { get; set; } = default!; + + /// + /// The IP address of the originator when they accepted the TOS. Formatted as an IPv4 or IPv6 IP address + /// + [JsonPropertyName("originator_ip_address")] + public string OriginatorIpAddress { get; set; } = default!; + + /// + /// ISO8601 timestamp indicating when the originator accepted the TOS + /// + [JsonPropertyName("agreement_accepted_at")] + public DateTimeOffset AgreementAcceptedAt { get; set; } = default!; + +} diff --git a/src/Plaid/Entity/TotalMonthlyIncomeInsights.cs b/src/Plaid/Entity/TotalMonthlyIncomeInsights.cs new file mode 100644 index 00000000..432183c6 --- /dev/null +++ b/src/Plaid/Entity/TotalMonthlyIncomeInsights.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// An object representing the insights about the total monthly income +/// +public record TotalMonthlyIncomeInsights +{ + /// + /// The aggregated income for the 30 days prior to subscription date + /// + [JsonPropertyName("baseline_amount")] + public decimal BaselineAmount { get; init; } = default!; + + /// + /// The aggregated income of the last 30 days + /// + [JsonPropertyName("current_amount")] + public decimal CurrentAmount { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/Transaction.cs b/src/Plaid/Entity/Transaction.cs index 11c8596c..c69595b0 100644 --- a/src/Plaid/Entity/Transaction.cs +++ b/src/Plaid/Entity/Transaction.cs @@ -12,7 +12,7 @@ public record Transaction public string? AccountId { get; init; } = default!; /// - /// The settled value of the transaction, denominated in the transactions's currency, as stated in iso_currency_code or unofficial_currency_code. Positive values when money moves out of the account; negative values when money moves in. For example, debit card purchases are positive; credit card payments, direct deposits, and refunds are negative. + /// The settled value of the transaction, denominated in the transactions's currency, as stated in iso_currency_code or unofficial_currency_code. For all products except Income: Positive values when money moves out of the account; negative values when money moves in. For example, debit card purchases are positive; credit card payments, direct deposits, and refunds are negative. For Income endpoints, values are positive when representing income. /// [JsonPropertyName("amount")] public decimal? Amount { get; init; } = default!; @@ -92,13 +92,13 @@ public record Transaction public Entity.PaymentMeta? PaymentMeta { get; init; } = default!; /// - /// When true, identifies the transaction as pending or unsettled. Pending transaction details (name, type, amount, category ID) may change before they are settled. + /// When true, identifies the transaction as pending or unsettled. Pending transaction details (name, type, amount, category ID) may change before they are settled. Not all institutions provide pending transactions. /// [JsonPropertyName("pending")] public bool? Pending { get; init; } = default!; /// - /// The ID of a posted transaction's associated pending transaction, where applicable. + /// The ID of a posted transaction's associated pending transaction, where applicable. Not all institutions provide pending transactions. /// [JsonPropertyName("pending_transaction_id")] public string? PendingTransactionId { get; init; } = default!; diff --git a/src/Plaid/Entity/TransactionsGetRequestOptions.cs b/src/Plaid/Entity/TransactionsGetRequestOptions.cs index bdf763c1..c9c611e1 100644 --- a/src/Plaid/Entity/TransactionsGetRequestOptions.cs +++ b/src/Plaid/Entity/TransactionsGetRequestOptions.cs @@ -49,9 +49,10 @@ public class TransactionsGetRequestOptions public bool? IncludeLogoAndCounterpartyBeta { get; set; } = default!; /// - /// This option only applies to calls for Items that were not initialized with Transactions during Link and are now adding the Transactions product to the Item for the first time. In these cases, this option controls the maximum number of days of transaction history that Plaid will request from the financial institution. For developer accounts created after December 3, 2023, if no value is specified, this will default to 90 days. For developer accounts created on December 3, 2023 or earlier, if no value is specified, this will default to 730 days until June 24, 2024, at which point it will default to 90 days. - /// If Transactions has already been added to the Item prior to this call, this field will have no effect. - /// We strongly recommend that customers utilizing Recurring Transactions request at least 180 days of history for optimal results. + /// This field only applies to calls for Items where the Transactions product has not already been initialized (i.e. by specifying transactions in the products, optional_products, or required_if_consented_products array when calling /link/token/create or by making a previous call to /transactions/sync or /transactions/get). In those cases, the field controls the maximum number of days of transaction history that Plaid will request from the financial institution. The more transaction history is requested, the longer the historical update poll will take. If no value is specified, 90 days of history will be requested by default. If a value under 30 is provided, a minimum of 30 days of history will be requested. + /// If you are initializing your Items with transactions during the /link/token/create call (e.g. by including transactions in the /link/token/create products array), you must use the transactions.days_requested field in the /link/token/create request instead of in the /transactions/get request. + /// If the Item has already been initialized with the Transactions product, this field will have no effect. The maximum amount of transaction history to request on an Item cannot be updated if Transactions has already been added to the Item. To request older transaction history on an Item where Transactions has already been added, you must delete the Item via /item/remove and send the user through Link to create a new Item. + /// Customers using Recurring Transactions should request at least 180 days of history for optimal results. /// [JsonPropertyName("days_requested")] public int? DaysRequested { get; set; } = default!; diff --git a/src/Plaid/Entity/TransactionsSyncRequestOptions.cs b/src/Plaid/Entity/TransactionsSyncRequestOptions.cs index 94e427ea..0ab18cbe 100644 --- a/src/Plaid/Entity/TransactionsSyncRequestOptions.cs +++ b/src/Plaid/Entity/TransactionsSyncRequestOptions.cs @@ -24,9 +24,10 @@ public class TransactionsSyncRequestOptions public bool? IncludeLogoAndCounterpartyBeta { get; set; } = default!; /// - /// This option only applies to calls for Items that were not initialized with Transactions during Link and are now adding the Transactions product to the Item for the first time. In these cases, this option controls the maximum number of days of transaction history that Plaid will request from the financial institution. For developer accounts created after December 3, 2023, if no value is specified, this will default to 90 days. For developer accounts created on December 3, 2023 or earlier, if no value is specified, this will default to 730 days until June 24, 2024, at which point it will default to 90 days. - /// If Transactions has already been added to the Item prior to this call, this field will have no effect. - /// We strongly recommend that customers utilizing Recurring Transactions request at least 180 days of history for optimal results. + /// This field only applies to calls for Items where the Transactions product has not already been initialized (i.e., by specifying transactions in the products, required_if_supported_products, or optional_products array when calling /link/token/create or by making a previous call to /transactions/sync or /transactions/get). In those cases, the field controls the maximum number of days of transaction history that Plaid will request from the financial institution. The more transaction history is requested, the longer the historical update poll will take. If no value is specified, 90 days of history will be requested by default. + /// If you are initializing your Items with transactions during the /link/token/create call (e.g. by including transactions in the /link/token/create products array), you must use the transactions.days_requested field in the /link/token/create request instead of in the /transactions/sync request. + /// If the Item has already been initialized with the Transactions product, this field will have no effect. The maximum amount of transaction history to request on an Item cannot be updated if Transactions has already been added to the Item. To request older transaction history on an Item where Transactions has already been added, you must delete the Item via /item/remove and send the user through Link to create a new Item. + /// Customers using Recurring Transactions should request at least 180 days of history for optimal results. /// [JsonPropertyName("days_requested")] public int? DaysRequested { get; set; } = default!; diff --git a/src/Plaid/Entity/Transfer.cs b/src/Plaid/Entity/Transfer.cs index 6fd75c95..57db2782 100644 --- a/src/Plaid/Entity/Transfer.cs +++ b/src/Plaid/Entity/Transfer.cs @@ -35,6 +35,12 @@ public record Transfer [JsonPropertyName("funding_account_id")] public string? FundingAccountId { get; init; } = default!; + /// + /// Plaid’s unique identifier for a Plaid Ledger Balance. + /// + [JsonPropertyName("ledger_id")] + public string? LedgerId { get; init; } = default!; + /// /// The type of transfer. This will be either debit or credit. A debit indicates a transfer of money into the origination account; a credit indicates a transfer of money out of the origination account. /// diff --git a/src/Plaid/Entity/TransferAuthorizationDecision.cs b/src/Plaid/Entity/TransferAuthorizationDecision.cs index 29a250b2..19020e09 100644 --- a/src/Plaid/Entity/TransferAuthorizationDecision.cs +++ b/src/Plaid/Entity/TransferAuthorizationDecision.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public enum TransferAuthorizationDecision { /// - /// – The proposed transfer has received the end user's consent and has been approved for processing by Plaid. The decision_rationale field is set if Plaid was unable to fetch the account information. You may proceed with the transfer, but further review is recommended (i.e., use Link in update mode to re-authenticate your user when decision_rationale.code is ITEM_LOGIN_REQUIRED). Refer to the code field in the decision_rationale object for details. + /// – The proposed transfer has received the end user's consent and has been approved for processing by Plaid. The decision_rationale field is set if Plaid was unable to fetch the account information. You may proceed with the transfer, but further review is recommended. Refer to the code field in the decision_rationale object for details. /// [EnumMember(Value = "approved")] Approved, @@ -18,7 +18,7 @@ public enum TransferAuthorizationDecision Declined, /// - /// – An action is required before Plaid can assess the transfer risk and make a decision. The most common scenario is to update authentication for an Item. To complete the required action, initialize Link by setting transfer.authorization_id in the request of /link/token/create. + /// – An action is required before Plaid can assess the transfer risk and make a decision. The most common scenario is to update authentication for an Item. To complete the required action, initialize Link by setting transfer.authorization_id in the request of /link/token/create. After Link flow is completed, you may re-attempt the authorization request. /// [EnumMember(Value = "user_action_required")] UserActionRequired, diff --git a/src/Plaid/Entity/TransferAuthorizationDecisionRationaleCode.cs b/src/Plaid/Entity/TransferAuthorizationDecisionRationaleCode.cs index f596f886..df4536df 100644 --- a/src/Plaid/Entity/TransferAuthorizationDecisionRationaleCode.cs +++ b/src/Plaid/Entity/TransferAuthorizationDecisionRationaleCode.cs @@ -30,7 +30,7 @@ public enum TransferAuthorizationDecisionRationaleCode ManuallyVerifiedItem, /// - /// – Unable to collect the account information due to Item staleness. Can be resolved by using Link in update mode. + /// – Unable to collect the account information due to Item staleness. Can be resolved by using Link and setting transfer.authorization_id in the request to /link/token/create. /// [EnumMember(Value = "ITEM_LOGIN_REQUIRED")] ItemLoginRequired, @@ -48,7 +48,7 @@ public enum TransferAuthorizationDecisionRationaleCode Error, /// - /// Item created via /transfer/account_migration endpoint, limited information available. + /// Item created via /transfer/migrate_account endpoint, limited information available. /// [EnumMember(Value = "MIGRATED_ACCOUNT_ITEM")] MigratedAccountItem, diff --git a/src/Plaid/Entity/TransferAuthorizationProposedTransfer.cs b/src/Plaid/Entity/TransferAuthorizationProposedTransfer.cs index 7ddbb98e..a976f5d7 100644 --- a/src/Plaid/Entity/TransferAuthorizationProposedTransfer.cs +++ b/src/Plaid/Entity/TransferAuthorizationProposedTransfer.cs @@ -23,6 +23,12 @@ public record TransferAuthorizationProposedTransfer [JsonPropertyName("funding_account_id")] public string? FundingAccountId { get; init; } = default!; + /// + /// Plaid’s unique identifier for a Plaid Ledger Balance. + /// + [JsonPropertyName("ledger_id")] + public string? LedgerId { get; init; } = default!; + /// /// The type of transfer. This will be either debit or credit. A debit indicates a transfer of money into the origination account; a credit indicates a transfer of money out of the origination account. /// diff --git a/src/Plaid/Entity/TransferEvent.cs b/src/Plaid/Entity/TransferEvent.cs index c38f8082..cf1ac64c 100644 --- a/src/Plaid/Entity/TransferEvent.cs +++ b/src/Plaid/Entity/TransferEvent.cs @@ -35,6 +35,12 @@ public record TransferEvent [JsonPropertyName("funding_account_id")] public string? FundingAccountId { get; init; } = default!; + /// + /// Plaid’s unique identifier for a Plaid Ledger Balance. + /// + [JsonPropertyName("ledger_id")] + public string? LedgerId { get; init; } = default!; + /// /// Plaid’s unique identifier for a transfer. This field is null for Plaid Ledger Sweep events. /// diff --git a/src/Plaid/Entity/TransferMetricsGetAuthorizationUsage.cs b/src/Plaid/Entity/TransferMetricsGetAuthorizationUsage.cs new file mode 100644 index 00000000..6dd361b3 --- /dev/null +++ b/src/Plaid/Entity/TransferMetricsGetAuthorizationUsage.cs @@ -0,0 +1,32 @@ +namespace Going.Plaid.Entity; + +/// +/// Details regarding authorization usage. +/// +public record TransferMetricsGetAuthorizationUsage +{ + /// + /// The daily credit utilization formatted as a decimal. + /// + [JsonPropertyName("daily_credit_utilization")] + public string? DailyCreditUtilization { get; init; } = default!; + + /// + /// The daily debit utilization formatted as a decimal. + /// + [JsonPropertyName("daily_debit_utilization")] + public string? DailyDebitUtilization { get; init; } = default!; + + /// + /// The monthly credit utilization formatted as a decimal. + /// + [JsonPropertyName("monthly_credit_utilization")] + public string? MonthlyCreditUtilization { get; init; } = default!; + + /// + /// The monthly debit utilization formatted as a decimal. + /// + [JsonPropertyName("monthly_debit_utilization")] + public string? MonthlyDebitUtilization { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/TransferRefund.cs b/src/Plaid/Entity/TransferRefund.cs index e513fac0..ed3793ce 100644 --- a/src/Plaid/Entity/TransferRefund.cs +++ b/src/Plaid/Entity/TransferRefund.cs @@ -35,6 +35,12 @@ public record TransferRefund [JsonPropertyName("failure_reason")] public Entity.TransferRefundFailure? FailureReason { get; init; } = default!; + /// + /// Plaid’s unique identifier for a Plaid Ledger Balance. + /// + [JsonPropertyName("ledger_id")] + public string? LedgerId { get; init; } = default!; + /// /// The datetime when this refund was created. This will be of the form 2006-01-02T15:04:05Z /// diff --git a/src/Plaid/Entity/TransferSweep.cs b/src/Plaid/Entity/TransferSweep.cs index 43dd5739..7f573a7e 100644 --- a/src/Plaid/Entity/TransferSweep.cs +++ b/src/Plaid/Entity/TransferSweep.cs @@ -20,6 +20,12 @@ public record TransferSweep [JsonPropertyName("funding_account_id")] public string FundingAccountId { get; init; } = default!; + /// + /// Plaid’s unique identifier for a Plaid Ledger Balance. + /// + [JsonPropertyName("ledger_id")] + public string? LedgerId { get; init; } = default!; + /// /// The datetime when the sweep occurred, in RFC 3339 format. /// diff --git a/src/Plaid/Entity/UpdateEntityScreeningRequestSearchTerms.cs b/src/Plaid/Entity/UpdateEntityScreeningRequestSearchTerms.cs index c5f74510..a126f8a3 100644 --- a/src/Plaid/Entity/UpdateEntityScreeningRequestSearchTerms.cs +++ b/src/Plaid/Entity/UpdateEntityScreeningRequestSearchTerms.cs @@ -12,19 +12,19 @@ public class UpdateEntityScreeningRequestSearchTerms public string EntityWatchlistProgramId { get; set; } = default!; /// - /// The name of the organization being screened. + /// The name of the organization being screened. Must have at least one alphabetical character, have a maximum length of 100 characters, and not include leading or trailing spaces. /// [JsonPropertyName("legal_name")] public string? LegalName { get; set; } = default!; /// - /// The numeric or alphanumeric identifier associated with this document. + /// The numeric or alphanumeric identifier associated with this document. Must be between 4 and 32 characters long, and cannot have leading or trailing spaces. /// [JsonPropertyName("document_number")] public string? DocumentNumber { get; set; } = default!; /// - /// A valid email address. + /// A valid email address. Must not have leading or trailing spaces. /// [JsonPropertyName("email_address")] public string? EmailAddress { get; set; } = default!; diff --git a/src/Plaid/Entity/UpdateIndividualScreeningRequestSearchTerms.cs b/src/Plaid/Entity/UpdateIndividualScreeningRequestSearchTerms.cs index 5ad868c7..92dde5c4 100644 --- a/src/Plaid/Entity/UpdateIndividualScreeningRequestSearchTerms.cs +++ b/src/Plaid/Entity/UpdateIndividualScreeningRequestSearchTerms.cs @@ -12,7 +12,7 @@ public class UpdateIndividualScreeningRequestSearchTerms public string? WatchlistProgramId { get; set; } = default!; /// - /// The legal name of the individual being screened. + /// The legal name of the individual being screened. Must have at least one alphabetical character, have a maximum length of 100 characters, and not include leading or trailing spaces. /// [JsonPropertyName("legal_name")] public string? LegalName { get; set; } = default!; @@ -24,7 +24,7 @@ public class UpdateIndividualScreeningRequestSearchTerms public DateOnly? DateOfBirth { get; set; } = default!; /// - /// The numeric or alphanumeric identifier associated with this document. + /// The numeric or alphanumeric identifier associated with this document. Must be between 4 and 32 characters long, and cannot have leading or trailing spaces. /// [JsonPropertyName("document_number")] public string? DocumentNumber { get; set; } = default!; diff --git a/src/Plaid/Entity/UserAddress.cs b/src/Plaid/Entity/UserAddress.cs index 4c36f347..ff24158c 100644 --- a/src/Plaid/Entity/UserAddress.cs +++ b/src/Plaid/Entity/UserAddress.cs @@ -13,7 +13,7 @@ public class UserAddress 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 20 characters. + /// 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/WalletTransaction.cs b/src/Plaid/Entity/WalletTransaction.cs index dce87412..0ab43317 100644 --- a/src/Plaid/Entity/WalletTransaction.cs +++ b/src/Plaid/Entity/WalletTransaction.cs @@ -77,4 +77,10 @@ public record WalletTransaction [JsonPropertyName("failure_reason")] public Entity.WalletTransactionFailureReason? FailureReason { get; init; } = default!; + /// + /// A list of wallet transactions that this transaction is associated with, if any. + /// + [JsonPropertyName("related_transactions")] + public IReadOnlyList? RelatedTransactions { get; init; } = default!; + } diff --git a/src/Plaid/Entity/WalletTransactionRelation.cs b/src/Plaid/Entity/WalletTransactionRelation.cs new file mode 100644 index 00000000..4c28b8e9 --- /dev/null +++ b/src/Plaid/Entity/WalletTransactionRelation.cs @@ -0,0 +1,24 @@ +namespace Going.Plaid.Entity; + +/// +/// Transactions are related when they have a logical connection. +/// For example, a PAYOUT transaction can be returned by the sender, creating a RETURN transaction. Each PAYOUT transaction can have at most one corresponding RETURN transaction in case of reversal. +/// These relationships are bi-directional, meaning that both entities have references to each other. For instance, when a transaction of type RETURN occurs, it is linked to the original transaction being returned. Likewise, the original transaction has a reference back to the RETURN transaction that represents the return. +/// This field is only populated for transactions of type RETURN, FUNDS_SWEEP, REFUND and PAYOUT. +/// The relationship between a PIS_PAY_IN payment and its corresponding REFUND transactions is only available through refund_ids property in the payment object. See/payment_initiation/payment/get. +/// +public record WalletTransactionRelation +{ + /// + /// The ID of the related transaction. + /// + [JsonPropertyName("id")] + public string? Id { get; init; } = default!; + + /// + /// The type of the transaction. + /// + [JsonPropertyName("type")] + public Entity.WalletTransactionRelationTypeEnum? Type { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/WalletTransactionRelationTypeEnum.cs b/src/Plaid/Entity/WalletTransactionRelationTypeEnum.cs new file mode 100644 index 00000000..45930d18 --- /dev/null +++ b/src/Plaid/Entity/WalletTransactionRelationTypeEnum.cs @@ -0,0 +1,38 @@ +namespace Going.Plaid.Entity; + +/// +/// The type of the transaction. +/// +public enum WalletTransactionRelationTypeEnum +{ + /// + /// + /// + [EnumMember(Value = "PAYOUT")] + Payout, + + /// + /// + /// + [EnumMember(Value = "RETURN")] + Return, + + /// + /// + /// + [EnumMember(Value = "REFUND")] + Refund, + + /// + /// + /// + [EnumMember(Value = "FUNDS_SWEEP")] + FundsSweep, + + /// + /// 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/WatchlistScreeningDocument.cs b/src/Plaid/Entity/WatchlistScreeningDocument.cs index f54d9f9b..29a91073 100644 --- a/src/Plaid/Entity/WatchlistScreeningDocument.cs +++ b/src/Plaid/Entity/WatchlistScreeningDocument.cs @@ -12,7 +12,7 @@ public record WatchlistScreeningDocument public Entity.WatchlistScreeningDocumentType Type { get; init; } = default!; /// - /// The numeric or alphanumeric identifier associated with this document. + /// The numeric or alphanumeric identifier associated with this document. Must be between 4 and 32 characters long, and cannot have leading or trailing spaces. /// [JsonPropertyName("number")] public string Number { get; init; } = default!; diff --git a/src/Plaid/Entity/WatchlistScreeningRequestSearchTerms.cs b/src/Plaid/Entity/WatchlistScreeningRequestSearchTerms.cs index f6571698..2f8dfcba 100644 --- a/src/Plaid/Entity/WatchlistScreeningRequestSearchTerms.cs +++ b/src/Plaid/Entity/WatchlistScreeningRequestSearchTerms.cs @@ -12,7 +12,7 @@ public class WatchlistScreeningRequestSearchTerms public string WatchlistProgramId { get; set; } = default!; /// - /// The legal name of the individual being screened. + /// The legal name of the individual being screened. Must have at least one alphabetical character, have a maximum length of 100 characters, and not include leading or trailing spaces. /// [JsonPropertyName("legal_name")] public string LegalName { get; set; } = default!; @@ -24,7 +24,7 @@ public class WatchlistScreeningRequestSearchTerms public DateOnly? DateOfBirth { get; set; } = default!; /// - /// The numeric or alphanumeric identifier associated with this document. + /// The numeric or alphanumeric identifier associated with this document. Must be between 4 and 32 characters long, and cannot have leading or trailing spaces. /// [JsonPropertyName("document_number")] public string? DocumentNumber { get; set; } = default!; diff --git a/src/Plaid/Entity/WatchlistScreeningSearchTerms.cs b/src/Plaid/Entity/WatchlistScreeningSearchTerms.cs index ae7398b4..9c6effbb 100644 --- a/src/Plaid/Entity/WatchlistScreeningSearchTerms.cs +++ b/src/Plaid/Entity/WatchlistScreeningSearchTerms.cs @@ -12,7 +12,7 @@ public record WatchlistScreeningSearchTerms public string WatchlistProgramId { get; init; } = default!; /// - /// The legal name of the individual being screened. + /// The legal name of the individual being screened. Must have at least one alphabetical character, have a maximum length of 100 characters, and not include leading or trailing spaces. /// [JsonPropertyName("legal_name")] public string LegalName { get; init; } = default!; @@ -24,7 +24,7 @@ public record WatchlistScreeningSearchTerms public DateOnly? DateOfBirth { get; init; } = default!; /// - /// The numeric or alphanumeric identifier associated with this document. + /// The numeric or alphanumeric identifier associated with this document. Must be between 4 and 32 characters long, and cannot have leading or trailing spaces. /// [JsonPropertyName("document_number")] public string? DocumentNumber { get; init; } = default!; diff --git a/src/Plaid/Entity/WebhookCode.cs b/src/Plaid/Entity/WebhookCode.cs index 1760f99d..3dd16ac1 100644 --- a/src/Plaid/Entity/WebhookCode.cs +++ b/src/Plaid/Entity/WebhookCode.cs @@ -89,6 +89,12 @@ public enum WebhookCode [EnumMember(Value = "INITIAL_UPDATE")] InitialUpdate, + /// + /// + /// + [EnumMember(Value = "ISSUE_RESOLVED")] + IssueResolved, + /// /// /// @@ -173,6 +179,12 @@ public enum WebhookCode [EnumMember(Value = "END_CUSTOMER_OAUTH_STATUS_UPDATED")] EndCustomerOauthStatusUpdated, + /// + /// + /// + [EnumMember(Value = "PENDING_DISCONNECT")] + PendingDisconnect, + /// /// /// diff --git a/src/Plaid/Entity/WebhookType.cs b/src/Plaid/Entity/WebhookType.cs index 7f61a7d8..14ecd20a 100644 --- a/src/Plaid/Entity/WebhookType.cs +++ b/src/Plaid/Entity/WebhookType.cs @@ -41,6 +41,12 @@ public enum WebhookType [EnumMember(Value = "IDENTITY")] Identity, + /// + /// + /// + [EnumMember(Value = "ISSUES")] + Issues, + /// /// /// @@ -161,6 +167,12 @@ public enum WebhookType [EnumMember(Value = "DASHBOARD_CONFIGURED_ALERT")] DashboardConfiguredAlert, + /// + /// + /// + [EnumMember(Value = "CRA_MONITORING")] + CraMonitoring, + /// /// /// diff --git a/src/Plaid/Identity/PlaidClient.cs b/src/Plaid/Identity/PlaidClient.cs index baf0cebf..4fddcea5 100644 --- a/src/Plaid/Identity/PlaidClient.cs +++ b/src/Plaid/Identity/PlaidClient.cs @@ -4,7 +4,6 @@ public sealed partial class PlaidClient { /// /// The /identity/get endpoint allows you to retrieve various account holder information on file with the financial institution, including names, emails, phone numbers, and addresses. Only name data is guaranteed to be returned; other fields will be empty arrays if not provided by the institution. - /// This request may take some time to complete if identity was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the data. /// Note: In API versions 2018-05-22 and earlier, the owners object is not returned, and instead identity information is returned in the top level identity object. For more details, see Plaid API versioning. /// /// @@ -23,7 +22,6 @@ public sealed partial class PlaidClient /// /// The /identity/match endpoint generates a match score, which indicates how well the provided identity data matches the identity information on file with the account holder's financial institution. /// Fields within the balances object will always be null when retrieved by /identity/match. Instead, use the free /accounts/get endpoint to request balance cached data, or /accounts/balance/get for real-time data. - /// This request may take some time to complete if Identity was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the data. /// /// public Task IdentityMatchAsync(Identity.IdentityMatchRequest request) => diff --git a/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs b/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs index 4870ea96..c8576c96 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs @@ -48,4 +48,10 @@ public partial class IdentityVerificationRetryRequest : RequestBase [JsonPropertyName("steps")] 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. + /// + [JsonPropertyName("is_shareable")] + public bool? IsShareable { get; set; } = default!; + } diff --git a/src/Plaid/Investments/PlaidClient.cs b/src/Plaid/Investments/PlaidClient.cs index 4800ba7f..f688b61d 100644 --- a/src/Plaid/Investments/PlaidClient.cs +++ b/src/Plaid/Investments/PlaidClient.cs @@ -23,7 +23,7 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// /investments/refresh is an optional endpoint for users of the Investments product. It initiates an on-demand extraction to fetch the newest investments, holdings and investment transactions for an Item. This on-demand extraction takes place in addition to the periodic extractions that automatically occur one or more times per day for any Investments-enabled Item. If changes to investments are discovered after calling /investments/refresh, Plaid will fire webhooks: HOLDINGS: DEFAULT_UPDATE if any new holdings are detected, and INVESTMENTS_TRANSACTIONS: DEFAULT_UPDATE if any new investment transactions are detected. Updated holdings and investment transactions can be fetched by calling /investments/holdings/get and /investments/transactions/get. "Note that the /investments/refresh endpoint is not supported by all institutions. If called on an Item from an institution that does not support this functionality, it will return a PRODUCT_NOT_SUPPORTED error. + /// /investments/refresh is an optional endpoint for users of the Investments product. It initiates an on-demand extraction to fetch the newest investment holdings and transactions for an Item. This on-demand extraction takes place in addition to the periodic extractions that automatically occur one or more times per day for any Investments-enabled Item. If changes to investments are discovered after calling /investments/refresh, Plaid will fire webhooks: HOLDINGS: DEFAULT_UPDATE if any new holdings are detected, and INVESTMENTS_TRANSACTIONS: DEFAULT_UPDATE if any new investment transactions are detected. Updated holdings and investment transactions can be fetched by calling /investments/holdings/get and /investments/transactions/get. Note that the /investments/refresh endpoint is not supported by all institutions. If called on an Item from an institution that does not support this functionality, it will return a PRODUCT_NOT_SUPPORTED error. /// As this endpoint triggers a synchronous request for fresh data, latency may be higher than for other Plaid endpoints (typically less than 10 seconds, but occasionally up to 30 seconds or more); if you encounter errors, you may find it necessary to adjust your timeout period when making requests. /// /investments/refresh is offered as an add-on to Investments and has a separate fee model. To request access to this endpoint, submit a product access request or contact your Plaid account manager. /// diff --git a/src/Plaid/Item/PlaidClient.cs b/src/Plaid/Item/PlaidClient.cs index 9ac3582f..adeb38f6 100644 --- a/src/Plaid/Item/PlaidClient.cs +++ b/src/Plaid/Item/PlaidClient.cs @@ -86,7 +86,7 @@ public sealed partial class PlaidClient /// A public_token is one-time use and expires after 30 minutes. You use a public_token to initialize Link in update mode for a particular Item. You can generate a public_token for an Item even if you did not use Link to create the Item originally. /// The /item/public_token/create endpoint is **not** used to create your initial public_token. If you have not already received an access_token for a specific Item, use Link to obtain your public_token instead. See the Quickstart for more information. /// - /// + /// public Task ItemPublicTokenCreateAsync(Item.ItemPublicTokenCreateRequest request) => PostAsync("/item/public_token/create", request) .ParseResponseAsync(); diff --git a/src/Plaid/Liabilities/PlaidClient.cs b/src/Plaid/Liabilities/PlaidClient.cs index ec9c1892..aacccadb 100644 --- a/src/Plaid/Liabilities/PlaidClient.cs +++ b/src/Plaid/Liabilities/PlaidClient.cs @@ -3,9 +3,8 @@ namespace Going.Plaid; public sealed partial class PlaidClient { /// - /// The /liabilities/get endpoint returns various details about an Item with loan or credit accounts. Liabilities data is available primarily for US financial institutions, with some limited coverage of Canadian institutions. Currently supported account types are account type credit with account subtype credit card or paypal, and account type loan with account subtype student or mortgage. To limit accounts listed in Link to types and subtypes supported by Liabilities, you can use the account_filters parameter when creating a Link token. + /// The /liabilities/get endpoint returns various details about an Item with loan or credit accounts. Liabilities data is available primarily for US financial institutions, with some limited coverage of Canadian institutions. Currently supported account types are account type credit with account subtype credit card or paypal, and account type loan with account subtype student or mortgage. To limit accounts listed in Link to types and subtypes supported by Liabilities, you can use the account_filters parameter when creating a Link token. /// The types of information returned by Liabilities can include balances and due dates, loan terms, and account details such as original loan amount and guarantor. Data is refreshed approximately once per day; the latest data can be retrieved by calling /liabilities/get. - /// Note: This request may take some time to complete if liabilities was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the additional data. /// /// public Task LiabilitiesGetAsync(Liabilities.LiabilitiesGetRequest request) => diff --git a/src/Plaid/Link/LinkTokenCreateRequest.cs b/src/Plaid/Link/LinkTokenCreateRequest.cs index b7127b7b..4a137cda 100644 --- a/src/Plaid/Link/LinkTokenCreateRequest.cs +++ b/src/Plaid/Link/LinkTokenCreateRequest.cs @@ -37,7 +37,8 @@ public partial class LinkTokenCreateRequest : RequestBase /// /// List of Plaid product(s) you wish to use. If launching Link in update mode, should be omitted (unless you are using update mode to add Income or Assets to an Item); required otherwise. /// balance is *not* a valid value, the Balance product does not require explicit initialization and will automatically be initialized when any other product is initialized. - /// The products specified here will determine which institutions will be available to your users in Link. Only institutions that support *all* requested products can be selected; a if a user attempts to select an institution that does not support a listed product, a "Connectivity not supported" error message will appear in Link. To maximize the number of institutions available, initialize Link with the minimal product set required for your use case. Additional products can be included via the optional_products or required_if_supported_products fields, or can be initialized by calling the endpoint after obtaining an access token. For details and exceptions, see Choosing when to initialize products. + /// The products specified here will determine which institutions will be available to your users in Link. Only institutions that support *all* requested products can be selected; a if a user attempts to select an institution that does not support a listed product, a "Connectivity not supported" error message will appear in Link. To maximize the number of institutions available, initialize Link with the minimal product set required for your use case. + /// Additional products can be included via the optional_products or required_if_supported_products fields. Products can also be be initialized by calling the endpoint after obtaining an access token; this may require the product to be listed in the additional_consented_products array. For details, see Choosing when to initialize products. /// Note that, unless you have opted to disable Instant Match support, institutions that support Instant Match will also be shown in Link if auth is specified as a product, even though these institutions do not contain auth in their product array. /// In Production, you will be billed for each product that you specify when initializing Link. Note that a product cannot be removed from an Item once the Item has been initialized with that product. To stop billing on an Item for subscription-based products, such as Liabilities, Investments, and Transactions, remove the Item via /item/remove. /// @@ -88,7 +89,7 @@ public partial class LinkTokenCreateRequest : RequestBase public string? LinkCustomizationName { get; set; } = default!; /// - /// A URI indicating the destination where a user should be forwarded after completing the Link flow; used to support OAuth authentication flows when launching Link in the browser or another app. The redirect_uri should not contain any query parameters. When used in Production, must be an https URI. To specify any subdomain, use * as a wildcard character, e.g. https://*.example.com/oauth.html. Note that any redirect URI must also be added to the Allowed redirect URIs list in the developer dashboard. If initializing on Android, android_package_name must be specified instead and redirect_uri should be left blank. If using Hosted Link, the redirect_uri must be set to https://secure.plaid.com/oauth/redirect. + /// A URI indicating the destination where a user should be forwarded after completing the Link flow; used to support OAuth authentication flows when launching Link in the browser or another app. The redirect_uri should not contain any query parameters. When used in Production, must be an https URI. To specify any subdomain, use * as a wildcard character, e.g. https://*.example.com/oauth.html. Note that any redirect URI must also be added to the Allowed redirect URIs list in the developer dashboard. If initializing on Android, android_package_name must be specified instead and redirect_uri should be left blank. /// [JsonPropertyName("redirect_uri")] public string? RedirectUri { get; set; } = default!; diff --git a/src/Plaid/Link/PlaidClient.cs b/src/Plaid/Link/PlaidClient.cs index 5452ab0f..661d9ad4 100644 --- a/src/Plaid/Link/PlaidClient.cs +++ b/src/Plaid/Link/PlaidClient.cs @@ -16,16 +16,15 @@ public sealed partial class PlaidClient /// The /link/token/create endpoint creates a link_token, which is required as a parameter when initializing Link. Once Link has been initialized, it returns a public_token. For most Plaid products, the public_token is saved and exchanged for an access_token via /item/public_token/exchange as part of the main Link flow. For more details, see the Link flow overview. /// A link_token generated by /link/token/create is also used to initialize other Link flows, such as the update mode flow for tokens with expired credentials, or the Identity Verification flow. /// - /// + /// public Task LinkTokenCreateAsync(Link.LinkTokenCreateRequest request) => PostAsync("/link/token/create", request) .ParseResponseAsync(); /// - /// The /link/token/get endpoint gets information about a previously-created link_token using the - /// /link/token/create endpoint. It can be useful for debugging purposes. + /// The /link/token/get endpoint gets information about a Link session, including all callbacks fired during the session along with their metadata, including the public token. This endpoint is used with Link flows that don't provide a public token via frontend callbacks, such as the Hosted Link flow and the Multi-Item Link flow. It also can be useful for debugging purposes. /// - /// + /// public Task LinkTokenGetAsync(Link.LinkTokenGetRequest request) => PostAsync("/link/token/get", request) .ParseResponseAsync(); diff --git a/src/Plaid/NetworkInsights/NetworkInsightsReportGetRequest.cs b/src/Plaid/NetworkInsights/NetworkInsightsReportGetRequest.cs new file mode 100644 index 00000000..b4871f0f --- /dev/null +++ b/src/Plaid/NetworkInsights/NetworkInsightsReportGetRequest.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.NetworkInsights; + +/// +/// NetworkInsightsReportGetRequest defines the request schema for /network_insights/report/get. +/// +public partial class NetworkInsightsReportGetRequest : RequestBase +{ + /// + /// A list of access tokens that the Network Insights will be requested for. These correspond to previous Items a user has connected. + /// + [JsonPropertyName("access_tokens")] + public IReadOnlyList AccessTokens { get; set; } = default!; + +} diff --git a/src/Plaid/NetworkInsights/NetworkInsightsReportGetResponse.cs b/src/Plaid/NetworkInsights/NetworkInsightsReportGetResponse.cs new file mode 100644 index 00000000..5fa27dc8 --- /dev/null +++ b/src/Plaid/NetworkInsights/NetworkInsightsReportGetResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.NetworkInsights; + +/// +/// NetworkInsightsReportGetResponse defines the response schema for /network_insights/report/get. +/// +public record NetworkInsightsReportGetResponse : ResponseBase +{ + /// + /// Contains data for the Network Insights Report. + /// + [JsonPropertyName("report")] + public Entity.NetworkInsightsReport Report { get; init; } = default!; + +} diff --git a/src/Plaid/NetworkInsights/PlaidClient.cs b/src/Plaid/NetworkInsights/PlaidClient.cs new file mode 100644 index 00000000..8a1dae66 --- /dev/null +++ b/src/Plaid/NetworkInsights/PlaidClient.cs @@ -0,0 +1,13 @@ +namespace Going.Plaid; + +public sealed partial class PlaidClient +{ + /// + /// This endpoint allows you to retrieve the Network Insights from a list of access_tokens. + /// + /// + public Task NetworkInsightsReportGetAsync(NetworkInsights.NetworkInsightsReportGetRequest request) => + PostAsync("/network_insights/report/get", request) + .ParseResponseAsync(); + +} diff --git a/src/Plaid/Processor/PlaidClient.cs b/src/Plaid/Processor/PlaidClient.cs index 2a9774e5..5cd5701f 100644 --- a/src/Plaid/Processor/PlaidClient.cs +++ b/src/Plaid/Processor/PlaidClient.cs @@ -138,7 +138,6 @@ public sealed partial class PlaidClient /// /// The /processor/identity/match endpoint generates a match score, which indicates how well the provided identity data matches the identity information on file with the account holder's financial institution. /// Fields within the balances object will always be null when retrieved by /identity/match. Instead, use the free /accounts/get endpoint to request balance cached data, or /accounts/balance/get for real-time data. - /// This request may take some time to complete if Identity was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the data. /// /// public Task ProcessorIdentityMatchAsync(Processor.ProcessorIdentityMatchRequest request) => diff --git a/src/Plaid/Processor/ProcessorSignalEvaluateRequest.cs b/src/Plaid/Processor/ProcessorSignalEvaluateRequest.cs index 81216ee3..5847a78a 100644 --- a/src/Plaid/Processor/ProcessorSignalEvaluateRequest.cs +++ b/src/Plaid/Processor/ProcessorSignalEvaluateRequest.cs @@ -66,4 +66,10 @@ public partial class ProcessorSignalEvaluateRequest : RequestBase [JsonPropertyName("device")] public Entity.SignalEvaluateDevice? Device { get; set; } = default!; + /// + /// The key of the Ruleset to use for this transaction. You can configure a Ruleset using the Signal dashboard located within the Plaid Dashboard. If not provided, no Ruleset will be used. This feature is currently in closed beta; to request access, contact your account manager. + /// + [JsonPropertyName("ruleset_key")] + public string? RulesetKey { get; set; } = default!; + } diff --git a/src/Plaid/Processor/ProcessorSignalEvaluateResponse.cs b/src/Plaid/Processor/ProcessorSignalEvaluateResponse.cs index 6ec1b3b4..90b13aaf 100644 --- a/src/Plaid/Processor/ProcessorSignalEvaluateResponse.cs +++ b/src/Plaid/Processor/ProcessorSignalEvaluateResponse.cs @@ -23,6 +23,12 @@ public record ProcessorSignalEvaluateResponse : ResponseBase [JsonPropertyName("core_attributes")] public Entity.SignalEvaluateCoreAttributes? CoreAttributes { get; init; } = default!; + /// + /// Details about the transaction result after evaluated by the requested Ruleset. If a ruleset_key is not provided, this field will be omitted. This feature is currently in closed beta; to request access, contact your account manager. + /// + [JsonPropertyName("ruleset")] + public Entity.SignalEvaluateRuleset? Ruleset { get; init; } = default!; + /// /// If bank information was not available to be used in the Signal model, this array contains warnings describing why bank data is missing. If you want to receive an API error instead of Signal scores in the case of missing bank data, file a support ticket or contact your Plaid account manager. /// diff --git a/src/Plaid/Profile/PlaidClient.cs b/src/Plaid/Profile/PlaidClient.cs index 58086513..da77e9b0 100644 --- a/src/Plaid/Profile/PlaidClient.cs +++ b/src/Plaid/Profile/PlaidClient.cs @@ -10,4 +10,13 @@ public sealed partial class PlaidClient PostAsync("/profile/get", request) .ParseResponseAsync(); + /// + /// The /profile/network_status/get endpoint can be used to check whether Plaid has a matching profile + /// for the user. + /// + /// + public Task ProfileNetworkStatusGetAsync(Profile.ProfileNetworkStatusGetRequest request) => + PostAsync("/profile/network_status/get", request) + .ParseResponseAsync(); + } diff --git a/src/Plaid/Profile/ProfileNetworkStatusGetRequest.cs b/src/Plaid/Profile/ProfileNetworkStatusGetRequest.cs new file mode 100644 index 00000000..9781af15 --- /dev/null +++ b/src/Plaid/Profile/ProfileNetworkStatusGetRequest.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Profile; + +/// +/// ProfileNetworkStatusGetRequest defines the request schema for /profile/network_status/get +/// +public partial class ProfileNetworkStatusGetRequest : RequestBase +{ + /// + /// An object specifying information about the end user for the network status check + /// + [JsonPropertyName("user")] + public Entity.ProfileNetworkStatusGetUser User { get; set; } = default!; + +} diff --git a/src/Plaid/Profile/ProfileNetworkStatusGetResponse.cs b/src/Plaid/Profile/ProfileNetworkStatusGetResponse.cs new file mode 100644 index 00000000..7a7c92c5 --- /dev/null +++ b/src/Plaid/Profile/ProfileNetworkStatusGetResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Profile; + +/// +/// ProfileNetworkStatusGetResponse defines the response schema for /profile/network_status/get +/// +public record ProfileNetworkStatusGetResponse : ResponseBase +{ + /// + /// Enum representing the overall network status of the user + /// + [JsonPropertyName("network_status")] + public Entity.ProfileNetworkStatusGetNetworkStatus NetworkStatus { get; init; } = default!; + +} diff --git a/src/Plaid/Sandbox/PlaidClient.cs b/src/Plaid/Sandbox/PlaidClient.cs index b0caeb5e..c4762ec6 100644 --- a/src/Plaid/Sandbox/PlaidClient.cs +++ b/src/Plaid/Sandbox/PlaidClient.cs @@ -11,7 +11,7 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// Use the /sandbox/public_token/create endpoint to create a valid public_token for an arbitrary institution ID, initial products, and test credentials. The created public_token maps to a new Sandbox Item. You can then call /item/public_token/exchange to exchange the public_token for an access_token and perform all API actions. /sandbox/public_token/create can also be used with the user_custom test username to generate a test account with custom data. /sandbox/public_token/create cannot be used with OAuth institutions. + /// Use the /sandbox/public_token/create endpoint to create a valid public_token for an arbitrary institution ID, initial products, and test credentials. The created public_token maps to a new Sandbox Item. You can then call /item/public_token/exchange to exchange the public_token for an access_token and perform all API actions. /sandbox/public_token/create can also be used with the user_custom test username to generate a test account with custom data, or with Plaid's pre-populated Sandbox test accounts. /// /// public Task SandboxPublicTokenCreateAsync(Sandbox.SandboxPublicTokenCreateRequest request) => @@ -21,7 +21,7 @@ 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. - /// NEW_ACCOUNTS_AVAILABLE: Webhook to be fired for a given Sandbox Item created with Account Select v2. + /// 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. /// 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. diff --git a/src/Plaid/Sandbox/SandboxTransferLedgerSimulateAvailableRequest.cs b/src/Plaid/Sandbox/SandboxTransferLedgerSimulateAvailableRequest.cs index 312c9d7b..fa278c29 100644 --- a/src/Plaid/Sandbox/SandboxTransferLedgerSimulateAvailableRequest.cs +++ b/src/Plaid/Sandbox/SandboxTransferLedgerSimulateAvailableRequest.cs @@ -5,6 +5,12 @@ namespace Going.Plaid.Sandbox; /// public partial class SandboxTransferLedgerSimulateAvailableRequest : RequestBase { + /// + /// Specify which ledger balance to simulate converting pending balance to available balance. If this field is left blank, this will default to id of the default ledger balance. + /// + [JsonPropertyName("ledger_id")] + public string? LedgerId { get; set; } = default!; + /// /// Plaid’s unique identifier for a test clock. If provided, only the pending balance that is due before the virtual_timestamp on the test clock will be converted. /// diff --git a/src/Plaid/Statements/StatementsRefreshRequest.cs b/src/Plaid/Statements/StatementsRefreshRequest.cs index d9f02241..7340adb0 100644 --- a/src/Plaid/Statements/StatementsRefreshRequest.cs +++ b/src/Plaid/Statements/StatementsRefreshRequest.cs @@ -6,13 +6,13 @@ namespace Going.Plaid.Statements; public partial class StatementsRefreshRequest : RequestBase { /// - /// The start date for statements, in “YYYY-MM-DD” format, e.g. "2023-08-30". To determine whether a statement falls within the specified date range, Plaid will use the statement posted date. The statement posted date is typically either the last day of the statement period, or the following day. + /// The start date for statements, in "YYYY-MM-DD" format, e.g. "2023-08-30". To determine whether a statement falls within the specified date range, Plaid will use the statement posted date. The statement posted date is typically either the last day of the statement period, or the following day. /// [JsonPropertyName("start_date")] public DateOnly StartDate { get; set; } = default!; /// - /// The end date for statements, in “YYYY-MM-DD” format, e.g. "2023-10-30". You can request up to two years of data. To determine whether a statement falls within the specified date range, Plaid will use the statement posted date. The statement posted date is typically either the last day of the statement period, or the following day. + /// The end date for statements, in "YYYY-MM-DD" format, e.g. "2023-10-30". You can request up to two years of data. To determine whether a statement falls within the specified date range, Plaid will use the statement posted date. The statement posted date is typically either the last day of the statement period, or the following day. /// [JsonPropertyName("end_date")] public DateOnly EndDate { get; set; } = default!; diff --git a/src/Plaid/Transactions/PlaidClient.cs b/src/Plaid/Transactions/PlaidClient.cs index 4f2cb055..94ecfc27 100644 --- a/src/Plaid/Transactions/PlaidClient.cs +++ b/src/Plaid/Transactions/PlaidClient.cs @@ -30,7 +30,8 @@ public sealed partial class PlaidClient /// /// The /transactions/recurring/get endpoint allows developers to receive a summary of the recurring outflow and inflow streams (expenses and deposits) from a user’s checking, savings or credit card accounts. Additionally, Plaid provides key insights about each recurring stream including the category, merchant, last amount, and more. Developers can use these insights to build tools and experiences that help their users better manage cash flow, monitor subscriptions, reduce spend, and stay on track with bill payments. /// This endpoint is offered as an add-on to Transactions. To request access to this endpoint, submit a product access request or contact your Plaid account manager. - /// This endpoint can only be called on an Item that has already been initialized with Transactions (either during Link, by specifying it in /link/token/create; or after Link, by calling /transactions/get or /transactions/sync). For optimal results, we strongly recommend customers using Recurring Transactions to request at least 180 days of history when initializing items with Transactions (using the days_requested option). Once all historical transactions have been fetched, call /transactions/recurring/get to receive the Recurring Transactions streams and subscribe to the RECURRING_TRANSACTIONS_UPDATE webhook. To know when historical transactions have been fetched, if you are using /transactions/sync listen for the SYNC_UPDATES_AVAILABLE webhook and check that the historical_update_complete field in the payload is true. If using /transactions/get, listen for the HISTORICAL_UPDATE webhook. + /// This endpoint can only be called on an Item that has already been initialized with Transactions (either during Link, by specifying it in /link/token/create; or after Link, by calling /transactions/get or /transactions/sync). + /// When using Recurring Transactions, for best results, make sure to use the days_requested parameter to request at least 180 days of history when initializing Items with Transactions. Once all historical transactions have been fetched, call /transactions/recurring/get to receive the Recurring Transactions streams and subscribe to the RECURRING_TRANSACTIONS_UPDATE webhook. To know when historical transactions have been fetched, if you are using /transactions/sync listen for the SYNC_UPDATES_AVAILABLE webhook and check that the historical_update_complete field in the payload is true. If using /transactions/get, listen for the HISTORICAL_UPDATE webhook. /// After the initial call, you can call /transactions/recurring/get endpoint at any point in the future to retrieve the latest summary of recurring streams. Listen to the RECURRING_TRANSACTIONS_UPDATE webhook to be notified when new updates are available. /// /// diff --git a/src/Plaid/Transfer/PlaidClient.cs b/src/Plaid/Transfer/PlaidClient.cs index 26514301..bb7361a9 100644 --- a/src/Plaid/Transfer/PlaidClient.cs +++ b/src/Plaid/Transfer/PlaidClient.cs @@ -19,12 +19,16 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// Use the /transfer/authorization/create endpoint to authorize a transfer. This endpoint must be called prior to calling /transfer/create. - /// There are three 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 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. + /// 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. /// 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. - /// - To approve a transfer with the rationale code ITEM_LOGIN_REQUIRED, reset the login for an Item. + /// - To get an authorization decision of user_action_required, reset the login for an Item. /// - To decline a transfer with the rationale code NSF, the available balance on the account must be less than the authorization amount. See Create Sandbox test data for details on how to customize data in Sandbox. /// - To decline a transfer with the rationale code RISK, the available balance on the account must be exactly $0. See Create Sandbox test data for details on how to customize data in Sandbox. /// @@ -114,7 +118,7 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// Use the /transfer/create endpoint to initiate a new transfer. + /// Use the /transfer/create endpoint to initiate a new transfer. This endpoint is retryable and idempotent; if a transfer with the provided transfer_id has already been created, it will return the transfer details without creating a new transfer. A transfer may still be created if a 500 error is returned; to detect this scenario, use Transfer events. /// /// public Task TransferCreateAsync(Transfer.TransferCreateRequest request) => @@ -194,7 +198,7 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// As an alternative to adding Items via Link, you can also use the /transfer/migrate_account endpoint to migrate known account and routing numbers to Plaid Items. If you intend to create wire transfers on this account, you must provide wire_routing_number. Note that Items created in this way are not compatible with endpoints for other products, such as /accounts/balance/get, and can only be used with Transfer endpoints. If you require access to other endpoints, create the Item through Link instead. Access to /transfer/migrate_account is not enabled by default; to obtain access, contact your Plaid Account Manager. + /// As an alternative to adding Items via Link, you can also use the /transfer/migrate_account endpoint to migrate known account and routing numbers to Plaid Items. This endpoint is also required when adding an Item for use with wire transfers; if you intend to create wire transfers on this account, you must provide wire_routing_number. Note that Items created in this way are not compatible with endpoints for other products, such as /accounts/balance/get, and can only be used with Transfer endpoints. If you require access to other endpoints, create the Item through Link instead. Access to /transfer/migrate_account is not enabled by default; to obtain access, contact your Plaid Account Manager. /// /// public Task TransferMigrateAccountAsync(Transfer.TransferMigrateAccountRequest request) => @@ -307,4 +311,12 @@ public sealed partial class PlaidClient PostAsync("/transfer/refund/cancel", request) .ParseResponseAsync(); + /// + /// The /transfer/platform/originator/create endpoint allows gathering information about the originator specific to the Scaled Platform Transfer offering, including the originator's agreement to legal terms required before accepting any further information related to the originator. + /// + /// + public Task TransferPlatformOriginatorCreateAsync(Transfer.TransferPlatformOriginatorCreateRequest request) => + PostAsync("/transfer/platform/originator/create", request) + .ParseResponseAsync(); + } diff --git a/src/Plaid/Transfer/TransferAuthorizationCreateRequest.cs b/src/Plaid/Transfer/TransferAuthorizationCreateRequest.cs index 4e366ebe..5f3e41c4 100644 --- a/src/Plaid/Transfer/TransferAuthorizationCreateRequest.cs +++ b/src/Plaid/Transfer/TransferAuthorizationCreateRequest.cs @@ -17,6 +17,12 @@ public partial class TransferAuthorizationCreateRequest : RequestBase [JsonPropertyName("funding_account_id")] public string? FundingAccountId { get; set; } = default!; + /// + /// Specify which ledger balance used to fund the transfer. Customers can find a list of ledger_ids in the Accounts page of your Plaid Dashboard. If this field is left blank, this will default to id of the default ledger balance. + /// + [JsonPropertyName("ledger_id")] + public string? LedgerId { get; set; } = default!; + /// /// The payment profile token associated with the Payment Profile that will be debited or credited. Required if not using access_token. /// @@ -80,6 +86,7 @@ public partial class TransferAuthorizationCreateRequest : RequestBase /// /// A random key provided by the client, per unique authorization, which expires after 48 hours. Maximum of 50 characters. /// The API supports idempotency for safely retrying requests without accidentally performing the same operation twice. For example, if a request to create an authorization fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single authorization is created. + /// Idempotency does not apply to authorizations whose decisions are user_action_required. Therefore you may re-attempt the authorization after completing the required user action without changing idempotency_key. /// This idempotency key expires after 48 hours, after which the same key can be reused. Failure to provide this key may result in duplicate charges. /// [JsonPropertyName("idempotency_key")] diff --git a/src/Plaid/Transfer/TransferLedgerDepositRequest.cs b/src/Plaid/Transfer/TransferLedgerDepositRequest.cs index 09507540..58e09046 100644 --- a/src/Plaid/Transfer/TransferLedgerDepositRequest.cs +++ b/src/Plaid/Transfer/TransferLedgerDepositRequest.cs @@ -17,6 +17,12 @@ public partial class TransferLedgerDepositRequest : RequestBase [JsonPropertyName("funding_account_id")] public string? FundingAccountId { get; set; } = default!; + /// + /// Specify which ledger balance to deposit to. Customers can find a list of ledger_ids in the Accounts page of your Plaid Dashboard. If this field is left blank, this will default to id of the default ledger balance. + /// + [JsonPropertyName("ledger_id")] + public string? LedgerId { get; set; } = default!; + /// /// A positive amount of how much will be deposited into ledger (decimal string with two digits of precision e.g. "5.50"). /// diff --git a/src/Plaid/Transfer/TransferLedgerGetRequest.cs b/src/Plaid/Transfer/TransferLedgerGetRequest.cs index 3edcf872..aacac47c 100644 --- a/src/Plaid/Transfer/TransferLedgerGetRequest.cs +++ b/src/Plaid/Transfer/TransferLedgerGetRequest.cs @@ -5,6 +5,12 @@ namespace Going.Plaid.Transfer; /// public partial class TransferLedgerGetRequest : RequestBase { + /// + /// Specify which ledger balance to get. Customers can find a list of ledger_ids in the Accounts page of your Plaid Dashboard. If this field is left blank, this will default to id of the default ledger balance. + /// + [JsonPropertyName("ledger_id")] + public string? LedgerId { get; set; } = default!; + /// /// Client ID of the end customer. /// diff --git a/src/Plaid/Transfer/TransferLedgerWithdrawRequest.cs b/src/Plaid/Transfer/TransferLedgerWithdrawRequest.cs index ceecf1aa..0d264dea 100644 --- a/src/Plaid/Transfer/TransferLedgerWithdrawRequest.cs +++ b/src/Plaid/Transfer/TransferLedgerWithdrawRequest.cs @@ -17,6 +17,12 @@ public partial class TransferLedgerWithdrawRequest : RequestBase [JsonPropertyName("funding_account_id")] public string? FundingAccountId { get; set; } = default!; + /// + /// Specify which ledger balance to withdraw from. Customers can find a list of ledger_ids in the Accounts page of your Plaid Dashboard. If this field is left blank, this will default to id of the default ledger balance. + /// + [JsonPropertyName("ledger_id")] + public string? LedgerId { get; set; } = default!; + /// /// A positive amount of how much will be withdrawn from the ledger balance (decimal string with two digits of precision e.g. "5.50"). /// diff --git a/src/Plaid/Transfer/TransferMetricsGetResponse.cs b/src/Plaid/Transfer/TransferMetricsGetResponse.cs index e09580ea..baae7136 100644 --- a/src/Plaid/Transfer/TransferMetricsGetResponse.cs +++ b/src/Plaid/Transfer/TransferMetricsGetResponse.cs @@ -47,4 +47,10 @@ public record TransferMetricsGetResponse : ResponseBase [JsonPropertyName("return_rates")] public Entity.TransferMetricsGetReturnRates? ReturnRates { get; init; } = default!; + /// + /// Details regarding authorization usage. + /// + [JsonPropertyName("authorization_usage")] + public Entity.TransferMetricsGetAuthorizationUsage? AuthorizationUsage { get; init; } = default!; + } diff --git a/src/Plaid/Transfer/TransferPlatformOriginatorCreateRequest.cs b/src/Plaid/Transfer/TransferPlatformOriginatorCreateRequest.cs new file mode 100644 index 00000000..f86f11bd --- /dev/null +++ b/src/Plaid/Transfer/TransferPlatformOriginatorCreateRequest.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Transfer; + +/// +/// Defines the request schema for /transfer/platform/originator/create +/// +public partial class TransferPlatformOriginatorCreateRequest : RequestBase +{ + /// + /// The client ID of the originator + /// + [JsonPropertyName("originator_client_id")] + public string OriginatorClientId { get; set; } = default!; + + /// + /// Metadata related to the acceptance of Terms of Service + /// + [JsonPropertyName("tos_acceptance_metadata")] + public Entity.TOSAcceptanceMetadata TosAcceptanceMetadata { get; set; } = default!; + + /// + /// ISO8601 timestamp indicating the most recent time the platform collected onboarding data from the originator + /// + [JsonPropertyName("originator_reviewed_at")] + public DateTimeOffset OriginatorReviewedAt { get; set; } = default!; + +} diff --git a/src/Plaid/Transfer/TransferPlatformOriginatorCreateResponse.cs b/src/Plaid/Transfer/TransferPlatformOriginatorCreateResponse.cs new file mode 100644 index 00000000..3cd18a2f --- /dev/null +++ b/src/Plaid/Transfer/TransferPlatformOriginatorCreateResponse.cs @@ -0,0 +1,8 @@ +namespace Going.Plaid.Transfer; + +/// +/// Defines the response schema for /transfer/platform/originator/create +/// +public record TransferPlatformOriginatorCreateResponse : ResponseBase +{ +} diff --git a/src/Plaid/User/PlaidClient.cs b/src/Plaid/User/PlaidClient.cs index 7ed78924..5af64a3d 100644 --- a/src/Plaid/User/PlaidClient.cs +++ b/src/Plaid/User/PlaidClient.cs @@ -3,29 +3,29 @@ namespace Going.Plaid; public sealed partial class PlaidClient { /// - /// This endpoint should be called for each of your end users before they begin a Plaid income flow. This provides you a single token to access all income data associated with the user. You should only create one per end user. + /// This endpoint should be called for each of your end users before they begin a Plaid Check or Income flow, or a Multi-Item Link flow. This provides you a single token to access all data associated with the user. You should only create one per end user. + /// The consumer_report_user_identity object must be present in order to create a Plaid Check Consumer Report for a user. If it is not provided during the /user/create call, it can be added later by calling /user/update. /// If you call the endpoint multiple times with the same client_user_id, the first creation call will succeed and the rest will fail with an error message indicating that the user has been created for the given client_user_id. /// Ensure that you store the user_token along with your user's identifier in your database, as it is not possible to retrieve a previously created user_token. /// - /// + /// public Task UserCreateAsync(User.UserCreateRequest request) => PostAsync("/user/create", request) .ParseResponseAsync(); /// - /// This endpoint is used to update user information associated with an existing user_token. The user_token should be in the response of /user/create call - /// If you call the endpoint with a non-exist user_token, the call will fail with an error message indicating that the user token is not found. + /// This endpoint is used to update user information associated with an existing user_token. It can also be used to enable an existing user_token for use with Consumer Reports by Plaid Check, by adding a consumer_report_user_identity object to the user. /// - /// + /// public Task UserUpdateAsync(User.UserUpdateRequest request) => PostAsync("/user/update", request) .ParseResponseAsync(); /// - /// This endpoint is used to remove a user and any relevant data related to the user based on the provided user token. + /// /user/remove deletes a user token and and associated information, including any Items associated with the token. /// Any subsequent calls to retrieve information using the same user token will result in an error stating the user does not exist. /// - /// + /// public Task UserRemoveAsync(User.UserRemoveRequest request) => PostAsync("/user/remove", request) .ParseResponseAsync(); @@ -33,7 +33,7 @@ public sealed partial class PlaidClient /// /// Returns Items associated with a User along with their corresponding statuses. /// - /// + /// public Task UserItemsGetAsync(User.UserItemsGetRequest request) => PostAsync("/user/items/get", request) .ParseResponseAsync(); diff --git a/src/Plaid/User/UserCreateRequest.cs b/src/Plaid/User/UserCreateRequest.cs index 1c22a3bf..9db21375 100644 --- a/src/Plaid/User/UserCreateRequest.cs +++ b/src/Plaid/User/UserCreateRequest.cs @@ -12,7 +12,7 @@ public partial class UserCreateRequest : RequestBase public string ClientUserId { get; set; } = default!; /// - /// This object defines the user identity data collected for consumer report purposes. This field is required if you are planning on using the user token with Plaid Check products. + /// 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. /// [JsonPropertyName("consumer_report_user_identity")] public Entity.ConsumerReportUserIdentity? ConsumerReportUserIdentity { get; set; } = default!; diff --git a/src/Plaid/User/UserUpdateRequest.cs b/src/Plaid/User/UserUpdateRequest.cs index e1611438..e133ca23 100644 --- a/src/Plaid/User/UserUpdateRequest.cs +++ b/src/Plaid/User/UserUpdateRequest.cs @@ -12,7 +12,7 @@ public partial class UserUpdateRequest : RequestBase public string UserToken { get; set; } = default!; /// - /// This object defines the user identity data collected for consumer report purposes. This field is required if you are planning on using the user token with Plaid Check products. + /// 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. /// [JsonPropertyName("consumer_report_user_identity")] public Entity.ConsumerReportUserIdentity? ConsumerReportUserIdentity { get; set; } = default!; diff --git a/src/Plaid/Wallet/WalletTransactionGetResponse.cs b/src/Plaid/Wallet/WalletTransactionGetResponse.cs index 9e17228f..5d5add0b 100644 --- a/src/Plaid/Wallet/WalletTransactionGetResponse.cs +++ b/src/Plaid/Wallet/WalletTransactionGetResponse.cs @@ -77,4 +77,10 @@ public record WalletTransactionGetResponse : ResponseBase [JsonPropertyName("failure_reason")] public Entity.WalletTransactionFailureReason? FailureReason { get; init; } = default!; + /// + /// A list of wallet transactions that this transaction is associated with, if any. + /// + [JsonPropertyName("related_transactions")] + public IReadOnlyList? RelatedTransactions { get; init; } = default!; + } diff --git a/src/Plaid/Webhook/AuthDefaultUpdateWebhook.cs b/src/Plaid/Webhook/AuthDefaultUpdateWebhook.cs index b860a82e..3036d415 100644 --- a/src/Plaid/Webhook/AuthDefaultUpdateWebhook.cs +++ b/src/Plaid/Webhook/AuthDefaultUpdateWebhook.cs @@ -20,13 +20,13 @@ public record AuthDefaultUpdateWebhook : WebhookBase public string ItemId { get; init; } = default!; /// - /// An array of account_id's for accounts that contain new auth.' + /// An array of account_id's for accounts that contain new auth. /// [JsonPropertyName("account_ids_with_new_auth")] public IReadOnlyList AccountIdsWithNewAuth { get; init; } = default!; /// - /// An object with keys of account_id's that are mapped to their respective auth attributes that changed. + /// An object with keys of account_id's that are mapped to their respective auth attributes that changed. ACCOUNT_NUMBER and ROUTING_NUMBER are the two potential values that can be flagged as updated. /// Example: { "XMBvvyMGQ1UoLbKByoMqH3nXMj84ALSdE5B58": ["ACCOUNT_NUMBER"] } /// [JsonPropertyName("account_ids_with_updated_auth")] diff --git a/src/Plaid/Webhook/HistoricalUpdateWebhook.cs b/src/Plaid/Webhook/HistoricalUpdateWebhook.cs index bd3635f7..0987bab7 100644 --- a/src/Plaid/Webhook/HistoricalUpdateWebhook.cs +++ b/src/Plaid/Webhook/HistoricalUpdateWebhook.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Webhook; /// -/// Fired when an Item's historical transaction pull is completed and Plaid has prepared as much historical transaction data as possible for the Item. Once this webhook has been fired, transaction data beyond the most recent 30 days can be fetched for the Item. If Account Select v2 is enabled, this webhook will also be fired if account selections for the Item are updated, with new_transactions set to the number of net new transactions pulled after the account selection update. +/// Fired when an Item's historical transaction pull is completed and Plaid has prepared as much historical transaction data as possible for the Item. Once this webhook has been fired, transaction data beyond the most recent 30 days can be fetched for the Item. This webhook will also be fired if account selections for the Item are updated, with new_transactions set to the number of net new transactions pulled after the account selection update. /// This webhook is intended for use with /transactions/get; if you are using the newer /transactions/sync endpoint, this webhook will still be fired to maintain backwards compatibility, but it is recommended to listen for and respond to the SYNC_UPDATES_AVAILABLE webhook instead. /// public record HistoricalUpdateWebhook : WebhookBase @@ -21,7 +21,7 @@ public record HistoricalUpdateWebhook : WebhookBase public Entity.PlaidError? Error { get; init; } = default!; /// - /// The number of new, unfetched transactions available + /// The number of new transactions available /// [JsonPropertyName("new_transactions")] public decimal NewTransactions { get; init; } = default!; diff --git a/src/Plaid/Webhook/InitialUpdateWebhook.cs b/src/Plaid/Webhook/InitialUpdateWebhook.cs index 9ef69ccc..69137c34 100644 --- a/src/Plaid/Webhook/InitialUpdateWebhook.cs +++ b/src/Plaid/Webhook/InitialUpdateWebhook.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Webhook; /// -/// Fired when an Item's initial transaction pull is completed. Once this webhook has been fired, transaction data for the most recent 30 days can be fetched for the Item. If Account Select v2 is enabled, this webhook will also be fired if account selections for the Item are updated, with new_transactions set to the number of net new transactions pulled after the account selection update. +/// Fired when an Item's initial transaction pull is completed. Once this webhook has been fired, transaction data for the most recent 30 days can be fetched for the Item. This webhook will also be fired if account selections for the Item are updated, with new_transactions set to the number of net new transactions pulled after the account selection update. /// This webhook is intended for use with /transactions/get; if you are using the newer /transactions/sync endpoint, this webhook will still be fired to maintain backwards compatibility, but it is recommended to listen for and respond to the SYNC_UPDATES_AVAILABLE webhook instead. /// public record InitialUpdateWebhook : WebhookBase @@ -21,7 +21,7 @@ public record InitialUpdateWebhook : WebhookBase public string? Error { get; init; } = default!; /// - /// The number of new, unfetched transactions available. + /// The number of new transactions available. /// [JsonPropertyName("new_transactions")] public decimal NewTransactions { get; init; } = default!; diff --git a/src/Plaid/Webhook/IssueResolvedWebhook.cs b/src/Plaid/Webhook/IssueResolvedWebhook.cs new file mode 100644 index 00000000..bd5ba698 --- /dev/null +++ b/src/Plaid/Webhook/IssueResolvedWebhook.cs @@ -0,0 +1,46 @@ +namespace Going.Plaid.Webhook; + +/// +/// Webhook notifications are sent only when a subscribed issue is marked as resolved. The payload contains details about the issue at the time of its resolution, focusing on the most essential information. +/// +public record IssueResolvedWebhook : WebhookBase +{ + /// + [JsonPropertyName("webhook_type")] + public override WebhookType WebhookType => WebhookType.Issues; + + /// + [JsonPropertyName("webhook_code")] + public override WebhookCode WebhookCode => WebhookCode.IssueResolved; + + /// + /// The unique identifier of the connectivity issue. + /// + [JsonPropertyName("issue_id")] + public string IssueId { get; init; } = default!; + + /// + /// A simple description of the error for the end user. + /// + [JsonPropertyName("issue_description")] + public string IssueDescription { get; init; } = default!; + + /// + /// The time when the issue was marked as resolved. + /// + [JsonPropertyName("issue_resolved_at")] + public DateTimeOffset IssueResolvedAt { get; init; } = default!; + + /// + /// The unique identifier of the financial institution involved. + /// + [JsonPropertyName("institution_id")] + public string InstitutionId { get; init; } = default!; + + /// + /// The name of the financial institution involved. + /// + [JsonPropertyName("institution_name")] + public string InstitutionName { get; init; } = default!; + +} diff --git a/src/Plaid/Webhook/ItemAddResultWebhook.cs b/src/Plaid/Webhook/ItemAddResultWebhook.cs index 9e2e7118..8e224dca 100644 --- a/src/Plaid/Webhook/ItemAddResultWebhook.cs +++ b/src/Plaid/Webhook/ItemAddResultWebhook.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Webhook; /// -/// Fired when a user successfully adds a Plaid item during a Link session. Contains the public token for the item. +/// Fired when a user successfully adds a Plaid Item during a Link session when using Hosted Link or Multi-Item Link sessions. Contains the public token for the Item. /// public record ItemAddResultWebhook : WebhookBase { diff --git a/src/Plaid/Webhook/LinkSessionFinishedWebhook.cs b/src/Plaid/Webhook/LinkSessionFinishedWebhook.cs index 6b9238aa..aa198f9a 100644 --- a/src/Plaid/Webhook/LinkSessionFinishedWebhook.cs +++ b/src/Plaid/Webhook/LinkSessionFinishedWebhook.cs @@ -1,8 +1,8 @@ namespace Going.Plaid.Webhook; /// -/// Contains the state of a completed Link session, along with the public token if available. -/// By default, the SESSION_FINISHED webhook is enabled only for clients that are enabled for Hosted Link. If you would like to receive this webhook and are not using Hosted Link, contact your Account Manager. +/// Contains the state of a completed Link session, along with the public token(s) if available. +/// By default, the SESSION_FINISHED webhook is enabled only for clients that are enabled for Hosted Link, or in sessions that are enabled for Multi-Item Link. If you would like to receive this webhook and are not using Hosted Link or Multi-Item Link, contact your Account Manager. /// public record LinkSessionFinishedWebhook : WebhookBase { diff --git a/src/Plaid/Webhook/NewAccountsAvailableWebhook.cs b/src/Plaid/Webhook/NewAccountsAvailableWebhook.cs index 8217f9f9..54d11ae6 100644 --- a/src/Plaid/Webhook/NewAccountsAvailableWebhook.cs +++ b/src/Plaid/Webhook/NewAccountsAvailableWebhook.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Webhook; /// -/// Fired when Plaid detects a new account for Items created or updated with Account Select v2. Upon receiving this webhook, you can prompt your users to share new accounts with you through Account Select v2 update mode (US/CA only). For end user accounts in the EU and UK, upon receiving this webhook, you can prompt your user to re-link their account and then delete the old Item via /item/remove. +/// Fired when Plaid detects a new account. Upon receiving this webhook, you can prompt your users to share new accounts with you through update mode (US/CA only). If the end user has opted not to share new accounts with Plaid via their institution's OAuth settings, Plaid will not detect new accounts and this webhook will not fire. For end user accounts in the EU and UK, upon receiving this webhook, you can prompt your user to re-link their account and then delete the old Item via /item/remove. /// public record NewAccountsAvailableWebhook : WebhookBase { diff --git a/src/Plaid/Webhook/PendingDisconnectWebhook.cs b/src/Plaid/Webhook/PendingDisconnectWebhook.cs new file mode 100644 index 00000000..018d27aa --- /dev/null +++ b/src/Plaid/Webhook/PendingDisconnectWebhook.cs @@ -0,0 +1,28 @@ +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. +/// +public record PendingDisconnectWebhook : WebhookBase +{ + /// + [JsonPropertyName("webhook_type")] + public override WebhookType WebhookType => WebhookType.Item; + + /// + [JsonPropertyName("webhook_code")] + public override WebhookCode WebhookCode => WebhookCode.PendingDisconnect; + + /// + /// The item_id of the Item associated with this webhook, warning, or error + /// + [JsonPropertyName("item_id")] + public string ItemId { get; init; } = default!; + + /// + /// Reason why the item is about to be disconnected. + /// + [JsonPropertyName("reason")] + public Entity.PendingDisconnectWebhookReason Reason { get; init; } = default!; + +} diff --git a/src/Plaid/Webhook/ProcessorHistoricalUpdateWebhook.cs b/src/Plaid/Webhook/ProcessorHistoricalUpdateWebhook.cs index 8b5560ed..dd5347f0 100644 --- a/src/Plaid/Webhook/ProcessorHistoricalUpdateWebhook.cs +++ b/src/Plaid/Webhook/ProcessorHistoricalUpdateWebhook.cs @@ -2,7 +2,7 @@ namespace Going.Plaid.Webhook; /// /// This webhook is only sent to Plaid processor partners. -/// Fired when an Item's historical transaction pull is completed and Plaid has prepared as much historical transaction data as possible for the Item. Once this webhook has been fired, transaction data beyond the most recent 30 days can be fetched for the Item. If Account Select v2 is enabled, this webhook will also be fired if account selections for the Item are updated, with new_transactions set to the number of net new transactions pulled after the account selection update. +/// Fired when an Item's historical transaction pull is completed and Plaid has prepared as much historical transaction data as possible for the Item. Once this webhook has been fired, transaction data beyond the most recent 30 days can be fetched for the Item. This webhook will also be fired if account selections for the Item are updated, with new_transactions set to the number of net new transactions pulled after the account selection update. /// This webhook is intended for use with /processor/transactions/get; if you are using the newer /processor/transactions/sync endpoint, this webhook will still be fired to maintain backwards compatibility, but it is recommended to listen for and respond to the SYNC_UPDATES_AVAILABLE webhook instead. /// public record ProcessorHistoricalUpdateWebhook : ProcessorWebhookBase @@ -22,7 +22,7 @@ public record ProcessorHistoricalUpdateWebhook : ProcessorWebhookBase public Entity.PlaidError? Error { get; init; } = default!; /// - /// The number of new, unfetched transactions available + /// The number of new transactions available /// [JsonPropertyName("new_transactions")] public decimal NewTransactions { get; init; } = default!; diff --git a/src/Plaid/Webhook/ProcessorInitialUpdateWebhook.cs b/src/Plaid/Webhook/ProcessorInitialUpdateWebhook.cs index f9c6ec59..473929ab 100644 --- a/src/Plaid/Webhook/ProcessorInitialUpdateWebhook.cs +++ b/src/Plaid/Webhook/ProcessorInitialUpdateWebhook.cs @@ -2,7 +2,7 @@ namespace Going.Plaid.Webhook; /// /// This webhook is only sent to Plaid processor partners. -/// Fired when an Item's initial transaction pull is completed. Once this webhook has been fired, transaction data for the most recent 30 days can be fetched for the Item. If Account Select v2 is enabled, this webhook will also be fired if account selections for the Item are updated, with new_transactions set to the number of net new transactions pulled after the account selection update. +/// Fired when an Item's initial transaction pull is completed. Once this webhook has been fired, transaction data for the most recent 30 days can be fetched for the Item. This webhook will also be fired if account selections for the Item are updated, with new_transactions set to the number of net new transactions pulled after the account selection update. /// This webhook is intended for use with /processor/transactions/get; if you are using the newer /processor/transactions/sync endpoint, this webhook will still be fired to maintain backwards compatibility, but it is recommended to listen for and respond to the SYNC_UPDATES_AVAILABLE webhook instead. /// public record ProcessorInitialUpdateWebhook : ProcessorWebhookBase @@ -22,7 +22,7 @@ public record ProcessorInitialUpdateWebhook : ProcessorWebhookBase public string? Error { get; init; } = default!; /// - /// The number of new, unfetched transactions available. + /// The number of new transactions available. /// [JsonPropertyName("new_transactions")] public decimal NewTransactions { get; init; } = default!; diff --git a/src/Plaid/Webhook/UserPermissionRevokedWebhook.cs b/src/Plaid/Webhook/UserPermissionRevokedWebhook.cs index 99ab68a0..e58659b4 100644 --- a/src/Plaid/Webhook/UserPermissionRevokedWebhook.cs +++ b/src/Plaid/Webhook/UserPermissionRevokedWebhook.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Webhook; /// -/// The USER_PERMISSION_REVOKED webhook may be fired when an end user has used either the my.plaid.com portal or the financial institution’s OAuth consent portal to revoke the permission that they previously granted to access an Item. This webhook is not guaranteed to always be fired upon consent revocation, 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. +/// 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. /// public record UserPermissionRevokedWebhook : WebhookBase