diff --git a/plaid-openapi b/plaid-openapi index 27c8d3cb..0d29e879 160000 --- a/plaid-openapi +++ b/plaid-openapi @@ -1 +1 @@ -Subproject commit 27c8d3cb0565c01b54010d45459a843a1080122c +Subproject commit 0d29e8791636d2c2c5dffb0bd3bbb8473697fbc8 diff --git a/src/Plaid/Accounts/AccountsBalanceGetRequest.cs b/src/Plaid/Accounts/AccountsBalanceGetRequest.cs index ad836baa..52bb4756 100644 --- a/src/Plaid/Accounts/AccountsBalanceGetRequest.cs +++ b/src/Plaid/Accounts/AccountsBalanceGetRequest.cs @@ -10,4 +10,10 @@ public partial class AccountsBalanceGetRequest : RequestBase /// [JsonPropertyName("options")] public Entity.AccountsBalanceGetRequestOptions? Options { get; set; } = default!; + + /// + /// An optional object containing payment details. If set, a payment risk assessment is performed and returned as AccountsBalanceGetResponsePaymentRiskAssessment. + /// + [JsonPropertyName("payment_details")] + public Entity.AccountsBalanceGetRequestPaymentDetails? PaymentDetails { get; set; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Accounts/AccountsGetResponse.cs b/src/Plaid/Accounts/AccountsGetResponse.cs index 37879429..abab5992 100644 --- a/src/Plaid/Accounts/AccountsGetResponse.cs +++ b/src/Plaid/Accounts/AccountsGetResponse.cs @@ -17,4 +17,10 @@ public record AccountsGetResponse : ResponseBase /// [JsonPropertyName("item")] public Entity.Item Item { get; init; } = default!; + + /// + /// This object provides detailed risk assessment for the requested transaction + /// + [JsonPropertyName("payment_risk_assessment")] + public Entity.AccountsBalanceGetResponsePaymentRiskAssessment? PaymentRiskAssessment { get; init; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Beacon/BeaconReportSyndicationGetRequest.cs b/src/Plaid/Beacon/BeaconReportSyndicationGetRequest.cs new file mode 100644 index 00000000..8e791c59 --- /dev/null +++ b/src/Plaid/Beacon/BeaconReportSyndicationGetRequest.cs @@ -0,0 +1,13 @@ +namespace Going.Plaid.Beacon; + +/// +/// Request input for getting a Beacon Report Syndication +/// +public partial class BeaconReportSyndicationGetRequest : RequestBase +{ + /// + /// ID of the associated Beacon Report Syndication. + /// + [JsonPropertyName("beacon_report_syndication_id")] + public string BeaconReportSyndicationId { get; set; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Beacon/BeaconReportSyndicationGetResponse.cs b/src/Plaid/Beacon/BeaconReportSyndicationGetResponse.cs new file mode 100644 index 00000000..8cfb53ef --- /dev/null +++ b/src/Plaid/Beacon/BeaconReportSyndicationGetResponse.cs @@ -0,0 +1,28 @@ +namespace Going.Plaid.Beacon; + +/// +/// A Beacon Report Syndication represents a Beacon Report created either by your organization or another Beacon customer that matches a specific Beacon User you've created. +/// The analysis field in the response indicates which fields matched between the originally reported Beacon User and the Beacon User that the report was syndicated to. +/// The report field in the response contains a subset of information from the original report. +/// +public record BeaconReportSyndicationGetResponse : ResponseBase +{ + /// + /// ID of the associated Beacon Report Syndication. + /// + [JsonPropertyName("id")] + public string Id { get; init; } = default!; + + /// + /// A subset of information from a Beacon Report that has been syndicated to a matching Beacon User in your program. + /// The id field in the response is the ID of the original report that was syndicated. If the original report was created by your organization, the field will be filled with the ID of the report. Otherwise, the field will be null indicating that the original report was created by another Beacon customer. + /// + [JsonPropertyName("report")] + public Entity.BeaconReportSyndicationOriginalReport Report { get; init; } = default!; + + /// + /// Analysis of which fields matched between the originally reported Beacon User and the Beacon User that the report was syndicated to. + /// + [JsonPropertyName("analysis")] + public Entity.BeaconReportSyndicationAnalysis Analysis { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Beacon/BeaconUserUpdateRequest.cs b/src/Plaid/Beacon/BeaconUserUpdateRequest.cs new file mode 100644 index 00000000..a93979ab --- /dev/null +++ b/src/Plaid/Beacon/BeaconUserUpdateRequest.cs @@ -0,0 +1,19 @@ +namespace Going.Plaid.Beacon; + +/// +/// Request input for updating the identity data of a Beacon User. +/// +public partial class BeaconUserUpdateRequest : RequestBase +{ + /// + /// ID of the associated Beacon User. + /// + [JsonPropertyName("beacon_user_id")] + public string BeaconUserId { get; set; } = default!; + + /// + /// A subset of a Beacon User's data which is used to patch the existing identity data associated with a Beacon User. At least one field must be provided,. + /// + [JsonPropertyName("user")] + public Entity.BeaconUserUpdateRequestData User { get; set; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Beacon/BeaconUserUpdateResponse.cs b/src/Plaid/Beacon/BeaconUserUpdateResponse.cs new file mode 100644 index 00000000..68be1a3a --- /dev/null +++ b/src/Plaid/Beacon/BeaconUserUpdateResponse.cs @@ -0,0 +1,55 @@ +namespace Going.Plaid.Beacon; + +/// +/// A Beacon User represents an end user that has been scanned against the Beacon Network. +/// +public record BeaconUserUpdateResponse : ResponseBase +{ + /// + /// ID of the associated Beacon User. + /// + [JsonPropertyName("id")] + public string Id { get; init; } = default!; + + /// + /// An ISO8601 formatted timestamp. + /// + [JsonPropertyName("created_at")] + public DateTimeOffset CreatedAt { get; init; } = default!; + + /// + /// An ISO8601 formatted timestamp. This field indicates the last time the resource was modified. + /// + [JsonPropertyName("updated_at")] + public DateTimeOffset UpdatedAt { get; init; } = default!; + + /// + /// A status of a Beacon User. + /// + [JsonPropertyName("status")] + public Entity.BeaconUserStatus Status { get; init; } = default!; + + /// + /// ID of the associated Beacon Program. + /// + [JsonPropertyName("program_id")] + public string ProgramId { get; init; } = default!; + + /// + /// 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; init; } = default!; + + /// + /// A Beacon User's data and resulting analysis when checked against duplicate records and the Beacon Fraud Network. + /// + [JsonPropertyName("user")] + public Entity.BeaconUserData User { get; init; } = default!; + + /// + /// Information about the last change made to the parent object specifying what caused the change as well as when it occurred. + /// + [JsonPropertyName("audit_trail")] + public Entity.BeaconAuditTrail AuditTrail { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Beacon/PlaidClient.cs b/src/Plaid/Beacon/PlaidClient.cs index d64ae8f6..e3ad688f 100644 --- a/src/Plaid/Beacon/PlaidClient.cs +++ b/src/Plaid/Beacon/PlaidClient.cs @@ -70,4 +70,25 @@ public sealed partial class PlaidClient public Task BeaconReportGetAsync(Beacon.BeaconReportGetRequest request) => PostAsync("/beacon/report/get", request) .ParseResponseAsync(); + + /// + /// 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(); + + /// + /// Update the identity data for a Beacon User in your Beacon Program. + /// Similar to /beacon/user/create, several checks are performed immediately when you submit a change to /beacon/user/update: + /// - The user's updated PII is searched against all other users within the Beacon Program you specified. If a match is found that violates your program's "Duplicate Information Filtering" settings, the user will be returned with a status of pending_review. + /// - The user's updated PII is also searched against all fraud reports created by your organization across all of your Beacon Programs. If the user's data matches a fraud report that your team created, the user will be returned with a status of rejected. + /// - Finally, the user's PII is searched against all fraud report shared with the Beacon Network by other companies. If a matching fraud report is found, the user will be returned with a pending_review status if your program has enabled automatic flagging based on network fraud. + /// Plaid maintains a version history for each Beacon User, so the Beacon User's identity data before and after the update is retained as separate versions. + /// + /// + public Task BeaconUserUpdateAsync(Beacon.BeaconUserUpdateRequest request) => + PostAsync("/beacon/user/update", request) + .ParseResponseAsync(); } \ No newline at end of file diff --git a/src/Plaid/Converters/WebhookBaseConverter.Map.cs b/src/Plaid/Converters/WebhookBaseConverter.Map.cs index 003deefe..16921127 100644 --- a/src/Plaid/Converters/WebhookBaseConverter.Map.cs +++ b/src/Plaid/Converters/WebhookBaseConverter.Map.cs @@ -53,6 +53,8 @@ public partial class WebhookBaseConverter : JsonConverter [(WebhookType.Item, WebhookCode.NewAccountsAvailable)] = typeof(NewAccountsAvailableWebhook), [(WebhookType.LinkDelivery, WebhookCode.DeliveryStatus)] = typeof(LinkUserDeliveryStatusWebhook), [(WebhookType.LinkDelivery, WebhookCode.LinkCallback)] = typeof(LinkDeliveryCallbackWebhook), + [(WebhookType.Item, WebhookCode.UserAccountRevoked)] = typeof(UserAccountRevokedWebhook), + [(WebhookType.Statements, WebhookCode.StatementsRefreshComplete)] = typeof(StatementsRefreshCompleteWebhook), [(WebhookType.BaseReport, WebhookCode.ProductReady)] = typeof(BaseReportsProductReadyWebhook), [(WebhookType.BaseReport, WebhookCode.Error)] = typeof(BaseReportsErrorWebhook), [(WebhookType.CraIncome, WebhookCode.BankIncomeComplete)] = typeof(CraBankIncomeCompleteWebhook), diff --git a/src/Plaid/Entity/AccountIdentity.cs b/src/Plaid/Entity/AccountIdentity.cs index 036b42c5..28ec223d 100644 --- a/src/Plaid/Entity/AccountIdentity.cs +++ b/src/Plaid/Entity/AccountIdentity.cs @@ -67,4 +67,10 @@ public record AccountIdentity /// [JsonPropertyName("owners")] public IReadOnlyList? Owners { get; init; } = default!; + + /// + /// Array of documents that identity data is dervied from. This array will be empty if none of the account identity is from a document. + /// + [JsonPropertyName("documents")] + public IReadOnlyList? Documents { get; init; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/AccountsBalanceGetRequestPaymentDetails.cs b/src/Plaid/Entity/AccountsBalanceGetRequestPaymentDetails.cs new file mode 100644 index 00000000..4a02d4cb --- /dev/null +++ b/src/Plaid/Entity/AccountsBalanceGetRequestPaymentDetails.cs @@ -0,0 +1,32 @@ +namespace Going.Plaid.Entity; + +/// +/// An optional object containing payment details. If set, a payment risk assessment is performed and returned as AccountsBalanceGetResponsePaymentRiskAssessment. +/// +public class AccountsBalanceGetRequestPaymentDetails +{ + /// + /// The Plaid account_id of the account that is the funding source for the proposed transaction. The account_id is returned in the /accounts/get endpoint as well as the onSuccess callback metadata. + /// This will return an INVALID_ACCOUNT_ID error if the account has been removed at the bank or if the account_id is no longer valid. + /// + [JsonPropertyName("account_id")] + public string? AccountId { get; set; } = default!; + + /// + /// The unique ID that you would like to use to refer to this transaction. For your convenience mapping your internal data, you could use your internal identifier for this transaction. The max length for this field is 36 characters. + /// + [JsonPropertyName("client_transaction_id")] + public string? ClientTransactionId { get; set; } = default!; + + /// + /// The transaction amount, in USD (e.g. 102.05) + /// + [JsonPropertyName("amount")] + public decimal? Amount { get; set; } = default!; + + /// + /// The threshold percentage of the account balance used for comparison with the requested ACH debit amount. + /// + [JsonPropertyName("balance_threshold_percentage")] + public int? BalanceThresholdPercentage { get; set; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/AccountsBalanceGetResponsePaymentRiskAssessment.cs b/src/Plaid/Entity/AccountsBalanceGetResponsePaymentRiskAssessment.cs new file mode 100644 index 00000000..9189b7c9 --- /dev/null +++ b/src/Plaid/Entity/AccountsBalanceGetResponsePaymentRiskAssessment.cs @@ -0,0 +1,19 @@ +namespace Going.Plaid.Entity; + +/// +/// This object provides detailed risk assessment for the requested transaction +/// +public record AccountsBalanceGetResponsePaymentRiskAssessment +{ + /// + /// A five-tier risk assessment for the transaction based on the probability of return. + /// + [JsonPropertyName("risk_level")] + public string? RiskLevel { get; init; } = default!; + + /// + /// Indicates whether the requested ACH debit amount is greater than the threshold (set by customers) of the available or current balance. + /// + [JsonPropertyName("exceeds_balance_threshold")] + public bool? ExceedsBalanceThreshold { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/AssetReportAddOns.cs b/src/Plaid/Entity/AssetReportAddOns.cs index b2e51302..3677a4df 100644 --- a/src/Plaid/Entity/AssetReportAddOns.cs +++ b/src/Plaid/Entity/AssetReportAddOns.cs @@ -12,7 +12,7 @@ public enum AssetReportAddOns Investments, /// - /// When Fast Assets is requested, Plaid will create two versions of the Asset Report: the Fast Asset Report, which will contain only Identity and Balance information, and the Full Asset Report, which will also contain Transactions information. A PRODUCT_READY webhook will be fired for each Asset Report when it is ready, and the report_type field will indicate whether the webhook is firing for the full or fast Asset Report. To retrieve the Fast Asset Report, call /asset_report/get with fast_report set to true. There is no additional charge for using Fast Assets. + /// When Fast Assets is requested, Plaid will create two versions of the Asset Report: the Fast Asset Report, which will contain only Identity and Balance information, and the Full Asset Report, which will also contain Transactions information. A PRODUCT_READY webhook will be fired for each Asset Report when it is ready, and the report_type field will indicate whether the webhook is firing for the full or fast Asset Report. To retrieve the Fast Asset Report, call /asset_report/get with fast_report set to true. There is no additional charge for using Fast Assets. To create a Fast Asset Report, Plaid must successfully retrieve both Identity and Balance data; if Plaid encounters an error obtaining this data, the Fast Asset Report will not be created. However, as long as Plaid can obtain Transactions data, the Full Asset Report will still be available. /// [EnumMember(Value = "fast_assets")] FastAssets, diff --git a/src/Plaid/Entity/BeaconUserData.cs b/src/Plaid/Entity/BeaconUserData.cs index f45b71f1..5033f37f 100644 --- a/src/Plaid/Entity/BeaconUserData.cs +++ b/src/Plaid/Entity/BeaconUserData.cs @@ -41,7 +41,7 @@ public record BeaconUserData /// The ID number associated with a Beacon User. /// [JsonPropertyName("id_number")] - public Entity.BeaconUserIDNumber IdNumber { get; init; } = default!; + public Entity.BeaconUserIDNumber? IdNumber { get; init; } = default!; /// /// An IPv4 or IPV6 address. diff --git a/src/Plaid/Entity/BeaconUserUpdateRequestData.cs b/src/Plaid/Entity/BeaconUserUpdateRequestData.cs new file mode 100644 index 00000000..15ead6d3 --- /dev/null +++ b/src/Plaid/Entity/BeaconUserUpdateRequestData.cs @@ -0,0 +1,49 @@ +namespace Going.Plaid.Entity; + +/// +/// A subset of a Beacon User's data which is used to patch the existing identity data associated with a Beacon User. At least one field must be provided,. +/// +public class BeaconUserUpdateRequestData +{ + /// + /// A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). + /// + [JsonPropertyName("date_of_birth")] + public DateOnly? DateOfBirth { get; set; } = default!; + + /// + /// The full name for a given Beacon User. + /// + [JsonPropertyName("name")] + public Entity.BeaconUserName? Name { get; set; } = default!; + + /// + /// Home address for the associated user. For more context on this field, see Input Validation by Country. + /// + [JsonPropertyName("address")] + public Entity.BeaconUserRequestAddress? Address { get; set; } = default!; + + /// + /// 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!; + + /// + /// The ID number associated with a Beacon User. + /// + [JsonPropertyName("id_number")] + public Entity.BeaconUserIDNumber? IdNumber { get; set; } = default!; + + /// + /// An IPv4 or IPV6 address. + /// + [JsonPropertyName("ip_address")] + public string? IpAddress { get; set; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/Enrichments.cs b/src/Plaid/Entity/Enrichments.cs index 3f81bc28..0a0bfad1 100644 --- a/src/Plaid/Entity/Enrichments.cs +++ b/src/Plaid/Entity/Enrichments.cs @@ -61,6 +61,12 @@ public record Enrichments [JsonPropertyName("payment_channel")] public Entity.PaymentChannel PaymentChannel { get; init; } = default!; + /// + /// The phone number associated with the primary_counterparty in E. 164 format. If there is a location match (i.e. a street address is returned in the location object), the phone number will be location specific. + /// + [JsonPropertyName("phone_number")] + public string? PhoneNumber { get; init; } = default!; + /// /// Information describing the intent of the transaction. Most relevant for personal finance use cases, but not limited to such use cases. /// See the taxonomy CSV file for a full list of personal finance categories. If you are migrating to personal finance categories from the legacy categories, also refer to the migration guide. diff --git a/src/Plaid/Entity/IdentityDocument.cs b/src/Plaid/Entity/IdentityDocument.cs new file mode 100644 index 00000000..a77e1fe9 --- /dev/null +++ b/src/Plaid/Entity/IdentityDocument.cs @@ -0,0 +1,19 @@ +namespace Going.Plaid.Entity; + +/// +/// Document object with metadata of the document uploaded +/// +public record IdentityDocument +{ + /// + /// In closed beta. Object representing metadata pertaining to the document. + /// + [JsonPropertyName("metadata")] + public Entity.IdentityDocumentMetadata? Metadata { get; init; } = default!; + + /// + /// + /// + [JsonPropertyName("document_id")] + public string? DocumentId { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/IdentityDocumentMetadata.cs b/src/Plaid/Entity/IdentityDocumentMetadata.cs new file mode 100644 index 00000000..51ccc276 --- /dev/null +++ b/src/Plaid/Entity/IdentityDocumentMetadata.cs @@ -0,0 +1,46 @@ +namespace Going.Plaid.Entity; + +/// +/// In closed beta. Object representing metadata pertaining to the document. +/// +public record IdentityDocumentMetadata +{ + /// + /// The name of the document. + /// + [JsonPropertyName("name")] + public string? Name { get; init; } = default!; + + /// + /// Boolean field indicating if the uploaded document's account number matches the account number we have on file + /// + [JsonPropertyName("is_account_number_match")] + public bool? IsAccountNumberMatch { get; init; } = default!; + + /// + /// The processing status of the document. + /// PROCESSING_COMPLETE: The document was successfully processed. + /// DOCUMENT_ERROR: The document could not be processed. Possible causes include: The document was an unacceptable document type such as an offer letter or bank statement, the document image was cropped or blurry, or the document was corrupted. + /// UNKNOWN or null: An internal error occurred. If this happens repeatedly, contact support or your Plaid account manager. + /// + [JsonPropertyName("status")] + public string? Status { get; init; } = default!; + + /// + /// + /// + [JsonPropertyName("last_updated")] + public DateTimeOffset? LastUpdated { get; init; } = default!; + + /// + /// + /// + [JsonPropertyName("uploaded_at")] + public DateTimeOffset? UploadedAt { get; init; } = default!; + + /// + /// + /// + [JsonPropertyName("page_count")] + public int? PageCount { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs b/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs index fd067458..19b8d4fb 100644 --- a/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs +++ b/src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs @@ -40,7 +40,8 @@ public class IdentityVerificationCreateRequestUser public Entity.IdentityVerificationRequestUserName? Name { get; set; } = default!; /// - /// Home address for the user. For more context on this field, see Input Validation by Country. + /// Home address for the user. Supported values are: not provided, address with only country code or full address. + /// For more context on this field, see Input Validation by Country. /// [JsonPropertyName("address")] public Entity.UserAddress? Address { get; set; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationRequestUser.cs b/src/Plaid/Entity/IdentityVerificationRequestUser.cs index 66a5a084..8894c359 100644 --- a/src/Plaid/Entity/IdentityVerificationRequestUser.cs +++ b/src/Plaid/Entity/IdentityVerificationRequestUser.cs @@ -39,7 +39,8 @@ public class IdentityVerificationRequestUser public Entity.IdentityVerificationRequestUserName? Name { get; set; } = default!; /// - /// Home address for the user. For more context on this field, see Input Validation by Country. + /// Home address for the user. Supported values are: not provided, address with only country code or full address. + /// For more context on this field, see Input Validation by Country. /// [JsonPropertyName("address")] public Entity.UserAddress? Address { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkCallbackMetadata.cs b/src/Plaid/Entity/LinkCallbackMetadata.cs index 67751b8d..743fa5d8 100644 --- a/src/Plaid/Entity/LinkCallbackMetadata.cs +++ b/src/Plaid/Entity/LinkCallbackMetadata.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// Information related to the callback from the hosted Link session. +/// Information related to the callback from the Hosted Link session. /// public record LinkCallbackMetadata { diff --git a/src/Plaid/Entity/LinkDeliveryMetadata.cs b/src/Plaid/Entity/LinkDeliveryMetadata.cs index 429008ee..a885edcd 100644 --- a/src/Plaid/Entity/LinkDeliveryMetadata.cs +++ b/src/Plaid/Entity/LinkDeliveryMetadata.cs @@ -6,13 +6,13 @@ namespace Going.Plaid.Entity; public record LinkDeliveryMetadata { /// - /// The communication method used to deliver the hosted link session + /// The communication method used to deliver the Hosted Link session /// [JsonPropertyName("communication_method")] public Entity.LinkDeliveryWebhookCommunicationMethod? CommunicationMethod { get; init; } = default!; /// - /// The status of the delivery of the hosted link to the user + /// The status of the delivery of the Hosted Link to the user /// [JsonPropertyName("delivery_status")] public Entity.LinkDeliveryWebhookDeliveryStatus? DeliveryStatus { get; init; } = default!; diff --git a/src/Plaid/Entity/LinkDeliveryWebhookCommunicationMethod.cs b/src/Plaid/Entity/LinkDeliveryWebhookCommunicationMethod.cs index 3b053fa5..b1133246 100644 --- a/src/Plaid/Entity/LinkDeliveryWebhookCommunicationMethod.cs +++ b/src/Plaid/Entity/LinkDeliveryWebhookCommunicationMethod.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The communication method used to deliver the hosted link session +/// The communication method used to deliver the Hosted Link session /// public enum LinkDeliveryWebhookCommunicationMethod { diff --git a/src/Plaid/Entity/LinkDeliveryWebhookDeliveryStatus.cs b/src/Plaid/Entity/LinkDeliveryWebhookDeliveryStatus.cs index e2a32608..38868263 100644 --- a/src/Plaid/Entity/LinkDeliveryWebhookDeliveryStatus.cs +++ b/src/Plaid/Entity/LinkDeliveryWebhookDeliveryStatus.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The status of the delivery of the hosted link to the user +/// The status of the delivery of the Hosted Link to the user /// public enum LinkDeliveryWebhookDeliveryStatus { diff --git a/src/Plaid/Entity/LinkTokenCreateHostedLink.cs b/src/Plaid/Entity/LinkTokenCreateHostedLink.cs index 147fa0f9..d6c6f73b 100644 --- a/src/Plaid/Entity/LinkTokenCreateHostedLink.cs +++ b/src/Plaid/Entity/LinkTokenCreateHostedLink.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// Configuration parameters for Hosted Link +/// Configuration parameters for Hosted Link (beta). Only available for participants in the Hosted Link beta program. /// public class LinkTokenCreateHostedLink { @@ -12,14 +12,13 @@ public class LinkTokenCreateHostedLink public Entity.HostedLinkDeliveryMethod? DeliveryMethod { get; set; } = default!; /// - /// URI that Hosted Link will redirect to upon completion of the Link flow. This will only occur in Hosted Link - /// sessions, not in other implementation methods. + /// URI that Hosted Link will redirect to upon completion of the Link flow. This will only occur in Hosted Link sessions, not in other implementation methods. /// [JsonPropertyName("completion_redirect_uri")] public string? CompletionRedirectUri { get; set; } = default!; /// - /// How many seconds the link will be valid for. Must be positive. Cannot be longer than 21 days. + /// How many seconds the link will be valid for. Must be positive. Cannot be longer than 21 days. The default lifetime is 4 hours. /// [JsonPropertyName("url_lifetime_seconds")] public int? UrlLifetimeSeconds { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenCreateRequestIdentityVerification.cs b/src/Plaid/Entity/LinkTokenCreateRequestIdentityVerification.cs index 3317500c..286c0d86 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestIdentityVerification.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestIdentityVerification.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public class LinkTokenCreateRequestIdentityVerification { /// - /// ID of the associated Identity Verification template. + /// /// [JsonPropertyName("template_id")] public string TemplateId { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenGetSessionsResponse.cs b/src/Plaid/Entity/LinkTokenGetSessionsResponse.cs index 1565942b..7d43985d 100644 --- a/src/Plaid/Entity/LinkTokenGetSessionsResponse.cs +++ b/src/Plaid/Entity/LinkTokenGetSessionsResponse.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// An object containing information about a link session. +/// An object containing information about a link session. This field will only be present if your client is enabled for Hosted Link (beta). Session data will be provided for up to six hours after the session has ended. /// public record LinkTokenGetSessionsResponse { diff --git a/src/Plaid/Entity/LinkTokenTransactions.cs b/src/Plaid/Entity/LinkTokenTransactions.cs index 73e279d0..2cbbd145 100644 --- a/src/Plaid/Entity/LinkTokenTransactions.cs +++ b/src/Plaid/Entity/LinkTokenTransactions.cs @@ -7,6 +7,7 @@ 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. /// [JsonPropertyName("days_requested")] public int? DaysRequested { get; set; } = default!; diff --git a/src/Plaid/Entity/OptionContract.cs b/src/Plaid/Entity/OptionContract.cs new file mode 100644 index 00000000..ebe5caed --- /dev/null +++ b/src/Plaid/Entity/OptionContract.cs @@ -0,0 +1,34 @@ +namespace Going.Plaid.Entity; + +/// +/// 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. +/// +public record OptionContract +{ + /// + /// The type of this option contract. It is one of: + /// put: for Put option contracts + /// call: for Call option contracts + /// + [JsonPropertyName("contract_type")] + public string ContractType { get; init; } = default!; + + /// + /// The expiration date for this option contract, in ISO 8601 format. + /// + [JsonPropertyName("expiration_date")] + public DateOnly ExpirationDate { get; init; } = default!; + + /// + /// The strike price for this option contract, per share of security. + /// + [JsonPropertyName("strike_price")] + public decimal StrikePrice { get; init; } = default!; + + /// + /// The ticker of the underlying security for this option contract. + /// + [JsonPropertyName("underlying_security_ticker")] + public string UnderlyingSecurityTicker { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/Owner.cs b/src/Plaid/Entity/Owner.cs index 9d1de64c..0fccb077 100644 --- a/src/Plaid/Entity/Owner.cs +++ b/src/Plaid/Entity/Owner.cs @@ -29,4 +29,10 @@ public record Owner /// [JsonPropertyName("addresses")] public IReadOnlyList Addresses { get; init; } = default!; + + /// + /// document_id is the id of the document that this identity belongs to + /// + [JsonPropertyName("document_id")] + public string? DocumentId { get; init; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs b/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs index 95072d9e..667f839d 100644 --- a/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs +++ b/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs @@ -263,6 +263,18 @@ public enum ProcessorTokenCreateRequestProcessorEnum [EnumMember(Value = "knot")] Knot, + /// + /// + /// + [EnumMember(Value = "sardine")] + Sardine, + + /// + /// + /// + [EnumMember(Value = "alloy")] + Alloy, + /// /// 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/Security.cs b/src/Plaid/Entity/Security.cs index 17f0c92d..f1b73cc8 100644 --- a/src/Plaid/Entity/Security.cs +++ b/src/Plaid/Entity/Security.cs @@ -112,4 +112,17 @@ public record Security /// [JsonPropertyName("unofficial_currency_code")] public string? UnofficialCurrencyCode { get; init; } = default!; + + /// + /// The ISO-10383 Market Identifier Code of the exchange or market in which the security is being traded. + /// + [JsonPropertyName("market_identifier_code")] + public string? MarketIdentifierCode { 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. + /// + [JsonPropertyName("option_contract")] + public Entity.OptionContract? OptionContract { get; init; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/SignalEvaluateCoreAttributes.cs b/src/Plaid/Entity/SignalEvaluateCoreAttributes.cs index 4dab93a1..480ff9cb 100644 --- a/src/Plaid/Entity/SignalEvaluateCoreAttributes.cs +++ b/src/Plaid/Entity/SignalEvaluateCoreAttributes.cs @@ -400,4 +400,16 @@ public record SignalEvaluateCoreAttributes /// [JsonPropertyName("transactions_last_updated")] public DateTimeOffset? TransactionsLastUpdated { get; init; } = default!; + + /// + /// Indicates if the receiver bank account is closed + /// + [JsonPropertyName("is_account_closed")] + public bool? IsAccountClosed { get; init; } = default!; + + /// + /// Indicates if the receiver bank account is either frozen or restricted + /// + [JsonPropertyName("is_account_frozen_or_restricted")] + public bool? IsAccountFrozenOrRestricted { get; init; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/StatementsRefreshCompleteResult.cs b/src/Plaid/Entity/StatementsRefreshCompleteResult.cs new file mode 100644 index 00000000..4998f399 --- /dev/null +++ b/src/Plaid/Entity/StatementsRefreshCompleteResult.cs @@ -0,0 +1,25 @@ +namespace Going.Plaid.Entity; + +/// +/// The result of the statement refresh extraction +/// +public enum StatementsRefreshCompleteResult +{ + /// + /// The statements were successfully extracted and can be listed via /statements/list/ and downloaded via /statements/download/. + /// + [EnumMember(Value = "SUCCESS")] + Success, + + /// + /// The statements failed to be extracted. + /// + [EnumMember(Value = "FAILURE")] + Failure, + + /// + /// 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/TransactionStream.cs b/src/Plaid/Entity/TransactionStream.cs index a80fe660..e29bd497 100644 --- a/src/Plaid/Entity/TransactionStream.cs +++ b/src/Plaid/Entity/TransactionStream.cs @@ -105,8 +105,8 @@ public record TransactionStream public bool IsUserModified { get; init; } = default!; /// - /// The date of the most recent user modification. This will only be set if is_user_modified is true. + /// The date and time of the most recent user modification. This will only be set if is_user_modified is true. /// - [JsonPropertyName("last_user_modified_date")] - public DateOnly? LastUserModifiedDate { get; init; } = default!; + [JsonPropertyName("last_user_modified_datetime")] + public DateTimeOffset? LastUserModifiedDatetime { get; init; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/TransactionsGetRequestOptions.cs b/src/Plaid/Entity/TransactionsGetRequestOptions.cs index 767ba6c7..f32579c0 100644 --- a/src/Plaid/Entity/TransactionsGetRequestOptions.cs +++ b/src/Plaid/Entity/TransactionsGetRequestOptions.cs @@ -51,6 +51,7 @@ public class TransactionsGetRequestOptions /// /// 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. /// [JsonPropertyName("days_requested")] public int? DaysRequested { get; set; } = default!; diff --git a/src/Plaid/Entity/TransactionsSyncRequestOptions.cs b/src/Plaid/Entity/TransactionsSyncRequestOptions.cs index 10f49f2c..6556e58e 100644 --- a/src/Plaid/Entity/TransactionsSyncRequestOptions.cs +++ b/src/Plaid/Entity/TransactionsSyncRequestOptions.cs @@ -26,6 +26,7 @@ public class TransactionsSyncRequestOptions /// /// 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. /// [JsonPropertyName("days_requested")] public int? DaysRequested { get; set; } = default!; diff --git a/src/Plaid/Entity/UserAddress.cs b/src/Plaid/Entity/UserAddress.cs index 9f156efc..6a68b1a2 100644 --- a/src/Plaid/Entity/UserAddress.cs +++ b/src/Plaid/Entity/UserAddress.cs @@ -1,7 +1,8 @@ namespace Going.Plaid.Entity; /// -/// Home address for the user. For more context on this field, see Input Validation by Country. +/// Home address for the user. Supported values are: not provided, address with only country code or full address. +/// For more context on this field, see Input Validation by Country. /// public class UserAddress { @@ -9,7 +10,7 @@ public class UserAddress /// The primary street portion of an address. If the user has submitted their address, this field will always be filled. /// [JsonPropertyName("street")] - public string Street { get; set; } = default!; + public string? Street { get; set; } = default!; /// /// Extra street information, like an apartment or suite number. @@ -21,7 +22,7 @@ public class UserAddress /// City from the end user's address /// [JsonPropertyName("city")] - public string City { get; set; } = default!; + public string? City { get; set; } = default!; /// /// An ISO 3166-2 subdivision code. Related terms would be "state", "province", "prefecture", "zone", "subdivision", etc. diff --git a/src/Plaid/Entity/WalletBalance.cs b/src/Plaid/Entity/WalletBalance.cs index 80ef7f6a..5018f650 100644 --- a/src/Plaid/Entity/WalletBalance.cs +++ b/src/Plaid/Entity/WalletBalance.cs @@ -16,4 +16,10 @@ public record WalletBalance /// [JsonPropertyName("current")] public decimal Current { get; init; } = default!; + + /// + /// The total amount of funds in the account after subtracting pending debit transaction amounts + /// + [JsonPropertyName("available")] + public decimal Available { get; init; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/WebhookCode.cs b/src/Plaid/Entity/WebhookCode.cs index 4c8b47ac..a5b0e858 100644 --- a/src/Plaid/Entity/WebhookCode.cs +++ b/src/Plaid/Entity/WebhookCode.cs @@ -227,6 +227,18 @@ public enum WebhookCode [EnumMember(Value = "LINK_CALLBACK")] LinkCallback, + /// + /// + /// + [EnumMember(Value = "USER_ACCOUNT_REVOKED")] + UserAccountRevoked, + + /// + /// + /// + [EnumMember(Value = "STATEMENTS_REFRESH_COMPLETE")] + StatementsRefreshComplete, + /// /// /// diff --git a/src/Plaid/Entity/WebhookType.cs b/src/Plaid/Entity/WebhookType.cs index 6d8cb0dd..41a02b4b 100644 --- a/src/Plaid/Entity/WebhookType.cs +++ b/src/Plaid/Entity/WebhookType.cs @@ -119,6 +119,12 @@ public enum WebhookType [EnumMember(Value = "LINK_DELIVERY")] LinkDelivery, + /// + /// + /// + [EnumMember(Value = "STATEMENTS")] + Statements, + /// /// /// diff --git a/src/Plaid/Link/LinkTokenCreateRequest.cs b/src/Plaid/Link/LinkTokenCreateRequest.cs index 5fad3ea7..e2bd81e2 100644 --- a/src/Plaid/Link/LinkTokenCreateRequest.cs +++ b/src/Plaid/Link/LinkTokenCreateRequest.cs @@ -89,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 via a webview. The redirect_uri should not contain any query parameters. When used in Production or Development, 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. + /// 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 via a webview. The redirect_uri should not contain any query parameters. When used in Production or Development, 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 (beta) the redirect_uri must be set to https://hosted.plaid.com/oauth/redirect. /// [JsonPropertyName("redirect_uri")] public string? RedirectUri { get; set; } = default!; @@ -216,7 +216,7 @@ public partial class LinkTokenCreateRequest : RequestBase public Entity.LinkTokenInvestmentsAuth? InvestmentsAuth { get; set; } = default!; /// - /// Configuration parameters for Hosted Link + /// Configuration parameters for Hosted Link (beta). Only available for participants in the Hosted Link beta program. /// [JsonPropertyName("hosted_link")] public Entity.LinkTokenCreateHostedLink? HostedLink { get; set; } = default!; diff --git a/src/Plaid/Link/LinkTokenCreateResponse.cs b/src/Plaid/Link/LinkTokenCreateResponse.cs index 426d550e..eb1d6dfa 100644 --- a/src/Plaid/Link/LinkTokenCreateResponse.cs +++ b/src/Plaid/Link/LinkTokenCreateResponse.cs @@ -18,7 +18,7 @@ public record LinkTokenCreateResponse : ResponseBase public DateTimeOffset Expiration { get; init; } = default!; /// - /// A URL of a Plaid-hosted Link flow that will use the Link token returned by this request + /// A URL of a Plaid-hosted Link flow that will use the Link token returned by this request. Only present if the client is enabled for Hosted Link (beta). /// [JsonPropertyName("hosted_link_url")] public string? HostedLinkUrl { get; init; } = default!; diff --git a/src/Plaid/Link/LinkTokenGetResponse.cs b/src/Plaid/Link/LinkTokenGetResponse.cs index 69c535b0..63c0d6ca 100644 --- a/src/Plaid/Link/LinkTokenGetResponse.cs +++ b/src/Plaid/Link/LinkTokenGetResponse.cs @@ -24,7 +24,7 @@ public record LinkTokenGetResponse : ResponseBase public DateTimeOffset? Expiration { get; init; } = default!; /// - /// Information about link sessions created using this link_token. + /// Information about Link sessions created using this link_token. This field will only be present if your client is enabled for Hosted Link (beta). Session data will be provided for up to six hours after the session has ended. /// [JsonPropertyName("link_sessions")] public IReadOnlyList? LinkSessions { get; init; } = default!; diff --git a/src/Plaid/Partner/PartnerCustomerCreateRequest.cs b/src/Plaid/Partner/PartnerCustomerCreateRequest.cs index f3cd5bf2..814dc168 100644 --- a/src/Plaid/Partner/PartnerCustomerCreateRequest.cs +++ b/src/Plaid/Partner/PartnerCustomerCreateRequest.cs @@ -94,4 +94,10 @@ public partial class PartnerCustomerCreateRequest : RequestBase /// [JsonPropertyName("redirect_uris")] public IReadOnlyList? RedirectUris { get; set; } = default!; + + /// + /// The unique identifier assigned to a financial institution by regulatory authorities, if applicable. For banks, this is the FDIC Certificate Number. For credit unions, this is the Credit Union Charter Number. + /// + [JsonPropertyName("registration_number")] + public string? RegistrationNumber { get; set; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Sandbox/PlaidClient.cs b/src/Plaid/Sandbox/PlaidClient.cs index f3de9015..e6f09795 100644 --- a/src/Plaid/Sandbox/PlaidClient.cs +++ b/src/Plaid/Sandbox/PlaidClient.cs @@ -46,7 +46,6 @@ public sealed partial class PlaidClient /// /// The /sandbox/item/set_verification_status endpoint can be used to change the verification status of an Item in in the Sandbox in order to simulate the Automated Micro-deposit flow. - /// Note that not all Plaid developer accounts are enabled for micro-deposit based verification by default. Your account must be enabled for this feature in order to test it in Sandbox. To enable this features or check your status, contact your account manager or submit a product access Support ticket. /// For more information on testing Automated Micro-deposits in Sandbox, see Auth full coverage testing. /// /// diff --git a/src/Plaid/Transactions/PlaidClient.cs b/src/Plaid/Transactions/PlaidClient.cs index be9f6fef..425dc15b 100644 --- a/src/Plaid/Transactions/PlaidClient.cs +++ b/src/Plaid/Transactions/PlaidClient.cs @@ -27,7 +27,7 @@ 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). 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). 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. /// 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/Transactions/TransactionsSyncRequest.cs b/src/Plaid/Transactions/TransactionsSyncRequest.cs index e2c6f534..33bee41e 100644 --- a/src/Plaid/Transactions/TransactionsSyncRequest.cs +++ b/src/Plaid/Transactions/TransactionsSyncRequest.cs @@ -7,7 +7,7 @@ public partial class TransactionsSyncRequest : RequestBase { /// /// The cursor value represents the last update requested. Providing it will cause the response to only return changes after this update. - /// If omitted, the entire history of updates will be returned, starting with the first-added transactions on the Item. The cursor also accepts the special value of "now", which can be used to fast-forward the cursor as part of migrating an existing Item from /transactions/get to /transactions/sync. For more information, see the Transactions sync migration guide. Note that using the "now value is not supported for any use case other than migrating existing Items from /transactions/get. + /// If omitted, the entire history of updates will be returned, starting with the first-added transactions on the Item. The cursor also accepts the special value of "now", which can be used to fast-forward the cursor as part of migrating an existing Item from /transactions/get to /transactions/sync. For more information, see the Transactions sync migration guide. Note that using the "now" value is not supported for any use case other than migrating existing Items from /transactions/get. /// The upper-bound length of this cursor is 256 characters of base64. /// [JsonPropertyName("cursor")] diff --git a/src/Plaid/Transfer/TransferCreateRequest.cs b/src/Plaid/Transfer/TransferCreateRequest.cs index 24470df2..c62a6d7a 100644 --- a/src/Plaid/Transfer/TransferCreateRequest.cs +++ b/src/Plaid/Transfer/TransferCreateRequest.cs @@ -44,7 +44,7 @@ public partial class TransferCreateRequest : RequestBase public string? Amount { get; set; } = default!; /// - /// The transfer description. Maximum of 15 characters. If reprocessing a returned transfer, please note that the description field must be "Retry" to indicate that it's a retry of a previously returned transfer. You may retry a transfer up to 2 times, within 180 days of creating the original transfer. Only transfers that were returned with code R01 or R09 may be retried. For a full listing of ACH return codes, see Transfer errors. + /// The transfer description. Maximum of 15 characters. If reprocessing a returned transfer, please note that the description field must be "Retry 1" or "Retry 2" to indicate that it's a retry of a previously returned transfer. You may retry a transfer up to 2 times, within 180 days of creating the original transfer. Only transfers that were returned with code R01 or R09 may be retried. For a full listing of ACH return codes, see Transfer errors. /// [JsonPropertyName("description")] public string Description { get; set; } = default!; diff --git a/src/Plaid/Transfer/TransferIntentCreateRequest.cs b/src/Plaid/Transfer/TransferIntentCreateRequest.cs index 775ea062..b54593ab 100644 --- a/src/Plaid/Transfer/TransferIntentCreateRequest.cs +++ b/src/Plaid/Transfer/TransferIntentCreateRequest.cs @@ -12,7 +12,7 @@ public partial class TransferIntentCreateRequest : RequestBase public string? AccountId { get; set; } = default!; /// - /// Specify the account used to fund the transfer. Customers can find a list of funding_account_ids in the Accounts page of your Plaid Dashboard, under the "Account ID" column. If this field is left blank, it will default to the default funding_account_id specified during onboarding. + /// Specify the account used to fund the transfer. Should be specified if using legacy funding methods only. If using Plaid Ledger, leave this field blank. Customers can find a list of funding_account_ids in the Accounts page of your Plaid Dashboard, under the "Account ID" column. If this field is left blank and you are using legacy funding methods, this will default to the default funding_account_id specified during onboarding. Otherwise, Plaid Ledger will be used. /// [JsonPropertyName("funding_account_id")] public string? FundingAccountId { get; set; } = default!; diff --git a/src/Plaid/Webhook/LinkDeliveryCallbackWebhook.cs b/src/Plaid/Webhook/LinkDeliveryCallbackWebhook.cs index 8c689402..4d0ec620 100644 --- a/src/Plaid/Webhook/LinkDeliveryCallbackWebhook.cs +++ b/src/Plaid/Webhook/LinkDeliveryCallbackWebhook.cs @@ -32,7 +32,7 @@ public record LinkDeliveryCallbackWebhook : WebhookBase public Entity.PlaidError? Error { get; init; } = default!; /// - /// Information related to the callback from the hosted Link session. + /// Information related to the callback from the Hosted Link session. /// [JsonPropertyName("link_callback_metadata")] public Entity.LinkCallbackMetadata LinkCallbackMetadata { get; init; } = default!; diff --git a/src/Plaid/Webhook/LinkSessionFinishedWebhook.cs b/src/Plaid/Webhook/LinkSessionFinishedWebhook.cs index c05e4a04..7394a4ea 100644 --- a/src/Plaid/Webhook/LinkSessionFinishedWebhook.cs +++ b/src/Plaid/Webhook/LinkSessionFinishedWebhook.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Webhook; /// -/// Contains the state of a completed link session, along with the public token if available. +/// Contains the state of a completed Link session, along with the public token if available. /// public record LinkSessionFinishedWebhook : WebhookBase { @@ -14,25 +14,25 @@ public record LinkSessionFinishedWebhook : WebhookBase public override WebhookCode WebhookCode => WebhookCode.SessionFinished; /// - /// The final status of the link session. Will always be "SUCCESS" or "EXITED". + /// The final status of the Link session. Will always be "SUCCESS" or "EXITED". /// [JsonPropertyName("status")] public string Status { get; init; } = default!; /// - /// The identifier for the link session. + /// The identifier for the Link session. /// [JsonPropertyName("link_session_id")] public string LinkSessionId { get; init; } = default!; /// - /// The link token used to create the link session. + /// The link token used to create the Link session. /// [JsonPropertyName("link_token")] public string LinkToken { get; init; } = default!; /// - /// The public token generated by the link session. + /// The public token generated by the Link session. /// [JsonPropertyName("public_token")] public string? PublicToken { get; init; } = default!; diff --git a/src/Plaid/Webhook/LinkUserDeliveryStatusWebhook.cs b/src/Plaid/Webhook/LinkUserDeliveryStatusWebhook.cs index 6340a34f..399657c4 100644 --- a/src/Plaid/Webhook/LinkUserDeliveryStatusWebhook.cs +++ b/src/Plaid/Webhook/LinkUserDeliveryStatusWebhook.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Webhook; /// -/// Webhook indicating that the status of the delivery of the hosted link session to a user +/// Webhook indicating that the status of the delivery of the Hosted Link session to a user /// public record LinkUserDeliveryStatusWebhook : WebhookBase { diff --git a/src/Plaid/Webhook/StatementsRefreshCompleteWebhook.cs b/src/Plaid/Webhook/StatementsRefreshCompleteWebhook.cs new file mode 100644 index 00000000..aabe3eb5 --- /dev/null +++ b/src/Plaid/Webhook/StatementsRefreshCompleteWebhook.cs @@ -0,0 +1,27 @@ +namespace Going.Plaid.Webhook; + +/// +/// Fired when refreshed statements extraction is completed or failed to be completed. Triggered by calling /statements/refresh. +/// +public record StatementsRefreshCompleteWebhook : WebhookBase +{ + /// + [JsonPropertyName("webhook_type")] + public override WebhookType WebhookType => WebhookType.Statements; + + /// + [JsonPropertyName("webhook_code")] + public override WebhookCode WebhookCode => WebhookCode.StatementsRefreshComplete; + + /// + /// The Plaid Item ID. The item_id is always unique; linking the same account at the same institution twice will result in two Items with different item_id values. Like all Plaid identifiers, the item_id is case-sensitive. + /// + [JsonPropertyName("item_id")] + public string ItemId { get; init; } = default!; + + /// + /// The result of the statement refresh extraction + /// + [JsonPropertyName("result")] + public Entity.StatementsRefreshCompleteResult Result { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Webhook/SyncUpdatesAvailableWebhook.cs b/src/Plaid/Webhook/SyncUpdatesAvailableWebhook.cs index cd0878f0..e7e01eb8 100644 --- a/src/Plaid/Webhook/SyncUpdatesAvailableWebhook.cs +++ b/src/Plaid/Webhook/SyncUpdatesAvailableWebhook.cs @@ -23,13 +23,13 @@ public record SyncUpdatesAvailableWebhook : WebhookBase public string ItemId { get; init; } = default!; /// - /// Indicates if initial pull information is available. + /// Indicates if initial pull information (most recent 30 days of transaction history) is available. /// [JsonPropertyName("initial_update_complete")] public bool InitialUpdateComplete { get; init; } = default!; /// - /// Indicates if historical pull information is available. + /// Indicates if historical pull information (maximum transaction history requested, up to 2 years) is available. /// [JsonPropertyName("historical_update_complete")] public bool HistoricalUpdateComplete { get; init; } = default!; diff --git a/src/Plaid/Webhook/UserAccountRevokedWebhook.cs b/src/Plaid/Webhook/UserAccountRevokedWebhook.cs new file mode 100644 index 00000000..d2c49fee --- /dev/null +++ b/src/Plaid/Webhook/UserAccountRevokedWebhook.cs @@ -0,0 +1,33 @@ +namespace Going.Plaid.Webhook; + +/// +/// The USER_ACCOUNT_REVOKED webhook is fired when an end user has revoked access to their account on the Data Provider's portal. The user can restore access to the revoked account by regranting permissions on the Data Provider's portal. This webhook is currently in beta. It will be available in GA in Jan 2024. +/// +public record UserAccountRevokedWebhook : WebhookBase +{ + /// + [JsonPropertyName("webhook_type")] + public override WebhookType WebhookType => WebhookType.Item; + + /// + [JsonPropertyName("webhook_code")] + public override WebhookCode WebhookCode => WebhookCode.UserAccountRevoked; + + /// + /// The item_id of the Item associated with this webhook, warning, or error + /// + [JsonPropertyName("item_id")] + public string ItemId { get; init; } = default!; + + /// + /// The external account ID of the affected account + /// + [JsonPropertyName("account_id")] + public string AccountId { get; init; } = default!; + + /// + /// We use standard HTTP response codes for success and failure notifications, and our errors are further classified by error_type. In general, 200 HTTP codes correspond to success, 40X codes are for developer- or user-related failures, and 50X codes are for Plaid-related issues. An Item with a non-null error object will only be part of an API response when calling /item/get to view Item status. Otherwise, error fields will be null if no error has occurred; if an error has occurred, an error code will be returned instead. + /// + [JsonPropertyName("error")] + public Entity.PlaidError? Error { get; init; } = default!; +} \ No newline at end of file