Skip to content

Commit

Permalink
Update to Plaid v1.474.3
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin committed Nov 30, 2023
1 parent cbb61a1 commit 45f40d1
Show file tree
Hide file tree
Showing 16 changed files with 150 additions and 40 deletions.
2 changes: 1 addition & 1 deletion plaid-openapi
Submodule plaid-openapi updated 2 files
+149 −6 2020-09-14.yml
+10 −0 CHANGELOG.md
13 changes: 13 additions & 0 deletions src/Plaid/Beacon/BeaconReportGetRequest.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</para>
/// </summary>
public partial class BeaconReportGetRequest : RequestBase
{
/// <summary>
/// <para>ID of the associated Beacon Report.</para>
/// </summary>
[JsonPropertyName("beacon_report_id")]
public string BeaconReportId { get; set; } = default!;
}
53 changes: 53 additions & 0 deletions src/Plaid/Beacon/BeaconReportGetResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
namespace Going.Plaid.Beacon;

/// <summary>
/// <para>A Beacon Report describes the type of fraud committed by a user as well as the date the fraud was committed and the total amount of money lost due to the fraud incident.</para>
/// <para>This information is used to block similar fraud attempts on your platform as well as alert other companies who screen a user with matching identity information.</para>
/// <para>Other companies will not receive any new identity information, just what matched, plus information such as industry, type of fraud, and date of fraud.</para>
/// <para>You can manage your fraud reports by adding, deleting, or editing reports as you get additional information on fraudulent users.</para>
/// </summary>
public record BeaconReportGetResponse : ResponseBase
{
/// <summary>
/// <para>ID of the associated Beacon Report.</para>
/// </summary>
[JsonPropertyName("id")]
public string Id { get; init; } = default!;

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

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

/// <summary>
/// <para>The type of Beacon Report.</para>
/// </summary>
[JsonPropertyName("type")]
public Entity.BeaconReportType Type { get; init; } = default!;

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

/// <summary>
/// <para>The amount and currency of the fraud or attempted fraud.</para>
/// <para><c>fraud_amount</c> should be omitted to indicate an unknown fraud amount.</para>
/// </summary>
[JsonPropertyName("fraud_amount")]
public Entity.FraudAmount? FraudAmount { 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!;
}
8 changes: 8 additions & 0 deletions src/Plaid/Beacon/PlaidClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,12 @@ public sealed partial class PlaidClient
public Task<Beacon.BeaconReportSyndicationListResponse> BeaconReportSyndicationListAsync(Beacon.BeaconReportSyndicationListRequest request) =>
PostAsync("/beacon/report_syndication/list", request)
.ParseResponseAsync<Beacon.BeaconReportSyndicationListResponse>();

/// <summary>
/// <para>Returns a Beacon report for a given Beacon report id.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docs/api/products/beacon/#beaconreportget" /></remarks>
public Task<Beacon.BeaconReportGetResponse> BeaconReportGetAsync(Beacon.BeaconReportGetRequest request) =>
PostAsync("/beacon/report/get", request)
.ParseResponseAsync<Beacon.BeaconReportGetResponse>();
}
1 change: 1 addition & 0 deletions src/Plaid/Converters/WebhookBaseConverter.Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,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.DashboardConfiguredAlert, WebhookCode.InstitutionStatusAlertTriggered)] = typeof(InstitutionStatusAlertWebhook),
[(WebhookType.Assets, WebhookCode.ProductReady)] = typeof(AssetsProductReadyWebhook),
[(WebhookType.Assets, WebhookCode.Error)] = typeof(AssetsErrorWebhook),
Expand Down
13 changes: 13 additions & 0 deletions src/Plaid/Entity/LinkTokenCreateCardSwitch.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>A map containing data to pass in for the Card Switch flow.</para>
/// </summary>
public class LinkTokenCreateCardSwitch
{
/// <summary>
/// <para>The BIN (Bank Identification Number) of the card to switch.</para>
/// </summary>
[JsonPropertyName("card_bin")]
public string CardBin { get; set; } = default!;
}
6 changes: 6 additions & 0 deletions src/Plaid/Entity/Products.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public enum Products
[EnumMember(Value = "identity")]
Identity,

/// <summary>
///
/// </summary>
[EnumMember(Value = "identity_match")]
IdentityMatch,

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

/// <summary>
/// <para>If Transactions has not already been added to the Item, this option controls the maximum number of days of transaction history Plaid will request from the financial institution. If Transactions has already been added to the Item, this field will have no effect.</para>
/// <para>This option only applies to calls for Items that were not initialized with Transactions during Link and are now adding the Transactions product to the Item for the first time. In these cases, this option controls the maximum number of days of transaction history that Plaid will request from the financial institution. For developer accounts created after December 3, 2023, if no value is specified, this will default to 90 days. For developer accounts created on December 3, 2023 or earlier, if no value is specified, this will default to 730 days until June 24, 2024, at which point it will default to 90 days.</para>
/// <para>If Transactions has already been added to the Item prior to this call, this field will have no effect.</para>
/// </summary>
[JsonPropertyName("days_requested")]
public int? DaysRequested { get; set; } = default!;
Expand Down
3 changes: 2 additions & 1 deletion src/Plaid/Entity/TransactionsSyncRequestOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public class TransactionsSyncRequestOptions
public bool? IncludeLogoAndCounterpartyBeta { get; set; } = default!;

/// <summary>
/// <para>If Transactions has not already been added to the Item, this option controls the maximum number of days of transaction history Plaid will request from the financial institution. If Transactions has already been added to the Item, this field will have no effect.</para>
/// <para>This option only applies to calls for Items that were not initialized with Transactions during Link and are now adding the Transactions product to the Item for the first time. In these cases, this option controls the maximum number of days of transaction history that Plaid will request from the financial institution. For developer accounts created after December 3, 2023, if no value is specified, this will default to 90 days. For developer accounts created on December 3, 2023 or earlier, if no value is specified, this will default to 730 days until June 24, 2024, at which point it will default to 90 days.</para>
/// <para>If Transactions has already been added to the Item prior to this call, this field will have no effect.</para>
/// </summary>
[JsonPropertyName("days_requested")]
public int? DaysRequested { get; set; } = default!;
Expand Down
4 changes: 2 additions & 2 deletions src/Plaid/Entity/Transfer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ public record Transfer
public IReadOnlyList<Entity.TransferExpectedSweepSettlementScheduleItem>? ExpectedSweepSettlementSchedule { get; init; } = default!;

/// <summary>
/// <para>Specifies the source of funds for the transfer. Only valid for <c>credit</c> transfers, and defaults to <c>sweep</c> if not specified. This field is not specified for <c>debit</c> transfers.</para>
///
/// </summary>
[JsonPropertyName("credit_funds_source")]
public Entity.TransferCreditFundsSource? CreditFundsSource { get; init; } = default!;
public string CreditFundsSource { get; init; } = default!;

/// <summary>
/// <para>The amount to deduct from <c>transfer.amount</c> and distribute to the platform’s Ledger balance as a facilitator fee (decimal string with two digits of precision e.g. "10.00"). The remainder will go to the end-customer’s Ledger balance. This must be less than or equal to the <c>transfer.amount</c>.</para>
Expand Down
4 changes: 2 additions & 2 deletions src/Plaid/Entity/TransferAuthorizationProposedTransfer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public record TransferAuthorizationProposedTransfer
public string? OriginatorClientId { get; init; } = default!;

/// <summary>
/// <para>Specifies the source of funds for the transfer. Only valid for <c>credit</c> transfers, and defaults to <c>sweep</c> if not specified. This field is not specified for <c>debit</c> transfers.</para>
///
/// </summary>
[JsonPropertyName("credit_funds_source")]
public Entity.TransferCreditFundsSource? CreditFundsSource { get; init; } = default!;
public string CreditFundsSource { get; init; } = default!;
}
31 changes: 0 additions & 31 deletions src/Plaid/Entity/TransferCreditFundsSource.cs

This file was deleted.

6 changes: 6 additions & 0 deletions src/Plaid/Entity/WebhookCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@ public enum WebhookCode
[EnumMember(Value = "SESSION_FINISHED")]
SessionFinished,

/// <summary>
///
/// </summary>
[EnumMember(Value = "HOSTED_VERIFICATION")]
HostedVerification,

/// <summary>
///
/// </summary>
Expand Down
6 changes: 6 additions & 0 deletions src/Plaid/Link/LinkTokenCreateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ public partial class LinkTokenCreateRequest : RequestBase
[JsonPropertyName("institution_data")]
public Entity.LinkTokenCreateInstitutionData? InstitutionData { get; set; } = default!;

/// <summary>
/// <para>A map containing data to pass in for the Card Switch flow.</para>
/// </summary>
[JsonPropertyName("card_switch")]
public Entity.LinkTokenCreateCardSwitch? CardSwitch { get; set; } = default!;

/// <summary>
/// <para>By default, Link will provide limited account filtering: it will only display Institutions that are compatible with all products supplied in the <c>products</c> parameter of <c>/link/token/create</c>, and, if <c>auth</c> is specified in the <c>products</c> array, will also filter out accounts other than <c>checking</c> and <c>savings</c> accounts on the Account Select pane. You can further limit the accounts shown in Link by using <c>account_filters</c> to specify the account subtypes to be shown in Link. Only the specified subtypes will be shown. This filtering applies to both the Account Select view (if enabled) and the Institution Select view. Institutions that do not support the selected subtypes will be omitted from Link. To indicate that all subtypes should be shown, use the value <c>"all"</c>. If the <c>account_filters</c> filter is used, any account type for which a filter is not specified will be entirely omitted from Link. For a full list of valid types and subtypes, see the <a href="https://plaid.com/docs/api/accounts#account-type-schema">Account schema</a>.</para>
/// <para>The filter may or may not impact the list of accounts shown by the institution in the OAuth account selection flow, depending on the specific institution. If the user selects excluded account subtypes in the OAuth flow, these accounts will not be added to the Item. If the user selects only excluded account subtypes, the link attempt will fail and the user will be prompted to try again.</para>
Expand Down
4 changes: 2 additions & 2 deletions src/Plaid/Transfer/TransferAuthorizationCreateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ public partial class TransferAuthorizationCreateRequest : RequestBase
public string? OriginatorClientId { get; set; } = default!;

/// <summary>
/// <para>Specifies the source of funds for the transfer. Only valid for <c>credit</c> transfers, and defaults to <c>sweep</c> if not specified. This field is not specified for <c>debit</c> transfers.</para>
///
/// </summary>
[JsonPropertyName("credit_funds_source")]
public Entity.TransferCreditFundsSource? CreditFundsSource { get; set; } = default!;
public string? CreditFundsSource { get; set; } = default!;

/// <summary>
/// <para>Plaid’s unique identifier for a test clock. This field may only be used when using <c>sandbox</c> environment. If provided, the <c>authorization</c> is created at the <c>virtual_time</c> on the provided test clock.</para>
Expand Down
33 changes: 33 additions & 0 deletions src/Plaid/Webhook/HostedMMDVerificationWebhook.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace Going.Plaid.Webhook;

/// <summary>
/// <para>Contains the state of a hosted same-day microdeposits verification session.</para>
/// </summary>
public record HostedMMDVerificationWebhook : WebhookBase
{
/// <inheritdoc />
[JsonPropertyName("webhook_type")]
public override WebhookType WebhookType => WebhookType.Auth;

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

/// <summary>
/// <para>The final status of the same-day microdeposits verification. Will always be "MANUALLY_VERIFIED" or "VERIFICATION_FAILED".</para>
/// </summary>
[JsonPropertyName("status")]
public string Status { get; init; } = default!;

/// <summary>
/// <para>The <c>item_id</c> of the Item associated with this webhook, warning, or error</para>
/// </summary>
[JsonPropertyName("item_id")]
public string ItemId { get; init; } = default!;

/// <summary>
/// <para>The external account ID of the affected account</para>
/// </summary>
[JsonPropertyName("account_id")]
public string AccountId { get; init; } = default!;
}

0 comments on commit 45f40d1

Please sign in to comment.