Skip to content

Commit

Permalink
Update to Plaid v1.431.7
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin committed Sep 19, 2023
1 parent 357498e commit 82f1a1e
Show file tree
Hide file tree
Showing 84 changed files with 900 additions and 130 deletions.
2 changes: 1 addition & 1 deletion plaid-openapi
Submodule plaid-openapi updated 2 files
+1,170 −283 2020-09-14.yml
+97 −1 CHANGELOG.md
5 changes: 4 additions & 1 deletion src/Plaid.OpenApiParser/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private static void AddSchemaEntity(string basePath, string name, BaseType baseT
var (pd, ed) = ParseEnumDescription(schema.Description);

static string GetEnumName(string name) =>
$"{(char.IsDigit(name[0]) ? "_" : "")}{name.ToLower().ToPascalCase()}";
$"{(char.IsDigit(name[0]) ? "_" : "")}{name.Replace(".", "_").ToLower().ToPascalCase()}";

schemaEntities[name] = new()
{
Expand Down Expand Up @@ -250,6 +250,9 @@ private static (string enumDescription, Dictionary<string, string> propertyDescr
{
if (string.IsNullOrWhiteSpace(description))
return (string.Empty, new Dictionary<string, string>());
if (description.StartsWith("The asynchronous event to be simulated.", StringComparison.OrdinalIgnoreCase))
return (FixupDescription(description), new Dictionary<string, string>());

var lines = description.Split(newLineSplits, StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);

if (lines.Length == 1)
Expand Down
3 changes: 1 addition & 2 deletions src/Plaid/AssetReport/PlaidClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ 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. 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>
/// <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
7 changes: 4 additions & 3 deletions src/Plaid/Converters/WebhookBaseConverter.Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ public partial class WebhookBaseConverter : JsonConverter<WebhookBase>
[(WebhookType.Item, WebhookCode.NewAccountsAvailable)] = typeof(NewAccountsAvailableWebhook),
[(WebhookType.LinkDelivery, WebhookCode.DeliveryStatus)] = typeof(LinkUserDeliveryStatusWebhook),
[(WebhookType.LinkDelivery, WebhookCode.LinkCallback)] = typeof(LinkDeliveryCallbackWebhook),
[(WebhookType.BaseReport, WebhookCode.ProductReady)] = typeof(BaseReportsProductReadyWebhook),
[(WebhookType.BaseReport, WebhookCode.Error)] = typeof(BaseReportsErrorWebhook),
[(WebhookType.CraIncome, WebhookCode.BankIncomeComplete)] = typeof(CraBankIncomeCompleteWebhook),
[(WebhookType.Income, WebhookCode.BankIncomeComplete)] = typeof(BankIncomeCompleteWebhook),
[(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),
};
}
6 changes: 6 additions & 0 deletions src/Plaid/Entity/AccountAssets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ public record AccountAssets
[JsonPropertyName("transactions")]
public IReadOnlyList<Entity.AssetReportTransaction> Transactions { get; init; } = default!;

/// <summary>
/// <para>A transaction within an investment account.</para>
/// </summary>
[JsonPropertyName("investments")]
public Entity.AssetReportInvestments? Investments { get; init; } = default!;

/// <summary>
/// <para>Data returned by the financial institution about the account owner or owners.For business accounts, the name reported may be either the name of the individual or the name of the business, depending on the institution. Multiple owners on a single account will be represented in the same <c>owner</c> object, not in multiple owner objects within the array. In API versions 2018-05-22 and earlier, the <c>owners</c> object is not returned, and instead identity information is returned in the top level <c>identity</c> object. For more details, see <a href="https://plaid.com/docs/api/versioning/#version-2019-05-29">Plaid API versioning</a></para>
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Plaid/Entity/AddressMatchScore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity;
public record AddressMatchScore
{
/// <summary>
/// <para>Match score for address. 100 is a perfect match, 99-90 is a strong match, 89-80 is a partial match, anything below 80 is considered a weak match. Typically, the match threshold should be set to a score of 80 or higher. If the address is missing from either the API or financial institution, this is null.</para>
/// <para>Match score for address. 100 is a perfect match, 99-90 is a strong match, 89-70 is a partial match, anything below 70 is considered a weak match. Typically, the match threshold should be set to a score of 70 or higher. If the address is missing from either the API or financial institution, this is null.</para>
/// </summary>
[JsonPropertyName("score")]
public int? Score { get; init; } = default!;
Expand Down
86 changes: 86 additions & 0 deletions src/Plaid/Entity/AssetReportInvestments.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>A transaction within an investment account.</para>
/// </summary>
public record AssetReportInvestments
{
/// <summary>
/// <para>The ID of the Investment transaction, unique across all Plaid transactions. Like all Plaid identifiers, the <c>investment_transaction_id</c> is case sensitive.</para>
/// </summary>
[JsonPropertyName("investment_transaction_id")]
public string InvestmentTransactionId { get; init; } = default!;

/// <summary>
/// <para>The <c>account_id</c> of the account against which this transaction posted.</para>
/// </summary>
[JsonPropertyName("account_id")]
public string AccountId { get; init; } = default!;

/// <summary>
/// <para>The <c>security_id</c> to which this transaction is related.</para>
/// </summary>
[JsonPropertyName("security_id")]
public string? SecurityId { get; init; } = default!;

/// <summary>
/// <para>The <a href="https://wikipedia.org/wiki/ISO_8601">ISO 8601</a> posting date for the transaction.</para>
/// </summary>
[JsonPropertyName("date")]
public DateOnly Date { get; init; } = default!;

/// <summary>
/// <para>The institution’s description of the transaction.</para>
/// </summary>
[JsonPropertyName("name")]
public string Name { get; init; } = default!;

/// <summary>
/// <para>The number of units of the security involved in this transaction. Positive for buy transactions; negative for sell transactions.</para>
/// </summary>
[JsonPropertyName("quantity")]
public decimal Quantity { get; init; } = default!;

/// <summary>
/// <para>The complete value of the transaction. Positive values when cash is debited, e.g. purchases of stock; negative values when cash is credited, e.g. sales of stock. Treatment remains the same for cash-only movements unassociated with securities.</para>
/// </summary>
[JsonPropertyName("amount")]
public decimal Amount { get; init; } = default!;

/// <summary>
/// <para>The price of the security at which this transaction occurred.</para>
/// </summary>
[JsonPropertyName("price")]
public decimal Price { get; init; } = default!;

/// <summary>
/// <para>The combined value of all fees applied to this transaction</para>
/// </summary>
[JsonPropertyName("fees")]
public decimal? Fees { get; init; } = default!;

/// <summary>
/// <para>Value is one of the following:</para>
/// </summary>
[JsonPropertyName("type")]
public Entity.InvestmentTransactionType Type { get; init; } = default!;

/// <summary>
/// <para>For descriptions of possible transaction types and subtypes, see the [Investment transaction types schema](https://plaid.com/docs/api/accounts/#investment-transaction-types-schema).</para>
/// </summary>
[JsonPropertyName("subtype")]
public Entity.InvestmentTransactionSubtype Subtype { get; init; } = default!;

/// <summary>
/// <para>The ISO-4217 currency code of the transaction. Always <c>null</c> if <c>unofficial_currency_code</c> is non-<c>null</c>.</para>
/// </summary>
[JsonPropertyName("iso_currency_code")]
public string? IsoCurrencyCode { get; init; } = default!;

/// <summary>
/// <para>The unofficial currency code associated with the holding. Always <c>null</c> if <c>iso_currency_code</c> is non-<c>null</c>. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.</para>
/// <para>See the <a href="https://plaid.com/docs/api/accounts#currency-code-schema">currency code schema</a> for a full listing of supported <c>iso_currency_code</c>s.</para>
/// </summary>
[JsonPropertyName("unofficial_currency_code")]
public string? UnofficialCurrencyCode { get; init; } = default!;
}
6 changes: 3 additions & 3 deletions src/Plaid/Entity/BankIncomeCompleteResult.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>The result of the bank income refresh report generation</para>
/// <para>The result of the bank income 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>
/// <para>The bank income report was successfully generated and can be retrieved via <c>/credit/bank_income/get</c>.</para>
/// </summary>
[EnumMember(Value = "SUCCESS")]
Success,

/// <summary>
/// <para>The refreshed report failed to be generated</para>
/// <para>The bank income report failed to be generated</para>
/// </summary>
[EnumMember(Value = "FAILURE")]
Failure,
Expand Down
2 changes: 1 addition & 1 deletion src/Plaid/Entity/ConsumerReportUserIdentity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class ConsumerReportUserIdentity
public string LastName { get; set; } = default!;

/// <summary>
/// <para>The user's phone numbers</para>
/// <para>The user's phone numbers. The format of phone number will be validated and for better normalization, it is expected to be in E.164 format +{countrycode}{number}, for example <c>+14151234567</c>.</para>
/// </summary>
[JsonPropertyName("phone_numbers")]
public IReadOnlyList<string> PhoneNumbers { get; set; } = default!;
Expand Down
19 changes: 18 additions & 1 deletion src/Plaid/Entity/Counterparty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ public record Counterparty
[JsonPropertyName("name")]
public string Name { get; init; } = default!;

/// <summary>
/// <para>A unique, stable, Plaid-generated ID that maps to the counterparty.</para>
/// </summary>
[JsonPropertyName("entity_id")]
public string? EntityId { get; init; } = default!;

/// <summary>
/// <para>The counterparty type.</para>
/// </summary>
Expand All @@ -24,8 +30,19 @@ public record Counterparty
public string? Website { get; init; } = default!;

/// <summary>
/// <para>The URL of a logo associated with the counterparty, if available. The logo is formatted as a 100x100 pixel PNG filepath.</para>
/// <para>The URL of a logo associated with the counterparty, if available. The logo will always be 100×100 pixel PNG file.</para>
/// </summary>
[JsonPropertyName("logo_url")]
public string? LogoUrl { get; init; } = default!;

/// <summary>
/// <para>A description of how confident we are that the provided counterparty is involved in the transaction.</para>
/// <para><c>VERY_HIGH</c>: We recognize this counterparty and we are more than 98% confident that it is involved in this transaction.</para>
/// <para><c>HIGH</c>: We recognize this counterparty and we are more than 90% confident that it is involved in this transaction.</para>
/// <para><c>MEDIUM</c>: We are moderately confident that this counterparty was involved in this transaction, but some details may differ from our records.</para>
/// <para><c>LOW</c>: We didn’t find a matching counterparty in our records, so we are returning a cleansed name parsed out of the request description.</para>
/// <para><c>UNKNOWN</c>: We don’t know the confidence level for this counterparty.</para>
/// </summary>
[JsonPropertyName("confidence_level")]
public string? ConfidenceLevel { get; init; } = default!;
}
25 changes: 25 additions & 0 deletions src/Plaid/Entity/CraBankIncomeCompleteResult.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 report generation</para>
/// </summary>
public enum CraBankIncomeCompleteResult
{
/// <summary>
/// <para>The bank income report was successfully generated and can be retrieved via <c>/cra/bank_income/get</c>.</para>
/// </summary>
[EnumMember(Value = "SUCCESS")]
Success,

/// <summary>
/// <para>The bank income 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,
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ public record CreditFreddieMacReportingInformation_VOA_2_4
[JsonPropertyName("ReportIdentifierType")]
public string? Reportidentifiertype { get; init; } = default!;

/// <summary>
/// <para>Documentation not found in the MISMO model viewer and not provided by Freddie Mac.</para>
/// </summary>
[JsonPropertyName("ReportingInformationParentIdentifier")]
public string? Reportinginformationparentidentifier { get; init; } = default!;

/// <summary>
/// <para>Documentation not found in the MISMO model viewer and not provided by Freddie Mac.</para>
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Plaid/Entity/CreditPayStubEmployee.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public record CreditPayStubEmployee
public string? Name { get; init; } = default!;

/// <summary>
/// <para>Marital status of the employee - either <c>SINGLE</c> or <c>MARRIED</c>.</para>
/// <para>Marital status of the employee - either <c>SINGLE</c> or <c>MARRIED</c> or <c>NOT LISTED</c>.</para>
/// </summary>
[JsonPropertyName("marital_status")]
public string? MaritalStatus { get; init; } = default!;
Expand Down
4 changes: 2 additions & 2 deletions src/Plaid/Entity/Enhancements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public record Enhancements
public string? Website { get; init; } = default!;

/// <summary>
/// <para>The URL of a logo associated with this transaction, if available. The logo is formatted as a 100x100 pixel PNG file.</para>
/// <para>The URL of a logo associated with this transaction, if available. The logo will always be 100×100 pixel PNG file.</para>
/// </summary>
[JsonPropertyName("logo_url")]
public string? LogoUrl { get; init; } = default!;
Expand Down Expand Up @@ -61,7 +61,7 @@ public record Enhancements
public Entity.PersonalFinanceCategory? PersonalFinanceCategory { get; init; } = default!;

/// <summary>
/// <para>A link to the icon associated with the primary personal finance category. The logo will always be 100x100 pixels.</para>
/// <para>The URL of an icon associated with the primary personal finance category. The icon will always be 100×100 pixel PNG file.</para>
/// </summary>
[JsonPropertyName("personal_finance_category_icon_url")]
public string? PersonalFinanceCategoryIconUrl { get; init; } = default!;
Expand Down
6 changes: 3 additions & 3 deletions src/Plaid/Entity/Enrichments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public record Enrichments
public IReadOnlyList<Entity.Counterparty> Counterparties { get; init; } = default!;

/// <summary>
/// <para>A unique, stable, Plaid-generated id that maps to the primary counterparty.</para>
/// <para>A unique, stable, Plaid-generated ID that maps to the primary counterparty.</para>
/// </summary>
[JsonPropertyName("entity_id")]
public string? EntityId { get; init; } = default!;
Expand All @@ -44,7 +44,7 @@ public record Enrichments
public Entity.Location Location { get; init; } = default!;

/// <summary>
/// <para>The URL of a logo associated with this transaction, if available. The logo is formatted as a 100x100 pixel PNG file.</para>
/// <para>The URL of a logo associated with this transaction, if available. The logo will always be 100×100 pixel PNG file.</para>
/// </summary>
[JsonPropertyName("logo_url")]
public string? LogoUrl { get; init; } = default!;
Expand All @@ -69,7 +69,7 @@ public record Enrichments
public Entity.PersonalFinanceCategory? PersonalFinanceCategory { get; init; } = default!;

/// <summary>
/// <para>A link to the icon associated with the primary personal finance category. The logo will always be 100x100 pixels.</para>
/// <para>The URL of an icon associated with the primary personal finance category. The icon will always be 100×100 pixel PNG file.</para>
/// </summary>
[JsonPropertyName("personal_finance_category_icon_url")]
public string PersonalFinanceCategoryIconUrl { get; init; } = default!;
Expand Down
6 changes: 6 additions & 0 deletions src/Plaid/Entity/LinkEventName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ public enum LinkEventName
[EnumMember(Value = "SELECT_DOWN_INSTITUTION")]
SelectDownInstitution,

/// <summary>
///
/// </summary>
[EnumMember(Value = "SELECT_FILTERED_INSTITUTION")]
SelectFilteredInstitution,

/// <summary>
///
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Plaid/Entity/LinkTokenCreateRequestAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class LinkTokenCreateRequestAuth
public bool? SameDayMicrodepositsEnabled { get; set; } = default!;

/// <summary>
/// <para>Specifies what type of Reroute to Credentials pane should be used in the Link session for the Same Day Micro-deposits flow.</para>
/// <para>Specifies what type of [Reroute to Credentials](https://plaid.com/docs/auth/coverage/same-day/#reroute-to-credentials) pane should be used in the Link session for the Same Day Micro-deposits flow. As of October 15 2023, the default setting is <c>OPTIONAL</c>.</para>
/// </summary>
[JsonPropertyName("reroute_to_credentials")]
public Entity.LinkTokenCreateRequestAuthRerouteToCredentialsEnum? RerouteToCredentials { get; set; } = default!;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>Specifies what type of Reroute to Credentials pane should be used in the Link session for the Same Day Micro-deposits flow.</para>
/// <para>Specifies what type of [Reroute to Credentials](https://plaid.com/docs/auth/coverage/same-day/#reroute-to-credentials) pane should be used in the Link session for the Same Day Micro-deposits flow. As of October 15 2023, the default setting is <c>OPTIONAL</c>.</para>
/// </summary>
public enum LinkTokenCreateRequestAuthRerouteToCredentialsEnum
{
Expand Down
Loading

0 comments on commit 82f1a1e

Please sign in to comment.