Skip to content

Commit

Permalink
Update to Plaid v1.496.2
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin committed Feb 22, 2024
1 parent 7e7d8ec commit 253c908
Show file tree
Hide file tree
Showing 16 changed files with 229 additions and 11 deletions.
2 changes: 1 addition & 1 deletion plaid-openapi
Submodule plaid-openapi updated 2 files
+213 −10 2020-09-14.yml
+6 −0 CHANGELOG.md
2 changes: 1 addition & 1 deletion src/Plaid/Converters/WebhookBaseConverter.Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public partial class WebhookBaseConverter : JsonConverter<WebhookBase>
[(WebhookType.Income, WebhookCode.BankIncomeRefreshComplete)] = typeof(BankIncomeRefreshCompleteWebhook),
[(WebhookType.Link, WebhookCode.Events)] = typeof(LinkEventsWebhook),
[(WebhookType.Link, WebhookCode.SessionFinished)] = typeof(LinkSessionFinishedWebhook),
[(WebhookType.Auth, WebhookCode.HostedVerification)] = typeof(HostedMMDVerificationWebhook),
[(WebhookType.Auth, WebhookCode.SmsMicrodepositsVerification)] = typeof(HostedMMDVerificationWebhook),
[(WebhookType.DashboardConfiguredAlert, WebhookCode.InstitutionStatusAlertTriggered)] = typeof(InstitutionStatusAlertWebhook),
[(WebhookType.Assets, WebhookCode.ProductReady)] = typeof(AssetsProductReadyWebhook),
[(WebhookType.Assets, WebhookCode.Error)] = typeof(AssetsErrorWebhook),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ namespace Going.Plaid.Entity;
public record AccountsBalanceGetResponsePaymentRiskAssessment
{
/// <summary>
/// <para>A five-tier risk assessment for the transaction based on the probability of return.</para>
/// <para>A five-tier risk assessment for the transaction, based on the probability of ACH returns,</para>
/// <para>measured by the incident rate.</para>
/// </summary>
[JsonPropertyName("risk_level")]
public string? RiskLevel { get; init; } = default!;
Expand All @@ -24,9 +25,10 @@ public record AccountsBalanceGetResponsePaymentRiskAssessment
public Entity.BalancePlusAttributes? Attributes { get; init; } = default!;

/// <summary>
/// <para>A score from 1-99 that indicates the transaction return risk: a higher risk score suggests a higher return likelihood.</para>
/// <para>The score evaluates the transaction return risk because an account is overdrawn or because an ineligible account is used and covers return codes: "R01", "R02", "R03", "R04", "R06", "R08", "R09", "R13",</para>
/// <para>"R16", "R17", "R20", "R23". These returns have a turnaround time of 2 banking days.</para>
/// <para>A risk score ranging from 1-99, reflecting the likelihood of ACH debit return.</para>
/// <para>A higher score indicates a greater risk of return, often due to overdrawn accounts or account</para>
/// <para>ineligibility to receive ACH transactions. Typical return codes include "R01", "R02", "R03",</para>
/// <para>"R04", "R06", "R08", "R09", "R13", "R16", "R17", "R20", "R23", etc., with a turnaround of 2 banking days.</para>
/// </summary>
[JsonPropertyName("score")]
public int? Score { get; init; } = default!;
Expand Down
6 changes: 6 additions & 0 deletions src/Plaid/Entity/CraBankIncomeSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ public record CraBankIncomeSource
[JsonPropertyName("forecasted_average_monthly_income")]
public decimal? ForecastedAverageMonthlyIncome { get; init; } = default!;

/// <summary>
/// <para>The prediction interval(s) for the forecasted average monthly income.</para>
/// </summary>
[JsonPropertyName("forecasted_average_monthly_income_prediction_interval")]
public IReadOnlyList<Entity.CraPredictionInterval> ForecastedAverageMonthlyIncomePredictionInterval { get; init; } = default!;

/// <summary>
/// <para>The object containing employer data.</para>
/// </summary>
Expand Down
27 changes: 27 additions & 0 deletions src/Plaid/Entity/CraPredictionInterval.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>The object containing prediction interval data.</para>
/// </summary>
public record CraPredictionInterval
{
/// <summary>
/// <para>The lower bound of the predicted attribute for the given probability.</para>
/// </summary>
[JsonPropertyName("lower_bound")]
public decimal? LowerBound { get; init; } = default!;

/// <summary>
/// <para>The upper bound of the predicted attribute for the given probability.</para>
/// </summary>
[JsonPropertyName("upper_bound")]
public decimal? UpperBound { get; init; } = default!;

/// <summary>
/// <para>The probability of the actual value of the attribute falling within the upper and lower bound.</para>
/// <para>This is a percentage represented as a value between 0 and 1.</para>
/// </summary>
[JsonPropertyName("probability")]
public decimal? Probability { get; init; } = default!;

}
2 changes: 1 addition & 1 deletion src/Plaid/Entity/LinkSessionSuccessMetadataAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public record LinkSessionSuccessMetadataAccount
/// <summary>
/// <para>Indicates an Item's micro-deposit-based verification status. Possible values are:</para>
/// <para><c>pending_automatic_verification</c>: The Item is pending automatic verification</para>
/// <para><c>pending_manual_verification</c>: The Item is pending manual micro-deposit verification. Items remain in this state until the user successfully verifies the two amounts.</para>
/// <para><c>pending_manual_verification</c>: The Item is pending manual micro-deposit verification. Items remain in this state until the user successfully verifies the code.</para>
/// <para><c>automatically_verified</c>: The Item has successfully been automatically verified</para>
/// <para><c>manually_verified</c>: The Item has successfully been manually verified</para>
/// <para><c>verification_expired</c>: Plaid was unable to automatically verify the deposit within 7 calendar days and will no longer attempt to validate the Item. Users may retry by submitting their information again through Link.</para>
Expand Down
6 changes: 6 additions & 0 deletions src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ public enum ProcessorTokenCreateRequestProcessorEnum
[EnumMember(Value = "alloy")]
Alloy,

/// <summary>
///
/// </summary>
[EnumMember(Value = "finix")]
Finix,

/// <summary>
/// <para>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.</para>
/// </summary>
Expand Down
44 changes: 44 additions & 0 deletions src/Plaid/Entity/ProfileIdentity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>ProfileIdentity defines the identity data permissioned by the end user during the authorization flow.</para>
/// </summary>
public record ProfileIdentity
{
/// <summary>
/// <para>ProfileIdentityName defines the user's first name and last name.</para>
/// </summary>
[JsonPropertyName("name")]
public Entity.ProfileIdentityName? Name { get; init; } = default!;

/// <summary>
/// <para>ProfileIdentityAddress defines the user's address.</para>
/// </summary>
[JsonPropertyName("address")]
public Entity.ProfileIdentityAddress? Address { get; init; } = default!;

/// <summary>
/// <para>The user's email address.</para>
/// </summary>
[JsonPropertyName("email")]
public string? Email { get; init; } = default!;

/// <summary>
/// <para>The user's date of birth.</para>
/// </summary>
[JsonPropertyName("date_of_birth")]
public string? DateOfBirth { get; init; } = default!;

/// <summary>
/// <para>The user's social security number.</para>
/// </summary>
[JsonPropertyName("ssn")]
public string? Ssn { get; init; } = default!;

/// <summary>
/// <para>The last 4 digits of the user's social security number.</para>
/// </summary>
[JsonPropertyName("ssn_last_4")]
public string? SsnLast4 { get; init; } = default!;

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

/// <summary>
/// <para>ProfileIdentityAddress defines the user's address.</para>
/// </summary>
public record ProfileIdentityAddress
{
/// <summary>
/// <para>The full city name</para>
/// </summary>
[JsonPropertyName("city")]
public string? City { get; init; } = default!;

/// <summary>
/// <para>The region or state.</para>
/// <para>Example: <c>"NC"</c></para>
/// </summary>
[JsonPropertyName("region")]
public string? Region { get; init; } = default!;

/// <summary>
/// <para>The full street address</para>
/// <para>Example: <c>"564 Main Street, APT 15"</c></para>
/// </summary>
[JsonPropertyName("street")]
public string? Street { get; init; } = default!;

/// <summary>
/// <para>The second line street address</para>
/// </summary>
[JsonPropertyName("street2")]
public string? Street2 { get; init; } = default!;

/// <summary>
/// <para>The postal code. In API versions 2018-05-22 and earlier, this field is called <c>zip</c>.</para>
/// </summary>
[JsonPropertyName("postal_code")]
public string? PostalCode { get; init; } = default!;

/// <summary>
/// <para>The ISO 3166-1 alpha-2 country code</para>
/// </summary>
[JsonPropertyName("country")]
public string? Country { get; init; } = default!;

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

/// <summary>
/// <para>ProfileIdentityName defines the user's first name and last name.</para>
/// </summary>
public record ProfileIdentityName
{
/// <summary>
///
/// </summary>
[JsonPropertyName("first_name")]
public string? FirstName { get; init; } = default!;

/// <summary>
///
/// </summary>
[JsonPropertyName("last_name")]
public string? LastName { get; init; } = default!;

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

/// <summary>
/// <para>ProfileItem defines an Item created during a profile authorization session.</para>
/// </summary>
public record ProfileItem
{
/// <summary>
/// <para>The Plaid Item ID. The <c>item_id</c> is always unique; linking the same account at the same institution twice will result in two Items with different <c>item_id</c> values. Like all Plaid identifiers, the <c>item_id</c> is case-sensitive.</para>
/// </summary>
[JsonPropertyName("item_id")]
public string? ItemId { get; init; } = default!;

/// <summary>
/// <para>The access token associated with the Item data is being requested for.</para>
/// </summary>
[JsonPropertyName("access_token")]
public string? AccessToken { get; init; } = default!;

}
4 changes: 2 additions & 2 deletions src/Plaid/Entity/WebhookCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ public enum WebhookCode
/// <summary>
///
/// </summary>
[EnumMember(Value = "HOSTED_VERIFICATION")]
HostedVerification,
[EnumMember(Value = "SMS_MICRODEPOSITS_VERIFICATION")]
SmsMicrodepositsVerification,

/// <summary>
///
Expand Down
13 changes: 13 additions & 0 deletions src/Plaid/Profile/PlaidClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Going.Plaid;

public sealed partial class PlaidClient
{
/// <summary>
/// <para>Returns user permissioned profile data including identity and item access tokens.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docs/api/profile/#profileget" /></remarks>
public Task<Profile.ProfileGetResponse> ProfileGetAsync(Profile.ProfileGetRequest request) =>
PostAsync("/profile/get", request)
.ParseResponseAsync<Profile.ProfileGetResponse>();

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

/// <summary>
/// <para>ProfileGetRequest defines the request schema for <c>/profile/get</c></para>
/// </summary>
public partial class ProfileGetRequest : RequestBase
{
/// <summary>
/// <para>The profile token generated by the end user authorization session.</para>
/// </summary>
[JsonPropertyName("profile_token")]
public string ProfileToken { get; set; } = default!;

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

/// <summary>
/// <para>ProfileGetResponse defines the response schema for <c>/profile/get</c></para>
/// </summary>
public record ProfileGetResponse : ResponseBase
{
/// <summary>
/// <para>ProfileIdentity defines the identity data permissioned by the end user during the authorization flow.</para>
/// </summary>
[JsonPropertyName("identity")]
public Entity.ProfileIdentity? Identity { get; init; } = default!;

/// <summary>
///
/// </summary>
[JsonPropertyName("items")]
public IReadOnlyList<Entity.ProfileItem> Items { get; init; } = default!;

}
4 changes: 2 additions & 2 deletions src/Plaid/Webhook/HostedMMDVerificationWebhook.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Going.Plaid.Webhook;

/// <summary>
/// <para>Contains the state of a hosted same-day microdeposits verification session.</para>
/// <para>Contains the state of a SMS same-day microdeposits verification session.</para>
/// </summary>
public record HostedMMDVerificationWebhook : WebhookBase
{
Expand All @@ -11,7 +11,7 @@ public record HostedMMDVerificationWebhook : WebhookBase

/// <inheritdoc />
[JsonPropertyName("webhook_code")]
public override WebhookCode WebhookCode => WebhookCode.HostedVerification;
public override WebhookCode WebhookCode => WebhookCode.SmsMicrodepositsVerification;

/// <summary>
/// <para>The final status of the same-day microdeposits verification. Will always be <c>MANUALLY_VERIFIED</c> or <c>VERIFICATION_FAILED</c>.</para>
Expand Down

0 comments on commit 253c908

Please sign in to comment.