Skip to content

Commit

Permalink
Update to Plaid v1.482.3
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin committed Dec 21, 2023
1 parent 7191a34 commit ec01acb
Show file tree
Hide file tree
Showing 56 changed files with 563 additions and 40 deletions.
2 changes: 1 addition & 1 deletion plaid-openapi
Submodule plaid-openapi updated 3 files
+728 −159 2020-09-14.yml
+61 −1 CHANGELOG.md
+1 −1 README.md
6 changes: 6 additions & 0 deletions src/Plaid/Accounts/AccountsBalanceGetRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ public partial class AccountsBalanceGetRequest : RequestBase
/// </summary>
[JsonPropertyName("options")]
public Entity.AccountsBalanceGetRequestOptions? Options { get; set; } = default!;

/// <summary>
/// <para>An optional object containing payment details. If set, a payment risk assessment is performed and returned as AccountsBalanceGetResponsePaymentRiskAssessment.</para>
/// </summary>
[JsonPropertyName("payment_details")]
public Entity.AccountsBalanceGetRequestPaymentDetails? PaymentDetails { get; set; } = default!;
}
6 changes: 6 additions & 0 deletions src/Plaid/Accounts/AccountsGetResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ public record AccountsGetResponse : ResponseBase
/// </summary>
[JsonPropertyName("item")]
public Entity.Item Item { get; init; } = default!;

/// <summary>
/// <para>This object provides detailed risk assessment for the requested transaction</para>
/// </summary>
[JsonPropertyName("payment_risk_assessment")]
public Entity.AccountsBalanceGetResponsePaymentRiskAssessment? PaymentRiskAssessment { get; init; } = default!;
}
13 changes: 13 additions & 0 deletions src/Plaid/Beacon/BeaconReportSyndicationGetRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Going.Plaid.Beacon;

/// <summary>
/// <para>Request input for getting a Beacon Report Syndication</para>
/// </summary>
public partial class BeaconReportSyndicationGetRequest : RequestBase
{
/// <summary>
/// <para>ID of the associated Beacon Report Syndication.</para>
/// </summary>
[JsonPropertyName("beacon_report_syndication_id")]
public string BeaconReportSyndicationId { get; set; } = default!;
}
28 changes: 28 additions & 0 deletions src/Plaid/Beacon/BeaconReportSyndicationGetResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace Going.Plaid.Beacon;

/// <summary>
/// <para>A Beacon Report Syndication represents a Beacon Report created either by your organization or another Beacon customer that matches a specific Beacon User you've created.</para>
/// <para>The <c>analysis</c> field in the response indicates which fields matched between the originally reported Beacon User and the Beacon User that the report was syndicated to.</para>
/// <para>The <c>report</c> field in the response contains a subset of information from the original report.</para>
/// </summary>
public record BeaconReportSyndicationGetResponse : ResponseBase
{
/// <summary>
/// <para>ID of the associated Beacon Report Syndication.</para>
/// </summary>
[JsonPropertyName("id")]
public string Id { get; init; } = default!;

/// <summary>
/// <para>A subset of information from a Beacon Report that has been syndicated to a matching Beacon User in your program.</para>
/// <para>The <c>id</c> field in the response is the ID of the original report that was syndicated. If the original report was created by your organization, the field will be filled with the ID of the report. Otherwise, the field will be <c>null</c> indicating that the original report was created by another Beacon customer.</para>
/// </summary>
[JsonPropertyName("report")]
public Entity.BeaconReportSyndicationOriginalReport Report { get; init; } = default!;

/// <summary>
/// <para>Analysis of which fields matched between the originally reported Beacon User and the Beacon User that the report was syndicated to.</para>
/// </summary>
[JsonPropertyName("analysis")]
public Entity.BeaconReportSyndicationAnalysis Analysis { get; init; } = default!;
}
19 changes: 19 additions & 0 deletions src/Plaid/Beacon/BeaconUserUpdateRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace Going.Plaid.Beacon;

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

/// <summary>
/// <para>A subset of a Beacon User's data which is used to patch the existing identity data associated with a Beacon User. At least one field must be provided,.</para>
/// </summary>
[JsonPropertyName("user")]
public Entity.BeaconUserUpdateRequestData User { get; set; } = default!;
}
55 changes: 55 additions & 0 deletions src/Plaid/Beacon/BeaconUserUpdateResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
namespace Going.Plaid.Beacon;

/// <summary>
/// <para>A Beacon User represents an end user that has been scanned against the Beacon Network.</para>
/// </summary>
public record BeaconUserUpdateResponse : ResponseBase
{
/// <summary>
/// <para>ID of the associated Beacon User.</para>
/// </summary>
[JsonPropertyName("id")]
public string Id { get; init; } = default!;

/// <summary>
/// <para>An ISO8601 formatted timestamp.</para>
/// </summary>
[JsonPropertyName("created_at")]
public DateTimeOffset CreatedAt { get; init; } = default!;

/// <summary>
/// <para>An ISO8601 formatted timestamp. This field indicates the last time the resource was modified.</para>
/// </summary>
[JsonPropertyName("updated_at")]
public DateTimeOffset UpdatedAt { get; init; } = default!;

/// <summary>
/// <para>A status of a Beacon User.</para>
/// </summary>
[JsonPropertyName("status")]
public Entity.BeaconUserStatus Status { get; init; } = default!;

/// <summary>
/// <para>ID of the associated Beacon Program.</para>
/// </summary>
[JsonPropertyName("program_id")]
public string ProgramId { get; init; } = default!;

/// <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 <c>/link/token/create</c> <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; init; } = default!;

/// <summary>
/// <para>A Beacon User's data and resulting analysis when checked against duplicate records and the Beacon Fraud Network.</para>
/// </summary>
[JsonPropertyName("user")]
public Entity.BeaconUserData User { get; init; } = default!;

/// <summary>
/// <para>Information about the last change made to the parent object specifying what caused the change as well as when it occurred.</para>
/// </summary>
[JsonPropertyName("audit_trail")]
public Entity.BeaconAuditTrail AuditTrail { get; init; } = default!;
}
21 changes: 21 additions & 0 deletions src/Plaid/Beacon/PlaidClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,25 @@ public sealed partial class PlaidClient
public Task<Beacon.BeaconReportGetResponse> BeaconReportGetAsync(Beacon.BeaconReportGetRequest request) =>
PostAsync("/beacon/report/get", request)
.ParseResponseAsync<Beacon.BeaconReportGetResponse>();

/// <summary>
/// <para>Returns a Beacon Report Syndication for a given Beacon Report Syndication id.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docs/api/products/beacon/#beaconreportsyndicationget" /></remarks>
public Task<Beacon.BeaconReportSyndicationGetResponse> BeaconReportSyndicationGetAsync(Beacon.BeaconReportSyndicationGetRequest request) =>
PostAsync("/beacon/report_syndication/get", request)
.ParseResponseAsync<Beacon.BeaconReportSyndicationGetResponse>();

/// <summary>
/// <para>Update the identity data for a Beacon User in your Beacon Program.</para>
/// <para>Similar to <c>/beacon/user/create</c>, several checks are performed immediately when you submit a change to <c>/beacon/user/update</c>:</para>
/// <para> - The user's updated PII is searched against all other users within the Beacon Program you specified. If a match is found that violates your program's "Duplicate Information Filtering" settings, the user will be returned with a status of <c>pending_review</c>.</para>
/// <para> - The user's updated PII is also searched against all fraud reports created by your organization across all of your Beacon Programs. If the user's data matches a fraud report that your team created, the user will be returned with a status of <c>rejected</c>.</para>
/// <para> - Finally, the user's PII is searched against all fraud report shared with the Beacon Network by other companies. If a matching fraud report is found, the user will be returned with a <c>pending_review</c> status if your program has enabled automatic flagging based on network fraud.</para>
/// <para>Plaid maintains a version history for each Beacon User, so the Beacon User's identity data before and after the update is retained as separate versions.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docs/api/products/beacon/#beaconuserupdate" /></remarks>
public Task<Beacon.BeaconUserUpdateResponse> BeaconUserUpdateAsync(Beacon.BeaconUserUpdateRequest request) =>
PostAsync("/beacon/user/update", request)
.ParseResponseAsync<Beacon.BeaconUserUpdateResponse>();
}
2 changes: 2 additions & 0 deletions src/Plaid/Converters/WebhookBaseConverter.Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ 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.Item, WebhookCode.UserAccountRevoked)] = typeof(UserAccountRevokedWebhook),
[(WebhookType.Statements, WebhookCode.StatementsRefreshComplete)] = typeof(StatementsRefreshCompleteWebhook),
[(WebhookType.BaseReport, WebhookCode.ProductReady)] = typeof(BaseReportsProductReadyWebhook),
[(WebhookType.BaseReport, WebhookCode.Error)] = typeof(BaseReportsErrorWebhook),
[(WebhookType.CraIncome, WebhookCode.BankIncomeComplete)] = typeof(CraBankIncomeCompleteWebhook),
Expand Down
6 changes: 6 additions & 0 deletions src/Plaid/Entity/AccountIdentity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,10 @@ public record AccountIdentity
/// </summary>
[JsonPropertyName("owners")]
public IReadOnlyList<Entity.Owner>? Owners { get; init; } = default!;

/// <summary>
/// <para>Array of documents that identity data is dervied from. This array will be empty if none of the account identity is from a document.</para>
/// </summary>
[JsonPropertyName("documents")]
public IReadOnlyList<Entity.IdentityDocument>? Documents { get; init; } = default!;
}
32 changes: 32 additions & 0 deletions src/Plaid/Entity/AccountsBalanceGetRequestPaymentDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>An optional object containing payment details. If set, a payment risk assessment is performed and returned as AccountsBalanceGetResponsePaymentRiskAssessment.</para>
/// </summary>
public class AccountsBalanceGetRequestPaymentDetails
{
/// <summary>
/// <para>The Plaid <c>account_id</c> of the account that is the funding source for the proposed transaction. The <c>account_id</c> is returned in the <c>/accounts/get</c> endpoint as well as the <a href="https://plaid.com/docs/link/ios/#link-ios-onsuccess-linkSuccess-metadata-accounts-id"><c>onSuccess</c></a> callback metadata.</para>
/// <para>This will return an <a href="https://plaid.com/docs/errors/invalid-input/#invalid_account_id"><c>INVALID_ACCOUNT_ID</c></a> error if the account has been removed at the bank or if the <c>account_id</c> is no longer valid.</para>
/// </summary>
[JsonPropertyName("account_id")]
public string? AccountId { get; set; } = default!;

/// <summary>
/// <para>The unique ID that you would like to use to refer to this transaction. For your convenience mapping your internal data, you could use your internal identifier for this transaction. The max length for this field is 36 characters.</para>
/// </summary>
[JsonPropertyName("client_transaction_id")]
public string? ClientTransactionId { get; set; } = default!;

/// <summary>
/// <para>The transaction amount, in USD (e.g. <c>102.05</c>)</para>
/// </summary>
[JsonPropertyName("amount")]
public decimal? Amount { get; set; } = default!;

/// <summary>
/// <para>The threshold percentage of the account balance used for comparison with the requested ACH debit amount.</para>
/// </summary>
[JsonPropertyName("balance_threshold_percentage")]
public int? BalanceThresholdPercentage { get; set; } = default!;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>This object provides detailed risk assessment for the requested transaction</para>
/// </summary>
public record AccountsBalanceGetResponsePaymentRiskAssessment
{
/// <summary>
/// <para>A five-tier risk assessment for the transaction based on the probability of return.</para>
/// </summary>
[JsonPropertyName("risk_level")]
public string? RiskLevel { get; init; } = default!;

/// <summary>
/// <para>Indicates whether the requested ACH debit amount is greater than the threshold (set by customers) of the available or current balance.</para>
/// </summary>
[JsonPropertyName("exceeds_balance_threshold")]
public bool? ExceedsBalanceThreshold { get; init; } = default!;
}
2 changes: 1 addition & 1 deletion src/Plaid/Entity/AssetReportAddOns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public enum AssetReportAddOns
Investments,

/// <summary>
/// <para>When Fast Assets is requested, Plaid will create two versions of the Asset Report: the Fast Asset Report, which will contain only Identity and Balance information, and the Full Asset Report, which will also contain Transactions information. A <c>PRODUCT_READY</c> webhook will be fired for each Asset Report when it is ready, and the <c>report_type</c> field will indicate whether the webhook is firing for the <c>full</c> or <c>fast</c> Asset Report. To retrieve the Fast Asset Report, call <c>/asset_report/get</c> with <c>fast_report</c> set to <c>true</c>. There is no additional charge for using Fast Assets.</para>
/// <para>When Fast Assets is requested, Plaid will create two versions of the Asset Report: the Fast Asset Report, which will contain only Identity and Balance information, and the Full Asset Report, which will also contain Transactions information. A <c>PRODUCT_READY</c> webhook will be fired for each Asset Report when it is ready, and the <c>report_type</c> field will indicate whether the webhook is firing for the <c>full</c> or <c>fast</c> Asset Report. To retrieve the Fast Asset Report, call <c>/asset_report/get</c> with <c>fast_report</c> set to <c>true</c>. There is no additional charge for using Fast Assets. To create a Fast Asset Report, Plaid must successfully retrieve both Identity and Balance data; if Plaid encounters an error obtaining this data, the Fast Asset Report will not be created. However, as long as Plaid can obtain Transactions data, the Full Asset Report will still be available.</para>
/// </summary>
[EnumMember(Value = "fast_assets")]
FastAssets,
Expand Down
2 changes: 1 addition & 1 deletion src/Plaid/Entity/BeaconUserData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public record BeaconUserData
/// <para>The ID number associated with a Beacon User.</para>
/// </summary>
[JsonPropertyName("id_number")]
public Entity.BeaconUserIDNumber IdNumber { get; init; } = default!;
public Entity.BeaconUserIDNumber? IdNumber { get; init; } = default!;

/// <summary>
/// <para>An IPv4 or IPV6 address.</para>
Expand Down
49 changes: 49 additions & 0 deletions src/Plaid/Entity/BeaconUserUpdateRequestData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>A subset of a Beacon User's data which is used to patch the existing identity data associated with a Beacon User. At least one field must be provided,.</para>
/// </summary>
public class BeaconUserUpdateRequestData
{
/// <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>The full name for a given Beacon User.</para>
/// </summary>
[JsonPropertyName("name")]
public Entity.BeaconUserName? Name { get; set; } = default!;

/// <summary>
/// <para>Home address for the associated user. For more context on this field, see <a href="https://plaid.com/docs/identity-verification/hybrid-input-validation/#input-validation-by-country">Input Validation by Country</a>.</para>
/// </summary>
[JsonPropertyName("address")]
public Entity.BeaconUserRequestAddress? Address { get; set; } = default!;

/// <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>The ID number associated with a Beacon User.</para>
/// </summary>
[JsonPropertyName("id_number")]
public Entity.BeaconUserIDNumber? IdNumber { get; set; } = default!;

/// <summary>
/// <para>An IPv4 or IPV6 address.</para>
/// </summary>
[JsonPropertyName("ip_address")]
public string? IpAddress { get; set; } = default!;
}
6 changes: 6 additions & 0 deletions src/Plaid/Entity/Enrichments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ public record Enrichments
[JsonPropertyName("payment_channel")]
public Entity.PaymentChannel PaymentChannel { get; init; } = default!;

/// <summary>
/// <para>The phone number associated with the primary_counterparty in E. 164 format. If there is a location match (i.e. a street address is returned in the location object), the phone number will be location specific.</para>
/// </summary>
[JsonPropertyName("phone_number")]
public string? PhoneNumber { get; init; } = default!;

/// <summary>
/// <para>Information describing the intent of the transaction. Most relevant for personal finance use cases, but not limited to such use cases.</para>
/// <para>See the <a href="https://plaid.com/documents/transactions-personal-finance-category-taxonomy.csv"><c>taxonomy CSV file</c></a> for a full list of personal finance categories. If you are migrating to personal finance categories from the legacy categories, also refer to the <a href="https://plaid.com/docs/transactions/pfc-migration/"><c>migration guide</c></a>.</para>
Expand Down
19 changes: 19 additions & 0 deletions src/Plaid/Entity/IdentityDocument.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>Document object with metadata of the document uploaded</para>
/// </summary>
public record IdentityDocument
{
/// <summary>
/// <para>In closed beta. Object representing metadata pertaining to the document.</para>
/// </summary>
[JsonPropertyName("metadata")]
public Entity.IdentityDocumentMetadata? Metadata { get; init; } = default!;

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

0 comments on commit ec01acb

Please sign in to comment.