Skip to content

Commit

Permalink
Update to Plaid v1.499.0
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin committed Mar 11, 2024
1 parent 9e09a80 commit 8fc509b
Show file tree
Hide file tree
Showing 32 changed files with 866 additions and 51 deletions.
2 changes: 1 addition & 1 deletion plaid-openapi
Submodule plaid-openapi updated 2 files
+525 −30 2020-09-14.yml
+33 −0 CHANGELOG.md
44 changes: 44 additions & 0 deletions src/Plaid/Beacon/BeaconAccountRiskEvaluateRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
namespace Going.Plaid.Beacon;

/// <summary>
/// <para>BeaconAccountRiskEvaluateRequest defines the request schema for <c>/v1/beacon/account_risk/risk/evaluate</c></para>
/// </summary>
public partial class BeaconAccountRiskEvaluateRequest : RequestBase
{
/// <summary>
/// <para>An optional object to filter <c>/beacon/account_risk/v1/evaluate</c> results to a subset of the accounts on the linked Item.</para>
/// </summary>
[JsonPropertyName("options")]
public Entity.BeaconAccountRiskEvaluateRequestOptions? Options { get; set; } = default!;

/// <summary>
/// <para>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.</para>
/// </summary>
[JsonPropertyName("client_user_id")]
public string? ClientUserId { get; set; } = default!;

/// <summary>
/// <para>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.</para>
/// </summary>
[JsonPropertyName("client_evaluation_id")]
public string? ClientEvaluationId { get; set; } = default!;

/// <summary>
/// <para>Description of the reason you want to evaluate risk.</para>
/// </summary>
[JsonPropertyName("evaluation_reason")]
public Entity.BeaconAccountRiskEvaluateEvaluationReason? EvaluationReason { get; set; } = default!;

/// <summary>
/// <para>Details about the end user's device. When calling <c>/signal/evaluate</c> or <c>/signal/processor/evaluate</c>, this field is optional, but strongly recommended to increase the accuracy of Signal results.</para>
/// </summary>
[JsonPropertyName("device")]
public Entity.SignalEvaluateDevice? Device { get; set; } = default!;

/// <summary>
/// <para>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).</para>
/// </summary>
[JsonPropertyName("evaluate_time")]
public DateOnly? EvaluateTime { get; set; } = default!;

}
14 changes: 14 additions & 0 deletions src/Plaid/Beacon/BeaconAccountRiskEvaluateResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Going.Plaid.Beacon;

/// <summary>
/// <para>BeaconAccountRiskEvaluateResponse defines the response schema for <c>/beacon/account_risk/v1/evaluate</c></para>
/// </summary>
public record BeaconAccountRiskEvaluateResponse : ResponseBase
{
/// <summary>
/// <para>The accounts for which a risk evaluation has been requested.</para>
/// </summary>
[JsonPropertyName("accounts")]
public IReadOnlyList<Entity.BeaconAccountRiskEvaluateAccount> Accounts { get; init; } = default!;

}
6 changes: 6 additions & 0 deletions src/Plaid/Beacon/BeaconUserCreateResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ public record BeaconUserCreateResponse : ResponseBase
[JsonPropertyName("id")]
public string Id { get; init; } = default!;

/// <summary>
/// <para>The <c>version</c> field begins with 1 and increments each time the user is updated.</para>
/// </summary>
[JsonPropertyName("version")]
public int Version { get; init; } = default!;

/// <summary>
/// <para>An ISO8601 formatted timestamp.</para>
/// </summary>
Expand Down
6 changes: 6 additions & 0 deletions src/Plaid/Beacon/BeaconUserGetResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ public record BeaconUserGetResponse : ResponseBase
[JsonPropertyName("id")]
public string Id { get; init; } = default!;

/// <summary>
/// <para>The <c>version</c> field begins with 1 and increments each time the user is updated.</para>
/// </summary>
[JsonPropertyName("version")]
public int Version { get; init; } = default!;

/// <summary>
/// <para>An ISO8601 formatted timestamp.</para>
/// </summary>
Expand Down
20 changes: 20 additions & 0 deletions src/Plaid/Beacon/BeaconUserHistoryListRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace Going.Plaid.Beacon;

/// <summary>
/// <para>Request input for listing the history of a Beacon User</para>
/// </summary>
public partial class BeaconUserHistoryListRequest : RequestBase
{
/// <summary>
/// <para>ID of the associated Beacon User.</para>
/// </summary>
[JsonPropertyName("beacon_user_id")]
public string BeaconUserId { get; set; } = default!;

/// <summary>
/// <para>An identifier that determines which page of results you receive.</para>
/// </summary>
[JsonPropertyName("cursor")]
public string? Cursor { get; set; } = default!;

}
20 changes: 20 additions & 0 deletions src/Plaid/Beacon/BeaconUserHistoryListResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace Going.Plaid.Beacon;

/// <summary>
/// <para>The response schema for <c>/beacon/user/history/list</c></para>
/// </summary>
public record BeaconUserHistoryListResponse : ResponseBase
{
/// <summary>
///
/// </summary>
[JsonPropertyName("beacon_users")]
public IReadOnlyList<Entity.BeaconUser> BeaconUsers { get; init; } = default!;

/// <summary>
/// <para>An identifier that determines which page of results you receive.</para>
/// </summary>
[JsonPropertyName("next_cursor")]
public string? NextCursor { get; init; } = default!;

}
6 changes: 6 additions & 0 deletions src/Plaid/Beacon/BeaconUserUpdateResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ public record BeaconUserUpdateResponse : ResponseBase
[JsonPropertyName("id")]
public string Id { get; init; } = default!;

/// <summary>
/// <para>The <c>version</c> field begins with 1 and increments each time the user is updated.</para>
/// </summary>
[JsonPropertyName("version")]
public int Version { get; init; } = default!;

/// <summary>
/// <para>An ISO8601 formatted timestamp.</para>
/// </summary>
Expand Down
16 changes: 16 additions & 0 deletions src/Plaid/Beacon/PlaidClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ namespace Going.Plaid;

public sealed partial class PlaidClient
{
/// <summary>
/// <para>Use <c>/beacon/account_risk/v1/evaluate</c> to get risk insights for a linked account.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docsnone" /></remarks>
public Task<Beacon.BeaconAccountRiskEvaluateResponse> BeaconAccountRiskV1EvaluateAsync(Beacon.BeaconAccountRiskEvaluateRequest request) =>
PostAsync("/beacon/account_risk/v1/evaluate", request)
.ParseResponseAsync<Beacon.BeaconAccountRiskEvaluateResponse>();

/// <summary>
/// <para>Create and scan a Beacon User against your Beacon Program, according to your program's settings.</para>
/// <para>When you submit a new user to <c>/beacon/user/create</c>, several checks are performed immediately:</para>
Expand Down Expand Up @@ -102,4 +110,12 @@ public sealed partial class PlaidClient
PostAsync("/beacon/duplicate/get", request)
.ParseResponseAsync<Beacon.BeaconDuplicateGetResponse>();

/// <summary>
/// <para>List all changes to the Beacon User in reverse-chronological order.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docs/api/products/beacon/#beaconuserhistorylist" /></remarks>
public Task<Beacon.BeaconUserHistoryListResponse> BeaconUserHistoryListAsync(Beacon.BeaconUserHistoryListRequest request) =>
PostAsync("/beacon/user/history/list", request)
.ParseResponseAsync<Beacon.BeaconUserHistoryListResponse>();

}
37 changes: 37 additions & 0 deletions src/Plaid/Entity/BeaconAccountRiskEvaluateAccount.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>An account in the <c>/beacon/account_risk/v1/evaluate</c> response.</para>
/// </summary>
public record BeaconAccountRiskEvaluateAccount
{
/// <summary>
/// <para>The account ID.</para>
/// </summary>
[JsonPropertyName("account_id")]
public string? AccountId { get; init; } = default!;

/// <summary>
/// <para>See the <a href="https://plaid.com/docs/api/accounts#account-type-schema">Account type schema</a> for a full listing of account types and corresponding subtypes.</para>
/// </summary>
[JsonPropertyName("type")]
public Entity.AccountType? Type { get; init; } = default!;

/// <summary>
/// <para>See the [Account type schema](https://plaid.com/docs/api/accounts/#account-type-schema) for a full listing of account types and corresponding subtypes.</para>
/// </summary>
[JsonPropertyName("subtype")]
public Entity.AccountSubtype? Subtype { get; init; } = default!;

/// <summary>
/// <para>The attributes object contains data that can be used to assess account risk. Examples of data include:</para>
/// <para><c>days_since_first_plaid_connection</c>: The number of days since the first time the Item was connected to an application via Plaid</para>
/// <para><c>plaid_connections_count_7d</c>: The number of times the Item has been connected to applications via Plaid over the past 7 days</para>
/// <para><c>plaid_connections_count_30d</c>: The number of times the Item has been connected to applications via Plaid over the past 30 days</para>
/// <para><c>total_plaid_connections_count</c>: The number of times the Item has been connected to applications via Plaid</para>
/// <para>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</para>
/// </summary>
[JsonPropertyName("attributes")]
public Entity.BeaconAccountRiskEvaluateAccountAttributes? Attributes { get; init; } = default!;

}
175 changes: 175 additions & 0 deletions src/Plaid/Entity/BeaconAccountRiskEvaluateAccountAttributes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>The attributes object contains data that can be used to assess account risk. Examples of data include:</para>
/// <para><c>days_since_first_plaid_connection</c>: The number of days since the first time the Item was connected to an application via Plaid</para>
/// <para><c>plaid_connections_count_7d</c>: The number of times the Item has been connected to applications via Plaid over the past 7 days</para>
/// <para><c>plaid_connections_count_30d</c>: The number of times the Item has been connected to applications via Plaid over the past 30 days</para>
/// <para><c>total_plaid_connections_count</c>: The number of times the Item has been connected to applications via Plaid</para>
/// <para>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</para>
/// </summary>
public record BeaconAccountRiskEvaluateAccountAttributes
{
/// <summary>
/// <para>The number of days since the first time the Item was connected to an application via Plaid</para>
/// </summary>
[JsonPropertyName("days_since_first_plaid_connection")]
public int? DaysSinceFirstPlaidConnection { get; init; } = default!;

/// <summary>
/// <para>The age of the account as reported by the FI, when available.</para>
/// </summary>
[JsonPropertyName("days_since_account_creation")]
public int? DaysSinceAccountCreation { get; init; } = default!;

/// <summary>
/// <para>Indicates if the account has been closed by the financial institution or the consumer, or is at risk of being closed</para>
/// </summary>
[JsonPropertyName("is_account_closed")]
public bool? IsAccountClosed { get; init; } = default!;

/// <summary>
/// <para>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</para>
/// </summary>
[JsonPropertyName("is_account_frozen_or_restricted")]
public bool? IsAccountFrozenOrRestricted { get; init; } = default!;

/// <summary>
/// <para>The total number of times the item has been connected to applications via Plaid</para>
/// </summary>
[JsonPropertyName("total_plaid_connections_count")]
public int? TotalPlaidConnectionsCount { get; init; } = default!;

/// <summary>
/// <para>The number of times the Item has been connected to applications via Plaid over the past 7 days</para>
/// </summary>
[JsonPropertyName("plaid_connections_count_7d")]
public int? PlaidConnectionsCount7d { get; init; } = default!;

/// <summary>
/// <para>The number of times the Item has been connected to applications via Plaid over the past 30 days</para>
/// </summary>
[JsonPropertyName("plaid_connections_count_30d")]
public int? PlaidConnectionsCount30d { get; init; } = default!;

/// <summary>
/// <para>The number of failed non-OAuth authentication attempts via Plaid for this bank account over the past 3 days</para>
/// </summary>
[JsonPropertyName("failed_plaid_non_oauth_authentication_attempts_count_3d")]
public int? FailedPlaidNonOauthAuthenticationAttemptsCount3d { get; init; } = default!;

/// <summary>
/// <para>The number of non-OAuth authentication attempts via Plaid for this bank account over the past 3 days</para>
/// </summary>
[JsonPropertyName("plaid_non_oauth_authentication_attempts_count_3d")]
public int? PlaidNonOauthAuthenticationAttemptsCount3d { get; init; } = default!;

/// <summary>
/// <para>The number of failed non-OAuth authentication attempts via Plaid for this bank account over the past 7 days</para>
/// </summary>
[JsonPropertyName("failed_plaid_non_oauth_authentication_attempts_count_7d")]
public int? FailedPlaidNonOauthAuthenticationAttemptsCount7d { get; init; } = default!;

/// <summary>
/// <para>The number of non-OAuth authentication attempts via Plaid for this bank account over the past 7 days</para>
/// </summary>
[JsonPropertyName("plaid_non_oauth_authentication_attempts_count_7d")]
public int? PlaidNonOauthAuthenticationAttemptsCount7d { get; init; } = default!;

/// <summary>
/// <para>The number of failed non-OAuth authentication attempts via Plaid for this bank account over the past 30 days</para>
/// </summary>
[JsonPropertyName("failed_plaid_non_oauth_authentication_attempts_count_30d")]
public int? FailedPlaidNonOauthAuthenticationAttemptsCount30d { get; init; } = default!;

/// <summary>
/// <para>The number of non-OAuth authentication attempts via Plaid for this bank account over the past 30 days</para>
/// </summary>
[JsonPropertyName("plaid_non_oauth_authentication_attempts_count_30d")]
public int? PlaidNonOauthAuthenticationAttemptsCount30d { get; init; } = default!;

/// <summary>
/// <para>The number of distinct IP addresses linked to the same bank account during Plaid authentication in the last 3 days</para>
/// </summary>
[JsonPropertyName("distinct_ip_addresses_count_3d")]
public int? DistinctIpAddressesCount3d { get; init; } = default!;

/// <summary>
/// <para>The number of distinct IP addresses linked to the same bank account during Plaid authentication in the last 7 days</para>
/// </summary>
[JsonPropertyName("distinct_ip_addresses_count_7d")]
public int? DistinctIpAddressesCount7d { get; init; } = default!;

/// <summary>
/// <para>The number of distinct IP addresses linked to the same bank account during Plaid authentication in the last 30 days</para>
/// </summary>
[JsonPropertyName("distinct_ip_addresses_count_30d")]
public int? DistinctIpAddressesCount30d { get; init; } = default!;

/// <summary>
/// <para>The number of distinct IP addresses linked to the same bank account during Plaid authentication in the last 90 days</para>
/// </summary>
[JsonPropertyName("distinct_ip_addresses_count_90d")]
public int? DistinctIpAddressesCount90d { get; init; } = default!;

/// <summary>
/// <para>The number of distinct user agents linked to the same bank account during Plaid authentication in the last 3 days</para>
/// </summary>
[JsonPropertyName("distinct_user_agents_count_3d")]
public int? DistinctUserAgentsCount3d { get; init; } = default!;

/// <summary>
/// <para>The number of distinct user agents linked to the same bank account during Plaid authentication in the last 7 days</para>
/// </summary>
[JsonPropertyName("distinct_user_agents_count_7d")]
public int? DistinctUserAgentsCount7d { get; init; } = default!;

/// <summary>
/// <para>The number of distinct user agents linked to the same bank account during Plaid authentication in the last 30 days</para>
/// </summary>
[JsonPropertyName("distinct_user_agents_count_30d")]
public int? DistinctUserAgentsCount30d { get; init; } = default!;

/// <summary>
/// <para>The number of distinct user agents linked to the same bank account during Plaid authentication in the last 90 days</para>
/// </summary>
[JsonPropertyName("distinct_user_agents_count_90d")]
public int? DistinctUserAgentsCount90d { get; init; } = default!;

/// <summary>
/// <para>The number of times the account's addresses on file have changed over the past 28 days</para>
/// </summary>
[JsonPropertyName("address_change_count_28d")]
public int? AddressChangeCount28d { get; init; } = default!;

/// <summary>
/// <para>The number of times the account's email addresses on file have changed over the past 28 days</para>
/// </summary>
[JsonPropertyName("email_change_count_28d")]
public int? EmailChangeCount28d { get; init; } = default!;

/// <summary>
/// <para>The number of times the account's phone numbers on file have changed over the past 28 days</para>
/// </summary>
[JsonPropertyName("phone_change_count_28d")]
public int? PhoneChangeCount28d { get; init; } = default!;

/// <summary>
/// <para>The number of times the account's addresses on file have changed over the past 90 days</para>
/// </summary>
[JsonPropertyName("address_change_count_90d")]
public int? AddressChangeCount90d { get; init; } = default!;

/// <summary>
/// <para>The number of times the account's email addresses on file have changed over the past 90 days</para>
/// </summary>
[JsonPropertyName("email_change_count_90d")]
public int? EmailChangeCount90d { get; init; } = default!;

/// <summary>
/// <para>The number of times the account's phone numbers on file have changed over the past 90 days</para>
/// </summary>
[JsonPropertyName("phone_change_count_90d")]
public int? PhoneChangeCount90d { get; init; } = default!;

}
Loading

0 comments on commit 8fc509b

Please sign in to comment.