Skip to content

Commit

Permalink
Update to Plaid v1.385.1
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin committed Jul 10, 2023
1 parent 1ba075d commit cb47d81
Show file tree
Hide file tree
Showing 56 changed files with 455 additions and 89 deletions.
2 changes: 1 addition & 1 deletion plaid-openapi
Submodule plaid-openapi updated 2 files
+499 −52 2020-09-14.yml
+36 −1 CHANGELOG.md
2 changes: 1 addition & 1 deletion src/Plaid/Categories/PlaidClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Going.Plaid;
public sealed partial class PlaidClient
{
/// <summary>
/// <para>Send a request to the <c>/categories/get</c> endpoint to get detailed information on categories returned by Plaid. This endpoint does not require authentication. </para>
/// <para>Send a request to the <c>/categories/get</c> endpoint to get detailed information on categories returned by Plaid. This endpoint does not require authentication.</para>
/// <para>All implementations are recommended to use the newer <c>personal_finance_category</c> taxonomy instead of the older <c>category</c> taxonomy supported by this endpoint. The <a href="https://plaid.com/documents/transactions-personal-finance-category-taxonomy.csv"><c>personal_finance_category taxonomy</c> CSV file</a> is available for download and is not accessible via API.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docs/api/products/transactions/#categoriesget" /></remarks>
Expand Down
64 changes: 29 additions & 35 deletions src/Plaid/Entity/AssetReportTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ public record AssetReportTransaction
/// <para>The ID of the account in which this transaction occurred.</para>
/// </summary>
[JsonPropertyName("account_id")]
public string? AccountId { get; init; } = default!;
public string AccountId { get; init; } = default!;

/// <summary>
/// <para>The settled value of the transaction, denominated in the transactions's currency, as stated in <c>iso_currency_code</c> or <c>unofficial_currency_code</c>. Positive values when money moves out of the account; negative values when money moves in. For example, debit card purchases are positive; credit card payments, direct deposits, and refunds are negative.</para>
/// </summary>
[JsonPropertyName("amount")]
public decimal? Amount { get; init; } = default!;
public decimal Amount { 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-null.</para>
Expand All @@ -30,6 +30,12 @@ public record AssetReportTransaction
[JsonPropertyName("unofficial_currency_code")]
public string? UnofficialCurrencyCode { get; init; } = default!;

/// <summary>
/// <para>The string returned by the financial institution to describe the transaction. For transactions returned by <c>/transactions/get</c>, this field is in beta and will be omitted unless the client is both enrolled in the closed beta program and has set <c>options.include_original_description</c> to <c>true</c>.</para>
/// </summary>
[JsonPropertyName("original_description")]
public string? OriginalDescription { get; init; } = default!;

/// <summary>
/// <para>A hierarchical array of the categories to which this transaction belongs. For a full list of categories, see <a href="https://plaid.com/docs/api/products/transactions/#categoriesget"><c>/categories/get</c></a>.</para>
/// <para>All Transactions implementations are recommended to use the new <c>personal_finance_category</c> instead of <c>category</c>. <c>personal_finance_category</c> provides more meaningful categorization and greater accuracy.</para>
Expand All @@ -46,6 +52,13 @@ public record AssetReportTransaction
[JsonPropertyName("category_id")]
public string? CategoryId { get; init; } = default!;

/// <summary>
/// <para>Information describing the intent of the transaction. Most relevant for credit use cases, but not limited to such use cases. Please reach out to your account manager or sales representative if you would like to receive this field.</para>
/// <para>See the <a href="https://plaid.com/documents/credit-category-taxonomy.csv"><c>taxonomy csv file</c></a> for a full list of credit categories.</para>
/// </summary>
[JsonPropertyName("credit_category")]
public Entity.CreditCategory? CreditCategory { get; init; } = default!;

/// <summary>
/// <para>The check number of the transaction. This field is only populated for check transactions.</para>
/// </summary>
Expand All @@ -56,7 +69,13 @@ public record AssetReportTransaction
/// <para>For pending transactions, the date that the transaction occurred; for posted transactions, the date that the transaction posted. Both dates are returned in an <a href="https://wikipedia.org/wiki/ISO_8601">ISO 8601</a> format ( <c>YYYY-MM-DD</c> ).</para>
/// </summary>
[JsonPropertyName("date")]
public DateOnly? Date { get; init; } = default!;
public DateOnly Date { get; init; } = default!;

/// <summary>
/// <para>The date on which the transaction took place, in IS0 8601 format.</para>
/// </summary>
[JsonPropertyName("date_transacted")]
public string? DateTransacted { get; init; } = default!;

/// <summary>
/// <para>A representation of where a transaction took place</para>
Expand All @@ -77,12 +96,6 @@ public record AssetReportTransaction
[JsonPropertyName("merchant_name")]
public string? MerchantName { get; init; } = default!;

/// <summary>
/// <para>The string returned by the financial institution to describe the transaction. For transactions returned by <c>/transactions/get</c>, this field is in beta and will be omitted unless the client is both enrolled in the closed beta program and has set <c>options.include_original_description</c> to <c>true</c>.</para>
/// </summary>
[JsonPropertyName("original_description")]
public string? OriginalDescription { get; init; } = default!;

/// <summary>
/// <para>Transaction information specific to inter-bank transfers. If the transaction was not an inter-bank transfer, all fields will be <c>null</c>.</para>
/// <para>If the <c>transactions</c> object was returned by a Transactions endpoint such as <c>/transactions/get</c>, the <c>payment_meta</c> key will always appear, but no data elements are guaranteed. If the <c>transactions</c> object was returned by an Assets endpoint such as <c>/asset_report/get/</c> or <c>/asset_report/pdf/get</c>, this field will only appear in an Asset Report with Insights.</para>
Expand All @@ -94,7 +107,7 @@ public record AssetReportTransaction
/// <para>When <c>true</c>, identifies the transaction as pending or unsettled. Pending transaction details (name, type, amount, category ID) may change before they are settled.</para>
/// </summary>
[JsonPropertyName("pending")]
public bool? Pending { get; init; } = default!;
public bool Pending { get; init; } = default!;

/// <summary>
/// <para>The ID of a posted transaction's associated pending transaction, where applicable.</para>
Expand All @@ -112,36 +125,17 @@ public record AssetReportTransaction
/// <para>The unique ID of the transaction. Like all Plaid identifiers, the <c>transaction_id</c> is case sensitive.</para>
/// </summary>
[JsonPropertyName("transaction_id")]
public string? TransactionId { get; init; } = default!;
public string TransactionId { get; init; } = default!;

/// <summary>
/// <para>Please use the <c>payment_channel</c> field, <c>transaction_type</c> will be deprecated in the future.</para>
///
/// </summary>
[JsonPropertyName("transaction_type")]
public Entity.AssetReportTransactionTransactionTypeEnum? TransactionType { get; init; } = default!;

/// <summary>
/// <para>The logo associated with the merchant, if available. Formatted as a 100x100 pixels PNG file path.</para>
/// </summary>
[JsonPropertyName("logo_url")]
public string? LogoUrl { get; init; } = default!;

/// <summary>
/// <para>The website associated with the merchant, if available.</para>
/// </summary>
[JsonPropertyName("website")]
public string? Website { get; init; } = default!;
public Entity.AssetReportTransactionType? TransactionType { get; init; } = default!;

/// <summary>
/// <para>The date on which the transaction took place, in IS0 8601 format.</para>
/// </summary>
[JsonPropertyName("date_transacted")]
public string? DateTransacted { get; init; } = default!;

/// <summary>
/// <para>Information describing the intent of the transaction. Most relevant for credit use cases, but not limited to such use cases. Please reach out to your account manager or sales representative if you would like to receive this field.</para>
/// <para>See the <a href="https://plaid.com/documents/credit-category-taxonomy.csv"><c>taxonomy csv file</c></a> for a full list of credit categories.</para>
/// <para>A unique identifier for an income source.</para>
/// </summary>
[JsonPropertyName("credit_category")]
public Entity.CreditCategory? CreditCategory { get; init; } = default!;
[JsonPropertyName("income_source_id")]
public string? IncomeSourceId { get; init; } = default!;
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>Please use the <c>payment_channel</c> field, <c>transaction_type</c> will be deprecated in the future.</para>
///
/// </summary>
public enum AssetReportTransactionTransactionTypeEnum
public enum AssetReportTransactionType
{
/// <summary>
/// <para>transactions that took place online.</para>
Expand Down
6 changes: 6 additions & 0 deletions src/Plaid/Entity/CreditBankStatementUploadBankAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,10 @@ public record CreditBankStatementUploadBankAccount
/// </summary>
[JsonPropertyName("periods")]
public IReadOnlyList<Entity.CreditBankStatementUploadBankAccountPeriod> Periods { get; init; } = default!;

/// <summary>
/// <para>The unique id of the bank account</para>
/// </summary>
[JsonPropertyName("account_id")]
public string? AccountId { get; init; } = default!;
}
6 changes: 6 additions & 0 deletions src/Plaid/Entity/CreditBankStatementUploadTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ public record CreditBankStatementUploadTransaction
/// </summary>
[JsonPropertyName("original_description")]
public string? OriginalDescription { get; init; } = default!;

/// <summary>
/// <para>The unique id of the bank account that this transaction occurs in</para>
/// </summary>
[JsonPropertyName("account_id")]
public string? AccountId { get; init; } = default!;
}
2 changes: 1 addition & 1 deletion src/Plaid/Entity/CreditDocumentMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public record CreditDocumentMetadata
public string? DocumentType { get; init; } = default!;

/// <summary>
/// <para>Signed URL to retrieve the underlying file. This download URL can only be used once. To generate a new download URL, call <c>/credit/payroll_income/get</c> again.</para>
/// <para>Signed URL to retrieve the underlying file. This download URL can only be used once and expires after two minutes. To generate a new download URL, call <c>/credit/payroll_income/get</c> again.</para>
/// </summary>
[JsonPropertyName("download_url")]
public string? DownloadUrl { get; init; } = default!;
Expand Down
59 changes: 59 additions & 0 deletions src/Plaid/Entity/IdentityVerificationCreateRequestUser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>User information collected outside of Link, most likely via your own onboarding process.</para>
/// <para>Each of the following identity fields are optional:</para>
/// <para><c>email_address</c></para>
/// <para><c>phone_number</c></para>
/// <para><c>date_of_birth</c></para>
/// <para><c>name</c></para>
/// <para><c>address</c></para>
/// <para><c>id_number</c></para>
/// <para>Specifically, these fields are optional in that they can either be fully provided (satisfying every required field in their subschema) or omitted from the request entirely by not providing the key or value.</para>
/// <para>Providing these fields via the API will result in Link skipping the data collection process for the associated user. All verification steps enabled in the associated Identity Verification Template will still be run. Verification steps will either be run immediately, or once the user completes the <c>accept_tos</c> step, depending on the value provided to the <c>gave_consent</c> field.</para>
/// <para>If you are not using the shareable URL feature, you can optionally provide these fields via <c>/link/token/create</c> instead; both <c>/identity_verification/create</c> and <c>/link/token/create</c> are valid ways to provide this information. Note that if you provide a non-<c>null</c> user data object via <c>/identity_verification/create</c>, any user data fields entered via <c>/link/token/create</c> for the same <c>client_user_id</c> will be ignored when prefilling Link.</para>
/// </summary>
public class IdentityVerificationCreateRequestUser
{
/// <summary>
/// <para>A valid email address.</para>
/// </summary>
[JsonPropertyName("email_address")]
public string? EmailAddress { get; set; } = default!;

/// <summary>
/// <para>A phone number in E.164 format.</para>
/// </summary>
[JsonPropertyName("phone_number")]
public string? PhoneNumber { get; set; } = default!;

/// <summary>
/// <para>A date in the format YYYY-MM-DD (RFC 3339 Section 5.6).</para>
/// </summary>
[JsonPropertyName("date_of_birth")]
public DateOnly? DateOfBirth { get; set; } = default!;

/// <summary>
/// <para>You can use this field to pre-populate the user's legal name; if it is provided here, they will not be prompted to enter their name in the identity verification attempt.</para>
/// </summary>
[JsonPropertyName("name")]
public Entity.IdentityVerificationRequestUserName? Name { get; set; } = default!;

/// <summary>
/// <para>Home address for the user.</para>
/// </summary>
[JsonPropertyName("address")]
public Entity.UserAddress? Address { get; set; } = default!;

/// <summary>
/// <para>ID number submitted by the user, currently used only for the Identity Verification product. If the user has not submitted this data yet, this field will be <c>null</c>. Otherwise, both fields are guaranteed to be filled.</para>
/// </summary>
[JsonPropertyName("id_number")]
public Entity.UserIDNumber? IdNumber { get; set; } = default!;

/// <summary>
/// <para>Specifying <c>user.client_user_id</c> is deprecated. Please provide <c>client_user_id</c> at the root level instead.</para>
/// </summary>
[JsonPropertyName("client_user_id")]
public string? ClientUserId { get; set; } = default!;
}
7 changes: 0 additions & 7 deletions src/Plaid/Entity/IdentityVerificationRequestUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,9 @@ namespace Going.Plaid.Entity;
/// <para><c>id_number</c></para>
/// <para>Specifically, these fields are optional in that they can either be fully provided (satisfying every required field in their subschema) or omitted from the request entirely by not providing the key or value.</para>
/// <para>Providing these fields via the API will result in Link skipping the data collection process for the associated user. All verification steps enabled in the associated Identity Verification Template will still be run. Verification steps will either be run immediately, or once the user completes the <c>accept_tos</c> step, depending on the value provided to the <c>gave_consent</c> field.</para>
/// <para>If you are not using the shareable URL feature, you can optionally provide these fields via <c>/link/token/create</c> instead; both <c>/identity_verification/create</c> and <c>/link/token/create</c> are valid ways to provide this information. Note that if you provide a non-<c>null</c> user data object via <c>/identity_verification/create</c>, any user data fields entered via <c>/link/token/create</c> for the same <c>client_user_id</c> will be ignored when prefilling Link.</para>
/// </summary>
public class IdentityVerificationRequestUser
{
/// <summary>
/// <para>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 <c>client_user_id</c> to be consistent. Personally identifiable information, such as an email address or phone number, should not be used in the <c>client_user_id</c>.</para>
/// </summary>
[JsonPropertyName("client_user_id")]
public string ClientUserId { get; set; } = default!;

/// <summary>
/// <para>A valid email address.</para>
/// </summary>
Expand Down
6 changes: 6 additions & 0 deletions src/Plaid/Entity/RiskCheckDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ public record RiskCheckDetails
/// </summary>
[JsonPropertyName("devices")]
public IReadOnlyList<Entity.RiskCheckDevice> Devices { get; init; } = default!;

/// <summary>
/// <para>Result summary object capturing abuse signals related to <c>identity abuse</c>, e.g. stolen and synthetic identity fraud.</para>
/// </summary>
[JsonPropertyName("identity_abuse_signals")]
public Entity.RiskCheckIdentityAbuseSignals? IdentityAbuseSignals { get; init; } = default!;
}
23 changes: 23 additions & 0 deletions src/Plaid/Entity/RiskCheckIdentityAbuseSignals.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>Result summary object capturing abuse signals related to <c>identity abuse</c>, e.g. stolen and synthetic identity fraud.</para>
/// </summary>
public record RiskCheckIdentityAbuseSignals
{
/// <summary>
/// <para>Field containing the data used in determining the outcome of the synthetic identity risk check.</para>
/// <para>Contains the following fields:</para>
/// <para><c>score</c> - A score from 0 to 100 indicating the likelihood that the user is a synthetic identity.</para>
/// </summary>
[JsonPropertyName("synthetic_identity")]
public Entity.RiskCheckSyntheticIdentity? SyntheticIdentity { get; init; } = default!;

/// <summary>
/// <para>Field containing the data used in determining the outcome of the stolen identity risk check.</para>
/// <para>Contains the following fields:</para>
/// <para><c>score</c> - A score from 0 to 100 indicating the likelihood that the user is a stolen identity.</para>
/// </summary>
[JsonPropertyName("stolen_identity")]
public Entity.RiskCheckStolenIdentity? StolenIdentity { get; init; } = default!;
}
15 changes: 15 additions & 0 deletions src/Plaid/Entity/RiskCheckStolenIdentity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>Field containing the data used in determining the outcome of the stolen identity risk check.</para>
/// <para>Contains the following fields:</para>
/// <para><c>score</c> - A score from 0 to 100 indicating the likelihood that the user is a stolen identity.</para>
/// </summary>
public record RiskCheckStolenIdentity
{
/// <summary>
/// <para>A score from 0 to 100 indicating the likelihood that the user is a stolen identity.</para>
/// </summary>
[JsonPropertyName("score")]
public int? Score { get; init; } = default!;
}
15 changes: 15 additions & 0 deletions src/Plaid/Entity/RiskCheckSyntheticIdentity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>Field containing the data used in determining the outcome of the synthetic identity risk check.</para>
/// <para>Contains the following fields:</para>
/// <para><c>score</c> - A score from 0 to 100 indicating the likelihood that the user is a synthetic identity.</para>
/// </summary>
public record RiskCheckSyntheticIdentity
{
/// <summary>
/// <para>A score from 0 to 100 indicating the likelihood that the user is a synthetic identity.</para>
/// </summary>
[JsonPropertyName("score")]
public int? Score { get; init; } = default!;
}
25 changes: 25 additions & 0 deletions src/Plaid/Entity/SandboxBankIncomeWebhookFireRequestWebhookCode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>The webhook codes this endpoint can be used to test</para>
/// </summary>
public enum SandboxBankIncomeWebhookFireRequestWebhookCode
{
/// <summary>
///
/// </summary>
[EnumMember(Value = "BANK_INCOME_REFRESH_UPDATE")]
BankIncomeRefreshUpdate,

/// <summary>
///
/// </summary>
[EnumMember(Value = "BANK_INCOME_REFRESH_COMPLETE")]
BankIncomeRefreshComplete,

/// <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
@@ -0,0 +1,19 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>Optional fields which will be populated in the simulated webhook</para>
/// </summary>
public class SandboxBankIncomeWebhookFireRequestWebhookFields
{
/// <summary>
/// <para>The user id to be returned in INCOME webhooks</para>
/// </summary>
[JsonPropertyName("user_id")]
public string UserId { get; set; } = default!;

/// <summary>
/// <para>The result of the bank income refresh report generation</para>
/// </summary>
[JsonPropertyName("bank_income_refresh_complete_result")]
public Entity.BankIncomeRefreshCompleteResult? BankIncomeRefreshCompleteResult { get; set; } = default!;
}
Loading

0 comments on commit cb47d81

Please sign in to comment.