diff --git a/plaid-openapi b/plaid-openapi index 10bd5903..9368e287 160000 --- a/plaid-openapi +++ b/plaid-openapi @@ -1 +1 @@ -Subproject commit 10bd5903508857843a88c05d2904327a6d18c15f +Subproject commit 9368e287622381ba2429628f0cda0a2f280478d9 diff --git a/src/Plaid/Beacon/BeaconAccountRiskEvaluateRequest.cs b/src/Plaid/Beacon/BeaconAccountRiskEvaluateRequest.cs new file mode 100644 index 00000000..d25817a9 --- /dev/null +++ b/src/Plaid/Beacon/BeaconAccountRiskEvaluateRequest.cs @@ -0,0 +1,44 @@ +namespace Going.Plaid.Beacon; + +/// +/// BeaconAccountRiskEvaluateRequest defines the request schema for /v1/beacon/account_risk/risk/evaluate +/// +public partial class BeaconAccountRiskEvaluateRequest : RequestBase +{ + /// + /// An optional object to filter /beacon/account_risk/v1/evaluate results to a subset of the accounts on the linked Item. + /// + [JsonPropertyName("options")] + public Entity.BeaconAccountRiskEvaluateRequestOptions? Options { 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 evaluations and/or multiple linked accounts. 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!; + + /// + /// Unique identifier of what you are looking to evaluate (account add, information change, etc.) to allow us to tie the activity to the decisions and possible fraud outcome sent via our feedback endpoints. You can use your internal request ID or similar. + /// + [JsonPropertyName("client_evaluation_id")] + public string? ClientEvaluationId { get; set; } = default!; + + /// + /// Description of the reason you want to evaluate risk. + /// + [JsonPropertyName("evaluation_reason")] + public Entity.BeaconAccountRiskEvaluateEvaluationReason? EvaluationReason { get; set; } = default!; + + /// + /// Details about the end user's device. When calling /signal/evaluate or /signal/processor/evaluate, this field is optional, but strongly recommended to increase the accuracy of Signal results. + /// + [JsonPropertyName("device")] + public Entity.SignalEvaluateDevice? Device { get; set; } = default!; + + /// + /// The time the event for evaluation has occurred. Populate this field for backfilling data. If you don’t populate this field, we’ll use the timestamp at the time of receipt. Use ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ). + /// + [JsonPropertyName("evaluate_time")] + public DateOnly? EvaluateTime { get; set; } = default!; + +} diff --git a/src/Plaid/Beacon/BeaconAccountRiskEvaluateResponse.cs b/src/Plaid/Beacon/BeaconAccountRiskEvaluateResponse.cs new file mode 100644 index 00000000..e9da94b3 --- /dev/null +++ b/src/Plaid/Beacon/BeaconAccountRiskEvaluateResponse.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Beacon; + +/// +/// BeaconAccountRiskEvaluateResponse defines the response schema for /beacon/account_risk/v1/evaluate +/// +public record BeaconAccountRiskEvaluateResponse : ResponseBase +{ + /// + /// The accounts for which a risk evaluation has been requested. + /// + [JsonPropertyName("accounts")] + public IReadOnlyList Accounts { get; init; } = default!; + +} diff --git a/src/Plaid/Beacon/BeaconUserCreateResponse.cs b/src/Plaid/Beacon/BeaconUserCreateResponse.cs index 1d3d72ab..3e054648 100644 --- a/src/Plaid/Beacon/BeaconUserCreateResponse.cs +++ b/src/Plaid/Beacon/BeaconUserCreateResponse.cs @@ -11,6 +11,12 @@ public record BeaconUserCreateResponse : ResponseBase [JsonPropertyName("id")] public string Id { get; init; } = default!; + /// + /// The version field begins with 1 and increments each time the user is updated. + /// + [JsonPropertyName("version")] + public int Version { get; init; } = default!; + /// /// An ISO8601 formatted timestamp. /// diff --git a/src/Plaid/Beacon/BeaconUserGetResponse.cs b/src/Plaid/Beacon/BeaconUserGetResponse.cs index 8339bfff..eed3e7a0 100644 --- a/src/Plaid/Beacon/BeaconUserGetResponse.cs +++ b/src/Plaid/Beacon/BeaconUserGetResponse.cs @@ -11,6 +11,12 @@ public record BeaconUserGetResponse : ResponseBase [JsonPropertyName("id")] public string Id { get; init; } = default!; + /// + /// The version field begins with 1 and increments each time the user is updated. + /// + [JsonPropertyName("version")] + public int Version { get; init; } = default!; + /// /// An ISO8601 formatted timestamp. /// diff --git a/src/Plaid/Beacon/BeaconUserHistoryListRequest.cs b/src/Plaid/Beacon/BeaconUserHistoryListRequest.cs new file mode 100644 index 00000000..70f37fbe --- /dev/null +++ b/src/Plaid/Beacon/BeaconUserHistoryListRequest.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Beacon; + +/// +/// Request input for listing the history of a Beacon User +/// +public partial class BeaconUserHistoryListRequest : RequestBase +{ + /// + /// ID of the associated Beacon User. + /// + [JsonPropertyName("beacon_user_id")] + public string BeaconUserId { get; set; } = default!; + + /// + /// An identifier that determines which page of results you receive. + /// + [JsonPropertyName("cursor")] + public string? Cursor { get; set; } = default!; + +} diff --git a/src/Plaid/Beacon/BeaconUserHistoryListResponse.cs b/src/Plaid/Beacon/BeaconUserHistoryListResponse.cs new file mode 100644 index 00000000..ecff4456 --- /dev/null +++ b/src/Plaid/Beacon/BeaconUserHistoryListResponse.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Beacon; + +/// +/// The response schema for /beacon/user/history/list +/// +public record BeaconUserHistoryListResponse : ResponseBase +{ + /// + /// + /// + [JsonPropertyName("beacon_users")] + public IReadOnlyList BeaconUsers { get; init; } = default!; + + /// + /// An identifier that determines which page of results you receive. + /// + [JsonPropertyName("next_cursor")] + public string? NextCursor { get; init; } = default!; + +} diff --git a/src/Plaid/Beacon/BeaconUserUpdateResponse.cs b/src/Plaid/Beacon/BeaconUserUpdateResponse.cs index 2d37ba64..25768c51 100644 --- a/src/Plaid/Beacon/BeaconUserUpdateResponse.cs +++ b/src/Plaid/Beacon/BeaconUserUpdateResponse.cs @@ -11,6 +11,12 @@ public record BeaconUserUpdateResponse : ResponseBase [JsonPropertyName("id")] public string Id { get; init; } = default!; + /// + /// The version field begins with 1 and increments each time the user is updated. + /// + [JsonPropertyName("version")] + public int Version { get; init; } = default!; + /// /// An ISO8601 formatted timestamp. /// diff --git a/src/Plaid/Beacon/PlaidClient.cs b/src/Plaid/Beacon/PlaidClient.cs index 624e4377..92b75bfe 100644 --- a/src/Plaid/Beacon/PlaidClient.cs +++ b/src/Plaid/Beacon/PlaidClient.cs @@ -2,6 +2,14 @@ namespace Going.Plaid; public sealed partial class PlaidClient { + /// + /// Use /beacon/account_risk/v1/evaluate to get risk insights for a linked account. + /// + /// + public Task BeaconAccountRiskV1EvaluateAsync(Beacon.BeaconAccountRiskEvaluateRequest request) => + PostAsync("/beacon/account_risk/v1/evaluate", request) + .ParseResponseAsync(); + /// /// Create and scan a Beacon User against your Beacon Program, according to your program's settings. /// When you submit a new user to /beacon/user/create, several checks are performed immediately: @@ -102,4 +110,12 @@ public sealed partial class PlaidClient PostAsync("/beacon/duplicate/get", request) .ParseResponseAsync(); + /// + /// List all changes to the Beacon User in reverse-chronological order. + /// + /// + public Task BeaconUserHistoryListAsync(Beacon.BeaconUserHistoryListRequest request) => + PostAsync("/beacon/user/history/list", request) + .ParseResponseAsync(); + } diff --git a/src/Plaid/Entity/BeaconAccountRiskEvaluateAccount.cs b/src/Plaid/Entity/BeaconAccountRiskEvaluateAccount.cs new file mode 100644 index 00000000..e4b237c9 --- /dev/null +++ b/src/Plaid/Entity/BeaconAccountRiskEvaluateAccount.cs @@ -0,0 +1,37 @@ +namespace Going.Plaid.Entity; + +/// +/// An account in the /beacon/account_risk/v1/evaluate response. +/// +public record BeaconAccountRiskEvaluateAccount +{ + /// + /// The account ID. + /// + [JsonPropertyName("account_id")] + public string? AccountId { get; init; } = default!; + + /// + /// See the Account type schema for a full listing of account types and corresponding subtypes. + /// + [JsonPropertyName("type")] + public Entity.AccountType? Type { get; init; } = default!; + + /// + /// See the [Account type schema](https://plaid.com/docs/api/accounts/#account-type-schema) for a full listing of account types and corresponding subtypes. + /// + [JsonPropertyName("subtype")] + public Entity.AccountSubtype? Subtype { get; init; } = default!; + + /// + /// The attributes object contains data that can be used to assess account 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 + /// 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("attributes")] + public Entity.BeaconAccountRiskEvaluateAccountAttributes? Attributes { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/BeaconAccountRiskEvaluateAccountAttributes.cs b/src/Plaid/Entity/BeaconAccountRiskEvaluateAccountAttributes.cs new file mode 100644 index 00000000..325138c5 --- /dev/null +++ b/src/Plaid/Entity/BeaconAccountRiskEvaluateAccountAttributes.cs @@ -0,0 +1,175 @@ +namespace Going.Plaid.Entity; + +/// +/// The attributes object contains data that can be used to assess account 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 +/// 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 +/// +public record BeaconAccountRiskEvaluateAccountAttributes +{ + /// + /// The number of days since the first time the Item was connected to an application via Plaid + /// + [JsonPropertyName("days_since_first_plaid_connection")] + public int? DaysSinceFirstPlaidConnection { get; init; } = default!; + + /// + /// The age of the account as reported by the FI, when available. + /// + [JsonPropertyName("days_since_account_creation")] + public int? DaysSinceAccountCreation { get; init; } = default!; + + /// + /// Indicates if the account has been closed by the financial institution or the consumer, or is at risk of being closed + /// + [JsonPropertyName("is_account_closed")] + public bool? IsAccountClosed { get; init; } = default!; + + /// + /// Indicates whether the account has withdrawals and transfers disabled or if access to the account is restricted. This could be due to a freeze by the credit issuer, legal restrictions (e.g., sanctions), or regulatory requirements limiting monthly withdrawals, among other reasons + /// + [JsonPropertyName("is_account_frozen_or_restricted")] + public bool? IsAccountFrozenOrRestricted { get; init; } = default!; + + /// + /// The total number of times the item has been connected to applications via Plaid + /// + [JsonPropertyName("total_plaid_connections_count")] + public int? TotalPlaidConnectionsCount { get; init; } = default!; + + /// + /// The number of times the Item has been connected to applications via Plaid over the past 7 days + /// + [JsonPropertyName("plaid_connections_count_7d")] + public int? PlaidConnectionsCount7d { get; init; } = default!; + + /// + /// The number of times the Item has been connected to applications via Plaid over the past 30 days + /// + [JsonPropertyName("plaid_connections_count_30d")] + public int? PlaidConnectionsCount30d { get; init; } = default!; + + /// + /// The number of failed non-OAuth authentication attempts via Plaid for this bank account over the past 3 days + /// + [JsonPropertyName("failed_plaid_non_oauth_authentication_attempts_count_3d")] + public int? FailedPlaidNonOauthAuthenticationAttemptsCount3d { get; init; } = default!; + + /// + /// The number of non-OAuth authentication attempts via Plaid for this bank account over the past 3 days + /// + [JsonPropertyName("plaid_non_oauth_authentication_attempts_count_3d")] + public int? PlaidNonOauthAuthenticationAttemptsCount3d { get; init; } = default!; + + /// + /// The number of failed non-OAuth authentication attempts via Plaid for this bank account over the past 7 days + /// + [JsonPropertyName("failed_plaid_non_oauth_authentication_attempts_count_7d")] + public int? FailedPlaidNonOauthAuthenticationAttemptsCount7d { get; init; } = default!; + + /// + /// The number of non-OAuth authentication attempts via Plaid for this bank account over the past 7 days + /// + [JsonPropertyName("plaid_non_oauth_authentication_attempts_count_7d")] + public int? PlaidNonOauthAuthenticationAttemptsCount7d { get; init; } = default!; + + /// + /// The number of failed non-OAuth authentication attempts via Plaid for this bank account over the past 30 days + /// + [JsonPropertyName("failed_plaid_non_oauth_authentication_attempts_count_30d")] + public int? FailedPlaidNonOauthAuthenticationAttemptsCount30d { get; init; } = default!; + + /// + /// The number of non-OAuth authentication attempts via Plaid for this bank account over the past 30 days + /// + [JsonPropertyName("plaid_non_oauth_authentication_attempts_count_30d")] + public int? PlaidNonOauthAuthenticationAttemptsCount30d { get; init; } = default!; + + /// + /// The number of distinct IP addresses linked to the same bank account during Plaid authentication in the last 3 days + /// + [JsonPropertyName("distinct_ip_addresses_count_3d")] + public int? DistinctIpAddressesCount3d { get; init; } = default!; + + /// + /// The number of distinct IP addresses linked to the same bank account during Plaid authentication in the last 7 days + /// + [JsonPropertyName("distinct_ip_addresses_count_7d")] + public int? DistinctIpAddressesCount7d { get; init; } = default!; + + /// + /// The number of distinct IP addresses linked to the same bank account during Plaid authentication in the last 30 days + /// + [JsonPropertyName("distinct_ip_addresses_count_30d")] + public int? DistinctIpAddressesCount30d { get; init; } = default!; + + /// + /// The number of distinct IP addresses linked to the same bank account during Plaid authentication in the last 90 days + /// + [JsonPropertyName("distinct_ip_addresses_count_90d")] + public int? DistinctIpAddressesCount90d { get; init; } = default!; + + /// + /// The number of distinct user agents linked to the same bank account during Plaid authentication in the last 3 days + /// + [JsonPropertyName("distinct_user_agents_count_3d")] + public int? DistinctUserAgentsCount3d { get; init; } = default!; + + /// + /// The number of distinct user agents linked to the same bank account during Plaid authentication in the last 7 days + /// + [JsonPropertyName("distinct_user_agents_count_7d")] + public int? DistinctUserAgentsCount7d { get; init; } = default!; + + /// + /// The number of distinct user agents linked to the same bank account during Plaid authentication in the last 30 days + /// + [JsonPropertyName("distinct_user_agents_count_30d")] + public int? DistinctUserAgentsCount30d { get; init; } = default!; + + /// + /// The number of distinct user agents linked to the same bank account during Plaid authentication in the last 90 days + /// + [JsonPropertyName("distinct_user_agents_count_90d")] + public int? DistinctUserAgentsCount90d { get; init; } = default!; + + /// + /// The number of times the account's addresses on file have changed over the past 28 days + /// + [JsonPropertyName("address_change_count_28d")] + public int? AddressChangeCount28d { get; init; } = default!; + + /// + /// The number of times the account's email addresses on file have changed over the past 28 days + /// + [JsonPropertyName("email_change_count_28d")] + public int? EmailChangeCount28d { get; init; } = default!; + + /// + /// The number of times the account's phone numbers on file have changed over the past 28 days + /// + [JsonPropertyName("phone_change_count_28d")] + public int? PhoneChangeCount28d { get; init; } = default!; + + /// + /// The number of times the account's addresses on file have changed over the past 90 days + /// + [JsonPropertyName("address_change_count_90d")] + public int? AddressChangeCount90d { get; init; } = default!; + + /// + /// The number of times the account's email addresses on file have changed over the past 90 days + /// + [JsonPropertyName("email_change_count_90d")] + public int? EmailChangeCount90d { get; init; } = default!; + + /// + /// The number of times the account's phone numbers on file have changed over the past 90 days + /// + [JsonPropertyName("phone_change_count_90d")] + public int? PhoneChangeCount90d { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/BeaconAccountRiskEvaluateEvaluationReason.cs b/src/Plaid/Entity/BeaconAccountRiskEvaluateEvaluationReason.cs new file mode 100644 index 00000000..bd243953 --- /dev/null +++ b/src/Plaid/Entity/BeaconAccountRiskEvaluateEvaluationReason.cs @@ -0,0 +1,44 @@ +namespace Going.Plaid.Entity; + +/// +/// Description of the reason you want to evaluate risk. +/// +public enum BeaconAccountRiskEvaluateEvaluationReason +{ + /// + /// user links a first bank account as part of the onboarding flow of your platform. + /// + [EnumMember(Value = "ONBOARDING")] + Onboarding, + + /// + /// user links another bank account or replaces the currently linked bank account on your platform. + /// + [EnumMember(Value = "NEW_ACCOUNT")] + NewAccount, + + /// + /// user changes their information on your platform, e.g., updating their phone number. + /// + [EnumMember(Value = "INFORMATION_CHANGE")] + InformationChange, + + /// + /// you decide to re-evaluate a user that becomes active after a period of inactivity. + /// + [EnumMember(Value = "DORMANT_USER")] + DormantUser, + + /// + /// any other reasons not listed here + /// + [EnumMember(Value = "OTHER")] + Other, + + /// + /// Catch-all for unknown values returned by Plaid. If you encounter this, please check if there is a later version of the Going.Plaid library. + /// + [EnumMember(Value = "undefined")] + Undefined, + +} diff --git a/src/Plaid/Entity/BeaconAccountRiskEvaluateRequestOptions.cs b/src/Plaid/Entity/BeaconAccountRiskEvaluateRequestOptions.cs new file mode 100644 index 00000000..bd333c57 --- /dev/null +++ b/src/Plaid/Entity/BeaconAccountRiskEvaluateRequestOptions.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Entity; + +/// +/// An optional object to filter /beacon/account_risk/v1/evaluate results to a subset of the accounts on the linked Item. +/// +public class BeaconAccountRiskEvaluateRequestOptions +{ + /// + /// An array of account_ids for the specific accounts to evaluate. + /// + [JsonPropertyName("account_ids")] + public IReadOnlyList? AccountIds { get; set; } = default!; + +} diff --git a/src/Plaid/Entity/BeaconAuditTrail.cs b/src/Plaid/Entity/BeaconAuditTrail.cs index dfeb4738..764b73d5 100644 --- a/src/Plaid/Entity/BeaconAuditTrail.cs +++ b/src/Plaid/Entity/BeaconAuditTrail.cs @@ -17,4 +17,10 @@ public record BeaconAuditTrail [JsonPropertyName("dashboard_user_id")] public string? DashboardUserId { get; init; } = default!; + /// + /// An ISO8601 formatted timestamp. + /// + [JsonPropertyName("timestamp")] + public DateTimeOffset Timestamp { get; init; } = default!; + } diff --git a/src/Plaid/Entity/BeaconUser.cs b/src/Plaid/Entity/BeaconUser.cs new file mode 100644 index 00000000..c15836c2 --- /dev/null +++ b/src/Plaid/Entity/BeaconUser.cs @@ -0,0 +1,62 @@ +namespace Going.Plaid.Entity; + +/// +/// A Beacon User represents an end user that has been scanned against the Beacon Network. +/// +public record BeaconUser +{ + /// + /// ID of the associated Beacon User. + /// + [JsonPropertyName("id")] + public string Id { get; init; } = default!; + + /// + /// The version field begins with 1 and increments each time the user is updated. + /// + [JsonPropertyName("version")] + public int Version { 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!; + +} diff --git a/src/Plaid/Entity/CreditDocumentMetadata.cs b/src/Plaid/Entity/CreditDocumentMetadata.cs index 80b5e6b1..76e7be21 100644 --- a/src/Plaid/Entity/CreditDocumentMetadata.cs +++ b/src/Plaid/Entity/CreditDocumentMetadata.cs @@ -28,7 +28,8 @@ public record CreditDocumentMetadata public string? DocumentType { get; init; } = default!; /// - /// Signed URL to retrieve the underlying file. For Payroll Income, the file type will always be PDF, and the file may not be available, in which case the field will be null. If you would like Plaid to generate a PDF if the original is not available, contact your Account Manager. For Document Income, this field will not be null, and the file type will be the original file type uploaded by the user. For more details on available file types, see the Document Income documentation. + /// Signed URL to retrieve the underlying file. For Payroll Income, the file type will always be PDF, and the file may not be available, in which case the field will be null. If you would like Plaid to generate a PDF if the original is not available, contact your Account Manager. Example generated pay stub. + /// For Document Income, this field will not be null, and the file type will be the original file type uploaded by the user. For more details on available file types, see the Document Income documentation. /// 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")] diff --git a/src/Plaid/Entity/LinkSessionExitMetadata.cs b/src/Plaid/Entity/LinkSessionExitMetadata.cs index a285efc0..42f24069 100644 --- a/src/Plaid/Entity/LinkSessionExitMetadata.cs +++ b/src/Plaid/Entity/LinkSessionExitMetadata.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public record LinkSessionExitMetadata { /// - /// An institution object. If the Item was created via Same-Day micro-deposit verification, will be null. + /// An institution object. If the Item was created via Same-Day or Instant micro-deposit verification, will be null. /// [JsonPropertyName("institution")] public Entity.LinkSessionExitMetadataInstitution? Institution { get; init; } = default!; diff --git a/src/Plaid/Entity/LinkSessionExitMetadataInstitution.cs b/src/Plaid/Entity/LinkSessionExitMetadataInstitution.cs index a8604c3d..d28d022d 100644 --- a/src/Plaid/Entity/LinkSessionExitMetadataInstitution.cs +++ b/src/Plaid/Entity/LinkSessionExitMetadataInstitution.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// An institution object. If the Item was created via Same-Day micro-deposit verification, will be null. +/// An institution object. If the Item was created via Same-Day or Instant micro-deposit verification, will be null. /// public record LinkSessionExitMetadataInstitution { diff --git a/src/Plaid/Entity/LinkSessionSuccessMetadata.cs b/src/Plaid/Entity/LinkSessionSuccessMetadata.cs index d1535a01..ebfbf471 100644 --- a/src/Plaid/Entity/LinkSessionSuccessMetadata.cs +++ b/src/Plaid/Entity/LinkSessionSuccessMetadata.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public record LinkSessionSuccessMetadata { /// - /// An institution object. If the Item was created via Same-Day micro-deposit verification, will be null. + /// An institution object. If the Item was created via Same-Day or Instant micro-deposit verification, will be null. /// [JsonPropertyName("institution")] public Entity.LinkSessionSuccessMetadataInstitution? Institution { get; init; } = default!; diff --git a/src/Plaid/Entity/LinkSessionSuccessMetadataInstitution.cs b/src/Plaid/Entity/LinkSessionSuccessMetadataInstitution.cs index cdffb4c7..82612701 100644 --- a/src/Plaid/Entity/LinkSessionSuccessMetadataInstitution.cs +++ b/src/Plaid/Entity/LinkSessionSuccessMetadataInstitution.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// An institution object. If the Item was created via Same-Day micro-deposit verification, will be null. +/// An institution object. If the Item was created via Same-Day or Instant micro-deposit verification, will be null. /// public record LinkSessionSuccessMetadataInstitution { diff --git a/src/Plaid/Entity/RiskCheckLinkedService.cs b/src/Plaid/Entity/RiskCheckLinkedService.cs index bfca18ab..ea691dc7 100644 --- a/src/Plaid/Entity/RiskCheckLinkedService.cs +++ b/src/Plaid/Entity/RiskCheckLinkedService.cs @@ -1,40 +1,196 @@ namespace Going.Plaid.Entity; /// -/// An enum indicating the type of a linked service. +/// An enum indicating the type of a linked service. Note that adult_sites refers' to explicit video content, and includes a number of related services. /// public enum RiskCheckLinkedService { + /// + /// + /// + [EnumMember(Value = "aboutme")] + Aboutme, + + /// + /// + /// + [EnumMember(Value = "adobe")] + Adobe, + + /// + /// + /// + [EnumMember(Value = "adult_sites")] + AdultSites, + + /// + /// + /// + [EnumMember(Value = "airbnb")] + Airbnb, + + /// + /// + /// + [EnumMember(Value = "altbalaji")] + Altbalaji, + + /// + /// + /// + [EnumMember(Value = "amazon")] + Amazon, + /// /// /// [EnumMember(Value = "apple")] Apple, + /// + /// + /// + [EnumMember(Value = "archiveorg")] + Archiveorg, + + /// + /// + /// + [EnumMember(Value = "atlassian")] + Atlassian, + + /// + /// + /// + [EnumMember(Value = "bitmoji")] + Bitmoji, + + /// + /// + /// + [EnumMember(Value = "bodybuilding")] + Bodybuilding, + + /// + /// + /// + [EnumMember(Value = "booking")] + Booking, + + /// + /// + /// + [EnumMember(Value = "bukalapak")] + Bukalapak, + + /// + /// + /// + [EnumMember(Value = "codecademy")] + Codecademy, + + /// + /// + /// + [EnumMember(Value = "deliveroo")] + Deliveroo, + + /// + /// + /// + [EnumMember(Value = "diigo")] + Diigo, + + /// + /// + /// + [EnumMember(Value = "discord")] + Discord, + + /// + /// + /// + [EnumMember(Value = "disneyplus")] + Disneyplus, + + /// + /// + /// + [EnumMember(Value = "duolingo")] + Duolingo, + /// /// /// [EnumMember(Value = "ebay")] Ebay, + /// + /// + /// + [EnumMember(Value = "envato")] + Envato, + + /// + /// + /// + [EnumMember(Value = "eventbrite")] + Eventbrite, + + /// + /// + /// + [EnumMember(Value = "evernote")] + Evernote, + /// /// /// [EnumMember(Value = "facebook")] Facebook, + /// + /// + /// + [EnumMember(Value = "firefox")] + Firefox, + /// /// /// [EnumMember(Value = "flickr")] Flickr, + /// + /// + /// + [EnumMember(Value = "flipkart")] + Flipkart, + /// /// /// [EnumMember(Value = "foursquare")] Foursquare, + /// + /// + /// + [EnumMember(Value = "freelancer")] + Freelancer, + + /// + /// + /// + [EnumMember(Value = "gaana")] + Gaana, + + /// + /// + /// + [EnumMember(Value = "giphy")] + Giphy, + /// /// /// @@ -53,24 +209,78 @@ public enum RiskCheckLinkedService [EnumMember(Value = "gravatar")] Gravatar, + /// + /// + /// + [EnumMember(Value = "hubspot")] + Hubspot, + + /// + /// + /// + [EnumMember(Value = "imgur")] + Imgur, + /// /// /// [EnumMember(Value = "instagram")] Instagram, + /// + /// + /// + [EnumMember(Value = "jdid")] + Jdid, + + /// + /// + /// + [EnumMember(Value = "kakao")] + Kakao, + + /// + /// + /// + [EnumMember(Value = "kommo")] + Kommo, + + /// + /// + /// + [EnumMember(Value = "komoot")] + Komoot, + /// /// /// [EnumMember(Value = "lastfm")] Lastfm, + /// + /// + /// + [EnumMember(Value = "lazada")] + Lazada, + + /// + /// + /// + [EnumMember(Value = "line")] + Line, + /// /// /// [EnumMember(Value = "linkedin")] Linkedin, + /// + /// + /// + [EnumMember(Value = "mailru")] + Mailru, + /// /// /// @@ -83,24 +293,138 @@ public enum RiskCheckLinkedService [EnumMember(Value = "myspace")] Myspace, + /// + /// + /// + [EnumMember(Value = "netflix")] + Netflix, + + /// + /// + /// + [EnumMember(Value = "nike")] + Nike, + + /// + /// + /// + [EnumMember(Value = "ok")] + Ok, + + /// + /// + /// + [EnumMember(Value = "patreon")] + Patreon, + /// /// /// [EnumMember(Value = "pinterest")] Pinterest, + /// + /// + /// + [EnumMember(Value = "plurk")] + Plurk, + + /// + /// + /// + [EnumMember(Value = "quora")] + Quora, + + /// + /// + /// + [EnumMember(Value = "qzone")] + Qzone, + + /// + /// + /// + [EnumMember(Value = "rambler")] + Rambler, + + /// + /// + /// + [EnumMember(Value = "rappi")] + Rappi, + + /// + /// + /// + [EnumMember(Value = "replit")] + Replit, + + /// + /// + /// + [EnumMember(Value = "samsung")] + Samsung, + + /// + /// + /// + [EnumMember(Value = "seoclerks")] + Seoclerks, + + /// + /// + /// + [EnumMember(Value = "shopclues")] + Shopclues, + /// /// /// [EnumMember(Value = "skype")] Skype, + /// + /// + /// + [EnumMember(Value = "snapchat")] + Snapchat, + + /// + /// + /// + [EnumMember(Value = "snapdeal")] + Snapdeal, + + /// + /// + /// + [EnumMember(Value = "soundcloud")] + Soundcloud, + /// /// /// [EnumMember(Value = "spotify")] Spotify, + /// + /// + /// + [EnumMember(Value = "starz")] + Starz, + + /// + /// + /// + [EnumMember(Value = "strava")] + Strava, + + /// + /// + /// + [EnumMember(Value = "taringa")] + Taringa, + /// /// /// @@ -110,98 +434,104 @@ public enum RiskCheckLinkedService /// /// /// - [EnumMember(Value = "tumblr")] - Tumblr, + [EnumMember(Value = "tiki")] + Tiki, /// /// /// - [EnumMember(Value = "twitter")] - Twitter, + [EnumMember(Value = "tokopedia")] + Tokopedia, /// /// /// - [EnumMember(Value = "viber")] - Viber, + [EnumMember(Value = "treehouse")] + Treehouse, /// /// /// - [EnumMember(Value = "vimeo")] - Vimeo, + [EnumMember(Value = "tumblr")] + Tumblr, /// /// /// - [EnumMember(Value = "weibo")] - Weibo, + [EnumMember(Value = "twitter")] + Twitter, /// /// /// - [EnumMember(Value = "whatsapp")] - Whatsapp, + [EnumMember(Value = "venmo")] + Venmo, /// /// /// - [EnumMember(Value = "yahoo")] - Yahoo, + [EnumMember(Value = "viber")] + Viber, /// /// /// - [EnumMember(Value = "airbnb")] - Airbnb, + [EnumMember(Value = "vimeo")] + Vimeo, /// /// /// - [EnumMember(Value = "amazon")] - Amazon, + [EnumMember(Value = "vivino")] + Vivino, /// /// /// - [EnumMember(Value = "booking")] - Booking, + [EnumMember(Value = "vkontakte")] + Vkontakte, /// /// /// - [EnumMember(Value = "discord")] - Discord, + [EnumMember(Value = "wattpad")] + Wattpad, /// /// /// - [EnumMember(Value = "kakao")] - Kakao, + [EnumMember(Value = "weibo")] + Weibo, /// /// /// - [EnumMember(Value = "ok")] - Ok, + [EnumMember(Value = "whatsapp")] + Whatsapp, /// /// /// - [EnumMember(Value = "qzone")] - Qzone, + [EnumMember(Value = "wordpress")] + Wordpress, /// /// /// - [EnumMember(Value = "line")] - Line, + [EnumMember(Value = "xing")] + Xing, /// /// /// - [EnumMember(Value = "snapchat")] - Snapchat, + [EnumMember(Value = "yahoo")] + Yahoo, + + /// + /// + /// + [EnumMember(Value = "yandex")] + Yandex, /// /// @@ -209,6 +539,12 @@ public enum RiskCheckLinkedService [EnumMember(Value = "zalo")] Zalo, + /// + /// + /// + [EnumMember(Value = "zoho")] + Zoho, + /// /// 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/SimulatedTransferSweep.cs b/src/Plaid/Entity/SimulatedTransferSweep.cs index f45048fa..20de3370 100644 --- a/src/Plaid/Entity/SimulatedTransferSweep.cs +++ b/src/Plaid/Entity/SimulatedTransferSweep.cs @@ -64,7 +64,7 @@ public record SimulatedTransferSweep /// /// The trace identifier for the transfer based on its network. This will only be set after the transfer has posted. /// For ach or same-day-ach transfers, this is the ACH trace number. - /// For wire transfers, this will be in the format of <IMAD>/<OMAD>. + /// For wire transfers, this is the IMAD (Input Message Accountability Data) number. /// The field will remain null for transfers on other rails. /// [JsonPropertyName("network_trace_id")] diff --git a/src/Plaid/Entity/StudentLoan.cs b/src/Plaid/Entity/StudentLoan.cs index 632d1ade..8e5fcef3 100644 --- a/src/Plaid/Entity/StudentLoan.cs +++ b/src/Plaid/Entity/StudentLoan.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public record StudentLoan { /// - /// The ID of the account that this liability belongs to. + /// The ID of the account that this liability belongs to. Each account can only contain one liability. /// [JsonPropertyName("account_id")] public string? AccountId { get; init; } = default!; diff --git a/src/Plaid/Entity/Transaction.cs b/src/Plaid/Entity/Transaction.cs index 95f0669f..d7cb8b52 100644 --- a/src/Plaid/Entity/Transaction.cs +++ b/src/Plaid/Entity/Transaction.cs @@ -184,7 +184,7 @@ public record Transaction public IReadOnlyList? Counterparties { get; init; } = default!; /// - /// A unique, stable, Plaid-generated ID that maps to the merchant. + /// A unique, stable, Plaid-generated ID that maps to the merchant. In the case of a merchant with multiple retail locations, this field will map to the broader merchant, not a specific location or store. /// [JsonPropertyName("merchant_entity_id")] public string? MerchantEntityId { get; init; } = default!; diff --git a/src/Plaid/Entity/TransactionsGetRequestOptions.cs b/src/Plaid/Entity/TransactionsGetRequestOptions.cs index 024c2800..bdf763c1 100644 --- a/src/Plaid/Entity/TransactionsGetRequestOptions.cs +++ b/src/Plaid/Entity/TransactionsGetRequestOptions.cs @@ -25,7 +25,7 @@ public class TransactionsGetRequestOptions public int? Offset { get; set; } = default!; /// - /// Include the raw unparsed transaction description from the financial institution. This field is disabled by default. If you need this information in addition to the parsed data provided, contact your Plaid Account Manager, or submit a Support request. + /// Include the raw unparsed transaction description from the financial institution. /// [JsonPropertyName("include_original_description")] public bool? IncludeOriginalDescription { get; set; } = default!; diff --git a/src/Plaid/Entity/Transfer.cs b/src/Plaid/Entity/Transfer.cs index 1b27052f..4a3118a1 100644 --- a/src/Plaid/Entity/Transfer.cs +++ b/src/Plaid/Entity/Transfer.cs @@ -193,7 +193,7 @@ public record Transfer /// /// The trace identifier for the transfer based on its network. This will only be set after the transfer has posted. /// For ach or same-day-ach transfers, this is the ACH trace number. - /// For wire transfers, this will be in the format of <IMAD>/<OMAD>. + /// For wire transfers, this is the IMAD (Input Message Accountability Data) number. /// The field will remain null for transfers on other rails. /// [JsonPropertyName("network_trace_id")] diff --git a/src/Plaid/Entity/TransferRefund.cs b/src/Plaid/Entity/TransferRefund.cs index 11d74b1a..79ec68a3 100644 --- a/src/Plaid/Entity/TransferRefund.cs +++ b/src/Plaid/Entity/TransferRefund.cs @@ -44,7 +44,7 @@ public record TransferRefund /// /// The trace identifier for the transfer based on its network. This will only be set after the transfer has posted. /// For ach or same-day-ach transfers, this is the ACH trace number. - /// For wire transfers, this will be in the format of <IMAD>/<OMAD>. + /// For wire transfers, this is the IMAD (Input Message Accountability Data) number. /// The field will remain null for transfers on other rails. /// [JsonPropertyName("network_trace_id")] diff --git a/src/Plaid/Entity/TransferSweep.cs b/src/Plaid/Entity/TransferSweep.cs index 75e576ae..16c94297 100644 --- a/src/Plaid/Entity/TransferSweep.cs +++ b/src/Plaid/Entity/TransferSweep.cs @@ -66,7 +66,7 @@ public record TransferSweep /// /// The trace identifier for the transfer based on its network. This will only be set after the transfer has posted. /// For ach or same-day-ach transfers, this is the ACH trace number. - /// For wire transfers, this will be in the format of <IMAD>/<OMAD>. + /// For wire transfers, this is the IMAD (Input Message Accountability Data) number. /// The field will remain null for transfers on other rails. /// [JsonPropertyName("network_trace_id")] diff --git a/src/Plaid/Processor/PlaidClient.cs b/src/Plaid/Processor/PlaidClient.cs index 826a904f..eaebf851 100644 --- a/src/Plaid/Processor/PlaidClient.cs +++ b/src/Plaid/Processor/PlaidClient.cs @@ -51,7 +51,7 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// /processor/transactions/refresh is an optional endpoint for users of the Transactions product. It initiates an on-demand extraction to fetch the newest transactions for a processor token. This on-demand extraction takes place in addition to the periodic extractions that automatically occur one or more times per day for any Transactions-enabled processor token. If changes to transactions are discovered after calling /processor/transactions/refresh, Plaid will fire a webhook: for /transactions/sync users, SYNC_UPDATES_AVAILABLE will be fired if there are any transactions updated, added, or removed. For users of both /processor/transactions/sync and /processor/transactions/get, TRANSACTIONS_REMOVED will be fired if any removed transactions are detected, and DEFAULT_UPDATE will be fired if any new transactions are detected. New transactions can be fetched by calling /processor/transactions/get or /processor/transactions/sync. Note that the /processor/transactions/refresh endpoint is not supported for Capital One (ins_128026) and will result in a PRODUCT_NOT_SUPPORTED error if called on a processor token from that institution. + /// /processor/transactions/refresh is an optional endpoint for users of the Transactions product. It initiates an on-demand extraction to fetch the newest transactions for a processor token. This on-demand extraction takes place in addition to the periodic extractions that automatically occur one or more times per day for any Transactions-enabled processor token. If changes to transactions are discovered after calling /processor/transactions/refresh, Plaid will fire a webhook: for /transactions/sync users, SYNC_UPDATES_AVAILABLE will be fired if there are any transactions updated, added, or removed. For users of both /processor/transactions/sync and /processor/transactions/get, TRANSACTIONS_REMOVED will be fired if any removed transactions are detected, and DEFAULT_UPDATE will be fired if any new transactions are detected. New transactions can be fetched by calling /processor/transactions/get or /processor/transactions/sync. Note that the /processor/transactions/refresh endpoint is not supported for Capital One (ins_128026) and will result in a PRODUCTS_NOT_SUPPORTED error if called on a processor token from that institution. /// As this endpoint triggers a synchronous request for fresh data, latency may be higher than for other Plaid endpoints (typically less than 10 seconds, but occasionally up to 30 seconds or more); if you encounter errors, you may find it necessary to adjust your timeout period when making requests. /// /processor/transactions/refresh is offered as an add-on to Transactions and has a separate fee model. To request access to this endpoint, submit a product access request or contact your Plaid account manager. /// diff --git a/src/Plaid/Processor/ProcessorAccountGetResponse.cs b/src/Plaid/Processor/ProcessorAccountGetResponse.cs index 91cc455a..03a483a7 100644 --- a/src/Plaid/Processor/ProcessorAccountGetResponse.cs +++ b/src/Plaid/Processor/ProcessorAccountGetResponse.cs @@ -11,4 +11,10 @@ public record ProcessorAccountGetResponse : ResponseBase [JsonPropertyName("account")] public Entity.Account Account { get; init; } = default!; + /// + /// The Plaid Institution ID associated with the Account. + /// + [JsonPropertyName("institution_id")] + public string InstitutionId { get; init; } = default!; + } diff --git a/src/Plaid/Transactions/PlaidClient.cs b/src/Plaid/Transactions/PlaidClient.cs index 720f6315..f5045602 100644 --- a/src/Plaid/Transactions/PlaidClient.cs +++ b/src/Plaid/Transactions/PlaidClient.cs @@ -16,9 +16,11 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// /transactions/refresh is an optional endpoint for users of the Transactions product. It initiates an on-demand extraction to fetch the newest transactions for an Item. This on-demand extraction takes place in addition to the periodic extractions that automatically occur one or more times per day for any Transactions-enabled Item. If changes to transactions are discovered after calling /transactions/refresh, Plaid will fire a webhook: for /transactions/sync users, SYNC_UPDATES_AVAILABLE will be fired if there are any transactions updated, added, or removed. For users of both /transactions/sync and /transactions/get, TRANSACTIONS_REMOVED will be fired if any removed transactions are detected, and DEFAULT_UPDATE will be fired if any new transactions are detected. New transactions can be fetched by calling /transactions/get or /transactions/sync. Note that the /transactions/refresh endpoint is not supported for Capital One (ins_128026) and will result in a PRODUCT_NOT_SUPPORTED error if called on an Item from that institution. + /// /transactions/refresh is an optional endpoint that initiates an on-demand extraction to fetch the newest transactions for an Item. The on-demand extraction takes place in addition to the periodic extractions that automatically occur one or more times per day for any Transactions-enabled Item. The Item must already have Transactions added as a product in order to call /transactions/refresh. + /// If changes to transactions are discovered after calling /transactions/refresh, Plaid will fire a webhook: for /transactions/sync users, SYNC_UPDATES_AVAILABLE will be fired if there are any transactions updated, added, or removed. For users of both /transactions/sync and /transactions/get, TRANSACTIONS_REMOVED will be fired if any removed transactions are detected, and DEFAULT_UPDATE will be fired if any new transactions are detected. New transactions can be fetched by calling /transactions/get or /transactions/sync. + /// Note that the /transactions/refresh endpoint is not supported for Capital One (ins_128026) and will result in a PRODUCTS_NOT_SUPPORTED error if called on an Item from that institution. /// As this endpoint triggers a synchronous request for fresh data, latency may be higher than for other Plaid endpoints (typically less than 10 seconds, but occasionally up to 30 seconds or more); if you encounter errors, you may find it necessary to adjust your timeout period when making requests. - /// /transactions/refresh is offered as an add-on to Transactions and has a separate fee model. To request access to this endpoint, submit a product access request or contact your Plaid account manager. + /// /transactions/refresh is offered as an optional add-on to Transactions and has a separate fee model. To request access to this endpoint, submit a product access request or contact your Plaid account manager. /// /// public Task TransactionsRefreshAsync(Transactions.TransactionsRefreshRequest request) => diff --git a/src/Plaid/Transactions/TransactionsRecurringGetRequest.cs b/src/Plaid/Transactions/TransactionsRecurringGetRequest.cs index 0396f861..d1c8127e 100644 --- a/src/Plaid/Transactions/TransactionsRecurringGetRequest.cs +++ b/src/Plaid/Transactions/TransactionsRecurringGetRequest.cs @@ -12,10 +12,10 @@ public partial class TransactionsRecurringGetRequest : RequestBase public Entity.TransactionsRecurringGetRequestOptions? Options { get; set; } = default!; /// - /// A list of account_ids to retrieve for the Item + /// An optional list of account_ids to retrieve for the Item. Retrieves all active accounts on item if no account_ids are provided. /// Note: An error will be returned if a provided account_id is not associated with the Item. /// [JsonPropertyName("account_ids")] - public IReadOnlyList AccountIds { get; set; } = default!; + public IReadOnlyList? AccountIds { get; set; } = default!; }