Skip to content

Commit

Permalink
Update to Plaid v1.210.4
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin committed Dec 16, 2022
1 parent 2da7953 commit e586a25
Show file tree
Hide file tree
Showing 68 changed files with 541 additions and 251 deletions.
2 changes: 1 addition & 1 deletion plaid-openapi
Submodule plaid-openapi updated 2 files
+753 −223 2020-09-14.yml
+110 −0 CHANGELOG.md
2 changes: 1 addition & 1 deletion src/Plaid/Beta/PlaidClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Going.Plaid;
public sealed partial class PlaidClient
{
/// <summary>
/// <para>The '/beta/transactions/v1/enhance' endpoint enriches raw transaction data provided directly by clients.</para>
/// <para>The <c>/beta/transactions/v1/enhance</c> endpoint enriches raw transaction data provided directly by clients.</para>
/// <para>The product is currently in beta.</para>
/// </summary>
public Task<Beta.TransactionsEnhanceGetResponse> BetaTransactionsV1EnhanceAsync(Beta.TransactionsEnhanceGetRequest request) =>
Expand Down
2 changes: 1 addition & 1 deletion src/Plaid/Credit/CreditRelayCreateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public partial class CreditRelayCreateRequest : RequestBase
public IReadOnlyList<string> ReportTokens { get; set; } = default!;

/// <summary>
/// <para>The <c>secondary_client_id</c> is the client id of the third party with whom you would like to share the Relay Token.</para>
/// <para>The <c>secondary_client_id</c> is the client id of the third party with whom you would like to share the relay token.</para>
/// </summary>
[JsonPropertyName("secondary_client_id")]
public string SecondaryClientId { get; set; } = default!;
Expand Down
2 changes: 1 addition & 1 deletion src/Plaid/Credit/CreditRelayRefreshRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial class CreditRelayRefreshRequest : RequestBase
public Entity.ReportType ReportType { get; set; } = default!;

/// <summary>
/// <para>The URL registered to receive webhooks when the report of a Relay Token has been refreshed.</para>
/// <para>The URL registered to receive webhooks when the report of a relay token has been refreshed.</para>
/// </summary>
[JsonPropertyName("webhook")]
public string? Webhook { get; set; } = default!;
Expand Down
2 changes: 1 addition & 1 deletion src/Plaid/Credit/CreditRelayRemoveResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Going.Plaid.Credit;
public record CreditRelayRemoveResponse : ResponseBase
{
/// <summary>
/// <para><c>true</c> if the Relay token was successfully removed.</para>
/// <para><c>true</c> if the relay token was successfully removed.</para>
/// </summary>
[JsonPropertyName("removed")]
public bool Removed { get; init; } = default!;
Expand Down
16 changes: 8 additions & 8 deletions src/Plaid/Credit/PlaidClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,33 +80,33 @@ public sealed partial class PlaidClient

/// <summary>
/// <para>Plaid can share an Asset Report directly with a participating third party on your behalf. The shared Asset Report is the exact same Asset Report originally created in <c>/asset_report/create</c>.</para>
/// <para>To grant access to an Asset Report to a third party, use the <c>/credit/relay/create</c> endpoint to create a <c>relay_token</c> and then pass that token to the third party who needs access. Each third party has its own <c>secondary_client_id</c>, for example <c>ce5bd328dcd34123456</c>. You'll need to create a separate <c>relay_token</c> for each third party to whom you want to grant access to the Report.</para>
/// <para>To grant a third party access to an Asset Report, use the <c>/credit/relay/create</c> endpoint to create a <c>relay_token</c> and then pass that token to your third party. Each third party has its own <c>secondary_client_id</c>; for example, <c>ce5bd328dcd34123456</c>. You'll need to create a separate <c>relay_token</c> for each third party that needs access to the report on your behalf.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docs/none/" /></remarks>
/// <remarks><see href="https://plaid.com/docs/api/products/assets/#creditrelaycreate" /></remarks>
public Task<Credit.CreditRelayCreateResponse> CreditRelayCreateAsync(Credit.CreditRelayCreateRequest request) =>
PostAsync("/credit/relay/create", request)
.ParseResponseAsync<Credit.CreditRelayCreateResponse>();

/// <summary>
/// <para><c>/credit/relay/get</c> allows third parties to get a report that was shared with them, using an <c>relay_token</c> that was created by the report owner.</para>
/// <para><c>/credit/relay/get</c> allows third parties to receive a report that was shared with them, using a <c>relay_token</c> that was created by the report owner.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docs/none/" /></remarks>
/// <remarks><see href="https://plaid.com/docs/api/products/assets/#creditrelayget" /></remarks>
public Task<AssetReport.AssetReportGetResponse> CreditRelayGetAsync(Credit.CreditRelayGetRequest request) =>
PostAsync("/credit/relay/get", request)
.ParseResponseAsync<AssetReport.AssetReportGetResponse>();

/// <summary>
/// <para>The <c>/credit/relay/refresh</c> endpoint allows third parties to refresh an report that was relayed to them, using a <c>relay_token</c> that was created by the report owner. A new report will be created based on the old one, but with the most recent data available.</para>
/// <para>The <c>/credit/relay/refresh</c> endpoint allows third parties to refresh a report that was relayed to them, using a <c>relay_token</c> that was created by the report owner. A new report will be created with the original report parameters, but with the most recent data available based on the <c>days_requested</c> value of the original report.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docs/api/products/#creditrelayrefresh" /></remarks>
/// <remarks><see href="https://plaid.com/docs/api/products/assets/#creditrelayrefresh" /></remarks>
public Task<Credit.CreditRelayRefreshResponse> CreditRelayRefreshAsync(Credit.CreditRelayRefreshRequest request) =>
PostAsync("/credit/relay/refresh", request)
.ParseResponseAsync<Credit.CreditRelayRefreshResponse>();

/// <summary>
/// <para>The <c>/credit/relay/remove</c> endpoint allows you to invalidate a <c>relay_token</c>, meaning the third party holding the token will no longer be able to use it to access the reports to which the <c>relay_token</c> gives access to. The report, items associated with it, and other Relay tokens that provide access to the same report are not affected and will remain accessible after removing the given `relay_token.</para>
/// <para>The <c>/credit/relay/remove</c> endpoint allows you to invalidate a <c>relay_token</c>. The third party holding the token will no longer be able to access or refresh the reports which the <c>relay_token</c> gives access to. The original report, associated Items, and other relay tokens that provide access to the same report are not affected and will remain accessible after removing the given <c>relay_token</c>.</para>
/// </summary>
/// <remarks><see href="https://plaid.com/docs/none/" /></remarks>
/// <remarks><see href="https://plaid.com/docs/api/products/assets/#creditrelayremove" /></remarks>
public Task<Credit.CreditRelayRemoveResponse> CreditRelayRemoveAsync(Credit.CreditRelayRemoveRequest request) =>
PostAsync("/credit/relay/remove", request)
.ParseResponseAsync<Credit.CreditRelayRemoveResponse>();
Expand Down
12 changes: 12 additions & 0 deletions src/Plaid/Entity/AssetReportTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@ public record AssetReportTransaction
[JsonPropertyName("merchant_name")]
public string? MerchantName { get; init; } = default!;

/// <summary>
/// <para>The logo associated with the merchant, if available. Formatted as a 100x100 pixels PNG file path.</para>
/// </summary>
[JsonPropertyName("logo_url")]
public string? LogoUrl { get; init; } = default!;

/// <summary>
/// <para>The website associated with the merchant, if available.</para>
/// </summary>
[JsonPropertyName("website")]
public string? Website { get; init; } = default!;

/// <summary>
/// <para>The check number of the transaction. This field is only populated for check transactions.</para>
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Plaid/Entity/ClientProvidedEnrichedTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public record ClientProvidedEnrichedTransaction
public Entity.EnrichTransactionDirection Direction { get; init; } = default!;

/// <summary>
/// <para>The ISO-4217 currency code of the transaction, e.g., USD.</para>
/// <para>The ISO-4217 currency code of the transaction e.g. USD.</para>
/// </summary>
[JsonPropertyName("iso_currency_code")]
public string IsoCurrencyCode { get; init; } = default!;
Expand Down
2 changes: 1 addition & 1 deletion src/Plaid/Entity/ClientProvidedRawTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ClientProvidedRawTransaction
public decimal Amount { get; set; } = default!;

/// <summary>
/// <para>The ISO-4217 currency code of the transaction, e.g., USD.</para>
/// <para>The ISO-4217 currency code of the transaction e.g. USD.</para>
/// </summary>
[JsonPropertyName("iso_currency_code")]
public string IsoCurrencyCode { get; set; } = default!;
Expand Down
21 changes: 20 additions & 1 deletion src/Plaid/Entity/ClientProvidedTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,27 @@ public class ClientProvidedTransaction
public Entity.EnrichTransactionDirection Direction { get; set; } = default!;

/// <summary>
/// <para>The ISO-4217 currency code of the transaction, e.g., USD.</para>
/// <para>The ISO-4217 currency code of the transaction e.g. USD.</para>
/// </summary>
[JsonPropertyName("iso_currency_code")]
public string IsoCurrencyCode { get; set; } = default!;

/// <summary>
/// <para>A representation of where a transaction took place.</para>
/// <para>Use this field to pass in structured location information you may have about your transactions.</para>
/// </summary>
[JsonPropertyName("location")]
public Entity.ClientProvidedTransactionLocation Location { get; set; } = default!;

/// <summary>
/// <para>Merchant category codes (MCCs) are four-digit numbers that describe a merchant's primary business activities.</para>
/// </summary>
[JsonPropertyName("mcc")]
public string Mcc { get; set; } = default!;

/// <summary>
/// <para>The date the transaction posted, in <a href="https://wikipedia.org/wiki/ISO_8601">ISO 8601</a> (YYYY-MM-DD) format.</para>
/// </summary>
[JsonPropertyName("date_posted")]
public DateOnly DatePosted { get; set; } = default!;
}
38 changes: 38 additions & 0 deletions src/Plaid/Entity/ClientProvidedTransactionLocation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>A representation of where a transaction took place.</para>
/// <para>Use this field to pass in structured location information you may have about your transactions.</para>
/// </summary>
public class ClientProvidedTransactionLocation
{
/// <summary>
/// <para>The country where the transaction occurred.</para>
/// </summary>
[JsonPropertyName("country")]
public string Country { get; set; } = default!;

/// <summary>
/// <para>The region or state where the transaction occurred.</para>
/// </summary>
[JsonPropertyName("region")]
public string Region { get; set; } = default!;

/// <summary>
/// <para>The city where the transaction occurred.</para>
/// </summary>
[JsonPropertyName("city")]
public string City { get; set; } = default!;

/// <summary>
/// <para>The street address where the transaction occurred.</para>
/// </summary>
[JsonPropertyName("address")]
public string Address { get; set; } = default!;

/// <summary>
/// <para>The postal code where the transaction occurred.</para>
/// </summary>
[JsonPropertyName("postal_code")]
public string PostalCode { get; set; } = default!;
}
12 changes: 12 additions & 0 deletions src/Plaid/Entity/Counterparty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,16 @@ public record Counterparty
/// </summary>
[JsonPropertyName("type")]
public Entity.CounterpartyType Type { get; init; } = default!;

/// <summary>
/// <para>The website associated with the counterparty.</para>
/// </summary>
[JsonPropertyName("website")]
public string? Website { get; init; } = default!;

/// <summary>
/// <para>The URL of a logo associated with the counterparty, if available. The logo is formatted as a 100x100 pixel PNG filepath.</para>
/// </summary>
[JsonPropertyName("logo_url")]
public string? LogoUrl { get; init; } = default!;
}
12 changes: 9 additions & 3 deletions src/Plaid/Entity/CounterpartyType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ public enum CounterpartyType
PaymentApp,

/// <summary>
/// <para>a food delivery marketplace (e.g DoorDash)</para>
/// <para>a marketplace (e.g DoorDash, Google Play Store)</para>
/// </summary>
[EnumMember(Value = "delivery_marketplace")]
DeliveryMarketplace,
[EnumMember(Value = "marketplace")]
Marketplace,

/// <summary>
/// <para>a point-of-sale payment terminal (e.g Square, Toast)</para>
/// </summary>
[EnumMember(Value = "payment_terminal")]
PaymentTerminal,

/// <summary>
/// <para>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.</para>
Expand Down
26 changes: 26 additions & 0 deletions src/Plaid/Entity/CreditAmountWithCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>This contains an amount, denominated in the currency specified by either <c>iso_currency_code</c> or <c>unofficial_currency_code</c></para>
/// </summary>
public record CreditAmountWithCurrency
{
/// <summary>
/// <para>Value of amount with up to 2 decimal places.</para>
/// </summary>
[JsonPropertyName("amount")]
public decimal Amount { get; init; } = default!;

/// <summary>
/// <para>The ISO 4217 currency code of the amount or balance.</para>
/// </summary>
[JsonPropertyName("iso_currency_code")]
public string? IsoCurrencyCode { get; init; } = default!;

/// <summary>
/// <para>The unofficial currency code associated with the amount or balance. Always <c>null</c> if <c>iso_currency_code</c> is non-null.</para>
/// <para>Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.</para>
/// </summary>
[JsonPropertyName("unofficial_currency_code")]
public string? UnofficialCurrencyCode { get; init; } = default!;
}
11 changes: 11 additions & 0 deletions src/Plaid/Entity/CreditBankIncomeHistoricalSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,34 @@ public record CreditBankIncomeHistoricalSummary
{
/// <summary>
/// <para>Total amount of earnings for the income source(s) of the user for the month in the summary.</para>
/// <para>This may return an incorrect value if the summary includes income sources in multiple currencies. </para>
/// <para>Please use <a href="https://plaid.com/docs/api/products/income/#credit-bank_income-get-response-bank-income-items-bank-income-sources-historical-summary-total-amounts"><c>total_amounts</c></a> instead.</para>
/// </summary>
[JsonPropertyName("total_amount")]
public decimal TotalAmount { get; init; } = default!;

/// <summary>
/// <para>The ISO 4217 currency code of the amount or balance.</para>
/// <para>Please use <a href="https://plaid.com/docs/api/products/income/#credit-bank_income-get-response-bank-income-items-bank-income-sources-historical-summary-total-amounts"><c>total_amounts</c></a> instead.</para>
/// </summary>
[JsonPropertyName("iso_currency_code")]
public string? IsoCurrencyCode { get; init; } = default!;

/// <summary>
/// <para>The unofficial currency code associated with the amount or balance. Always <c>null</c> if <c>iso_currency_code</c> is non-null.</para>
/// <para>Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.</para>
/// <para>Please use <a href="https://plaid.com/docs/api/products/income/#credit-bank_income-get-response-bank-income-items-bank-income-sources-historical-summary-total-amounts"><c>total_amounts</c></a> instead.</para>
/// </summary>
[JsonPropertyName("unofficial_currency_code")]
public string? UnofficialCurrencyCode { get; init; } = default!;

/// <summary>
/// <para>Total amount of earnings for the income source(s) of the user for the month in the summary.</para>
/// <para>This can contain multiple amounts, with each amount denominated in one unique currency.</para>
/// </summary>
[JsonPropertyName("total_amounts")]
public IReadOnlyList<Entity.CreditAmountWithCurrency> TotalAmounts { get; init; } = default!;

/// <summary>
/// <para>The start date of the period covered in this monthly summary.</para>
/// <para>This date will be the first day of the month, unless the month being covered is a partial month because it is the first month included in the summary and the date range being requested does not begin with the first day of the month.</para>
Expand Down
13 changes: 12 additions & 1 deletion src/Plaid/Entity/CreditBankIncomeSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,34 @@ public record CreditBankIncomeSummary
{
/// <summary>
/// <para>Total amount of earnings across all the income sources in the end user's Items for the days requested by the client.</para>
/// <para>This may return an incorrect value if the summary includes income sources in multiple currencies.</para>
/// <para>Please use <a href="https://plaid.com/docs/api/products/income/#credit-bank_income-get-response-bank-income-bank-income-summary-total-amounts"><c>total_amounts</c></a> instead.</para>
/// </summary>
[JsonPropertyName("total_amount")]
public decimal TotalAmount { get; init; } = default!;

/// <summary>
/// <para>The ISO 4217 currency code of the amount or balance.</para>
/// <para>The ISO 4217 currency code of the amount or balance. </para>
/// <para>Please use <a href="https://plaid.com/docs/api/products/income/#credit-bank_income-get-response-bank-income-bank-income-summary-total-amounts"><c>total_amounts</c></a> instead.</para>
/// </summary>
[JsonPropertyName("iso_currency_code")]
public string? IsoCurrencyCode { get; init; } = default!;

/// <summary>
/// <para>The unofficial currency code associated with the amount or balance. Always <c>null</c> if <c>iso_currency_code</c> is non-null.</para>
/// <para>Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.</para>
/// <para>Please use <a href="https://plaid.com/docs/api/products/income/#credit-bank_income-get-response-bank-income-bank-income-summary-total-amounts"><c>total_amounts</c></a> instead.</para>
/// </summary>
[JsonPropertyName("unofficial_currency_code")]
public string? UnofficialCurrencyCode { get; init; } = default!;

/// <summary>
/// <para>Total amount of earnings across all the income sources in the end user's Items for the days requested by the client.</para>
/// <para>This can contain multiple amounts, with each amount denominated in one unique currency.</para>
/// </summary>
[JsonPropertyName("total_amounts")]
public IReadOnlyList<Entity.CreditAmountWithCurrency> TotalAmounts { get; init; } = default!;

/// <summary>
/// <para>The earliest date within the days requested in which all income sources identified by Plaid appear in a user's account.</para>
/// <para>The date will be returned in an ISO 8601 format (YYYY-MM-DD).</para>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
namespace Going.Plaid.Entity;

/// <summary>
/// <para>Best guess frequency of transactions of the end customer.</para>
/// <para>The explicit pay basis on the paystub (if present).</para>
/// </summary>
public enum TransactionFrequency
public enum CreditPayStubPayBasisType
{
/// <summary>
///
/// </summary>
[EnumMember(Value = "once_per_month")]
OncePerMonth,
[EnumMember(Value = "SALARY")]
Salary,

/// <summary>
///
/// </summary>
[EnumMember(Value = "twice_per_month")]
TwicePerMonth,
[EnumMember(Value = "HOURLY")]
Hourly,

/// <summary>
///
/// </summary>
[EnumMember(Value = "four_times_per_month")]
FourTimesPerMonth,

/// <summary>
///
/// </summary>
[EnumMember(Value = "daily")]
Daily,
[EnumMember(Value = "COMMISSION")]
Commission,

/// <summary>
/// <para>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.</para>
Expand Down
25 changes: 0 additions & 25 deletions src/Plaid/Entity/DisbursementLimits.cs

This file was deleted.

Loading

0 comments on commit e586a25

Please sign in to comment.