Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library version v8.0.0 #13

Merged
merged 38 commits into from
Apr 27, 2024
Merged

Library version v8.0.0 #13

merged 38 commits into from
Apr 27, 2024

Conversation

RobinTTY
Copy link
Owner

@RobinTTY RobinTTY commented Apr 27, 2024

Breaking changes

  • The BasicError type was removed since it has the same properties as the BasicResponse type. This changes the signatures of the following methods:
    • AccountsEndpoint.GetAccount() now returns Task<NordigenApiResponse<BankAccount, BasicResponse>> instead of Task<NordigenApiResponse<BankAccount, BasicError>>
    • AgreementsEndpoint.GetAgreements() now returns Task<NordigenApiResponse<ResponsePage<Agreement>, BasicResponse>> instead of Task<NordigenApiResponse<ResponsePage<Agreement>, BasicError>>
    • AgreementsEndpoint.GetAgreement() now returns Task<NordigenApiResponse<Agreement, BasicResponse>> instead of Task<NordigenApiResponse<Agreement, BasicError>>
    • AgreementsEndpoint.DeleteAgreement() now returns Task<NordigenApiResponse<BasicResponse, BasicResponse>> instead of Task<NordigenApiResponse<BasicResponse, BasicError>>
    • AgreementsEndpoint.AcceptAgreement() now returns Task<NordigenApiResponse<Agreement, BasicResponse>> instead of Task<NordigenApiResponse<Agreement, BasicError>>
    • InstitutionsEndpoint.GetInstitution() now returns Task<NordigenApiResponse<Institution, BasicResponse>> instead of Task<NordigenApiResponse<Institution, BasicError>>
    • RequisitionsEndpoint.GetRequisitions() now returns Task<NordigenApiResponse<ResponsePage<Requisition>, BasicResponse>> instead of Task<NordigenApiResponse<ResponsePage<Requisition>, BasicError>>
    • RequisitionsEndpoint.GetRequisition() now returns Task<NordigenApiResponse<Requisition, BasicResponse>> instead of Task<NordigenApiResponse<Requisition, BasicError>>
    • RequisitionsEndpoint.DeleteRequisition() now returns Task<NordigenApiResponse<BasicResponse, BasicResponse>> instead of Task<NordigenApiResponse<BasicResponse, BasicError>>
    • TokenEndpoint.GetTokenPair() now returns Task<NordigenApiResponse<JsonWebTokenPair, BasicResponse>> instead of Task<NordigenApiResponse<JsonWebTokenPair, BasicError>>
    • TokenEndpoint.RefreshAccessToken() now returns Task<NordigenApiResponse<JsonWebAccessToken, BasicResponse>> instead of Task<NordigenApiResponse<JsonWebAccessToken, BasicError>>
  • The InstitutionsError type has been removed and replaced by BasicResponse since the error can in all cases be simplified to this type. This changes the signatures of the following method:
    • InstitutionsEndpoint.GetInstitutions() now returns Task<NordigenApiResponse<List<Institution>, BasicResponse>> instead of Task<NordigenApiResponse<List<Institution>, InstitutionsError>>
  • Introduced the following exceptions:
    • AccountsEndpoint.GetTransactions() now immediately throws an ArgumentException when the endDate argument contains a date before startDate instead of executing the response, since this will always result in an error being returned by the API
    • JsonWebTokenPair and NordigenClientCredentials now throw an ArgumentNullException when the supplied string arguments are null
  • Multiple changes to the Institution type:
    • Changed the type of the TransactionTotalDays property from int to uint since this value can't be negative
    • Added the following new properties:
      • SupportedPayments: The supported payment products for this institution (e.g. SepaCreditTransfers, SwiftPaymentService, etc.)
      • SupportedFeatures: The supported features for this institution (e.g. account_selection, card_accounts, etc.). This can inform you which features you can use when creating a requisition with an institution.
      • IdentificationCodes: Undocumented field in the response model
  • Changed properties of type IEnumerable to List since most where already returning List and to bring them in line. This affects the following properties:
    • ResponsePage.Results
    • Tranasction.RemittanceInformationUnstructuredArray
    • Transaction.RemittanceInformationStructuredArray
    • Transaction.CurrencyExchange

Miscellaneous

  • When the client can't acquire a valid access token needed for authenticated requests it won't try to execute any subsequent request anymore (if they require authentication). Instead the error returned by the authentication request is returned immediately. The previous behavior was to execute the subsequent request which would return a more generic authentication error.
  • The TokenPairUpdated event is now only raised when the token was successfully updated. In the past it was also raised for unsuccessful token refreshes. Therefore the TokenPairUpdatedEventArgs.JsonWebTokenPair property is now no longer nullable.
  • Fixed a multitude of errors not being correctly deserialized due to erratic API response models

RobinTTY added 30 commits April 5, 2024 22:35
… constructors by throwing exception when null is provided as argument
…startDate instead of executing request, update tests
@RobinTTY RobinTTY self-assigned this Apr 27, 2024
RobinTTY

This comment was marked as duplicate.

@RobinTTY RobinTTY merged commit 644038d into main Apr 27, 2024
4 checks passed
@RobinTTY RobinTTY deleted the v8.0.0 branch April 27, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant