diff --git a/plaid-openapi b/plaid-openapi index aeaec3af..e5d64a19 160000 --- a/plaid-openapi +++ b/plaid-openapi @@ -1 +1 @@ -Subproject commit aeaec3af0eee2d0c38168c57fd25e253d1283a06 +Subproject commit e5d64a1986f7e62ccfd0bc939db94384463358f7 diff --git a/src/Plaid/Converters/WebhookBaseConverter.Map.cs b/src/Plaid/Converters/WebhookBaseConverter.Map.cs index e38612eb..63ce106b 100644 --- a/src/Plaid/Converters/WebhookBaseConverter.Map.cs +++ b/src/Plaid/Converters/WebhookBaseConverter.Map.cs @@ -11,6 +11,10 @@ public partial class WebhookBaseConverter : JsonConverter [(WebhookType.Screening, WebhookCode.StatusUpdated)] = typeof(ScreeningStatusUpdatedWebhook), [(WebhookType.EntityScreening, WebhookCode.StatusUpdated)] = typeof(EntityScreeningStatusUpdatedWebhook), [(WebhookType.Beacon, WebhookCode.UserStatusUpdated)] = typeof(BeaconUserStatusUpdatedWebhook), + [(WebhookType.Beacon, WebhookCode.ReportCreated)] = typeof(BeaconReportCreatedWebhook), + [(WebhookType.Beacon, WebhookCode.ReportUpdated)] = typeof(BeaconReportUpdatedWebhook), + [(WebhookType.Beacon, WebhookCode.ReportSyndicationCreated)] = typeof(BeaconReportSyndicationCreatedWebhook), + [(WebhookType.Beacon, WebhookCode.DuplicateDetected)] = typeof(BeaconDuplicateDetectedWebhook), [(WebhookType.IdentityVerification, WebhookCode.StepUpdated)] = typeof(IdentityVerificationStepUpdatedWebhook), [(WebhookType.IdentityVerification, WebhookCode.Retried)] = typeof(IdentityVerificationRetriedWebhook), [(WebhookType.IdentityVerification, WebhookCode.StatusUpdated)] = typeof(IdentityVerificationStatusUpdatedWebhook), diff --git a/src/Plaid/Entity/LinkTokenCreateRequestStatements.cs b/src/Plaid/Entity/LinkTokenCreateRequestStatements.cs index dc02d812..89840d92 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestStatements.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestStatements.cs @@ -12,7 +12,7 @@ public class LinkTokenCreateRequestStatements public DateOnly? StartDate { get; set; } = default!; /// - /// The end date for statements, in ISO 8601 “YYYY-MM-DD” format, e.g. "2020-10-30". If no value is provided, this will default to the current date. + /// The end date for statements, in ISO 8601 “YYYY-MM-DD” format, e.g. "2020-10-30". If no value is provided, this will default to the current date. You can request up to two years of data. /// [JsonPropertyName("end_date")] public DateOnly? EndDate { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenTransactions.cs b/src/Plaid/Entity/LinkTokenTransactions.cs new file mode 100644 index 00000000..73e279d0 --- /dev/null +++ b/src/Plaid/Entity/LinkTokenTransactions.cs @@ -0,0 +1,13 @@ +namespace Going.Plaid.Entity; + +/// +/// Configuration parameters for the Transactions product +/// +public class LinkTokenTransactions +{ + /// + /// The maximum number of days of transaction history to request for the Transactions product. 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. + /// + [JsonPropertyName("days_requested")] + public int? DaysRequested { get; set; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs b/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs index deeeec8a..95072d9e 100644 --- a/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs +++ b/src/Plaid/Entity/ProcessorTokenCreateRequestProcessorEnum.cs @@ -257,6 +257,12 @@ public enum ProcessorTokenCreateRequestProcessorEnum [EnumMember(Value = "taba_pay")] TabaPay, + /// + /// + /// + [EnumMember(Value = "knot")] + Knot, + /// /// 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. /// diff --git a/src/Plaid/Entity/SandboxPublicTokenCreateRequestOptionsTransactions.cs b/src/Plaid/Entity/SandboxPublicTokenCreateRequestOptionsTransactions.cs index a967309e..c7b48131 100644 --- a/src/Plaid/Entity/SandboxPublicTokenCreateRequestOptionsTransactions.cs +++ b/src/Plaid/Entity/SandboxPublicTokenCreateRequestOptionsTransactions.cs @@ -16,4 +16,10 @@ public class SandboxPublicTokenCreateRequestOptionsTransactions /// [JsonPropertyName("end_date")] public DateOnly? EndDate { get; set; } = default!; + + /// + /// The maximum number of days of transaction history to request for the Transactions product. + /// + [JsonPropertyName("days_requested")] + public int? DaysRequested { get; set; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/TransactionsGetRequestOptions.cs b/src/Plaid/Entity/TransactionsGetRequestOptions.cs index b23a8d2f..61d5f401 100644 --- a/src/Plaid/Entity/TransactionsGetRequestOptions.cs +++ b/src/Plaid/Entity/TransactionsGetRequestOptions.cs @@ -47,4 +47,10 @@ public class TransactionsGetRequestOptions /// [JsonPropertyName("include_logo_and_counterparty_beta")] public bool? IncludeLogoAndCounterpartyBeta { get; set; } = default!; + + /// + /// 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. + /// + [JsonPropertyName("days_requested")] + public int? DaysRequested { get; set; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/TransactionsSyncRequestOptions.cs b/src/Plaid/Entity/TransactionsSyncRequestOptions.cs index 9f2c1062..dd56414e 100644 --- a/src/Plaid/Entity/TransactionsSyncRequestOptions.cs +++ b/src/Plaid/Entity/TransactionsSyncRequestOptions.cs @@ -22,4 +22,10 @@ public class TransactionsSyncRequestOptions /// [JsonPropertyName("include_logo_and_counterparty_beta")] public bool? IncludeLogoAndCounterpartyBeta { get; set; } = default!; + + /// + /// 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. + /// + [JsonPropertyName("days_requested")] + public int? DaysRequested { get; set; } = default!; } \ No newline at end of file diff --git a/src/Plaid/Entity/WebhookCode.cs b/src/Plaid/Entity/WebhookCode.cs index 8280412f..9c4206e1 100644 --- a/src/Plaid/Entity/WebhookCode.cs +++ b/src/Plaid/Entity/WebhookCode.cs @@ -17,6 +17,30 @@ public enum WebhookCode [EnumMember(Value = "USER_STATUS_UPDATED")] UserStatusUpdated, + /// + /// + /// + [EnumMember(Value = "REPORT_CREATED")] + ReportCreated, + + /// + /// + /// + [EnumMember(Value = "REPORT_UPDATED")] + ReportUpdated, + + /// + /// + /// + [EnumMember(Value = "REPORT_SYNDICATION_CREATED")] + ReportSyndicationCreated, + + /// + /// + /// + [EnumMember(Value = "DUPLICATE_DETECTED")] + DuplicateDetected, + /// /// /// diff --git a/src/Plaid/Link/LinkTokenCreateRequest.cs b/src/Plaid/Link/LinkTokenCreateRequest.cs index 635293d7..fc6a7b52 100644 --- a/src/Plaid/Link/LinkTokenCreateRequest.cs +++ b/src/Plaid/Link/LinkTokenCreateRequest.cs @@ -215,6 +215,12 @@ public partial class LinkTokenCreateRequest : RequestBase [JsonPropertyName("hosted_link")] public Entity.LinkTokenCreateHostedLink? HostedLink { get; set; } = default!; + /// + /// Configuration parameters for the Transactions product + /// + [JsonPropertyName("transactions")] + public Entity.LinkTokenTransactions? Transactions { get; set; } = default!; + /// /// If true, request a CRA connection. Defaults to false. /// diff --git a/src/Plaid/Webhook/BeaconDuplicateDetectedWebhook.cs b/src/Plaid/Webhook/BeaconDuplicateDetectedWebhook.cs new file mode 100644 index 00000000..febbfb75 --- /dev/null +++ b/src/Plaid/Webhook/BeaconDuplicateDetectedWebhook.cs @@ -0,0 +1,21 @@ +namespace Going.Plaid.Webhook; + +/// +/// Fired when a Beacon User created within your organization matches one of your existing users. +/// +public record BeaconDuplicateDetectedWebhook : WebhookBase +{ + /// + [JsonPropertyName("webhook_type")] + public override WebhookType WebhookType => WebhookType.Beacon; + + /// + [JsonPropertyName("webhook_code")] + public override WebhookCode WebhookCode => WebhookCode.DuplicateDetected; + + /// + /// The ID of the associated Beacon Duplicate. + /// + [JsonPropertyName("beacon_duplicate_id")] + public string BeaconDuplicateId { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Webhook/BeaconReportCreatedWebhook.cs b/src/Plaid/Webhook/BeaconReportCreatedWebhook.cs new file mode 100644 index 00000000..4d1dd369 --- /dev/null +++ b/src/Plaid/Webhook/BeaconReportCreatedWebhook.cs @@ -0,0 +1,21 @@ +namespace Going.Plaid.Webhook; + +/// +/// Fired when one of your Beacon Users is first reported to the Beacon network. +/// +public record BeaconReportCreatedWebhook : WebhookBase +{ + /// + [JsonPropertyName("webhook_type")] + public override WebhookType WebhookType => WebhookType.Beacon; + + /// + [JsonPropertyName("webhook_code")] + public override WebhookCode WebhookCode => WebhookCode.ReportCreated; + + /// + /// The ID of the associated Beacon Report. + /// + [JsonPropertyName("beacon_report_id")] + public string BeaconReportId { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Webhook/BeaconReportSyndicationCreatedWebhook.cs b/src/Plaid/Webhook/BeaconReportSyndicationCreatedWebhook.cs new file mode 100644 index 00000000..7fc9352a --- /dev/null +++ b/src/Plaid/Webhook/BeaconReportSyndicationCreatedWebhook.cs @@ -0,0 +1,21 @@ +namespace Going.Plaid.Webhook; + +/// +/// Fired when a report created on the Beacon Network matches with one of your Beacon Users. +/// +public record BeaconReportSyndicationCreatedWebhook : WebhookBase +{ + /// + [JsonPropertyName("webhook_type")] + public override WebhookType WebhookType => WebhookType.Beacon; + + /// + [JsonPropertyName("webhook_code")] + public override WebhookCode WebhookCode => WebhookCode.ReportSyndicationCreated; + + /// + /// The ID of the associated Beacon Report Syndication. + /// + [JsonPropertyName("beacon_report_syndication_id")] + public string BeaconReportSyndicationId { get; init; } = default!; +} \ No newline at end of file diff --git a/src/Plaid/Webhook/BeaconReportUpdatedWebhook.cs b/src/Plaid/Webhook/BeaconReportUpdatedWebhook.cs new file mode 100644 index 00000000..ffcec8d2 --- /dev/null +++ b/src/Plaid/Webhook/BeaconReportUpdatedWebhook.cs @@ -0,0 +1,21 @@ +namespace Going.Plaid.Webhook; + +/// +/// Fired when one of your existing Beacon Reports has been modified or removed from the Beacon Network. +/// +public record BeaconReportUpdatedWebhook : WebhookBase +{ + /// + [JsonPropertyName("webhook_type")] + public override WebhookType WebhookType => WebhookType.Beacon; + + /// + [JsonPropertyName("webhook_code")] + public override WebhookCode WebhookCode => WebhookCode.ReportUpdated; + + /// + /// The ID of the associated Beacon Report. + /// + [JsonPropertyName("beacon_report_id")] + public string BeaconReportId { get; init; } = default!; +} \ No newline at end of file