-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e7d8ec
commit 253c908
Showing
16 changed files
with
229 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
namespace Going.Plaid.Entity; | ||
|
||
/// <summary> | ||
/// <para>The object containing prediction interval data.</para> | ||
/// </summary> | ||
public record CraPredictionInterval | ||
{ | ||
/// <summary> | ||
/// <para>The lower bound of the predicted attribute for the given probability.</para> | ||
/// </summary> | ||
[JsonPropertyName("lower_bound")] | ||
public decimal? LowerBound { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The upper bound of the predicted attribute for the given probability.</para> | ||
/// </summary> | ||
[JsonPropertyName("upper_bound")] | ||
public decimal? UpperBound { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The probability of the actual value of the attribute falling within the upper and lower bound.</para> | ||
/// <para>This is a percentage represented as a value between 0 and 1.</para> | ||
/// </summary> | ||
[JsonPropertyName("probability")] | ||
public decimal? Probability { get; init; } = default!; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
namespace Going.Plaid.Entity; | ||
|
||
/// <summary> | ||
/// <para>ProfileIdentity defines the identity data permissioned by the end user during the authorization flow.</para> | ||
/// </summary> | ||
public record ProfileIdentity | ||
{ | ||
/// <summary> | ||
/// <para>ProfileIdentityName defines the user's first name and last name.</para> | ||
/// </summary> | ||
[JsonPropertyName("name")] | ||
public Entity.ProfileIdentityName? Name { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>ProfileIdentityAddress defines the user's address.</para> | ||
/// </summary> | ||
[JsonPropertyName("address")] | ||
public Entity.ProfileIdentityAddress? Address { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The user's email address.</para> | ||
/// </summary> | ||
[JsonPropertyName("email")] | ||
public string? Email { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The user's date of birth.</para> | ||
/// </summary> | ||
[JsonPropertyName("date_of_birth")] | ||
public string? DateOfBirth { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The user's social security number.</para> | ||
/// </summary> | ||
[JsonPropertyName("ssn")] | ||
public string? Ssn { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The last 4 digits of the user's social security number.</para> | ||
/// </summary> | ||
[JsonPropertyName("ssn_last_4")] | ||
public string? SsnLast4 { get; init; } = default!; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
namespace Going.Plaid.Entity; | ||
|
||
/// <summary> | ||
/// <para>ProfileIdentityAddress defines the user's address.</para> | ||
/// </summary> | ||
public record ProfileIdentityAddress | ||
{ | ||
/// <summary> | ||
/// <para>The full city name</para> | ||
/// </summary> | ||
[JsonPropertyName("city")] | ||
public string? City { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The region or state.</para> | ||
/// <para>Example: <c>"NC"</c></para> | ||
/// </summary> | ||
[JsonPropertyName("region")] | ||
public string? Region { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The full street address</para> | ||
/// <para>Example: <c>"564 Main Street, APT 15"</c></para> | ||
/// </summary> | ||
[JsonPropertyName("street")] | ||
public string? Street { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The second line street address</para> | ||
/// </summary> | ||
[JsonPropertyName("street2")] | ||
public string? Street2 { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The postal code. In API versions 2018-05-22 and earlier, this field is called <c>zip</c>.</para> | ||
/// </summary> | ||
[JsonPropertyName("postal_code")] | ||
public string? PostalCode { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The ISO 3166-1 alpha-2 country code</para> | ||
/// </summary> | ||
[JsonPropertyName("country")] | ||
public string? Country { get; init; } = default!; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace Going.Plaid.Entity; | ||
|
||
/// <summary> | ||
/// <para>ProfileIdentityName defines the user's first name and last name.</para> | ||
/// </summary> | ||
public record ProfileIdentityName | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
[JsonPropertyName("first_name")] | ||
public string? FirstName { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
[JsonPropertyName("last_name")] | ||
public string? LastName { get; init; } = default!; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace Going.Plaid.Entity; | ||
|
||
/// <summary> | ||
/// <para>ProfileItem defines an Item created during a profile authorization session.</para> | ||
/// </summary> | ||
public record ProfileItem | ||
{ | ||
/// <summary> | ||
/// <para>The Plaid Item ID. The <c>item_id</c> is always unique; linking the same account at the same institution twice will result in two Items with different <c>item_id</c> values. Like all Plaid identifiers, the <c>item_id</c> is case-sensitive.</para> | ||
/// </summary> | ||
[JsonPropertyName("item_id")] | ||
public string? ItemId { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// <para>The access token associated with the Item data is being requested for.</para> | ||
/// </summary> | ||
[JsonPropertyName("access_token")] | ||
public string? AccessToken { get; init; } = default!; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace Going.Plaid; | ||
|
||
public sealed partial class PlaidClient | ||
{ | ||
/// <summary> | ||
/// <para>Returns user permissioned profile data including identity and item access tokens.</para> | ||
/// </summary> | ||
/// <remarks><see href="https://plaid.com/docs/api/profile/#profileget" /></remarks> | ||
public Task<Profile.ProfileGetResponse> ProfileGetAsync(Profile.ProfileGetRequest request) => | ||
PostAsync("/profile/get", request) | ||
.ParseResponseAsync<Profile.ProfileGetResponse>(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Going.Plaid.Profile; | ||
|
||
/// <summary> | ||
/// <para>ProfileGetRequest defines the request schema for <c>/profile/get</c></para> | ||
/// </summary> | ||
public partial class ProfileGetRequest : RequestBase | ||
{ | ||
/// <summary> | ||
/// <para>The profile token generated by the end user authorization session.</para> | ||
/// </summary> | ||
[JsonPropertyName("profile_token")] | ||
public string ProfileToken { get; set; } = default!; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace Going.Plaid.Profile; | ||
|
||
/// <summary> | ||
/// <para>ProfileGetResponse defines the response schema for <c>/profile/get</c></para> | ||
/// </summary> | ||
public record ProfileGetResponse : ResponseBase | ||
{ | ||
/// <summary> | ||
/// <para>ProfileIdentity defines the identity data permissioned by the end user during the authorization flow.</para> | ||
/// </summary> | ||
[JsonPropertyName("identity")] | ||
public Entity.ProfileIdentity? Identity { get; init; } = default!; | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
[JsonPropertyName("items")] | ||
public IReadOnlyList<Entity.ProfileItem> Items { get; init; } = default!; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters