Skip to content

Commit

Permalink
Update to Plaid v1.413.0
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin committed Aug 17, 2023
1 parent 4711f29 commit d8726f3
Show file tree
Hide file tree
Showing 39 changed files with 592 additions and 22 deletions.
2 changes: 1 addition & 1 deletion plaid-openapi
Submodule plaid-openapi updated 2 files
+432 −24 2020-09-14.yml
+27 −0 CHANGELOG.md
6 changes: 3 additions & 3 deletions src/Plaid/AssetReport/PlaidClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public sealed partial class PlaidClient

/// <summary>
/// <para>The <c>/asset_report/get</c> endpoint retrieves the Asset Report in JSON format. Before calling <c>/asset_report/get</c>, you must first create the Asset Report using <c>/asset_report/create</c> (or filter an Asset Report using <c>/asset_report/filter</c>) and then wait for the <a href="https://plaid.com/docs/api/products/assets/#product_ready"><c>PRODUCT_READY</c></a> webhook to fire, indicating that the Report is ready to be retrieved.</para>
/// <para>By default, an Asset Report includes transaction descriptions as returned by the bank, as opposed to parsed and categorized by Plaid. You can also receive cleaned and categorized transactions, as well as additional insights like merchant name or location information. We call this an Asset Report with Insights. An Asset Report with Insights provides transaction category, location, and merchant information in addition to the transaction strings provided in a standard Asset Report.</para>
/// <para>If report_type was set to <c>VERIFICATION_OF_EMPLOYMENT</c> when the Asset Report was created in asset_report/create, debit transactions and transaction amounts won’t be included in the report.</para>
/// <para>To retrieve an Asset Report with Insights, call the <c>/asset_report/get</c> endpoint with <c>include_insights</c> set to <c>true</c>.</para>
/// <para>By default, an Asset Report includes transaction descriptions as returned by the bank, as opposed to parsed and categorized by Plaid. You can also receive cleaned and categorized transactions, as well as additional insights like merchant name or location information. We call this an Asset Report with Insights. An Asset Report with Insights provides transaction category, location, and merchant information in addition to the transaction strings provided in a standard Asset Report. To retrieve an Asset Report with Insights, call <c>/asset_report/get</c> endpoint with <c>include_insights</c> set to <c>true</c>.</para>
/// <para>If <c>report_type</c> was set to <c>VERIFICATION_OF_EMPLOYMENT</c> when the Asset Report was created in <c>/asset_report/create</c>, debit transactions and transaction amounts won’t be included in the report.</para>
/// <para> For latency-sensitive applications, you can optionally call <c>/asset_report/create</c> with <c>options.add_ons</c> set to <c>["fast_assets"]</c>. This will cause Plaid to create two versions of the Asset Report: one with only current and available balance and identity information, and then later on the complete Asset Report. You will receive separate webhooks for each version of the Asset Report.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docs/api/products/assets/#asset_reportget" /></remarks>
public Task<AssetReport.AssetReportGetResponse> AssetReportGetAsync(AssetReport.AssetReportGetRequest request) =>
Expand Down
2 changes: 2 additions & 0 deletions src/Plaid/Converters/WebhookBaseConverter.Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ public partial class WebhookBaseConverter : JsonConverter<WebhookBase>
[(WebhookType.Income, WebhookCode.BankIncomeRefreshUpdate)] = typeof(BankIncomeRefreshUpdateWebhook),
[(WebhookType.Income, WebhookCode.BankIncomeRefreshComplete)] = typeof(BankIncomeRefreshCompleteWebhook),
[(WebhookType.Link, WebhookCode.Events)] = typeof(LinkEventsWebhook),
[(WebhookType.Link, WebhookCode.SessionFinished)] = typeof(LinkSessionFinishedWebhook),
[(WebhookType.Assets, WebhookCode.ProductReady)] = typeof(AssetsProductReadyWebhook),
[(WebhookType.Assets, WebhookCode.Error)] = typeof(AssetsErrorWebhook),
[(WebhookType.BaseReport, WebhookCode.ProductReady)] = typeof(BaseReportsProductReadyWebhook),
[(WebhookType.BaseReport, WebhookCode.Error)] = typeof(BaseReportsErrorWebhook),
[(WebhookType.CraIncome, WebhookCode.BankIncomeComplete)] = typeof(BankIncomeCompleteWebhook),
};
}
25 changes: 25 additions & 0 deletions src/Plaid/Entity/BankIncomeCompleteResult.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>The result of the bank income refresh report generation</para>
/// </summary>
public enum BankIncomeCompleteResult
{
/// <summary>
/// <para>The refreshed report was successfully generated and can be retrieved via <c>/cra/bank_income/get</c>.</para>
/// </summary>
[EnumMember(Value = "SUCCESS")]
Success,

/// <summary>
/// <para>The refreshed report failed to be generated</para>
/// </summary>
[EnumMember(Value = "FAILURE")]
Failure,

/// <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>
[EnumMember(Value = "undefined")]
Undefined,
}
2 changes: 1 addition & 1 deletion src/Plaid/Entity/BankIncomeRefreshCompleteResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity;
public enum BankIncomeRefreshCompleteResult
{
/// <summary>
/// <para>The refreshed report was successfully generated and can be retrieved via /credit/bank_income/get</para>
/// <para>The refreshed report was successfully generated and can be retrieved via <c>/credit/bank_income/get</c>.</para>
/// </summary>
[EnumMember(Value = "SUCCESS")]
Success,
Expand Down
37 changes: 37 additions & 0 deletions src/Plaid/Entity/ConsumerReportUserIdentity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>ConsumerReportUserIdentity defines the user identity data collected for consumer report purpose. This field is required to be set if you later use the created user for consumer report purpose.</para>
/// </summary>
public class ConsumerReportUserIdentity
{
/// <summary>
/// <para>The user's first name</para>
/// </summary>
[JsonPropertyName("first_name")]
public string FirstName { get; set; } = default!;

/// <summary>
/// <para>The user's last name</para>
/// </summary>
[JsonPropertyName("last_name")]
public string LastName { get; set; } = default!;

/// <summary>
/// <para>The user's phone numbers</para>
/// </summary>
[JsonPropertyName("phone_numbers")]
public IReadOnlyList<string> PhoneNumbers { get; set; } = default!;

/// <summary>
/// <para>The user's emails</para>
/// </summary>
[JsonPropertyName("emails")]
public IReadOnlyList<string> Emails { get; set; } = default!;

/// <summary>
/// <para>Data about the components comprising an address.</para>
/// </summary>
[JsonPropertyName("primary_address")]
public Entity.AddressData PrimaryAddress { get; set; } = default!;
}
4 changes: 2 additions & 2 deletions src/Plaid/Entity/CraBankIncomeSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public record CraBankIncomeSource
/// <summary>
/// <para>The predicted average monthly net income amount for the income source(s).</para>
/// </summary>
[JsonPropertyName("forcasted_average_monthly_income")]
public decimal? ForcastedAverageMonthlyIncome { get; init; } = default!;
[JsonPropertyName("forecasted_average_monthly_income")]
public decimal? ForecastedAverageMonthlyIncome { get; init; } = default!;

/// <summary>
/// <para>The object containing employer data.</para>
Expand Down
4 changes: 2 additions & 2 deletions src/Plaid/Entity/CraBankIncomeSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public record CraBankIncomeSummary
/// <summary>
/// <para>The predicted average monthly income amount for the income source(s).</para>
/// </summary>
[JsonPropertyName("forcasted_average_monthly_income")]
public IReadOnlyList<Entity.CreditAmountWithCurrency>? ForcastedAverageMonthlyIncome { get; init; } = default!;
[JsonPropertyName("forecasted_average_monthly_income")]
public IReadOnlyList<Entity.CreditAmountWithCurrency>? ForecastedAverageMonthlyIncome { get; init; } = default!;

/// <summary>
///
Expand Down
2 changes: 1 addition & 1 deletion src/Plaid/Entity/EntityWatchlistCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public enum EntityWatchlistCode
IzUnc,

/// <summary>
///
/// <para>World Bank Listing of Ineligible Firms and Individuals</para>
/// </summary>
[EnumMember(Value = "IZ_WBK")]
IzWbk,
Expand Down
25 changes: 25 additions & 0 deletions src/Plaid/Entity/HostedLinkDeliveryMethod.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace Going.Plaid.Entity;

/// <summary>
///
/// </summary>
public enum HostedLinkDeliveryMethod
{
/// <summary>
///
/// </summary>
[EnumMember(Value = "sms")]
Sms,

/// <summary>
///
/// </summary>
[EnumMember(Value = "email")]
Email,

/// <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>
[EnumMember(Value = "undefined")]
Undefined,
}
19 changes: 19 additions & 0 deletions src/Plaid/Entity/LinkSessionExit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>An object representing an <a href="https://plaid.com/docs/link/web/#onexit">onExit</a> callback from Link.</para>
/// </summary>
public record LinkSessionExit
{
/// <summary>
/// <para>We use standard HTTP response codes for success and failure notifications, and our errors are further classified by <c>error_type</c>. 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-<c>null</c> error object will only be part of an API response when calling <c>/item/get</c> to view Item status. Otherwise, error fields will be <c>null</c> if no error has occurred; if an error has occurred, an error code will be returned instead.</para>
/// </summary>
[JsonPropertyName("error")]
public Entity.PlaidError? Error { get; init; } = default!;

/// <summary>
/// <para>Displayed if a user exits Link without successfully linking an Item.</para>
/// </summary>
[JsonPropertyName("metadata")]
public Entity.LinkSessionExitMetadata? Metadata { get; init; } = default!;
}
31 changes: 31 additions & 0 deletions src/Plaid/Entity/LinkSessionExitMetadata.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>Displayed if a user exits Link without successfully linking an Item.</para>
/// </summary>
public record LinkSessionExitMetadata
{
/// <summary>
/// <para>An institution object. If the Item was created via Same-Day micro-deposit verification, will be <c>null</c>.</para>
/// </summary>
[JsonPropertyName("institution")]
public Entity.LinkSessionExitMetadataInstitution? Institution { get; init; } = default!;

/// <summary>
/// <para>The point at which the user exited the Link flow. One of the following values.</para>
/// </summary>
[JsonPropertyName("status")]
public string? Status { get; init; } = default!;

/// <summary>
/// <para>A unique identifier associated with a user's actions and events through the Link flow. Include this identifier when opening a support ticket for faster turnaround.</para>
/// </summary>
[JsonPropertyName("link_session_id")]
public string? LinkSessionId { get; init; } = default!;

/// <summary>
/// <para>The request ID for the last request made by Link. This can be shared with Plaid Support to expedite investigation.</para>
/// </summary>
[JsonPropertyName("request_id")]
public string? RequestId { get; init; } = default!;
}
19 changes: 19 additions & 0 deletions src/Plaid/Entity/LinkSessionExitMetadataInstitution.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>An institution object. If the Item was created via Same-Day micro-deposit verification, will be <c>null</c>.</para>
/// </summary>
public record LinkSessionExitMetadataInstitution
{
/// <summary>
/// <para>The full institution name, such as <c>Wells Fargo</c></para>
/// </summary>
[JsonPropertyName("name")]
public string? Name { get; init; } = default!;

/// <summary>
/// <para>The Plaid institution identifier</para>
/// </summary>
[JsonPropertyName("institution_id")]
public string? InstitutionId { get; init; } = default!;
}
19 changes: 19 additions & 0 deletions src/Plaid/Entity/LinkSessionSuccess.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>An object representing an <a href="https://plaid.com/docs/link/web/#onsuccess">onSuccess</a> callback from Link.</para>
/// </summary>
public record LinkSessionSuccess
{
/// <summary>
/// <para>Displayed once a user has successfully linked their Item.</para>
/// </summary>
[JsonPropertyName("public_token")]
public string PublicToken { get; init; } = default!;

/// <summary>
/// <para>Displayed once a user has successfully linked their Item.</para>
/// </summary>
[JsonPropertyName("metadata")]
public Entity.LinkSessionSuccessMetadata? Metadata { get; init; } = default!;
}
31 changes: 31 additions & 0 deletions src/Plaid/Entity/LinkSessionSuccessMetadata.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>Displayed once a user has successfully linked their Item.</para>
/// </summary>
public record LinkSessionSuccessMetadata
{
/// <summary>
/// <para>An institution object. If the Item was created via Same-Day micro-deposit verification, will be <c>null</c>.</para>
/// </summary>
[JsonPropertyName("institution")]
public Entity.LinkSessionSuccessMetadataInstitution? Institution { get; init; } = default!;

/// <summary>
/// <para>A list of accounts attached to the connected Item. If Account Select is enabled via the developer dashboard, <c>accounts</c> will only include selected accounts.</para>
/// </summary>
[JsonPropertyName("accounts")]
public IReadOnlyList<Entity.LinkSessionSuccessMetadataAccount>? Accounts { get; init; } = default!;

/// <summary>
/// <para>A unique identifier associated with a user's actions and events through the Link flow. Include this identifier when opening a support ticket for faster turnaround.</para>
/// </summary>
[JsonPropertyName("link_session_id")]
public string? LinkSessionId { get; init; } = default!;

/// <summary>
///
/// </summary>
[JsonPropertyName("transfer_status")]
public Entity.LinkSessionSuccessMetadataTransferStatus? TransferStatus { get; init; } = default!;
}
56 changes: 56 additions & 0 deletions src/Plaid/Entity/LinkSessionSuccessMetadataAccount.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>An account attached to the connected Item.</para>
/// </summary>
public record LinkSessionSuccessMetadataAccount
{
/// <summary>
/// <para>The Plaid <c>account_id</c></para>
/// </summary>
[JsonPropertyName("id")]
public string? Id { get; init; } = default!;

/// <summary>
/// <para>The official account name</para>
/// </summary>
[JsonPropertyName("name")]
public string? Name { get; init; } = default!;

/// <summary>
/// <para>The last 2-4 alphanumeric characters of an account's official account number. Note that the mask may be non-unique between an Item's accounts. It may also not match the mask that the bank displays to the user.</para>
/// </summary>
[JsonPropertyName("mask")]
public string? Mask { get; init; } = default!;

/// <summary>
/// <para>The account type. See the <a href="https://plaid.com/docs/api/accounts#account-type-schema">Account schema</a> for a full list of possible values</para>
/// </summary>
[JsonPropertyName("type")]
public string? Type { get; init; } = default!;

/// <summary>
/// <para>The account subtype. See the <a href="https://plaid.com/docs/api/accounts#account-type-schema">Account schema</a> for a full list of possible values</para>
/// </summary>
[JsonPropertyName("subtype")]
public string? Subtype { get; init; } = default!;

/// <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>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>
/// <para><c>verification_failed</c>: The Item failed manual micro-deposit verification because the user exhausted all 3 verification attempts. Users may retry by submitting their information again through Link.</para>
/// <para><c>null</c>: micro-deposit-based verification is not being used for the Item.</para>
/// </summary>
[JsonPropertyName("verification_status")]
public string? VerificationStatus { get; init; } = default!;

/// <summary>
/// <para>If micro-deposit verification is being used, indicates whether the account being verified is a <c>business</c> or <c>personal</c> account.</para>
/// </summary>
[JsonPropertyName("class_type")]
public string? ClassType { get; init; } = default!;
}
19 changes: 19 additions & 0 deletions src/Plaid/Entity/LinkSessionSuccessMetadataInstitution.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>An institution object. If the Item was created via Same-Day micro-deposit verification, will be <c>null</c>.</para>
/// </summary>
public record LinkSessionSuccessMetadataInstitution
{
/// <summary>
/// <para>The full institution name, such as <c>'Wells Fargo'</c></para>
/// </summary>
[JsonPropertyName("name")]
public string? Name { get; init; } = default!;

/// <summary>
/// <para>The Plaid institution identifier</para>
/// </summary>
[JsonPropertyName("institution_id")]
public string? InstitutionId { get; init; } = default!;
}
25 changes: 25 additions & 0 deletions src/Plaid/Entity/LinkSessionSuccessMetadataTransferStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace Going.Plaid.Entity;

/// <summary>
///
/// </summary>
public enum LinkSessionSuccessMetadataTransferStatus
{
/// <summary>
///
/// </summary>
[EnumMember(Value = "COMPLETE")]
Complete,

/// <summary>
///
/// </summary>
[EnumMember(Value = "INCOMPLETE")]
Incomplete,

/// <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>
[EnumMember(Value = "undefined")]
Undefined,
}
Loading

0 comments on commit d8726f3

Please sign in to comment.