-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for
/cra/check_report/pdf/get
endpoint
- Loading branch information
1 parent
728a96b
commit cac899e
Showing
3 changed files
with
50 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Going.Plaid.Credit; | ||
|
||
/// <summary> | ||
/// <para>CheckReportPdfGetRequest defines the request schema for <c>/cra/check_report/pdf/get</c></para> | ||
/// </summary> | ||
public partial class CheckReportPdfGetRequest : RequestBase | ||
{ | ||
/// <summary> | ||
/// <para>Use this field to include other reports in the PDF.</para> | ||
/// <para>Possible values: <c>cra_income_insights</c></para> | ||
/// </summary> | ||
[JsonPropertyName("add_ons")] | ||
public IReadOnlyList<Entity.CheckReportPdfGetRequestAddOnsEnum> AddOns { 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,14 @@ | ||
namespace Going.Plaid; | ||
|
||
public sealed partial class PlaidClient | ||
{ | ||
/// <summary> | ||
/// <para>The <c>/cra/check_report/pdf/get</c> retrieves the most recent Consumer Report in PDF format. By default, the most recent Base Report (if it exists) for the user will be returned. To request that the most recent Income Insights report be included in the PDF as well, use the <c>add-ons</c> field.</para> | ||
/// <para>The response to <c>/asset_report/pdf/get</c> is the PDF binary data. The <c>request_id</c> is returned in the <c>Plaid-Request-ID</c> header.</para> | ||
/// <para><a href="https://plaid.com/documents/sample-asset-report.pdf">View a sample PDF Asset Report</a></para> | ||
/// </summary> | ||
/// <remarks><see href="https://plaid.com/docs/api/products/assets/#asset_reportpdfget" /></remarks> | ||
public Task<FileResponse> CreditCheckReportPdfGetAsync(Credit.CheckReportPdfGetRequest request) => | ||
PostAsync("/cra/check_report/pdf/get", request) | ||
.ParseFileResponseAsync(); | ||
} |
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,22 @@ | ||
namespace Going.Plaid.Entity; | ||
|
||
/// <summary> | ||
/// <para>Use this enum to specify other reports to include in the PDF.</para> | ||
/// <para>Possible values: <c>cra_income_insights</c></para> | ||
/// </summary> | ||
public enum CheckReportPdfGetRequestAddOnsEnum | ||
{ | ||
|
||
/// <summary> | ||
/// <para>Include Check Report Income Insights</para> | ||
/// </summary> | ||
[EnumMember(Value = "cra_income_insights")] | ||
CraIncomeInsights, | ||
|
||
/// <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> | ||
/// </summary> | ||
[EnumMember(Value = "undefined")] | ||
Undefined, | ||
|
||
} |