Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork36
viceroypenguin/Going.Plaid
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Going.Plaid is a library for interacting withPlaid's banking APIs. See their documentationhere.It is supported for .net standard 2.0, .net core 3.1, and .net 5.0+.
Going.Plaid is available atnuget.org.
Package ManagerPM > Install-Package Going.Plaid
You can make all calls to Plaid's API via theGoing.Plaid.PlaidClient
class.
varclient=newPlaidClient(Environment.Sandbox);// Retrieving a user's recent transactions.varresult=awaitclient.TransactionsGetAsync(new(){Secret="<secret>",ClientId="<client_id>",AccessToken="<access_token>",});
You may providesecret
andclientId
to the constructor as follows:
varclient=newPlaidClient(Environment.Sandbox,secret:"<secret>",clientId:"<client_id>");// Retrieving a user's recent transactions.varresult=awaitclient.TransactionsGetAsync(new(){AccessToken="<access_token>",});
This will allow you to save a singlePlaidClient
in the DI system without trackingsecret
andclientId
separately.PlaidClient
is comfortable being used as a single-instance class in this manner.
Please visitthis repo and download to review a working example ofhow to use this library and the Plaid API.
Callservices.AddPlaid(IConfigurationRoot)
orservices.AddPlaid(IConfiguration)
. This will automatically bind optionsfrom the provided configuration section or thePlaid
section of the root; configure a namedHttpClient
for Going.Plaid;and configurePlaidClient
as a singleton.
Going.Plaid supports theIHttpClientFactory
for correct usage ofHttpClient
, as describedhere.If you choose not to call.AddPlaid()
, because you need to customize your DI structure, it is recommended that you callservices.AddPlaidClient()
to properly configure theIHttpClientFactory
for Going.Plaid usage.
Going.Plaid supports configuration from any configuration source via theIOptions
pattern.You can provide any configuration section to.AddPlaid()
and the options will be automatically bound.Alternatively, you may callservices.Configure<PlaidOptions>();
to configure thePlaidOption
manually.Once done, you can then addPlaidClient
as a singleton by callingservices.AddSingleton<PlaidClient>()
.
There are several converters that Going.Plaid uses to serialize and deserialize data to the Plaid service.These converters are automatically used internally for all api calls to Plaid. However, if you need to doany serialization or deserialization of your own (for example, if you wish to passGoing.Plaid.Link.OnSuccessMetadata
directly from the browser to the web server), then you may need to add these converters to the ASP.NETJSON serializer. The easiest way to do this is as follows:
services.Configure<JsonOptions>(o=>{o.SerializerOptions.AddPlaidConverters();});
This will automatically add the converters to the default options for ASP.NET JSON serializer. Otherwise,you can manually add the types found underGoing.Plaid.Converters
to theJsonSerializationOptions.Converters
list of converters.
Going.Plaid currently targets Plaid API version2020-09-14
only.
About
Plaid API .NET library
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors14
Uh oh!
There was an error while loading.Please reload this page.