From 4c31792a533755819818c52692574e0a9b159f0b Mon Sep 17 00:00:00 2001 From: Stuart Turner Date: Wed, 17 Jan 2024 17:20:52 -0600 Subject: [PATCH] Update to Plaid v1.485.1 --- plaid-openapi | 2 +- src/Plaid/Beacon/BeaconDuplicateGetRequest.cs | 14 +++++ .../Beacon/BeaconDuplicateGetResponse.cs | 32 ++++++++++ src/Plaid/Beacon/PlaidClient.cs | 11 ++++ src/Plaid/Entity/Account.cs | 2 +- src/Plaid/Entity/AccountAssets.cs | 2 +- src/Plaid/Entity/AccountBalance.cs | 5 +- src/Plaid/Entity/AccountIdentity.cs | 2 +- src/Plaid/Entity/AccountIdentityMatchScore.cs | 2 +- src/Plaid/Entity/BaseReportAccountBalances.cs | 5 +- .../Entity/BeaconMatchSummaryAnalysis.cs | 50 ++++++++++++++++ src/Plaid/Entity/BeaconUserAddress.cs | 2 +- src/Plaid/Entity/BeaconUserRequestAddress.cs | 2 +- src/Plaid/Entity/BeaconUserRevision.cs | 20 +++++++ src/Plaid/Entity/Holding.cs | 2 +- src/Plaid/Entity/IdentityVerification.cs | 4 +- .../IdentityVerificationAutofillAddress.cs | 58 +++++++++++++++++++ .../IdentityVerificationAutofillStatus.cs | 26 +++++++++ .../IdentityVerificationAutofillUserData.cs | 28 +++++++++ .../Entity/IdentityVerificationStepStatus.cs | 2 +- .../Entity/IdentityVerificationStepSummary.cs | 14 ++--- .../IdentityVerificationTemplateReference.cs | 2 +- .../Entity/IdentityVerificationUserAddress.cs | 2 +- .../Entity/IdentityVerificationUserData.cs | 2 +- .../Entity/LinkTokenCreateInstitutionData.cs | 2 +- .../Entity/LinkTokenCreateRequestUser.cs | 2 +- ...LinkTokenCreateRequestUserAddressObject.cs | 2 +- src/Plaid/Entity/PayPeriodDetails.cs | 2 +- ...num.cs => PayPeriodDetailsPayFrequency.cs} | 2 +- src/Plaid/Entity/RiskCheckDetails.cs | 2 +- src/Plaid/Entity/SignalEvaluateRiskProfile.cs | 20 +++++++ src/Plaid/Entity/StatementsAccount.cs | 20 ++++++- src/Plaid/Entity/UserAddress.cs | 2 +- ...entityVerificationAutofillCreateRequest.cs | 14 +++++ ...ntityVerificationAutofillCreateResponse.cs | 20 +++++++ .../IdentityVerificationCreateResponse.cs | 4 +- .../IdentityVerificationGetRequest.cs | 2 +- .../IdentityVerificationGetResponse.cs | 4 +- .../IdentityVerificationListRequest.cs | 2 +- .../IdentityVerificationRetryResponse.cs | 4 +- src/Plaid/IdentityVerification/PlaidClient.cs | 12 +++- .../PaymentInitiationPaymentCreateRequest.cs | 1 + src/Plaid/Processor/PlaidClient.cs | 10 ++++ .../ProcessorLiabilitiesGetRequest.cs | 14 +++++ .../ProcessorLiabilitiesGetResponse.cs | 20 +++++++ src/Plaid/Signal/SignalEvaluateRequest.cs | 6 ++ src/Plaid/Signal/SignalEvaluateResponse.cs | 6 ++ src/Plaid/Statements/PlaidClient.cs | 8 +++ .../Statements/StatementsRefreshRequest.cs | 20 +++++++ .../Statements/StatementsRefreshResponse.cs | 8 +++ 50 files changed, 457 insertions(+), 43 deletions(-) create mode 100644 src/Plaid/Beacon/BeaconDuplicateGetRequest.cs create mode 100644 src/Plaid/Beacon/BeaconDuplicateGetResponse.cs create mode 100644 src/Plaid/Entity/BeaconMatchSummaryAnalysis.cs create mode 100644 src/Plaid/Entity/BeaconUserRevision.cs create mode 100644 src/Plaid/Entity/IdentityVerificationAutofillAddress.cs create mode 100644 src/Plaid/Entity/IdentityVerificationAutofillStatus.cs create mode 100644 src/Plaid/Entity/IdentityVerificationAutofillUserData.cs rename src/Plaid/Entity/{PayPeriodDetailsPayFrequencyEnum.cs => PayPeriodDetailsPayFrequency.cs} (95%) create mode 100644 src/Plaid/Entity/SignalEvaluateRiskProfile.cs create mode 100644 src/Plaid/IdentityVerification/IdentityVerificationAutofillCreateRequest.cs create mode 100644 src/Plaid/IdentityVerification/IdentityVerificationAutofillCreateResponse.cs create mode 100644 src/Plaid/Processor/ProcessorLiabilitiesGetRequest.cs create mode 100644 src/Plaid/Processor/ProcessorLiabilitiesGetResponse.cs create mode 100644 src/Plaid/Statements/StatementsRefreshRequest.cs create mode 100644 src/Plaid/Statements/StatementsRefreshResponse.cs diff --git a/plaid-openapi b/plaid-openapi index 0d29e879..a2d6925d 160000 --- a/plaid-openapi +++ b/plaid-openapi @@ -1 +1 @@ -Subproject commit 0d29e8791636d2c2c5dffb0bd3bbb8473697fbc8 +Subproject commit a2d6925d38c49c77f26665a9cbc4276526af7039 diff --git a/src/Plaid/Beacon/BeaconDuplicateGetRequest.cs b/src/Plaid/Beacon/BeaconDuplicateGetRequest.cs new file mode 100644 index 00000000..cd46dcb9 --- /dev/null +++ b/src/Plaid/Beacon/BeaconDuplicateGetRequest.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Beacon; + +/// +/// Request input for getting a Beacon Duplicate +/// +public partial class BeaconDuplicateGetRequest : RequestBase +{ + /// + /// ID of the associated Beacon Duplicate. + /// + [JsonPropertyName("beacon_duplicate_id")] + public string BeaconDuplicateId { get; set; } = default!; + +} diff --git a/src/Plaid/Beacon/BeaconDuplicateGetResponse.cs b/src/Plaid/Beacon/BeaconDuplicateGetResponse.cs new file mode 100644 index 00000000..83d51d72 --- /dev/null +++ b/src/Plaid/Beacon/BeaconDuplicateGetResponse.cs @@ -0,0 +1,32 @@ +namespace Going.Plaid.Beacon; + +/// +/// A Beacon Duplicate represents a pair of matching Beacon Users and an analysis of the fields they matched on. +/// +public record BeaconDuplicateGetResponse : ResponseBase +{ + /// + /// ID of the associated Beacon Duplicate. + /// + [JsonPropertyName("id")] + public string Id { get; init; } = default!; + + /// + /// A Beacon User Revision identifies a Beacon User at some point in its revision history. + /// + [JsonPropertyName("beacon_user1")] + public Entity.BeaconUserRevision BeaconUser1 { get; init; } = default!; + + /// + /// A Beacon User Revision identifies a Beacon User at some point in its revision history. + /// + [JsonPropertyName("beacon_user2")] + public Entity.BeaconUserRevision BeaconUser2 { get; init; } = default!; + + /// + /// Analysis of which fields matched between one Beacon User and another. + /// + [JsonPropertyName("analysis")] + public Entity.BeaconMatchSummaryAnalysis Analysis { get; init; } = default!; + +} diff --git a/src/Plaid/Beacon/PlaidClient.cs b/src/Plaid/Beacon/PlaidClient.cs index b37a1360..929475e8 100644 --- a/src/Plaid/Beacon/PlaidClient.cs +++ b/src/Plaid/Beacon/PlaidClient.cs @@ -92,4 +92,15 @@ public sealed partial class PlaidClient PostAsync("/beacon/user/update", request) .ParseResponseAsync(); + /// + /// Returns a Beacon Duplicate for a given Beacon Duplicate id. + /// A Beacon Duplicate represents a pair of similar Beacon Users within your organization. + /// Two Beacon User revisions are returned for each Duplicate record in either the beacon_user1 or beacon_user2 response fields. + /// The analysis field in the response indicates which fields matched between beacon_user1 and beacon_user2. + /// + /// + public Task BeaconDuplicateGetAsync(Beacon.BeaconDuplicateGetRequest request) => + PostAsync("/beacon/duplicate/get", request) + .ParseResponseAsync(); + } diff --git a/src/Plaid/Entity/Account.cs b/src/Plaid/Entity/Account.cs index 57183b31..bfb20536 100644 --- a/src/Plaid/Entity/Account.cs +++ b/src/Plaid/Entity/Account.cs @@ -57,7 +57,7 @@ public record Account public Entity.AccountVerificationStatusEnum? VerificationStatus { get; init; } = default!; /// - /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently an opt-in field and only supported for Chase Items. + /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently only supported for Chase Items. /// [JsonPropertyName("persistent_account_id")] public string? PersistentAccountId { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountAssets.cs b/src/Plaid/Entity/AccountAssets.cs index 8af683d2..41ec6011 100644 --- a/src/Plaid/Entity/AccountAssets.cs +++ b/src/Plaid/Entity/AccountAssets.cs @@ -57,7 +57,7 @@ public record AccountAssets public Entity.AccountAssetsVerificationStatusEnum? VerificationStatus { get; init; } = default!; /// - /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently an opt-in field and only supported for Chase Items. + /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently only supported for Chase Items. /// [JsonPropertyName("persistent_account_id")] public string? PersistentAccountId { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountBalance.cs b/src/Plaid/Entity/AccountBalance.cs index 981e4ed5..a271aedb 100644 --- a/src/Plaid/Entity/AccountBalance.cs +++ b/src/Plaid/Entity/AccountBalance.cs @@ -50,8 +50,9 @@ public record AccountBalance public string? UnofficialCurrencyCode { get; init; } = default!; /// - /// Timestamp in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ) indicating the last time that the balance for the given account has been updated - /// This is currently only provided when the min_last_updated_datetime is passed when calling /accounts/balance/get for ins_128026 (Capital One). + /// Timestamp in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ) indicating the oldest acceptable balance when making a request to /accounts/balance/get. + /// This field is only used and expected when the institution is ins_128026 (Capital One) and the Item contains one or more accounts with a non-depository account type, in which case a value must be provided or an INVALID_REQUEST error with the code of INVALID_FIELD will be returned. For Capital One depository accounts as well as all other account types on all other institutions, this field is ignored. See account type schema for a full list of account types. + /// If the balance that is pulled is older than the given timestamp for Items with this field required, an INVALID_REQUEST error with the code of LAST_UPDATED_DATETIME_OUT_OF_RANGE will be returned with the most recent timestamp for the requested account contained in the response. /// [JsonPropertyName("last_updated_datetime")] public DateTimeOffset? LastUpdatedDatetime { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountIdentity.cs b/src/Plaid/Entity/AccountIdentity.cs index cffffc9f..ff890d04 100644 --- a/src/Plaid/Entity/AccountIdentity.cs +++ b/src/Plaid/Entity/AccountIdentity.cs @@ -57,7 +57,7 @@ public record AccountIdentity public Entity.AccountIdentityVerificationStatusEnum? VerificationStatus { get; init; } = default!; /// - /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently an opt-in field and only supported for Chase Items. + /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently only supported for Chase Items. /// [JsonPropertyName("persistent_account_id")] public string? PersistentAccountId { get; init; } = default!; diff --git a/src/Plaid/Entity/AccountIdentityMatchScore.cs b/src/Plaid/Entity/AccountIdentityMatchScore.cs index c05ef107..0e0ee176 100644 --- a/src/Plaid/Entity/AccountIdentityMatchScore.cs +++ b/src/Plaid/Entity/AccountIdentityMatchScore.cs @@ -57,7 +57,7 @@ public record AccountIdentityMatchScore public Entity.AccountIdentityMatchScoreVerificationStatusEnum? VerificationStatus { get; init; } = default!; /// - /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently an opt-in field and only supported for Chase Items. + /// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently only supported for Chase Items. /// [JsonPropertyName("persistent_account_id")] public string? PersistentAccountId { get; init; } = default!; diff --git a/src/Plaid/Entity/BaseReportAccountBalances.cs b/src/Plaid/Entity/BaseReportAccountBalances.cs index 49d1855c..6ff62173 100644 --- a/src/Plaid/Entity/BaseReportAccountBalances.cs +++ b/src/Plaid/Entity/BaseReportAccountBalances.cs @@ -50,8 +50,9 @@ public record BaseReportAccountBalances public string? UnofficialCurrencyCode { get; init; } = default!; /// - /// Timestamp in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ) indicating the last time that the balance for the given account has been updated - /// This is currently only provided when the min_last_updated_datetime is passed when calling /accounts/balance/get for ins_128026 (Capital One). + /// Timestamp in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ) indicating the oldest acceptable balance when making a request to /accounts/balance/get. + /// This field is only used and expected when the institution is ins_128026 (Capital One) and the Item contains one or more accounts with a non-depository account type, in which case a value must be provided or an INVALID_REQUEST error with the code of INVALID_FIELD will be returned. For Capital One depository accounts as well as all other account types on all other institutions, this field is ignored. See account type schema for a full list of account types. + /// If the balance that is pulled is older than the given timestamp for Items with this field required, an INVALID_REQUEST error with the code of LAST_UPDATED_DATETIME_OUT_OF_RANGE will be returned with the most recent timestamp for the requested account contained in the response. /// [JsonPropertyName("last_updated_datetime")] public DateTimeOffset? LastUpdatedDatetime { get; init; } = default!; diff --git a/src/Plaid/Entity/BeaconMatchSummaryAnalysis.cs b/src/Plaid/Entity/BeaconMatchSummaryAnalysis.cs new file mode 100644 index 00000000..6467faa3 --- /dev/null +++ b/src/Plaid/Entity/BeaconMatchSummaryAnalysis.cs @@ -0,0 +1,50 @@ +namespace Going.Plaid.Entity; + +/// +/// Analysis of which fields matched between one Beacon User and another. +/// +public record BeaconMatchSummaryAnalysis +{ + /// + /// An enum indicating the match type between two Beacon Users. + /// + [JsonPropertyName("address")] + public Entity.BeaconMatchSummaryCode Address { get; init; } = default!; + + /// + /// An enum indicating the match type between two Beacon Users. + /// + [JsonPropertyName("date_of_birth")] + public Entity.BeaconMatchSummaryCode DateOfBirth { get; init; } = default!; + + /// + /// An enum indicating the match type between two Beacon Users. + /// + [JsonPropertyName("email_address")] + public Entity.BeaconMatchSummaryCode EmailAddress { get; init; } = default!; + + /// + /// An enum indicating the match type between two Beacon Users. + /// + [JsonPropertyName("name")] + public Entity.BeaconMatchSummaryCode Name { get; init; } = default!; + + /// + /// An enum indicating the match type between two Beacon Users. + /// + [JsonPropertyName("id_number")] + public Entity.BeaconMatchSummaryCode IdNumber { get; init; } = default!; + + /// + /// An enum indicating the match type between two Beacon Users. + /// + [JsonPropertyName("ip_address")] + public Entity.BeaconMatchSummaryCode IpAddress { get; init; } = default!; + + /// + /// An enum indicating the match type between two Beacon Users. + /// + [JsonPropertyName("phone_number")] + public Entity.BeaconMatchSummaryCode PhoneNumber { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/BeaconUserAddress.cs b/src/Plaid/Entity/BeaconUserAddress.cs index d7a7fc26..08bae79c 100644 --- a/src/Plaid/Entity/BeaconUserAddress.cs +++ b/src/Plaid/Entity/BeaconUserAddress.cs @@ -8,7 +8,7 @@ namespace Going.Plaid.Entity; public record BeaconUserAddress { /// - /// The primary street portion of an address. If the user has submitted their address, this field will always be filled. + /// The primary street portion of an address. If an address is provided, this field will always be filled. /// [JsonPropertyName("street")] public string Street { get; init; } = default!; diff --git a/src/Plaid/Entity/BeaconUserRequestAddress.cs b/src/Plaid/Entity/BeaconUserRequestAddress.cs index 8f679c0b..e542db76 100644 --- a/src/Plaid/Entity/BeaconUserRequestAddress.cs +++ b/src/Plaid/Entity/BeaconUserRequestAddress.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public class BeaconUserRequestAddress { /// - /// The primary street portion of an address. If the user has submitted their address, this field will always be filled. + /// The primary street portion of an address. If an address is provided, this field will always be filled. /// [JsonPropertyName("street")] public string Street { get; set; } = default!; diff --git a/src/Plaid/Entity/BeaconUserRevision.cs b/src/Plaid/Entity/BeaconUserRevision.cs new file mode 100644 index 00000000..3ff0aa6b --- /dev/null +++ b/src/Plaid/Entity/BeaconUserRevision.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// A Beacon User Revision identifies a Beacon User at some point in its revision history. +/// +public record BeaconUserRevision +{ + /// + /// ID of the associated Beacon User. + /// + [JsonPropertyName("id")] + public string Id { get; init; } = default!; + + /// + /// The version field begins with 1 and increments with each subsequent revision. + /// + [JsonPropertyName("version")] + public int Version { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/Holding.cs b/src/Plaid/Entity/Holding.cs index e2773ec2..157b36dc 100644 --- a/src/Plaid/Entity/Holding.cs +++ b/src/Plaid/Entity/Holding.cs @@ -43,7 +43,7 @@ public record Holding public decimal InstitutionValue { get; init; } = default!; /// - /// The original total value of the holding. This field is calculated by Plaid as the sum of the purchase price of all of the shares in the holding. + /// The total cost basis of the holding (e.g., the total amount spent to acquire all assets currently in the holding). /// [JsonPropertyName("cost_basis")] public decimal? CostBasis { get; init; } = default!; diff --git a/src/Plaid/Entity/IdentityVerification.cs b/src/Plaid/Entity/IdentityVerification.cs index 7b58c8d6..bb267233 100644 --- a/src/Plaid/Entity/IdentityVerification.cs +++ b/src/Plaid/Entity/IdentityVerification.cs @@ -42,13 +42,13 @@ public record IdentityVerification public string? ShareableUrl { get; init; } = default!; /// - /// The resource ID and version number of the template configuring the behavior of a given identity verification. + /// The resource ID and version number of the template configuring the behavior of a given Identity Verification. /// [JsonPropertyName("template")] public Entity.IdentityVerificationTemplateReference Template { get; init; } = default!; /// - /// The identity data that was either collected from the user or provided via API in order to perform an identity verification. + /// The identity data that was either collected from the user or provided via API in order to perform an Identity Verification. /// [JsonPropertyName("user")] public Entity.IdentityVerificationUserData User { get; init; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationAutofillAddress.cs b/src/Plaid/Entity/IdentityVerificationAutofillAddress.cs new file mode 100644 index 00000000..20ea1538 --- /dev/null +++ b/src/Plaid/Entity/IdentityVerificationAutofillAddress.cs @@ -0,0 +1,58 @@ +namespace Going.Plaid.Entity; + +/// +/// Even if an address has been autofilled, some fields may be null depending on the region's addressing system. For example: +/// Addresses from the United Kingdom will not include a region +/// Addresses from Hong Kong will not include postal code +/// +public record IdentityVerificationAutofillAddress +{ + /// + /// The primary street portion of an address. If an address is provided, this field will always be filled. + /// + [JsonPropertyName("street")] + public string Street { get; init; } = default!; + + /// + /// Extra street information, like an apartment or suite number. + /// + [JsonPropertyName("street2")] + public string? Street2 { get; init; } = default!; + + /// + /// City from the end user's address + /// + [JsonPropertyName("city")] + public string? City { get; init; } = default!; + + /// + /// An ISO 3166-2 subdivision code. Related terms would be "state", "province", "prefecture", "zone", "subdivision", etc. + /// + [JsonPropertyName("region")] + public string? Region { get; init; } = default!; + + /// + /// The postal code for the associated address. Between 2 and 10 alphanumeric characters. For US-based addresses this must be 5 numeric digits. + /// + [JsonPropertyName("postal_code")] + public string? PostalCode { get; init; } = default!; + + /// + /// Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form. + /// + [JsonPropertyName("country")] + public string Country { get; init; } = default!; + + /// + /// Field describing whether the associated address is a post office box. Will be yes when a P.O. box is detected, no when Plaid confirmed the address is not a P.O. box, and no_data when Plaid was not able to determine if the address is a P.O. box. + /// + [JsonPropertyName("po_box")] + public Entity.POBoxStatus PoBox { get; init; } = default!; + + /// + /// + /// + [JsonPropertyName("type")] + public Entity.AddressPurposeLabel Type { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/IdentityVerificationAutofillStatus.cs b/src/Plaid/Entity/IdentityVerificationAutofillStatus.cs new file mode 100644 index 00000000..1341f08f --- /dev/null +++ b/src/Plaid/Entity/IdentityVerificationAutofillStatus.cs @@ -0,0 +1,26 @@ +namespace Going.Plaid.Entity; + +/// +/// A status enum indicating whether autofill succeeded or failed. +/// +public enum IdentityVerificationAutofillStatus +{ + /// + /// + /// + [EnumMember(Value = "success")] + Success, + + /// + /// + /// + [EnumMember(Value = "failed")] + Failed, + + /// + /// 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. + /// + [EnumMember(Value = "undefined")] + Undefined, + +} diff --git a/src/Plaid/Entity/IdentityVerificationAutofillUserData.cs b/src/Plaid/Entity/IdentityVerificationAutofillUserData.cs new file mode 100644 index 00000000..77792384 --- /dev/null +++ b/src/Plaid/Entity/IdentityVerificationAutofillUserData.cs @@ -0,0 +1,28 @@ +namespace Going.Plaid.Entity; + +/// +/// User information that was autofilled. All this information should be confirmed by the user before using. +/// +public record IdentityVerificationAutofillUserData +{ + /// + /// The full name provided by the user. If the user has not submitted their name, this field will be null. Otherwise, both fields are guaranteed to be filled. + /// + [JsonPropertyName("name")] + public Entity.IdentityVerificationResponseUserName? Name { get; init; } = default!; + + /// + /// Even if an address has been autofilled, some fields may be null depending on the region's addressing system. For example: + /// Addresses from the United Kingdom will not include a region + /// Addresses from Hong Kong will not include postal code + /// + [JsonPropertyName("address")] + public Entity.IdentityVerificationAutofillAddress? Address { get; init; } = default!; + + /// + /// 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 null. Otherwise, both fields are guaranteed to be filled. + /// + [JsonPropertyName("id_number")] + public Entity.UserIDNumber? IdNumber { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/IdentityVerificationStepStatus.cs b/src/Plaid/Entity/IdentityVerificationStepStatus.cs index 8331f446..a10b0c9f 100644 --- a/src/Plaid/Entity/IdentityVerificationStepStatus.cs +++ b/src/Plaid/Entity/IdentityVerificationStepStatus.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The status of a step in the identity verification process. +/// The status of a step in the Identity Verification process. /// public enum IdentityVerificationStepStatus { diff --git a/src/Plaid/Entity/IdentityVerificationStepSummary.cs b/src/Plaid/Entity/IdentityVerificationStepSummary.cs index 08e498ba..f85d68e0 100644 --- a/src/Plaid/Entity/IdentityVerificationStepSummary.cs +++ b/src/Plaid/Entity/IdentityVerificationStepSummary.cs @@ -17,43 +17,43 @@ namespace Going.Plaid.Entity; public record IdentityVerificationStepSummary { /// - /// The status of a step in the identity verification process. + /// The status of a step in the Identity Verification process. /// [JsonPropertyName("accept_tos")] public Entity.IdentityVerificationStepStatus AcceptTos { get; init; } = default!; /// - /// The status of a step in the identity verification process. + /// The status of a step in the Identity Verification process. /// [JsonPropertyName("verify_sms")] public Entity.IdentityVerificationStepStatus VerifySms { get; init; } = default!; /// - /// The status of a step in the identity verification process. + /// The status of a step in the Identity Verification process. /// [JsonPropertyName("kyc_check")] public Entity.IdentityVerificationStepStatus KycCheck { get; init; } = default!; /// - /// The status of a step in the identity verification process. + /// The status of a step in the Identity Verification process. /// [JsonPropertyName("documentary_verification")] public Entity.IdentityVerificationStepStatus DocumentaryVerification { get; init; } = default!; /// - /// The status of a step in the identity verification process. + /// The status of a step in the Identity Verification process. /// [JsonPropertyName("selfie_check")] public Entity.IdentityVerificationStepStatus SelfieCheck { get; init; } = default!; /// - /// The status of a step in the identity verification process. + /// The status of a step in the Identity Verification process. /// [JsonPropertyName("watchlist_screening")] public Entity.IdentityVerificationStepStatus WatchlistScreening { get; init; } = default!; /// - /// The status of a step in the identity verification process. + /// The status of a step in the Identity Verification process. /// [JsonPropertyName("risk_check")] public Entity.IdentityVerificationStepStatus RiskCheck { get; init; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationTemplateReference.cs b/src/Plaid/Entity/IdentityVerificationTemplateReference.cs index 33fe83dc..84a71312 100644 --- a/src/Plaid/Entity/IdentityVerificationTemplateReference.cs +++ b/src/Plaid/Entity/IdentityVerificationTemplateReference.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The resource ID and version number of the template configuring the behavior of a given identity verification. +/// The resource ID and version number of the template configuring the behavior of a given Identity Verification. /// public record IdentityVerificationTemplateReference { diff --git a/src/Plaid/Entity/IdentityVerificationUserAddress.cs b/src/Plaid/Entity/IdentityVerificationUserAddress.cs index 548c0c58..32ae6cc9 100644 --- a/src/Plaid/Entity/IdentityVerificationUserAddress.cs +++ b/src/Plaid/Entity/IdentityVerificationUserAddress.cs @@ -8,7 +8,7 @@ namespace Going.Plaid.Entity; public record IdentityVerificationUserAddress { /// - /// The primary street portion of an address. If the user has submitted their address, this field will always be filled. + /// The primary street portion of an address. If an address is provided, this field will always be filled. /// [JsonPropertyName("street")] public string? Street { get; init; } = default!; diff --git a/src/Plaid/Entity/IdentityVerificationUserData.cs b/src/Plaid/Entity/IdentityVerificationUserData.cs index 51d80ddd..77bf945e 100644 --- a/src/Plaid/Entity/IdentityVerificationUserData.cs +++ b/src/Plaid/Entity/IdentityVerificationUserData.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.Entity; /// -/// The identity data that was either collected from the user or provided via API in order to perform an identity verification. +/// The identity data that was either collected from the user or provided via API in order to perform an Identity Verification. /// public record IdentityVerificationUserData { diff --git a/src/Plaid/Entity/LinkTokenCreateInstitutionData.cs b/src/Plaid/Entity/LinkTokenCreateInstitutionData.cs index 94178d9f..11a5b63e 100644 --- a/src/Plaid/Entity/LinkTokenCreateInstitutionData.cs +++ b/src/Plaid/Entity/LinkTokenCreateInstitutionData.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public class LinkTokenCreateInstitutionData { /// - /// The routing number of the bank to highlight. + /// The routing number of the bank to highlight in Link. Note: in rare cases, a single routing number can be associated with multiple institutions, e.g. due to a brokerage using another institution to manage ACH on its sweep accounts. If this happens, the bank will not be highlighted in Link even if the routing number is provided. /// [JsonPropertyName("routing_number")] public string? RoutingNumber { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenCreateRequestUser.cs b/src/Plaid/Entity/LinkTokenCreateRequestUser.cs index 9d747f00..6959411f 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestUser.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestUser.cs @@ -12,7 +12,7 @@ public class LinkTokenCreateRequestUser public string ClientUserId { get; set; } = default!; /// - /// The user's full legal name, used for micro-deposit based verification flows. For a small number of customers on legacy flows, providing this field is required to enable micro-deposit-based flows. For all other customers, this field is optional, but providing the user's name in this field when using micro-deposit-based verification will enable certain risk checks and can reduce micro-deposit fraud. + /// The user's full legal name, used for micro-deposit based verification flows. For a small number of customers on legacy flows, providing this field is required to enable micro-deposit-based flows. For all other customers, this field is optional. Providing the user's name in this field when using micro-deposit-based verification will streamline the end user experience, as the user will not be prompted to enter their name during the Link flow; Plaid will use the provided legal name instead. /// [JsonPropertyName("legal_name")] public string? LegalName { get; set; } = default!; diff --git a/src/Plaid/Entity/LinkTokenCreateRequestUserAddressObject.cs b/src/Plaid/Entity/LinkTokenCreateRequestUserAddressObject.cs index 3b3c7f12..8d6b2262 100644 --- a/src/Plaid/Entity/LinkTokenCreateRequestUserAddressObject.cs +++ b/src/Plaid/Entity/LinkTokenCreateRequestUserAddressObject.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public class LinkTokenCreateRequestUserAddressObject { /// - /// The primary street portion of an address. If the user has submitted their address, this field will always be filled. + /// The primary street portion of an address. If an address is provided, this field will always be filled. /// [JsonPropertyName("street")] public string? Street { get; set; } = default!; diff --git a/src/Plaid/Entity/PayPeriodDetails.cs b/src/Plaid/Entity/PayPeriodDetails.cs index 29ca0889..1b3f20e5 100644 --- a/src/Plaid/Entity/PayPeriodDetails.cs +++ b/src/Plaid/Entity/PayPeriodDetails.cs @@ -39,7 +39,7 @@ public record PayPeriodDetails /// The frequency at which an individual is paid. /// [JsonPropertyName("pay_frequency")] - public Entity.PayPeriodDetailsPayFrequencyEnum? PayFrequency { get; init; } = default!; + public Entity.PayPeriodDetailsPayFrequency? PayFrequency { get; init; } = default!; /// /// The date on which the paystub was issued, in ISO 8601 format ("yyyy-mm-dd"). diff --git a/src/Plaid/Entity/PayPeriodDetailsPayFrequencyEnum.cs b/src/Plaid/Entity/PayPeriodDetailsPayFrequency.cs similarity index 95% rename from src/Plaid/Entity/PayPeriodDetailsPayFrequencyEnum.cs rename to src/Plaid/Entity/PayPeriodDetailsPayFrequency.cs index c35a5353..9299ff48 100644 --- a/src/Plaid/Entity/PayPeriodDetailsPayFrequencyEnum.cs +++ b/src/Plaid/Entity/PayPeriodDetailsPayFrequency.cs @@ -3,7 +3,7 @@ namespace Going.Plaid.Entity; /// /// The frequency at which an individual is paid. /// -public enum PayPeriodDetailsPayFrequencyEnum +public enum PayPeriodDetailsPayFrequency { /// /// diff --git a/src/Plaid/Entity/RiskCheckDetails.cs b/src/Plaid/Entity/RiskCheckDetails.cs index 1f0fcae7..cb2d51c8 100644 --- a/src/Plaid/Entity/RiskCheckDetails.cs +++ b/src/Plaid/Entity/RiskCheckDetails.cs @@ -6,7 +6,7 @@ namespace Going.Plaid.Entity; public record RiskCheckDetails { /// - /// The status of a step in the identity verification process. + /// The status of a step in the Identity Verification process. /// [JsonPropertyName("status")] public Entity.IdentityVerificationStepStatus Status { get; init; } = default!; diff --git a/src/Plaid/Entity/SignalEvaluateRiskProfile.cs b/src/Plaid/Entity/SignalEvaluateRiskProfile.cs new file mode 100644 index 00000000..3fe9275b --- /dev/null +++ b/src/Plaid/Entity/SignalEvaluateRiskProfile.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Entity; + +/// +/// Details about the transaction result after evaluated by the requested risk profile. If a risk_profile_key is not provided, this field will be omitted. This feature is currently in closed beta; to request access, contact your account manager. +/// +public record SignalEvaluateRiskProfile +{ + /// + /// The name of the risk profile used for this transaction. + /// + [JsonPropertyName("key")] + public string? Key { get; init; } = default!; + + /// + /// The name of the evaluated outcome for this transaction. + /// + [JsonPropertyName("outcome")] + public string? Outcome { get; init; } = default!; + +} diff --git a/src/Plaid/Entity/StatementsAccount.cs b/src/Plaid/Entity/StatementsAccount.cs index 52d2a726..20f3fe4e 100644 --- a/src/Plaid/Entity/StatementsAccount.cs +++ b/src/Plaid/Entity/StatementsAccount.cs @@ -11,6 +11,12 @@ public record StatementsAccount [JsonPropertyName("account_id")] public string AccountId { get; init; } = default!; + /// + /// The last 2-4 alphanumeric characters of an account's official account number. Note that the mask may be non-unique between an Item's accounts, and it may also not match the mask that the bank displays to the user. + /// + [JsonPropertyName("account_mask")] + public string AccountMask { get; init; } = default!; + /// /// The name of the account, either assigned by the user or by the financial institution itself. /// @@ -18,7 +24,19 @@ public record StatementsAccount public string AccountName { get; init; } = default!; /// - /// The type of account. Possible values are investment, credit, depository, loan, brokerage, other. + /// The official name of the account as given by the financial institution. + /// + [JsonPropertyName("account_official_name")] + public string AccountOfficialName { get; init; } = default!; + + /// + /// The subtype of the account. For a full list of valid types and subtypes, see the Account schema. + /// + [JsonPropertyName("account_subtype")] + public string AccountSubtype { get; init; } = default!; + + /// + /// The type of account. For a full list of valid types and subtypes, see the Account schema. /// [JsonPropertyName("account_type")] public string AccountType { get; init; } = default!; diff --git a/src/Plaid/Entity/UserAddress.cs b/src/Plaid/Entity/UserAddress.cs index d4a65aae..e698a49f 100644 --- a/src/Plaid/Entity/UserAddress.cs +++ b/src/Plaid/Entity/UserAddress.cs @@ -7,7 +7,7 @@ namespace Going.Plaid.Entity; public class UserAddress { /// - /// The primary street portion of an address. If the user has submitted their address, this field will always be filled. + /// The primary street portion of an address. If an address is provided, this field will always be filled. /// [JsonPropertyName("street")] public string? Street { get; set; } = default!; diff --git a/src/Plaid/IdentityVerification/IdentityVerificationAutofillCreateRequest.cs b/src/Plaid/IdentityVerification/IdentityVerificationAutofillCreateRequest.cs new file mode 100644 index 00000000..58ee10c9 --- /dev/null +++ b/src/Plaid/IdentityVerification/IdentityVerificationAutofillCreateRequest.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.IdentityVerification; + +/// +/// Request input to autofill an Identity Verification +/// +public partial class IdentityVerificationAutofillCreateRequest : RequestBase +{ + /// + /// ID of the associated Identity Verification attempt. + /// + [JsonPropertyName("identity_verification_id")] + public string IdentityVerificationId { get; set; } = default!; + +} diff --git a/src/Plaid/IdentityVerification/IdentityVerificationAutofillCreateResponse.cs b/src/Plaid/IdentityVerification/IdentityVerificationAutofillCreateResponse.cs new file mode 100644 index 00000000..9fbf8184 --- /dev/null +++ b/src/Plaid/IdentityVerification/IdentityVerificationAutofillCreateResponse.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.IdentityVerification; + +/// +/// Autofill represents unverified customer information. This needs to be confirmed by the customer before using. +/// +public record IdentityVerificationAutofillCreateResponse : ResponseBase +{ + /// + /// A status enum indicating whether autofill succeeded or failed. + /// + [JsonPropertyName("status")] + public Entity.IdentityVerificationAutofillStatus Status { get; init; } = default!; + + /// + /// User information that was autofilled. All this information should be confirmed by the user before using. + /// + [JsonPropertyName("user")] + public Entity.IdentityVerificationAutofillUserData? User { get; init; } = default!; + +} diff --git a/src/Plaid/IdentityVerification/IdentityVerificationCreateResponse.cs b/src/Plaid/IdentityVerification/IdentityVerificationCreateResponse.cs index 38bea0b8..c6a8af2f 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationCreateResponse.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationCreateResponse.cs @@ -42,13 +42,13 @@ public record IdentityVerificationCreateResponse : ResponseBase public string? ShareableUrl { get; init; } = default!; /// - /// The resource ID and version number of the template configuring the behavior of a given identity verification. + /// The resource ID and version number of the template configuring the behavior of a given Identity Verification. /// [JsonPropertyName("template")] public Entity.IdentityVerificationTemplateReference Template { get; init; } = default!; /// - /// The identity data that was either collected from the user or provided via API in order to perform an identity verification. + /// The identity data that was either collected from the user or provided via API in order to perform an Identity Verification. /// [JsonPropertyName("user")] public Entity.IdentityVerificationUserData User { get; init; } = default!; diff --git a/src/Plaid/IdentityVerification/IdentityVerificationGetRequest.cs b/src/Plaid/IdentityVerification/IdentityVerificationGetRequest.cs index 36f181ec..948bcec6 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationGetRequest.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationGetRequest.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.IdentityVerification; /// -/// Request input for fetching an identity verification +/// Request input for fetching an Identity Verification /// public partial class IdentityVerificationGetRequest : RequestBase { diff --git a/src/Plaid/IdentityVerification/IdentityVerificationGetResponse.cs b/src/Plaid/IdentityVerification/IdentityVerificationGetResponse.cs index 67ef9a31..11185192 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationGetResponse.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationGetResponse.cs @@ -42,13 +42,13 @@ public record IdentityVerificationGetResponse : ResponseBase public string? ShareableUrl { get; init; } = default!; /// - /// The resource ID and version number of the template configuring the behavior of a given identity verification. + /// The resource ID and version number of the template configuring the behavior of a given Identity Verification. /// [JsonPropertyName("template")] public Entity.IdentityVerificationTemplateReference Template { get; init; } = default!; /// - /// The identity data that was either collected from the user or provided via API in order to perform an identity verification. + /// The identity data that was either collected from the user or provided via API in order to perform an Identity Verification. /// [JsonPropertyName("user")] public Entity.IdentityVerificationUserData User { get; init; } = default!; diff --git a/src/Plaid/IdentityVerification/IdentityVerificationListRequest.cs b/src/Plaid/IdentityVerification/IdentityVerificationListRequest.cs index bd1a86d4..f2bd73a7 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationListRequest.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationListRequest.cs @@ -1,7 +1,7 @@ namespace Going.Plaid.IdentityVerification; /// -/// Request input for listing identity verifications +/// Request input for listing Identity Verifications /// public partial class IdentityVerificationListRequest : RequestBase { diff --git a/src/Plaid/IdentityVerification/IdentityVerificationRetryResponse.cs b/src/Plaid/IdentityVerification/IdentityVerificationRetryResponse.cs index 118fda3f..fe7d844d 100644 --- a/src/Plaid/IdentityVerification/IdentityVerificationRetryResponse.cs +++ b/src/Plaid/IdentityVerification/IdentityVerificationRetryResponse.cs @@ -42,13 +42,13 @@ public record IdentityVerificationRetryResponse : ResponseBase public string? ShareableUrl { get; init; } = default!; /// - /// The resource ID and version number of the template configuring the behavior of a given identity verification. + /// The resource ID and version number of the template configuring the behavior of a given Identity Verification. /// [JsonPropertyName("template")] public Entity.IdentityVerificationTemplateReference Template { get; init; } = default!; /// - /// The identity data that was either collected from the user or provided via API in order to perform an identity verification. + /// The identity data that was either collected from the user or provided via API in order to perform an Identity Verification. /// [JsonPropertyName("user")] public Entity.IdentityVerificationUserData User { get; init; } = default!; diff --git a/src/Plaid/IdentityVerification/PlaidClient.cs b/src/Plaid/IdentityVerification/PlaidClient.cs index 1d95bbdb..12d9bf12 100644 --- a/src/Plaid/IdentityVerification/PlaidClient.cs +++ b/src/Plaid/IdentityVerification/PlaidClient.cs @@ -13,7 +13,7 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// Retrieve a previously created identity verification. + /// Retrieve a previously created Identity Verification. /// /// public Task IdentityVerificationGetAsync(IdentityVerification.IdentityVerificationGetRequest request) => @@ -29,11 +29,19 @@ public sealed partial class PlaidClient .ParseResponseAsync(); /// - /// Allow a customer to retry their identity verification + /// Allow a customer to retry their Identity Verification /// /// public Task IdentityVerificationRetryAsync(IdentityVerification.IdentityVerificationRetryRequest request) => PostAsync("/identity_verification/retry", request) .ParseResponseAsync(); + /// + /// Try to autofill an Identity Verification based of the provided phone number, date of birth and country of residence. + /// + /// + public Task IdentityVerificationAutofillCreateAsync(IdentityVerification.IdentityVerificationAutofillCreateRequest request) => + PostAsync("/identity_verification/autofill/create", request) + .ParseResponseAsync(); + } diff --git a/src/Plaid/PaymentInitiation/PaymentInitiationPaymentCreateRequest.cs b/src/Plaid/PaymentInitiation/PaymentInitiationPaymentCreateRequest.cs index 5821bf69..bc5b9f9d 100644 --- a/src/Plaid/PaymentInitiation/PaymentInitiationPaymentCreateRequest.cs +++ b/src/Plaid/PaymentInitiation/PaymentInitiationPaymentCreateRequest.cs @@ -14,6 +14,7 @@ public partial class PaymentInitiationPaymentCreateRequest : RequestBase /// /// A reference for the payment. This must be an alphanumeric string with at most 18 characters and must not contain any special characters (since not all institutions support them). /// In order to track settlement via Payment Confirmation, each payment must have a unique reference. If the reference provided through the API is not unique, Plaid will adjust it. + /// Some institutions may limit the reference to less than 18 characters. If necessary, Plaid will adjust the reference by truncating it to fit the institution's requirements. /// Both the originally provided and automatically adjusted references (if any) can be found in the reference and adjusted_reference fields, respectively. /// [JsonPropertyName("reference")] diff --git a/src/Plaid/Processor/PlaidClient.cs b/src/Plaid/Processor/PlaidClient.cs index 9c33ab5a..5b481b93 100644 --- a/src/Plaid/Processor/PlaidClient.cs +++ b/src/Plaid/Processor/PlaidClient.cs @@ -114,6 +114,16 @@ public sealed partial class PlaidClient PostAsync("/processor/bank_transfer/create", request) .ParseResponseAsync(); + /// + /// The /processor/liabilities/get endpoint returns various details about a loan or credit account. Liabilities data is available primarily for US financial institutions, with some limited coverage of Canadian institutions. Currently supported account types are account type credit with account subtype credit card or paypal, and account type loan with account subtype student or mortgage. + /// The types of information returned by Liabilities can include balances and due dates, loan terms, and account details such as original loan amount and guarantor. Data is refreshed approximately once per day; the latest data can be retrieved by calling /processor/liabilities/get. + /// Note: This request may take some time to complete if liabilities was not specified as an initial product when creating the processor token. This is because Plaid must communicate directly with the institution to retrieve the additional data. + /// + /// + public Task ProcessorLiabilitiesGetAsync(Processor.ProcessorLiabilitiesGetRequest request) => + PostAsync("/processor/liabilities/get", request) + .ParseResponseAsync(); + /// /// The /processor/identity/get endpoint allows you to retrieve various account holder information on file with the financial institution, including names, emails, phone numbers, and addresses. /// diff --git a/src/Plaid/Processor/ProcessorLiabilitiesGetRequest.cs b/src/Plaid/Processor/ProcessorLiabilitiesGetRequest.cs new file mode 100644 index 00000000..b4cfeb2c --- /dev/null +++ b/src/Plaid/Processor/ProcessorLiabilitiesGetRequest.cs @@ -0,0 +1,14 @@ +namespace Going.Plaid.Processor; + +/// +/// ProcessorLiabilitiesGetRequest defines the request schema for /processor/liabilities/get +/// +public partial class ProcessorLiabilitiesGetRequest : RequestBase +{ + /// + /// The processor token obtained from the Plaid integration partner. Processor tokens are in the format: processor-<environment>-<identifier> + /// + [JsonPropertyName("processor_token")] + public string ProcessorToken { get; set; } = default!; + +} diff --git a/src/Plaid/Processor/ProcessorLiabilitiesGetResponse.cs b/src/Plaid/Processor/ProcessorLiabilitiesGetResponse.cs new file mode 100644 index 00000000..65607288 --- /dev/null +++ b/src/Plaid/Processor/ProcessorLiabilitiesGetResponse.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Processor; + +/// +/// ProcessorLiabilitiesGetResponse defines the response schema for /processor/liabilities/get +/// +public record ProcessorLiabilitiesGetResponse : ResponseBase +{ + /// + /// A single account at a financial institution. + /// + [JsonPropertyName("account")] + public Entity.Account Account { get; init; } = default!; + + /// + /// An object containing liability accounts + /// + [JsonPropertyName("liabilities")] + public Entity.LiabilitiesObject Liabilities { get; init; } = default!; + +} diff --git a/src/Plaid/Signal/SignalEvaluateRequest.cs b/src/Plaid/Signal/SignalEvaluateRequest.cs index e275b325..3abf82de 100644 --- a/src/Plaid/Signal/SignalEvaluateRequest.cs +++ b/src/Plaid/Signal/SignalEvaluateRequest.cs @@ -67,4 +67,10 @@ public partial class SignalEvaluateRequest : RequestBase [JsonPropertyName("device")] public Entity.SignalEvaluateDevice? Device { get; set; } = default!; + /// + /// The name of the risk profile to use for this transaction. A risk profile can be configured using via the Plaid Dashboard. If not provided, no risk profile will be used. This feature is currently in closed beta; to request access, contact your account manager. + /// + [JsonPropertyName("risk_profile_key")] + public string? RiskProfileKey { get; set; } = default!; + } diff --git a/src/Plaid/Signal/SignalEvaluateResponse.cs b/src/Plaid/Signal/SignalEvaluateResponse.cs index e2316e1a..0833ca13 100644 --- a/src/Plaid/Signal/SignalEvaluateResponse.cs +++ b/src/Plaid/Signal/SignalEvaluateResponse.cs @@ -23,6 +23,12 @@ public record SignalEvaluateResponse : ResponseBase [JsonPropertyName("core_attributes")] public Entity.SignalEvaluateCoreAttributes? CoreAttributes { get; init; } = default!; + /// + /// Details about the transaction result after evaluated by the requested risk profile. If a risk_profile_key is not provided, this field will be omitted. This feature is currently in closed beta; to request access, contact your account manager. + /// + [JsonPropertyName("risk_profile")] + public Entity.SignalEvaluateRiskProfile? RiskProfile { get; init; } = default!; + /// /// If bank information was not available to be used in the Signal model, this array contains warnings describing why bank data is missing. If you want to receive an API error instead of Signal scores in the case of missing bank data, file a support ticket or contact your Plaid account manager. /// diff --git a/src/Plaid/Statements/PlaidClient.cs b/src/Plaid/Statements/PlaidClient.cs index 5a63cb1a..d9159353 100644 --- a/src/Plaid/Statements/PlaidClient.cs +++ b/src/Plaid/Statements/PlaidClient.cs @@ -18,4 +18,12 @@ public sealed partial class PlaidClient PostAsync("/statements/download", request) .ParseResponseAsync(); + /// + /// /statements/refresh initiates an on-demand extraction to fetch the statements for the provided dates. + /// + /// + public Task StatementsRefreshAsync(Statements.StatementsRefreshRequest request) => + PostAsync("/statements/refresh", request) + .ParseResponseAsync(); + } diff --git a/src/Plaid/Statements/StatementsRefreshRequest.cs b/src/Plaid/Statements/StatementsRefreshRequest.cs new file mode 100644 index 00000000..d9f02241 --- /dev/null +++ b/src/Plaid/Statements/StatementsRefreshRequest.cs @@ -0,0 +1,20 @@ +namespace Going.Plaid.Statements; + +/// +/// StatementsRefreshRequest defines the request schema for /statements/refresh +/// +public partial class StatementsRefreshRequest : RequestBase +{ + /// + /// The start date for statements, in “YYYY-MM-DD” format, e.g. "2023-08-30". To determine whether a statement falls within the specified date range, Plaid will use the statement posted date. The statement posted date is typically either the last day of the statement period, or the following day. + /// + [JsonPropertyName("start_date")] + public DateOnly StartDate { get; set; } = default!; + + /// + /// The end date for statements, in “YYYY-MM-DD” format, e.g. "2023-10-30". You can request up to two years of data. To determine whether a statement falls within the specified date range, Plaid will use the statement posted date. The statement posted date is typically either the last day of the statement period, or the following day. + /// + [JsonPropertyName("end_date")] + public DateOnly EndDate { get; set; } = default!; + +} diff --git a/src/Plaid/Statements/StatementsRefreshResponse.cs b/src/Plaid/Statements/StatementsRefreshResponse.cs new file mode 100644 index 00000000..b3545619 --- /dev/null +++ b/src/Plaid/Statements/StatementsRefreshResponse.cs @@ -0,0 +1,8 @@ +namespace Going.Plaid.Statements; + +/// +/// StatementsRefreshResponse defines the response schema for /statements/refresh +/// +public record StatementsRefreshResponse : ResponseBase +{ +}