Skip to main content

AgreementsEndpoint

The AgreementsEndpoint class provides support for the API operations of the agreements endpoint.

Methods​

GetAgreements​

Gets a ResponsePage containing a given number of end user agreements.

public async Task<NordigenApiResponse<ResponsePage<Agreement>, BasicResponse>>
GetAgreements(int limit, int offset, CancellationToken cancellationToken = default)

Parameters​

limit - int​

Number of results to return per page.

offset - int​

The initial index from which to return the results.

cancellationToken - CancellationToken​

A token to signal cancellation of the operation.

Returns​

Task<NordigenApiResponse<ResponsePage<Agreement>, BasicResponse>>

A NordigenApiResponse containing the ResponsePage which in turn contains the end user agreement(s) if the request was successful.

GetAgreement​

Gets the end user agreement with the given id.

public async Task<NordigenApiResponse<Agreement, BasicResponse>>
GetAgreement(Guid id, CancellationToken cancellationToken = default)

Overloaded id parameter using the string type:

public async Task<NordigenApiResponse<Agreement, BasicResponse>>
GetAgreement(string id, CancellationToken cancellationToken = default)

Parameters​

id - Guid | string​

The id of the agreement to retrieve.

cancellationToken - CancellationToken​

A token to signal cancellation of the operation.

Returns​

Task<NordigenApiResponse<Agreement, BasicResponse>>

A NordigenApiResponse containing the end user agreement if the request was successful.

CreateAgreement​

Creates a new end user agreement which determines the scope and length of access to data provided by institutions.

public async Task<NordigenApiResponse<Agreement, CreateAgreementError>>
CreateAgreement(string institutionId, uint accessValidForDays = 90, uint maxHistoricalDays = 90,
List<AccessScope>? accessScope = null, bool reconfirmationSupported = false,
CancellationToken cancellationToken = default)

Parameters​

institutionId - string​

The institution this agreement will refer to.

accessValidForDays - uint​

The length the access to the account will be valid for to request.

maxHistoricalDays - uint​

The length of the transaction history in days to request.

accessScope - List<AccessScope>?​

The scope of information that will be available for access to request. By default all access scopes (balances, transactions and details) will be requested.

reconfirmationSupported - bool​

Whether this agreement should be extendable. Supported by British banks only.

cancellationToken - CancellationToken​

A token to signal cancellation of the operation.

Returns​

Task<NordigenApiResponse<Agreement, CreateAgreementError>>

A NordigenApiResponse containing the create end user agreement if the request was successful.

DeleteAgreement​

Deletes the end user agreement with the given id.

public async Task<NordigenApiResponse<BasicResponse, BasicResponse>>
DeleteAgreement(Guid id, CancellationToken cancellationToken = default)

Overloaded id parameter using the string type:

public async Task<NordigenApiResponse<BasicResponse, BasicResponse>>
DeleteAgreement(string id, CancellationToken cancellationToken = default)

Parameters​

id - Guid | string​

The id of the agreement to delete.

cancellationToken - CancellationToken​

A token to signal cancellation of the operation.

Returns​

Task<NordigenApiResponse<BasicResponse, BasicResponse>>

A NordigenApiResponse containing a confirmation of the deletion if the request was successful.

AcceptAgreement​

Accepts an end user agreement.

public async Task<NordigenApiResponse<Agreement, BasicResponse>>
AcceptAgreement(Guid id, string userAgent, string ipAddress,
CancellationToken cancellationToken = default)

Overloaded id parameter using the string type:

public async Task<NordigenApiResponse<Agreement, BasicResponse>>
AcceptAgreement(string id, string userAgent, string ipAddress,
CancellationToken cancellationToken = default)
Information

This functionality is only available to customers with an enterprise contract at GoCardless. Therefore this method is untested. Please open an issue if you encounter any problems.

Parameters​

id - Guid | string​

The id of the end user agreement to accept.

userAgent - string​

User agent of the client that accepts the request.

ipAddress - string​

IP address of the client that accepts the request.

cancellationToken - CancellationToken​

A token to signal cancellation of the operation.

Returns​

Task<NordigenApiResponse<Agreement, BasicResponse>>

A NordigenApiResponse containing the accepted end user agreement if the request was successful.

GetReconfirmationDetails​

Retrieves a Reconfirmation for a specific agreement.

public async Task<NordigenApiResponse<Reconfirmation, BasicResponse>> GetReconfirmationDetails(
Guid agreementId, CancellationToken cancellationToken = default);

Overloaded agreementId parameter using the string type:

public async Task<NordigenApiResponse<Reconfirmation, BasicResponse>> GetReconfirmationDetails(
string agreementId, CancellationToken cancellationToken = default);

Parameters​

agreementId - Guid | string​

The unique identifier of the agreement to retrieve the reconfirmation details for.

cancellationToken - CancellationToken​

A token to signal cancellation of the operation.

Returns​

Task<NordigenApiResponse<Reconfirmation, BasicResponse>>

A NordigenApiResponse containing the reconfirmation details if the request was successful.

Information

This functionality is only available to customers with an enterprise contract at GoCardless. Therefore this method is untested. Please open an issue if you encounter any problems.

ReconfirmAgreement​

Reconfirms an existing agreement based on the provided identifier.

public async Task<NordigenApiResponse<Reconfirmation, BasicResponse>> ReconfirmAgreement(
Guid agreementId, Uri? redirect = null, CancellationToken cancellationToken = default);

Overloaded agreementId parameter using the string type:

public async Task<NordigenApiResponse<Reconfirmation, BasicResponse>> ReconfirmAgreement(
string agreementId, Uri? redirect = null, CancellationToken cancellationToken = default);

Parameters​

agreementId - Guid | string​

The unique identifier of the agreement to be reconfirmed.

redirect - Uri? (optional)​

Optional URL overriding the requisition's redirect.

cancellationToken - CancellationToken​

A token to signal cancellation of the operation.

Returns​

Task<NordigenApiResponse<Reconfirmation, BasicResponse>>

A NordigenApiResponse containing the reconfirmation details if the request was successful.

Information

This functionality is only available to customers with an enterprise contract at GoCardless. Therefore this method is untested. Please open an issue if you encounter any problems.