From cb47d81cac840154583d93d2109f1e8268d70f6a Mon Sep 17 00:00:00 2001 From: Stuart Turner Date: Mon, 10 Jul 2023 14:25:34 -0500 Subject: [PATCH] Update to Plaid v1.385.1 --- plaid-openapi | 2 +- src/Plaid/Categories/PlaidClient.cs | 2 +- src/Plaid/Entity/AssetReportTransaction.cs | 64 +++++++++---------- ...eEnum.cs => AssetReportTransactionType.cs} | 4 +- .../CreditBankStatementUploadBankAccount.cs | 6 ++ .../CreditBankStatementUploadTransaction.cs | 6 ++ src/Plaid/Entity/CreditDocumentMetadata.cs | 2 +- .../IdentityVerificationCreateRequestUser.cs | 59 +++++++++++++++++ .../Entity/IdentityVerificationRequestUser.cs | 7 -- src/Plaid/Entity/RiskCheckDetails.cs | 6 ++ .../Entity/RiskCheckIdentityAbuseSignals.cs | 23 +++++++ src/Plaid/Entity/RiskCheckStolenIdentity.cs | 15 +++++ .../Entity/RiskCheckSyntheticIdentity.cs | 15 +++++ ...BankIncomeWebhookFireRequestWebhookCode.cs | 25 ++++++++ ...nkIncomeWebhookFireRequestWebhookFields.cs | 19 ++++++ src/Plaid/Entity/SignalInsights.cs | 31 +++++++++ src/Plaid/Entity/Transaction.cs | 8 +-- src/Plaid/Entity/TransactionStream.cs | 2 +- .../Entity/TransactionsGetRequestOptions.cs | 4 +- .../TransactionsRecurringGetRequestOptions.cs | 2 +- src/Plaid/Entity/TransferAuthorization.cs | 6 ++ src/Plaid/Entity/TransferDocumentPurpose.cs | 19 ++++++ .../IdentityVerificationCreateRequest.cs | 8 ++- .../IdentityVerificationRetryRequest.cs | 15 +++++ .../Investments/InvestmentsAuthGetResponse.cs | 4 +- src/Plaid/Link/LinkTokenCreateRequest.cs | 11 ++-- src/Plaid/Processor/PlaidClient.cs | 2 +- .../Processor/ProcessorAuthGetRequest.cs | 2 +- .../Processor/ProcessorBalanceGetRequest.cs | 2 +- .../ProcessorBankTransferCreateRequest.cs | 2 +- .../Processor/ProcessorIdentityGetRequest.cs | 2 +- .../ProcessorIdentityMatchRequest.cs | 2 +- .../ProcessorSignalDecisionReportRequest.cs | 2 +- .../ProcessorSignalEvaluateRequest.cs | 4 +- .../ProcessorSignalEvaluateResponse.cs | 2 +- .../ProcessorSignalReturnReportRequest.cs | 2 +- .../ProcessorTokenPermissionsGetRequest.cs | 2 +- .../ProcessorTokenPermissionsSetRequest.cs | 2 +- .../ProcessorTransactionsGetRequest.cs | 2 +- ...rocessorTransactionsRecurringGetRequest.cs | 2 +- .../ProcessorTransactionsRefreshRequest.cs | 2 +- .../ProcessorTransactionsSyncRequest.cs | 2 +- src/Plaid/Sandbox/PlaidClient.cs | 10 ++- .../SandboxBankIncomeFireWebhookRequest.cs | 25 ++++++++ .../SandboxBankIncomeFireWebhookResponse.cs | 8 +++ src/Plaid/Signal/SignalEvaluateRequest.cs | 2 +- src/Plaid/Signal/SignalEvaluateResponse.cs | 2 +- src/Plaid/Transfer/PlaidClient.cs | 9 +++ .../TransferAuthorizationCreateRequest.cs | 10 ++- .../TransferConfigurationGetResponse.cs | 24 +++++++ .../TransferDiligenceDocumentUploadRequest.cs | 25 ++++++++ ...TransferDiligenceDocumentUploadResponse.cs | 8 +++ .../Transfer/TransferMetricsGetResponse.cs | 12 ++++ src/Plaid/Transfer/TransferSweepGetRequest.cs | 2 +- .../Transfer/TransferSweepListRequest.cs | 6 ++ .../Webhook/UserPermissionRevokedWebhook.cs | 2 +- 56 files changed, 455 insertions(+), 89 deletions(-) rename src/Plaid/Entity/{AssetReportTransactionTransactionTypeEnum.cs => AssetReportTransactionType.cs} (83%) create mode 100644 src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs create mode 100644 src/Plaid/Entity/RiskCheckIdentityAbuseSignals.cs create mode 100644 src/Plaid/Entity/RiskCheckStolenIdentity.cs create mode 100644 src/Plaid/Entity/RiskCheckSyntheticIdentity.cs create mode 100644 src/Plaid/Entity/SandboxBankIncomeWebhookFireRequestWebhookCode.cs create mode 100644 src/Plaid/Entity/SandboxBankIncomeWebhookFireRequestWebhookFields.cs create mode 100644 src/Plaid/Entity/SignalInsights.cs create mode 100644 src/Plaid/Entity/TransferDocumentPurpose.cs create mode 100644 src/Plaid/Sandbox/SandboxBankIncomeFireWebhookRequest.cs create mode 100644 src/Plaid/Sandbox/SandboxBankIncomeFireWebhookResponse.cs create mode 100644 src/Plaid/Transfer/TransferDiligenceDocumentUploadRequest.cs create mode 100644 src/Plaid/Transfer/TransferDiligenceDocumentUploadResponse.cs diff --git a/plaid-openapi b/plaid-openapi index 32f364c2..dfecaf62 160000 --- a/plaid-openapi +++ b/plaid-openapi @@ -1 +1 @@ -Subproject commit 32f364c24e89f603f90fa7feb19277b5b3b4dd65 +Subproject commit dfecaf628d527a32550105575366fc077b1f4b8f diff --git a/src/Plaid/Categories/PlaidClient.cs b/src/Plaid/Categories/PlaidClient.cs index f5d29584..586b4482 100644 --- a/src/Plaid/Categories/PlaidClient.cs +++ b/src/Plaid/Categories/PlaidClient.cs @@ -3,7 +3,7 @@ namespace Going.Plaid; public sealed partial class PlaidClient { /// - /// Send a request to the /categories/get endpoint to get detailed information on categories returned by Plaid. This endpoint does not require authentication. + /// Send a request to the /categories/get endpoint to get detailed information on categories returned by Plaid. This endpoint does not require authentication. /// All implementations are recommended to use the newer personal_finance_category taxonomy instead of the older category taxonomy supported by this endpoint. The personal_finance_category taxonomy CSV file is available for download and is not accessible via API. /// /// diff --git a/src/Plaid/Entity/AssetReportTransaction.cs b/src/Plaid/Entity/AssetReportTransaction.cs index 807cc5b6..b2af7d97 100644 --- a/src/Plaid/Entity/AssetReportTransaction.cs +++ b/src/Plaid/Entity/AssetReportTransaction.cs @@ -9,13 +9,13 @@ public record AssetReportTransaction /// The ID of the account in which this transaction occurred. /// [JsonPropertyName("account_id")] - public string? AccountId { get; init; } = default!; + 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. /// [JsonPropertyName("amount")] - public decimal? Amount { get; init; } = default!; + public decimal Amount { get; init; } = default!; /// /// The ISO-4217 currency code of the transaction. Always null if unofficial_currency_code is non-null. @@ -30,6 +30,12 @@ public record AssetReportTransaction [JsonPropertyName("unofficial_currency_code")] public string? UnofficialCurrencyCode { get; init; } = default!; + /// + /// The string returned by the financial institution to describe the transaction. For transactions returned by /transactions/get, this field is in beta and will be omitted unless the client is both enrolled in the closed beta program and has set options.include_original_description to true. + /// + [JsonPropertyName("original_description")] + public string? OriginalDescription { get; init; } = default!; + /// /// A hierarchical array of the categories to which this transaction belongs. For a full list of categories, see /categories/get. /// All Transactions implementations are recommended to use the new personal_finance_category instead of category. personal_finance_category provides more meaningful categorization and greater accuracy. @@ -46,6 +52,13 @@ public record AssetReportTransaction [JsonPropertyName("category_id")] public string? CategoryId { get; init; } = default!; + /// + /// Information describing the intent of the transaction. Most relevant for credit use cases, but not limited to such use cases. Please reach out to your account manager or sales representative if you would like to receive this field. + /// See the taxonomy csv file for a full list of credit categories. + /// + [JsonPropertyName("credit_category")] + public Entity.CreditCategory? CreditCategory { get; init; } = default!; + /// /// The check number of the transaction. This field is only populated for check transactions. /// @@ -56,7 +69,13 @@ public record AssetReportTransaction /// 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 date on which the transaction took place, in IS0 8601 format. + /// + [JsonPropertyName("date_transacted")] + public string? DateTransacted { get; init; } = default!; /// /// A representation of where a transaction took place @@ -77,12 +96,6 @@ public record AssetReportTransaction [JsonPropertyName("merchant_name")] public string? MerchantName { get; init; } = default!; - /// - /// The string returned by the financial institution to describe the transaction. For transactions returned by /transactions/get, this field is in beta and will be omitted unless the client is both enrolled in the closed beta program and has set options.include_original_description to true. - /// - [JsonPropertyName("original_description")] - public string? OriginalDescription { get; init; } = default!; - /// /// Transaction information specific to inter-bank transfers. If the transaction was not an inter-bank transfer, all fields will be null. /// If the transactions object was returned by a Transactions endpoint such as /transactions/get, the payment_meta key will always appear, but no data elements are guaranteed. If the transactions object was returned by an Assets endpoint such as /asset_report/get/ or /asset_report/pdf/get, this field will only appear in an Asset Report with Insights. @@ -94,7 +107,7 @@ public record AssetReportTransaction /// When true, identifies the transaction as pending or unsettled. 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 ID of a posted transaction's associated pending transaction, where applicable. @@ -112,36 +125,17 @@ public record AssetReportTransaction /// 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!; /// - /// Please use the payment_channel field, transaction_type will be deprecated in the future. + /// /// [JsonPropertyName("transaction_type")] - public Entity.AssetReportTransactionTransactionTypeEnum? TransactionType { get; init; } = default!; - - /// - /// The logo associated with the merchant, if available. Formatted as a 100x100 pixels PNG file path. - /// - [JsonPropertyName("logo_url")] - public string? LogoUrl { get; init; } = default!; - - /// - /// The website associated with the merchant, if available. - /// - [JsonPropertyName("website")] - public string? Website { get; init; } = default!; + public Entity.AssetReportTransactionType? TransactionType { get; init; } = default!; /// - /// The date on which the transaction took place, in IS0 8601 format. - /// - [JsonPropertyName("date_transacted")] - public string? DateTransacted { get; init; } = default!; - - /// - /// Information describing the intent of the transaction. Most relevant for credit use cases, but not limited to such use cases. Please reach out to your account manager or sales representative if you would like to receive this field. - /// See the taxonomy csv file for a full list of credit categories. + /// A unique identifier for an income source. /// - [JsonPropertyName("credit_category")] - public Entity.CreditCategory? CreditCategory { get; init; } = default!; + [JsonPropertyName("income_source_id")] + public string? IncomeSourceId { get; init; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/AssetReportTransactionTransactionTypeEnum.cs b/src/Plaid/Entity/AssetReportTransactionType.cs similarity index 83% rename from src/Plaid/Entity/AssetReportTransactionTransactionTypeEnum.cs rename to src/Plaid/Entity/AssetReportTransactionType.cs index bc632a07..1e7d2245 100644 --- a/src/Plaid/Entity/AssetReportTransactionTransactionTypeEnum.cs +++ b/src/Plaid/Entity/AssetReportTransactionType.cs @@ -1,9 +1,9 @@ namespace Going.Plaid.Entity; /// -/// Please use the payment_channel field, transaction_type will be deprecated in the future. +/// /// -public enum AssetReportTransactionTransactionTypeEnum +public enum AssetReportTransactionType { /// /// transactions that took place online. diff --git a/src/Plaid/Entity/CreditBankStatementUploadBankAccount.cs b/src/Plaid/Entity/CreditBankStatementUploadBankAccount.cs index 0b1cfa2d..60fec8c4 100644 --- a/src/Plaid/Entity/CreditBankStatementUploadBankAccount.cs +++ b/src/Plaid/Entity/CreditBankStatementUploadBankAccount.cs @@ -40,4 +40,10 @@ public record CreditBankStatementUploadBankAccount /// [JsonPropertyName("periods")] public IReadOnlyList Periods { get; init; } = default!; + + /// + /// The unique id of the bank account + /// + [JsonPropertyName("account_id")] + public string? AccountId { get; init; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/CreditBankStatementUploadTransaction.cs b/src/Plaid/Entity/CreditBankStatementUploadTransaction.cs index c00d7985..e8175267 100644 --- a/src/Plaid/Entity/CreditBankStatementUploadTransaction.cs +++ b/src/Plaid/Entity/CreditBankStatementUploadTransaction.cs @@ -22,4 +22,10 @@ public record CreditBankStatementUploadTransaction /// [JsonPropertyName("original_description")] public string? OriginalDescription { get; init; } = default!; + + /// + /// The unique id of the bank account that this transaction occurs in + /// + [JsonPropertyName("account_id")] + public string? AccountId { get; init; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/CreditDocumentMetadata.cs b/src/Plaid/Entity/CreditDocumentMetadata.cs index c6895509..d4703cb3 100644 --- a/src/Plaid/Entity/CreditDocumentMetadata.cs +++ b/src/Plaid/Entity/CreditDocumentMetadata.cs @@ -28,7 +28,7 @@ public record CreditDocumentMetadata public string? DocumentType { get; init; } = default!; /// - /// Signed URL to retrieve the underlying file. This download URL can only be used once. To generate a new download URL, call /credit/payroll_income/get again. + /// Signed URL to retrieve the underlying file. This download URL can only be used once and expires after two minutes. To generate a new download URL, call /credit/payroll_income/get again. /// [JsonPropertyName("download_url")] public string? DownloadUrl { get; init; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs b/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs new file mode 100644 index 00000000..bba483d0 --- /dev/null +++ b/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs @@ -0,0 +1,59 @@ +namespace Going.Plaid.Entity; + +/// +/// User information collected outside of Link, most likely via your own onboarding process. +/// Each of the following identity fields are optional: +/// email_address +/// phone_number +/// date_of_birth +/// name +/// address +/// id_number +/// Specifically, these fields are optional in that they can either be fully provided (satisfying every required field in their subschema) or omitted from the request entirely by not providing the key or value. +/// Providing these fields via the API will result in Link skipping the data collection process for the associated user. All verification steps enabled in the associated Identity Verification Template will still be run. Verification steps will either be run immediately, or once the user completes the accept_tos step, depending on the value provided to the gave_consent field. +/// If you are not using the shareable URL feature, you can optionally provide these fields via /link/token/create instead; both /identity_verification/create and /link/token/create are valid ways to provide this information. Note that if you provide a non-null user data object via /identity_verification/create, any user data fields entered via /link/token/create for the same client_user_id will be ignored when prefilling Link. +/// +public class IdentityVerificationCreateRequestUser +{ + /// + /// A valid email address. + /// + [JsonPropertyName("email_address")] + public string? EmailAddress { get; set; } = default!; + + /// + /// A phone number in E.164 format. + /// + [JsonPropertyName("phone_number")] + public string? PhoneNumber { get; set; } = default!; + + /// + /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). + /// + [JsonPropertyName("date_of_birth")] + public DateOnly? DateOfBirth { get; set; } = default!; + + /// + /// You can use this field to pre-populate the user's legal name; if it is provided here, they will not be prompted to enter their name in the identity verification attempt. + /// + [JsonPropertyName("name")] + public Entity.IdentityVerificationRequestUserName? Name { get; set; } = default!; + + /// + /// Home address for the user. + /// + [JsonPropertyName("address")] + public Entity.UserAddress? Address { get; set; } = default!; + + /// + /// ID number submitted by the user, currently used only for the Identity Verification product. If the user has not submitted this data yet, this field will be null. Otherwise, both fields are guaranteed to be filled. + /// + [JsonPropertyName("id_number")] + public Entity.UserIDNumber? IdNumber { get; set; } = default!; + + /// + /// Specifying user.client_user_id is deprecated. Please provide client_user_id at the root level instead. + /// + [JsonPropertyName("client_user_id")] + public string? ClientUserId { get; set; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/IdentityVerificationRequestUser.cs b/src/Plaid/Entity/IdentityVerificationRequestUser.cs index c627cc35..4ee681b2 100644 --- a/src/Plaid/Entity/IdentityVerificationRequestUser.cs +++ b/src/Plaid/Entity/IdentityVerificationRequestUser.cs @@ -11,16 +11,9 @@ namespace Going.Plaid.Entity; /// id_number /// Specifically, these fields are optional in that they can either be fully provided (satisfying every required field in their subschema) or omitted from the request entirely by not providing the key or value. /// Providing these fields via the API will result in Link skipping the data collection process for the associated user. All verification steps enabled in the associated Identity Verification Template will still be run. Verification steps will either be run immediately, or once the user completes the accept_tos step, depending on the value provided to the gave_consent field. -/// If you are not using the shareable URL feature, you can optionally provide these fields via /link/token/create instead; both /identity_verification/create and /link/token/create are valid ways to provide this information. Note that if you provide a non-null user data object via /identity_verification/create, any user data fields entered via /link/token/create for the same client_user_id will be ignored when prefilling Link. /// public class IdentityVerificationRequestUser { - /// - /// A unique ID that identifies the end user in your system. This ID can also be used to associate user-specific data from other Plaid products. Financial Account Matching requires this field and the Link Token Create client_user_id to be consistent. Personally identifiable information, such as an email address or phone number, should not be used in the client_user_id. - /// - [JsonPropertyName("client_user_id")] - public string ClientUserId { get; set; } = default!; - /// /// A valid email address. /// diff --git a/src/Plaid/Entity/RiskCheckDetails.cs b/src/Plaid/Entity/RiskCheckDetails.cs index 0e1f2c0d..b96689be 100644 --- a/src/Plaid/Entity/RiskCheckDetails.cs +++ b/src/Plaid/Entity/RiskCheckDetails.cs @@ -34,4 +34,10 @@ public record RiskCheckDetails /// [JsonPropertyName("devices")] public IReadOnlyList Devices { get; init; } = default!; + + /// + /// Result summary object capturing abuse signals related to identity abuse, e.g. stolen and synthetic identity fraud. + /// + [JsonPropertyName("identity_abuse_signals")] + public Entity.RiskCheckIdentityAbuseSignals? IdentityAbuseSignals { get; init; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/RiskCheckIdentityAbuseSignals.cs b/src/Plaid/Entity/RiskCheckIdentityAbuseSignals.cs new file mode 100644 index 00000000..7d5f5f38 --- /dev/null +++ b/src/Plaid/Entity/RiskCheckIdentityAbuseSignals.cs @@ -0,0 +1,23 @@ +namespace Going.Plaid.Entity; + +/// +/// Result summary object capturing abuse signals related to identity abuse, e.g. stolen and synthetic identity fraud. +/// +public record RiskCheckIdentityAbuseSignals +{ + /// + /// Field containing the data used in determining the outcome of the synthetic identity risk check. + /// Contains the following fields: + /// score - A score from 0 to 100 indicating the likelihood that the user is a synthetic identity. + /// + [JsonPropertyName("synthetic_identity")] + public Entity.RiskCheckSyntheticIdentity? SyntheticIdentity { get; init; } = default!; + + /// + /// Field containing the data used in determining the outcome of the stolen identity risk check. + /// Contains the following fields: + /// score - A score from 0 to 100 indicating the likelihood that the user is a stolen identity. + /// + [JsonPropertyName("stolen_identity")] + public Entity.RiskCheckStolenIdentity? StolenIdentity { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/RiskCheckStolenIdentity.cs b/src/Plaid/Entity/RiskCheckStolenIdentity.cs new file mode 100644 index 00000000..4c8cd08f --- /dev/null +++ b/src/Plaid/Entity/RiskCheckStolenIdentity.cs @@ -0,0 +1,15 @@ +namespace Going.Plaid.Entity; + +/// +/// Field containing the data used in determining the outcome of the stolen identity risk check. +/// Contains the following fields: +/// score - A score from 0 to 100 indicating the likelihood that the user is a stolen identity. +/// +public record RiskCheckStolenIdentity +{ + /// + /// A score from 0 to 100 indicating the likelihood that the user is a stolen identity. + /// + [JsonPropertyName("score")] + public int? Score { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/RiskCheckSyntheticIdentity.cs b/src/Plaid/Entity/RiskCheckSyntheticIdentity.cs new file mode 100644 index 00000000..bd67156d --- /dev/null +++ b/src/Plaid/Entity/RiskCheckSyntheticIdentity.cs @@ -0,0 +1,15 @@ +namespace Going.Plaid.Entity; + +/// +/// Field containing the data used in determining the outcome of the synthetic identity risk check. +/// Contains the following fields: +/// score - A score from 0 to 100 indicating the likelihood that the user is a synthetic identity. +/// +public record RiskCheckSyntheticIdentity +{ + /// + /// A score from 0 to 100 indicating the likelihood that the user is a synthetic identity. + /// + [JsonPropertyName("score")] + public int? Score { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/SandboxBankIncomeWebhookFireRequestWebhookCode.cs b/src/Plaid/Entity/SandboxBankIncomeWebhookFireRequestWebhookCode.cs new file mode 100644 index 00000000..54c5dab2 --- /dev/null +++ b/src/Plaid/Entity/SandboxBankIncomeWebhookFireRequestWebhookCode.cs @@ -0,0 +1,25 @@ +namespace Going.Plaid.Entity; + +/// +/// The webhook codes this endpoint can be used to test +/// +public enum SandboxBankIncomeWebhookFireRequestWebhookCode +{ + /// + /// + /// + [EnumMember(Value = "BANK_INCOME_REFRESH_UPDATE")] + BankIncomeRefreshUpdate, + + /// + /// + /// + [EnumMember(Value = "BANK_INCOME_REFRESH_COMPLETE")] + BankIncomeRefreshComplete, + + /// + /// 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, +} \ No newline at end of file diff --git a/src/Plaid/Entity/SandboxBankIncomeWebhookFireRequestWebhookFields.cs b/src/Plaid/Entity/SandboxBankIncomeWebhookFireRequestWebhookFields.cs new file mode 100644 index 00000000..381caf6f --- /dev/null +++ b/src/Plaid/Entity/SandboxBankIncomeWebhookFireRequestWebhookFields.cs @@ -0,0 +1,19 @@ +namespace Going.Plaid.Entity; + +/// +/// Optional fields which will be populated in the simulated webhook +/// +public class SandboxBankIncomeWebhookFireRequestWebhookFields +{ + /// + /// The user id to be returned in INCOME webhooks + /// + [JsonPropertyName("user_id")] + public string UserId { get; set; } = default!; + + /// + /// The result of the bank income refresh report generation + /// + [JsonPropertyName("bank_income_refresh_complete_result")] + public Entity.BankIncomeRefreshCompleteResult? BankIncomeRefreshCompleteResult { get; set; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/SignalInsights.cs b/src/Plaid/Entity/SignalInsights.cs new file mode 100644 index 00000000..2e6de78d --- /dev/null +++ b/src/Plaid/Entity/SignalInsights.cs @@ -0,0 +1,31 @@ +namespace Going.Plaid.Entity; + +/// +/// Signal insights including scores and attributes. +/// +public record SignalInsights +{ + /// + /// Risk scoring details broken down by risk category. + /// + [JsonPropertyName("scores")] + public Entity.SignalEvaluateScores? Scores { get; init; } = default!; + + /// + /// The core attributes object contains additional data that can be used to assess the ACH return risk. Examples of data include: + /// days_since_first_plaid_connection: The number of days since the first time the Item was connected to an application via Plaid + /// plaid_connections_count_7d: The number of times the Item has been connected to applications via Plaid over the past 7 days + /// plaid_connections_count_30d: The number of times the Item has been connected to applications via Plaid over the past 30 days + /// total_plaid_connections_count: The number of times the Item has been connected to applications via Plaid + /// is_savings_or_money_market_account: Indicates whether the ACH transaction funding account is a savings/money market account + /// For the full list and detailed documentation of core attributes available, or to request that core attributes not be returned, contact Sales or your Plaid account manager + /// + [JsonPropertyName("core_attributes")] + public Entity.SignalEvaluateCoreAttributes? CoreAttributes { 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. + /// + [JsonPropertyName("warnings")] + public IReadOnlyList? Warnings { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/Transaction.cs b/src/Plaid/Entity/Transaction.cs index ae78c79b..a60e43c9 100644 --- a/src/Plaid/Entity/Transaction.cs +++ b/src/Plaid/Entity/Transaction.cs @@ -53,7 +53,7 @@ public record Transaction public string? CheckNumber { 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 ). + /// 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 ). To receive information about the date that a posted transaction was initiated, see the authorized_date field. /// [JsonPropertyName("date")] public DateOnly? Date { get; init; } = default!; @@ -133,20 +133,20 @@ public record Transaction public string? Website { get; init; } = default!; /// - /// The date that the transaction was authorized. Dates are returned in an ISO 8601 format ( YYYY-MM-DD ). + /// The date that the transaction was authorized. For posted transactions, the date field will indicate the posted date, but authorized_date will indicate the day the transaction was authorized by the financial institution. If presenting transactions to the user in a UI, the authorized_date, when available, is generally preferable to use over the date field for posted transactions, as it will generally represent the date the user actually made the transaction. Dates are returned in an ISO 8601 format ( YYYY-MM-DD ). /// [JsonPropertyName("authorized_date")] public DateOnly? AuthorizedDate { get; init; } = default!; /// - /// Date and time when a transaction was authorized in ISO 8601 format ( YYYY-MM-DDTHH:mm:ssZ ). + /// Date and time when a transaction was authorized in ISO 8601 format ( YYYY-MM-DDTHH:mm:ssZ ). For posted transactions, the datetime field will indicate the posted date, but authorized_datetime will indicate the day the transaction was authorized by the financial institution. If presenting transactions to the user in a UI, the authorized_datetime, when available, is generally preferable to use over the datetime field for posted transactions, as it will generally represent the date the user actually made the transaction. /// This field is returned for select financial institutions and comes as provided by the institution. It may contain default time values (such as 00:00:00). This field is only populated in API version 2019-05-29 and later. /// [JsonPropertyName("authorized_datetime")] public DateTimeOffset? AuthorizedDatetime { get; init; } = default!; /// - /// Date and time when a transaction was posted in ISO 8601 format ( YYYY-MM-DDTHH:mm:ssZ ). + /// Date and time when a transaction was posted in ISO 8601 format ( YYYY-MM-DDTHH:mm:ssZ ). For the date that the transaction was initiated, rather than posted, see the authorized_datetime field. /// This field is returned for select financial institutions and comes as provided by the institution. It may contain default time values (such as 00:00:00). This field is only populated in API version 2019-05-29 and later. /// [JsonPropertyName("datetime")] diff --git a/src/Plaid/Entity/TransactionStream.cs b/src/Plaid/Entity/TransactionStream.cs index b55b026e..f3ab0e46 100644 --- a/src/Plaid/Entity/TransactionStream.cs +++ b/src/Plaid/Entity/TransactionStream.cs @@ -18,7 +18,7 @@ public record TransactionStream public string StreamId { get; init; } = default!; /// - /// A hierarchical array of the categories to which this transaction belongs. See Categories. + /// A hierarchical array of the categories to which this transaction belongs. See Categories. /// All implementations are encouraged to use the new personal_finance_category instead of category. personal_finance_category provides more meaningful categorization and greater accuracy. /// [JsonPropertyName("category")] diff --git a/src/Plaid/Entity/TransactionsGetRequestOptions.cs b/src/Plaid/Entity/TransactionsGetRequestOptions.cs index e588df0c..b0952b0e 100644 --- a/src/Plaid/Entity/TransactionsGetRequestOptions.cs +++ b/src/Plaid/Entity/TransactionsGetRequestOptions.cs @@ -37,8 +37,8 @@ public class TransactionsGetRequestOptions public bool? IncludePersonalFinanceCategoryBeta { get; set; } = default!; /// - /// Include the personal_finance_category object in the response. - /// All implementations are encouraged to set this field to true and use the personal_finance_category instead of category. Personal finance categories are the preferred categorization system for transactions, providing higher accuracy and more meaningful categories. + /// Include the personal_finance_category object in the response. + /// All implementations are encouraged to set this field to true and use the personal_finance_category instead of category. Personal finance categories are the preferred categorization system for transactions, providing higher accuracy and more meaningful categories. /// See the taxonomy csv file for a full list of personal finance categories. /// Plaid is also introducing Category Rules - a new endpoint that will enable you to change the personal_finance_category for a transaction based on your users’ needs. When rules are set, the selected category will override the Plaid provided category. To learn more, send a note to transactions-feedback@plaid.com. /// diff --git a/src/Plaid/Entity/TransactionsRecurringGetRequestOptions.cs b/src/Plaid/Entity/TransactionsRecurringGetRequestOptions.cs index c8d62bf2..2c70373d 100644 --- a/src/Plaid/Entity/TransactionsRecurringGetRequestOptions.cs +++ b/src/Plaid/Entity/TransactionsRecurringGetRequestOptions.cs @@ -7,7 +7,7 @@ public class TransactionsRecurringGetRequestOptions { /// /// Include the personal_finance_category object for each transaction stream in the response. - /// All implementations are encouraged to set this field to true and to use the personal_finance_category field instead of category. Personal finance categories are the preferred categorization system for transactions, providing higher accuracy and more meaningful categories. + /// All implementations are encouraged to set this field to true and to use the personal_finance_category field instead of category. Personal finance categories are the preferred categorization system for transactions, providing higher accuracy and more meaningful categories. /// See the taxonomy csv file for a full list of personal finance categories. /// [JsonPropertyName("include_personal_finance_category")] diff --git a/src/Plaid/Entity/TransferAuthorization.cs b/src/Plaid/Entity/TransferAuthorization.cs index 24b16daa..3cfda27a 100644 --- a/src/Plaid/Entity/TransferAuthorization.cs +++ b/src/Plaid/Entity/TransferAuthorization.cs @@ -29,6 +29,12 @@ public record TransferAuthorization [JsonPropertyName("decision_rationale")] public Entity.TransferAuthorizationDecisionRationale? DecisionRationale { get; init; } = default!; + /// + /// Signal insights including scores and attributes. + /// + [JsonPropertyName("signal_insights")] + public Entity.SignalInsights? SignalInsights { get; init; } = default!; + /// /// Indicates whether the transfer is guaranteed by Plaid (Guarantee customers only). This field will contain either GUARANTEED or NOT_GUARANTEED indicating whether Plaid will guarantee the transfer. If the transfer is not guaranteed, additional information will be provided in the guarantee_decision_rationale field. Refer to the code field in guarantee_decision_rationale for details. /// diff --git a/src/Plaid/Entity/TransferDocumentPurpose.cs b/src/Plaid/Entity/TransferDocumentPurpose.cs new file mode 100644 index 00000000..9e1fdc32 --- /dev/null +++ b/src/Plaid/Entity/TransferDocumentPurpose.cs @@ -0,0 +1,19 @@ +namespace Going.Plaid.Entity; + +/// +/// Specifies the purpose of the uploaded file. +/// +public enum TransferDocumentPurpose +{ + /// + /// The transfer due diligence document of the originator. + /// + [EnumMember(Value = "DUE_DILIGENCE")] + DueDiligence, + + /// + /// 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, +} \ No newline at end of file diff --git a/src/Plaid/IdentityVerification/IdentityVerificationCreateRequest.cs b/src/Plaid/IdentityVerification/IdentityVerificationCreateRequest.cs index 6ac6b370..bccc2ee1 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationCreateRequest.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationCreateRequest.cs @@ -5,6 +5,12 @@ namespace Going.Plaid.IdentityVerification; /// public partial class IdentityVerificationCreateRequest : RequestBase { + /// + /// A unique ID that identifies the end user in your system. This ID can also be used to associate user-specific data from other Plaid products. Financial Account Matching requires this field and the Link Token Create client_user_id to be consistent. Personally identifiable information, such as an email address or phone number, should not be used in the client_user_id. + /// + [JsonPropertyName("client_user_id")] + public string? ClientUserId { get; set; } = default!; + /// /// A flag specifying whether you would like Plaid to expose a shareable URL for the verification being created. /// @@ -38,7 +44,7 @@ public partial class IdentityVerificationCreateRequest : RequestBase /// If you are not using the shareable URL feature, you can optionally provide these fields via /link/token/create instead; both /identity_verification/create and /link/token/create are valid ways to provide this information. Note that if you provide a non-null user data object via /identity_verification/create, any user data fields entered via /link/token/create for the same client_user_id will be ignored when prefilling Link. /// [JsonPropertyName("user")] - public Entity.IdentityVerificationRequestUser User { get; set; } = default!; + public Entity.IdentityVerificationCreateRequestUser? User { get; set; } = default!; /// /// An optional flag specifying how you would like Plaid to handle attempts to create an Identity Verification when an Identity Verification already exists for the provided client_user_id and template_id. diff --git a/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs b/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs index f625040f..6b6db5af 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationRetryRequest.cs @@ -23,6 +23,21 @@ public partial class IdentityVerificationRetryRequest : RequestBase [JsonPropertyName("strategy")] public Entity.Strategy Strategy { get; set; } = default!; + /// + /// User information collected outside of Link, most likely via your own onboarding process. + /// Each of the following identity fields are optional: + /// email_address + /// phone_number + /// date_of_birth + /// name + /// address + /// id_number + /// Specifically, these fields are optional in that they can either be fully provided (satisfying every required field in their subschema) or omitted from the request entirely by not providing the key or value. + /// Providing these fields via the API will result in Link skipping the data collection process for the associated user. All verification steps enabled in the associated Identity Verification Template will still be run. Verification steps will either be run immediately, or once the user completes the accept_tos step, depending on the value provided to the gave_consent field. + /// + [JsonPropertyName("user")] + public Entity.IdentityVerificationRequestUser? User { get; set; } = default!; + /// /// Instructions for the custom retry strategy specifying which steps should be required or skipped. /// Note: diff --git a/src/Plaid/Investments/InvestmentsAuthGetResponse.cs b/src/Plaid/Investments/InvestmentsAuthGetResponse.cs index 62ea5995..9d3c3fbd 100644 --- a/src/Plaid/Investments/InvestmentsAuthGetResponse.cs +++ b/src/Plaid/Investments/InvestmentsAuthGetResponse.cs @@ -1,4 +1,4 @@ -namespace Going.Plaid.Investments; +namespace Going.Plaid.Investments; /// /// InvestmentsAuthGetResponse defines the response schema for /investments/auth/get @@ -40,4 +40,4 @@ public record InvestmentsAuthGetResponse : ResponseBase /// [JsonPropertyName("item")] public Entity.Item Item { get; init; } = default!; -} +} \ No newline at end of file diff --git a/src/Plaid/Link/LinkTokenCreateRequest.cs b/src/Plaid/Link/LinkTokenCreateRequest.cs index 22d78988..1637883d 100644 --- a/src/Plaid/Link/LinkTokenCreateRequest.cs +++ b/src/Plaid/Link/LinkTokenCreateRequest.cs @@ -36,7 +36,7 @@ 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 added after Link initialization by calling the relevant endpoints. 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 required_if_supported_products field, or can be initialized by calling the endpoint after obtaining an access token. For details and exceptions, 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. /// @@ -53,12 +53,9 @@ public partial class LinkTokenCreateRequest : RequestBase public IReadOnlyList? AdditionalConsentedProducts { get; set; } = default!; /// - /// List of Plaid product(s) you wish to use only if the institution and accounts selected by the user support the product. Institutions that do not support these products will still be shown in Link. The products will only be extracted if the user selects an institution that supports them. - /// If the institution and accounts selected by the user support a product specified in this field, but Plaid is unable to successfully fetch data for the product (for example, because the institution uses an OAuth connection and the end user does not grant the required product permission(s) in the institution's OAuth flow) the error will be presented to the user in Link and they will be prompted to fix the error. - /// There should be no overlap between products and required_if_supported_products. The products array must have at least one product. Valid required_if_supported_products are: - /// transactions, auth, identity, investments, liabilities - /// Example: ['identity'] - /// In Production, you will only be billed for required if supported products when they are supported and added to the Item. To see the full list of products added to the item during Link, call /item/get. + /// List of Plaid product(s) you wish to use only if the institution and account(s) selected by the user support the product. Institutions that do not support these products will still be shown in Link. The products will only be extracted and billed if the user selects an institution and account type that supports them. + /// There should be no overlap between products and required_if_supported_products. The products array must have at least one product. + /// For more details on using this feature, see Required if Supported Products. /// [JsonPropertyName("required_if_supported_products")] public IReadOnlyList? RequiredIfSupportedProducts { get; set; } = default!; diff --git a/src/Plaid/Processor/PlaidClient.cs b/src/Plaid/Processor/PlaidClient.cs index 2fb9c2ba..7d33ff2b 100644 --- a/src/Plaid/Processor/PlaidClient.cs +++ b/src/Plaid/Processor/PlaidClient.cs @@ -62,7 +62,7 @@ public sealed partial class PlaidClient /// /// Use /processor/signal/evaluate to evaluate a planned ACH transaction as a processor to get a return risk assessment (such as a risk score and risk tier) and additional risk signals. /// In order to obtain a valid score for an ACH transaction, Plaid must have an access token for the account, and the Item must be healthy (receiving product updates) or have recently been in a healthy state. If the transaction does not meet eligibility requirements, an error will be returned corresponding to the underlying cause. If /processor/signal/evaluate is called on the same transaction multiple times within a 24-hour period, cached results may be returned. For more information please refer to our error documentation on item errors and Link in Update Mode. - /// Note: This request may take some time to complete if Signal is being added to an existing Item. This is because Plaid must communicate directly with the institution when retrieving the data for the first time. + /// Note: This request may take some time to complete if Signal is being added to an existing Item. This is because Plaid must communicate directly with the institution when retrieving the data for the first time. To reduce this latency, you can call /signal/prepare on the Item before you need to request Signal data. /// /// public Task ProcessorSignalEvaluateAsync(Processor.ProcessorSignalEvaluateRequest request) => diff --git a/src/Plaid/Processor/ProcessorAuthGetRequest.cs b/src/Plaid/Processor/ProcessorAuthGetRequest.cs index bee52d90..4642082c 100644 --- a/src/Plaid/Processor/ProcessorAuthGetRequest.cs +++ b/src/Plaid/Processor/ProcessorAuthGetRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorAuthGetRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorBalanceGetRequest.cs b/src/Plaid/Processor/ProcessorBalanceGetRequest.cs index 9143b592..4eef0c4b 100644 --- a/src/Plaid/Processor/ProcessorBalanceGetRequest.cs +++ b/src/Plaid/Processor/ProcessorBalanceGetRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorBalanceGetRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorBankTransferCreateRequest.cs b/src/Plaid/Processor/ProcessorBankTransferCreateRequest.cs index 22c23e89..6f24f4f3 100644 --- a/src/Plaid/Processor/ProcessorBankTransferCreateRequest.cs +++ b/src/Plaid/Processor/ProcessorBankTransferCreateRequest.cs @@ -13,7 +13,7 @@ public partial class ProcessorBankTransferCreateRequest : RequestBase public string IdempotencyKey { get; set; } = default!; /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorIdentityGetRequest.cs b/src/Plaid/Processor/ProcessorIdentityGetRequest.cs index fd00720d..dc5faf64 100644 --- a/src/Plaid/Processor/ProcessorIdentityGetRequest.cs +++ b/src/Plaid/Processor/ProcessorIdentityGetRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorIdentityGetRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorIdentityMatchRequest.cs b/src/Plaid/Processor/ProcessorIdentityMatchRequest.cs index e9b20794..a0fc63be 100644 --- a/src/Plaid/Processor/ProcessorIdentityMatchRequest.cs +++ b/src/Plaid/Processor/ProcessorIdentityMatchRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorIdentityMatchRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorSignalDecisionReportRequest.cs b/src/Plaid/Processor/ProcessorSignalDecisionReportRequest.cs index d829a5cc..f0ec712d 100644 --- a/src/Plaid/Processor/ProcessorSignalDecisionReportRequest.cs +++ b/src/Plaid/Processor/ProcessorSignalDecisionReportRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorSignalDecisionReportRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorSignalEvaluateRequest.cs b/src/Plaid/Processor/ProcessorSignalEvaluateRequest.cs index 6cfde951..f5bc9602 100644 --- a/src/Plaid/Processor/ProcessorSignalEvaluateRequest.cs +++ b/src/Plaid/Processor/ProcessorSignalEvaluateRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorSignalEvaluateRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; @@ -30,7 +30,7 @@ public partial class ProcessorSignalEvaluateRequest : RequestBase public bool? UserPresent { get; set; } = default!; /// - /// A unique ID that identifies the end user in your system. This ID is used to correlate requests by a user with multiple Items. The max length for this field is 36 characters. Personally identifiable information, such as an email address or phone number, should not be used in the client_user_id. + /// A unique ID that identifies the end user in your system. This ID is used to correlate requests by a user with multiple Items. Personally identifiable information, such as an email address or phone number, should not be used in the client_user_id. /// [JsonPropertyName("client_user_id")] public string? ClientUserId { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorSignalEvaluateResponse.cs b/src/Plaid/Processor/ProcessorSignalEvaluateResponse.cs index ab7ba634..3381da2e 100644 --- a/src/Plaid/Processor/ProcessorSignalEvaluateResponse.cs +++ b/src/Plaid/Processor/ProcessorSignalEvaluateResponse.cs @@ -24,7 +24,7 @@ public record ProcessorSignalEvaluateResponse : ResponseBase public Entity.SignalEvaluateCoreAttributes? CoreAttributes { get; init; } = default!; /// - /// If bank information was not able to be used as features into the Signal model, this array contains warnings describing why we were missing bank data. If you want to receive an API error instead of Signal scores in case of missing bank data, please contact sales or your Plaid account manager. + /// 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. /// [JsonPropertyName("warnings")] public IReadOnlyList? Warnings { get; init; } = default!; diff --git a/src/Plaid/Processor/ProcessorSignalReturnReportRequest.cs b/src/Plaid/Processor/ProcessorSignalReturnReportRequest.cs index 611dc17d..256a9a2a 100644 --- a/src/Plaid/Processor/ProcessorSignalReturnReportRequest.cs +++ b/src/Plaid/Processor/ProcessorSignalReturnReportRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorSignalReturnReportRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorTokenPermissionsGetRequest.cs b/src/Plaid/Processor/ProcessorTokenPermissionsGetRequest.cs index 33d37288..dbda6209 100644 --- a/src/Plaid/Processor/ProcessorTokenPermissionsGetRequest.cs +++ b/src/Plaid/Processor/ProcessorTokenPermissionsGetRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorTokenPermissionsGetRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorTokenPermissionsSetRequest.cs b/src/Plaid/Processor/ProcessorTokenPermissionsSetRequest.cs index bbfc0835..8b8f8033 100644 --- a/src/Plaid/Processor/ProcessorTokenPermissionsSetRequest.cs +++ b/src/Plaid/Processor/ProcessorTokenPermissionsSetRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorTokenPermissionsSetRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorTransactionsGetRequest.cs b/src/Plaid/Processor/ProcessorTransactionsGetRequest.cs index 2b85e2dc..1999bb3f 100644 --- a/src/Plaid/Processor/ProcessorTransactionsGetRequest.cs +++ b/src/Plaid/Processor/ProcessorTransactionsGetRequest.cs @@ -12,7 +12,7 @@ public partial class ProcessorTransactionsGetRequest : RequestBase public Entity.TransactionsGetRequestOptions? Options { get; set; } = default!; /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorTransactionsRecurringGetRequest.cs b/src/Plaid/Processor/ProcessorTransactionsRecurringGetRequest.cs index 9810ed4b..55e5fbcc 100644 --- a/src/Plaid/Processor/ProcessorTransactionsRecurringGetRequest.cs +++ b/src/Plaid/Processor/ProcessorTransactionsRecurringGetRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorTransactionsRecurringGetRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorTransactionsRefreshRequest.cs b/src/Plaid/Processor/ProcessorTransactionsRefreshRequest.cs index de196b47..22b4807d 100644 --- a/src/Plaid/Processor/ProcessorTransactionsRefreshRequest.cs +++ b/src/Plaid/Processor/ProcessorTransactionsRefreshRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorTransactionsRefreshRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Processor/ProcessorTransactionsSyncRequest.cs b/src/Plaid/Processor/ProcessorTransactionsSyncRequest.cs index eedfb82d..cb1d004f 100644 --- a/src/Plaid/Processor/ProcessorTransactionsSyncRequest.cs +++ b/src/Plaid/Processor/ProcessorTransactionsSyncRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Processor; public partial class ProcessorTransactionsSyncRequest : RequestBase { /// - /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-environment-identifier + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> /// [JsonPropertyName("processor_token")] public string ProcessorToken { get; set; } = default!; diff --git a/src/Plaid/Sandbox/PlaidClient.cs b/src/Plaid/Sandbox/PlaidClient.cs index 37dee409..26cecf75 100644 --- a/src/Plaid/Sandbox/PlaidClient.cs +++ b/src/Plaid/Sandbox/PlaidClient.cs @@ -151,13 +151,21 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// Use the /sandbox/income/fire_webhook endpoint to manually trigger an Income webhook in the Sandbox environment. + /// Use the /sandbox/income/fire_webhook endpoint to manually trigger a Payroll Income webhook in the Sandbox environment. /// /// public Task SandboxIncomeFireWebhookAsync(Sandbox.SandboxIncomeFireWebhookRequest request) => PostAsync("/sandbox/income/fire_webhook", request) .ParseResponseAsync(); + /// + /// Use the /sandbox/bank_income/fire_webhook endpoint to manually trigger a Bank Income webhook in the Sandbox environment. + /// + /// + public Task SandboxBankIncomeFireWebhookAsync(Sandbox.SandboxBankIncomeFireWebhookRequest request) => + PostAsync("/sandbox/bank_income/fire_webhook", request) + .ParseResponseAsync(); + /// /// Save the selected accounts when connecting to the Platypus Oauth institution /// diff --git a/src/Plaid/Sandbox/SandboxBankIncomeFireWebhookRequest.cs b/src/Plaid/Sandbox/SandboxBankIncomeFireWebhookRequest.cs new file mode 100644 index 00000000..d9e5aca9 --- /dev/null +++ b/src/Plaid/Sandbox/SandboxBankIncomeFireWebhookRequest.cs @@ -0,0 +1,25 @@ +namespace Going.Plaid.Sandbox; + +/// +/// SandboxBankIncomeFireWebhookRequest defines the request schema for /sandbox/bank_income/fire_webhook +/// +public partial class SandboxBankIncomeFireWebhookRequest : RequestBase +{ + /// + /// The URL to which the webhook should be sent. If provided, this will override the URL set in the dashboard. + /// + [JsonPropertyName("webhook_override")] + public string? WebhookOverride { get; set; } = default!; + + /// + /// The webhook codes this endpoint can be used to test + /// + [JsonPropertyName("webhook_code")] + public Entity.SandboxBankIncomeWebhookFireRequestWebhookCode WebhookCode { get; set; } = default!; + + /// + /// Optional fields which will be populated in the simulated webhook + /// + [JsonPropertyName("webhook_fields")] + public Entity.SandboxBankIncomeWebhookFireRequestWebhookFields WebhookFields { get; set; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Sandbox/SandboxBankIncomeFireWebhookResponse.cs b/src/Plaid/Sandbox/SandboxBankIncomeFireWebhookResponse.cs new file mode 100644 index 00000000..05130cef --- /dev/null +++ b/src/Plaid/Sandbox/SandboxBankIncomeFireWebhookResponse.cs @@ -0,0 +1,8 @@ +namespace Going.Plaid.Sandbox; + +/// +/// SandboxBankIncomeFireWebhookResponse defines the response schema for /sandbox/bank_income/fire_webhook +/// +public record SandboxBankIncomeFireWebhookResponse : ResponseBase +{ +} \ No newline at end of file diff --git a/src/Plaid/Signal/SignalEvaluateRequest.cs b/src/Plaid/Signal/SignalEvaluateRequest.cs index 602597b2..5159fcde 100644 --- a/src/Plaid/Signal/SignalEvaluateRequest.cs +++ b/src/Plaid/Signal/SignalEvaluateRequest.cs @@ -31,7 +31,7 @@ public partial class SignalEvaluateRequest : RequestBase public bool? UserPresent { get; set; } = default!; /// - /// A unique ID that identifies the end user in your system. This ID is used to correlate requests by a user with multiple Items. The max length for this field is 36 characters. Personally identifiable information, such as an email address or phone number, should not be used in the client_user_id. + /// A unique ID that identifies the end user in your system. This ID is used to correlate requests by a user with multiple Items. Personally identifiable information, such as an email address or phone number, should not be used in the client_user_id. /// [JsonPropertyName("client_user_id")] public string? ClientUserId { get; set; } = default!; diff --git a/src/Plaid/Signal/SignalEvaluateResponse.cs b/src/Plaid/Signal/SignalEvaluateResponse.cs index c6a60e84..a48dd415 100644 --- a/src/Plaid/Signal/SignalEvaluateResponse.cs +++ b/src/Plaid/Signal/SignalEvaluateResponse.cs @@ -24,7 +24,7 @@ public record SignalEvaluateResponse : ResponseBase public Entity.SignalEvaluateCoreAttributes? CoreAttributes { get; init; } = default!; /// - /// If bank information was not able to be used as features into the Signal model, this array contains warnings describing why we were missing bank data. If you want to receive an API error instead of Signal scores in case of missing bank data, please contact sales or your Plaid account manager. + /// 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. /// [JsonPropertyName("warnings")] public IReadOnlyList Warnings { get; init; } = default!; diff --git a/src/Plaid/Transfer/PlaidClient.cs b/src/Plaid/Transfer/PlaidClient.cs index 6eb30cef..e6f6afae 100644 --- a/src/Plaid/Transfer/PlaidClient.cs +++ b/src/Plaid/Transfer/PlaidClient.cs @@ -209,6 +209,15 @@ public sealed partial class PlaidClient PostAsync("/transfer/diligence/submit", request) .ParseResponseAsync(); + /// + /// Third-party sender customers can use /transfer/diligence/document/upload endpoint to upload a document on behalf of its end customer (i.e. originator) to Plaid. You’ll need to send a request of type multipart/form-data. + /// You must provide the client_id in the PLAID-CLIENT-ID header and secret in the PLAID-SECRET header. + /// + /// + public Task TransferDiligenceDocumentUploadAsync(Transfer.TransferDiligenceDocumentUploadRequest request) => + PostAsync("/transfer/diligence/document/upload", request) + .ParseResponseAsync(); + /// /// The /transfer/originator/get endpoint gets status updates for an originator's onboarding process. This information is also available via the Transfer page on the Plaid dashboard. /// diff --git a/src/Plaid/Transfer/TransferAuthorizationCreateRequest.cs b/src/Plaid/Transfer/TransferAuthorizationCreateRequest.cs index 92827aa3..b61140e1 100644 --- a/src/Plaid/Transfer/TransferAuthorizationCreateRequest.cs +++ b/src/Plaid/Transfer/TransferAuthorizationCreateRequest.cs @@ -72,9 +72,9 @@ public partial class TransferAuthorizationCreateRequest : RequestBase public string? IsoCurrencyCode { get; set; } = default!; /// - /// A random key provided by the client, per unique authorization. Maximum of 50 characters. + /// 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. - /// Failure to provide this key may result in duplicate charges. + /// 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. /// Required for guaranteed ACH customers. /// [JsonPropertyName("idempotency_key")] @@ -109,4 +109,10 @@ public partial class TransferAuthorizationCreateRequest : RequestBase /// [JsonPropertyName("credit_funds_source")] public Entity.TransferCreditFundsSource? CreditFundsSource { get; set; } = default!; + + /// + /// Plaid’s unique identifier for a test clock. This field may only be used when using sandbox environment. If provided, the authorization is created at the virtual_time on the provided test_clock. + /// + [JsonPropertyName("test_clock_id")] + public string? TestClockId { get; set; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Transfer/TransferConfigurationGetResponse.cs b/src/Plaid/Transfer/TransferConfigurationGetResponse.cs index 88ef2ff7..6d598d96 100644 --- a/src/Plaid/Transfer/TransferConfigurationGetResponse.cs +++ b/src/Plaid/Transfer/TransferConfigurationGetResponse.cs @@ -11,6 +11,18 @@ public record TransferConfigurationGetResponse : ResponseBase [JsonPropertyName("max_single_transfer_amount")] public string MaxSingleTransferAmount { get; init; } = default!; + /// + /// The max limit of dollar amount of a single credit transfer (decimal string with two digits of precision e.g. "10.00"). + /// + [JsonPropertyName("max_single_transfer_credit_amount")] + public string MaxSingleTransferCreditAmount { get; init; } = default!; + + /// + /// The max limit of dollar amount of a single debit transfer (decimal string with two digits of precision e.g. "10.00"). + /// + [JsonPropertyName("max_single_transfer_debit_amount")] + public string MaxSingleTransferDebitAmount { get; init; } = default!; + /// /// The max limit of sum of dollar amount of credit transfers in last 24 hours (decimal string with two digits of precision e.g. "10.00"). /// @@ -29,6 +41,18 @@ public record TransferConfigurationGetResponse : ResponseBase [JsonPropertyName("max_monthly_amount")] public string MaxMonthlyAmount { get; init; } = default!; + /// + /// The max limit of sum of dollar amount of credit transfers in one calendar month (decimal string with two digits of precision e.g. "10.00"). + /// + [JsonPropertyName("max_monthly_credit_amount")] + public string MaxMonthlyCreditAmount { get; init; } = default!; + + /// + /// The max limit of sum of dollar amount of debit transfers in one calendar month (decimal string with two digits of precision e.g. "10.00"). + /// + [JsonPropertyName("max_monthly_debit_amount")] + public string MaxMonthlyDebitAmount { get; init; } = default!; + /// /// The currency of the dollar amount, e.g. "USD". /// diff --git a/src/Plaid/Transfer/TransferDiligenceDocumentUploadRequest.cs b/src/Plaid/Transfer/TransferDiligenceDocumentUploadRequest.cs new file mode 100644 index 00000000..78ef5bb8 --- /dev/null +++ b/src/Plaid/Transfer/TransferDiligenceDocumentUploadRequest.cs @@ -0,0 +1,25 @@ +namespace Going.Plaid.Transfer; + +/// +/// Defines the request schema for /transfer/diligence/document/upload +/// +public partial class TransferDiligenceDocumentUploadRequest : RequestBase +{ + /// + /// The Client ID of the originator whose document that you want to upload. + /// + [JsonPropertyName("originator_client_id")] + public string OriginatorClientId { get; set; } = default!; + + /// + /// A file to upload. + /// + [JsonPropertyName("file")] + public string File { get; set; } = default!; + + /// + /// Specifies the purpose of the uploaded file. + /// + [JsonPropertyName("purpose")] + public Entity.TransferDocumentPurpose Purpose { get; set; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Transfer/TransferDiligenceDocumentUploadResponse.cs b/src/Plaid/Transfer/TransferDiligenceDocumentUploadResponse.cs new file mode 100644 index 00000000..a4fe1de1 --- /dev/null +++ b/src/Plaid/Transfer/TransferDiligenceDocumentUploadResponse.cs @@ -0,0 +1,8 @@ +namespace Going.Plaid.Transfer; + +/// +/// Defines the response schema for /transfer/diligence/document/upload +/// +public record TransferDiligenceDocumentUploadResponse : ResponseBase +{ +} \ No newline at end of file diff --git a/src/Plaid/Transfer/TransferMetricsGetResponse.cs b/src/Plaid/Transfer/TransferMetricsGetResponse.cs index aa697712..138eddc6 100644 --- a/src/Plaid/Transfer/TransferMetricsGetResponse.cs +++ b/src/Plaid/Transfer/TransferMetricsGetResponse.cs @@ -23,6 +23,18 @@ public record TransferMetricsGetResponse : ResponseBase [JsonPropertyName("monthly_transfer_volume")] public string MonthlyTransferVolume { get; init; } = default!; + /// + /// Sum of dollar amount of debit transfers in current calendar month (decimal string with two digits of precision e.g. "10.00"). + /// + [JsonPropertyName("monthly_debit_transfer_volume")] + public string MonthlyDebitTransferVolume { get; init; } = default!; + + /// + /// Sum of dollar amount of credit transfers in current calendar month (decimal string with two digits of precision e.g. "10.00"). + /// + [JsonPropertyName("monthly_credit_transfer_volume")] + public string MonthlyCreditTransferVolume { get; init; } = default!; + /// /// The currency of the dollar amount, e.g. "USD". /// diff --git a/src/Plaid/Transfer/TransferSweepGetRequest.cs b/src/Plaid/Transfer/TransferSweepGetRequest.cs index 88f171d4..bb2eb92f 100644 --- a/src/Plaid/Transfer/TransferSweepGetRequest.cs +++ b/src/Plaid/Transfer/TransferSweepGetRequest.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Transfer; public partial class TransferSweepGetRequest : RequestBase { /// - /// Plaid’s unique identifier for a sweep. + /// Plaid's unique identifier for the sweep (UUID) or a shortened form consisting of the first 8 characters of the identifier (8-digit hexadecimal string). /// [JsonPropertyName("sweep_id")] public string SweepId { get; set; } = default!; diff --git a/src/Plaid/Transfer/TransferSweepListRequest.cs b/src/Plaid/Transfer/TransferSweepListRequest.cs index ea731a55..65d8e079 100644 --- a/src/Plaid/Transfer/TransferSweepListRequest.cs +++ b/src/Plaid/Transfer/TransferSweepListRequest.cs @@ -29,6 +29,12 @@ public partial class TransferSweepListRequest : RequestBase [JsonPropertyName("offset")] public int? Offset { get; set; } = default!; + /// + /// Filter sweeps to only those with the specified amount. + /// + [JsonPropertyName("amount")] + public string? Amount { get; set; } = default!; + /// /// Filter sweeps to only those with the specified originator client. /// diff --git a/src/Plaid/Webhook/UserPermissionRevokedWebhook.cs b/src/Plaid/Webhook/UserPermissionRevokedWebhook.cs index b6c07514..68c6f4f5 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 is fired when an end user has used either the my.plaid.com portal or the financial institution’s consent portal to revoke the permission that they previously granted to access an Item. 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. +/// 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. /// public record UserPermissionRevokedWebhook : WebhookBase {