Git Product home page Git Product logo

nordigendotnet's People

Contributors

dependabot[bot] avatar itisnathaniel avatar vmelnalksnis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nordigendotnet's Issues

NordigenTokenCache is not thread-safe

Currently token access/updates in NordigenTokenCache are not thread-safe, which might cause failed requests when refreshing/recreating tokens.

Should only be an issue in long running applications, since by default access tokens will be refreshed once in 12 hours, and the refresh token once in 15 days.

Allow configuration of HttpClient used for tokens

Currently the HttpClient used to create and refresh tokens is not user configurable, and does not expose it's IHttpClientBuilder. That means that all other endpoints can be, for example, configured with retries, but not the token endpoints.

Fix publish.sh attributes

deployments/publish.sh should be executable by default, so that it does not have to be set in actions.

Bug Missing = after date_from on uri

Hi,

You missed an "=" in the query after "date_from"

@VMelnalksnis.NordigenDotNet/Accounts/AccountClient.cs
@public async Task GetTransactions
@line 65

uri += $"?date_from{value.Start:yyyy-MM-dd}&date_to={value.End:yyyy-MM-dd}";

should be:
uri += $"?date_from={value.Start:yyyy-MM-dd}&date_to={value.End:yyyy-MM-dd}";
Thx

Add 'transactionId' to pending transactions

Is your feature request related to a problem? Please describe.

  • Pending transactions for some banks have an ID which is not passed through by this library from nordigen on the pending transaction data type, IDs are only available for booked transactions currently

Describe the solution you'd like

  • Moving the following property from /Accounts/BookedTransaction.cs to /Accounts/Transaction.cs would resolve this, so the property is available on both booked and pending transactions
/// <summary>Gets or sets a unique transaction id created by the <see cref="Institution"/>.</summary>
public string TransactionId { get; set; } = null!;

Additional context

  • Noticed that this field is present and populated in AMEX data feeds

Missing fields in transaction object

Is your feature request related to a problem? Please describe.
Missing fields in transactions

Describe the solution you'd like
I've noticed that I'm now seeing more information available in the 'pending' data for one of my accounts.

I've have moved the following items from only being present on booked transactions to being present on all transactions: BookingDate, CreditorName, EntryReference.

I've also added support for the following new fields:

  • CurrencyExchange - exchange rate
  • BookingDateTime - combined date and time for transaction booking
  • ValueDateTime - combined date and time for transaction value

There's some example data here too:

"pending": [
  {
      "transactionId": "XXXX",
      "entryReference": "XXXX",
      "bookingDate": "2023-11-08",
      "bookingDateTime": "2023-11-08T10:05:00Z",
      "transactionAmount": {
          "amount": "-10.00",
          "currency": "GBP"
      },
      "currencyExchange": {
          "sourceCurrency": "GBP",
          "exchangeRate": "0.0"
      },
      "creditorName": "EXAMPLE",
      "remittanceInformationUnstructured": "EXAMPLE-123",
      "additionalInformation": "XXXX",
      "merchantCategoryCode": "000"
  }
]

Describe alternatives you've considered
Adding additional fields to transactions

Additional context
Add any other context or screenshots about the feature request here.

Refresh the access token

Currently the access token is acquired once when the client is created. In ASP.NET Core, when used from a controller, that means that INordigenClient authenticates once per incoming request, which works, but is a bit wasteful.

NordigenHttpClient should preserve the token and automatically refresh it.

Add StructuredInformation to Transaccion class

Describe the bug
Transacciont record does not contains a property to save "remittanceInformationStructured"

To Reproduce
Transacctions retrieved from this intitution_id => ABANCA_CAGLESMM needs to get "remittanceInformationStructured" whit the transacction description.

Expected behavior
Get the "remittanceInformationStructured" from Nordigen API

/// <summary>Gets or sets structured information about the transaction, usually added by the debtor.</summary>
[JsonPropertyName("remittanceInformationStructured")]
public string StructuredInformation { get; set; } = null!;

Account.LastAccesed ["last_accesed"] it's optional and should be nullable

Describe the bug
The property LastAccesed for the Account class is not nullable but the Nordigen documentation describes it as optional.
It should be nullable.

Now:
///

Gets or sets the point in time when the account object was last accessed.
[JsonPropertyName("last_accessed")]
public Instant LastAccessed { get; set; }

Should be;
///

Gets or sets the point in time when the account object was last accessed.
[JsonPropertyName("last_accessed")]
public Instant? LastAccessed { get; set; } = null!;

To Reproduce
Steps to reproduce the behavior:
Getting de account for the institution_id => ABANCA_CAGLESMM does not return last_accesed property and return a format exception during serialization when try to parse the NodaTime Instant

Expected behavior
Set LastAccessed property as nullable
///

Gets or sets the point in time when the account object was last accessed.
[JsonPropertyName("last_accessed")]
public Instant? LastAccessed { get; set; } = null!;

Screenshots
image

Additional context
Add any other context about the problem here.

Premium endpoint support

Currently I have no plans of using/paying for the premium endpoints, I don't plan to add support for them.

If those are needed, either provide a sample of the data returned by the endpoints, as I don't trust their documentation, or open a pull request.

Support Transaction Data with Non-Zulu Time

Is your feature request related to a problem? Please describe.

After support for ValueDateTime and BookingDateTime being implemented, I've found that in addition to some banks supporting Zulu Time (i.e. 2023-11-08T10:05:00Z) as shown in the documentation, some banks also return an offset instead (like 2023-11-08T10:05:00+00:00) which the instant date type is not able to handle when parsed.

The below exception is thrown when returning transacitons for a bank that returns with such data:
Image showing exception thrown

Describe the solution you'd like

I suggest that the ValueDateTime and BookingDateTime parameters instead become OffsetDateTime data types, to add support for offset timezones which may be returned from banks in practice.

Adding support for maskedPan and Details fields

Is your feature request related to a problem? Please describe.

When looking at some account types, I noticed that the account fields maskedPan and details are not passed through the library, this PR adds support for these types.

A sample sanitised API response from the /api/v2/accounts/:id/details/ endpoint:

{
    "account": {
        "resourceId": "resource_id",
        "currency": "GBP",
        "ownerName": "Account User",
        "cashAccountType": "CARD",
        "status": "enabled",
        "maskedPan": "XXXX-XXXXXX-12345",
        "details": "A Sample Card"
    }
}

Describe the solution you'd like
Adding support for the maskedPan and details items in the API

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context

  • Noticed that this field is present and populated in AMEX data feeds

Add policy handler which handles API rate limits

Is your feature request related to a problem? Please describe.
The APIs have undocumented rate limits which are being hit during integration tests.

Describe the solution you'd like
The client contains retry policies which handles standard rate limiting.

Describe alternatives you've considered

Additional context
Example rate limited response:

{"summary":"Rate limit exceeded","detail":"The rate limit for this resource is 300/minute. Please try again in 20 seconds","status_code":429}
09:57:02 [INF] [System.Net.Http.HttpClient.Nordigen.ClientHandler] Sending HTTP request GET https://ob.nordigen.com/api/v2/requisitions/?limit=100&offset=0
09:57:02 [VRB] [System.Net.Http.HttpClient.Nordigen.ClientHandler] Request Headers:
User-Agent: VMelnalksnis.NordigenDotNet/1.0.0.0
Authorization: Bearer ********
09:57:02 [INF] [System.Net.Http.HttpClient.Nordigen.ClientHandler] Received HTTP response headers after 405.6839ms - 429
09:57:02 [VRB] [System.Net.Http.HttpClient.Nordigen.ClientHandler] Response Headers:
Date: Sat, 03 Feb 2024 07:57:41 GMT
Connection: keep-alive
Server: nginx
Vary: Accept, Accept-Language
X-C-UUID: 6ab1565a-81d2-4dcb-a899-c4150e3d55c6
X-U-UUID: 08027fea-7f3f-43fc-bee6-e2e68a844a59
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Content-Type: application/json
Content-Length: 141
Allow: GET, POST, HEAD, OPTIONS
Content-Language: en
09:57:02 [INF] [System.Net.Http.HttpClient.Nordigen.LogicalHandler] End processing HTTP request after 980.0212ms - 429
09:57:02 [VRB] [System.Net.Http.HttpClient.Nordigen.LogicalHandler] Response Headers:
Date: Sat, 03 Feb 2024 07:57:41 GMT
Connection: keep-alive
Server: nginx
Vary: Accept, Accept-Language
X-C-UUID: 6ab1565a-81d2-4dcb-a899-c4150e3d55c6
X-U-UUID: 08027fea-7f3f-43fc-bee6-e2e68a844a59
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Content-Type: application/json
Content-Length: 141
Allow: GET, POST, HEAD, OPTIONS
Content-Language: en

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.