Skip to content

Commit

Permalink
Add documentation of errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTTY committed Aug 7, 2024
1 parent 3b3be28 commit 6b63e2d
Show file tree
Hide file tree
Showing 9 changed files with 258 additions and 41 deletions.
56 changes: 56 additions & 0 deletions docs/docs/api-reference/errors/accounts-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: AccountsError
---

The `AccountsError` class represents an error description as returned by some operations of the accounts endpoint of the GoCardless API.

## Properties

### `Summary` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The summary text of the error.

### `Detail` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The detailed description of the error.

### `Type` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The type of the error.

### `StartDateError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the [`AccountsEndpoint.GetTransactions`](/docs/api-reference/endpoints/accounts-endpoint#gettransactions) method because the start date value was not accepted.

### `EndDateError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the [`AccountsEndpoint.GetTransactions`](/docs/api-reference/endpoints/accounts-endpoint#gettransactions) method because the end date value was not accepted.

## Constructor

```csharp
public AccountsError(string summary, string detail, string? type,
BasicResponse? startDateError, BasicResponse? endDateError)
```

### Parameters

#### `summary` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The summary text of the error.

#### `detail` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The detailed description of the error.

#### `type` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The type of the error.

#### `startDateError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the [`AccountsEndpoint.GetTransactions`](/docs/api-reference/endpoints/accounts-endpoint#gettransactions) method because the start date value was not accepted.

#### `endDateError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the [`AccountsEndpoint.GetTransactions`](/docs/api-reference/endpoints/accounts-endpoint#gettransactions) method because the end date value was not accepted.
74 changes: 74 additions & 0 deletions docs/docs/api-reference/errors/create-agreement-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
title: CreateAgreementError
---

The `CreateAgreementError` class represents an error description as returned by the create operation of the agreements endpoint of the GoCardless API.

## Properties

### `Summary` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The summary text of the error.

### `Detail` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The detailed description of the error.

### `InstitutionIdError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the institutionId sent during the request.

### `AccessScopeError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the accessScope property sent during the request.

### `MaxHistoricalDaysError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the maxHistoricalDays property sent during the request.

### `AccessValidForDaysError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the accessValidForDays property sent during the request.

### `AgreementError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the institutionId property sent during the request.

## Constructor

```csharp
public CreateAgreementError(
string? summary, string? detail, BasicResponse? institutionIdError,
BasicResponse? accessScopeError, BasicResponse? maxHistoricalDaysError,
BasicResponse? accessValidForDaysError, BasicResponse? agreementError)
```

### Parameters

#### `summary` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The summary text of the error.

#### `detail` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The detailed description of the error.

#### `institutionIdError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the institutionId sent during the request.

#### `accessScopeError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the accessScope property sent during the request.

#### `maxHistoricalDaysError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the maxHistoricalDays property sent during the request.

#### `accessValidForDaysError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the accessValidForDays property sent during the request.

#### `agreementError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the institutionId property sent during the request.
90 changes: 90 additions & 0 deletions docs/docs/api-reference/errors/create-requisition-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
title: CreateRequisitionError
---

The `CreateRequisitionError` class represents an error description as returned by the create operation of the requisitions endpoint of the GoCardless API.

## Properties

### `Summary` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The summary text of the error.

### `Detail` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The detailed description of the error.

### `ReferenceError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the reference property sent during the request.

### `UserLanguageError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the userLanguage property sent during the request.

### `AgreementError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the agreementId property sent during the request.

### `RedirectError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the redirect property sent during the request.

### `SocialSecurityNumberError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the socialSecurityNumber property sent during the request.

### `AccountSelectionError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the accountSelection property sent during the request.

### `InstitutionIdError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the institutionId property sent during the request.

## Constructor

```csharp
public CreateRequisitionError(string? summary, string? detail, BasicResponse? referenceError,
BasicResponse? userLanguageError, BasicResponse? agreementError, BasicResponse? redirectError,
BasicResponse? socialSecurityNumberError, BasicResponse? accountSelectionError,
BasicResponse? institutionIdError)
```

### Parameters

#### `summary` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The summary text of the error.

#### `detail` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The detailed description of the error.

#### `referenceError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the reference property sent during the request.

#### `userLanguageError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the userLanguage property sent during the request.

#### `agreementError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the agreementId property sent during the request.

#### `redirectError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the redirect property sent during the request.

#### `socialSecurityNumberError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the socialSecurityNumber property sent during the request.

#### `accountSelectionError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the accountSelection property sent during the request.

#### `institutionIdError` - [BasicResponse](/docs/api-reference/responses/basic-response)?

An error that was returned related to the institutionId property sent during the request.
4 changes: 2 additions & 2 deletions docs/docs/api-reference/responses/basic-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ A basic response/error returned by the GoCardless API containing a textual descr

### `Summary` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The summary text of the response/error.
The summary text of the response.

### `Detail` - [string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-string-type)?

The detailed description of the response/error.
The detailed description of the response.

## Constructor

Expand Down
9 changes: 9 additions & 0 deletions docs/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ const sidebars: SidebarsConfig = {
"api-reference/responses/transaction",
],
},
{
type: "category",
label: "Errors",
items: [
"api-reference/errors/accounts-error",
"api-reference/errors/create-agreement-error",
"api-reference/errors/create-requisition-error",
],
},
],
},
],
Expand Down
4 changes: 2 additions & 2 deletions src/RobinTTY.NordigenApiClient/Models/Errors/AccountsError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace RobinTTY.NordigenApiClient.Models.Errors;

/// <summary>
/// An error description as returned by some operations of the accounts endpoint of the Nordigen API.
/// An error description as returned by some operations of the accounts endpoint of the GoCardless API.
/// </summary>
public class AccountsError : BasicResponse
{
Expand Down Expand Up @@ -96,7 +96,7 @@ public AccountsError() { }
/// </param>
#endif
[JsonConstructor]
public AccountsError(string summary, string detail, string? type, BasicResponse? startDateError,
public AccountsError(string? summary, string? detail, string? type, BasicResponse? startDateError,
BasicResponse? endDateError) : base(summary, detail)
{
Type = type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace RobinTTY.NordigenApiClient.Models.Errors;

/// <summary>
/// An error description as returned by the create operation of the agreements endpoint of the Nordigen API.
/// An error description as returned by the create operation of the agreements endpoint of the GoCardless API.
/// </summary>
public class CreateAgreementError : BasicResponse
{
Expand Down Expand Up @@ -61,29 +61,24 @@ public CreateAgreementError() { }
/// <param name="summary">The summary of the API error.</param>
/// <param name="detail">The detailed description of the API error.</param>
/// <param name="institutionIdError">
/// An error that was returned related to the
/// <see cref="CreateAgreementRequest.InstitutionId" /> property sent during the request.
/// An error that was returned related to the institutionId sent during the request.
/// </param>
/// <param name="accessScopeError">
/// An error that was returned related to the
/// <see cref="CreateAgreementRequest.AccessScope" /> property sent during the request.
/// An error that was returned related to the accessScope property sent during the request.
/// </param>
/// <param name="maxHistoricalDaysError">
/// An error that was returned related to the
/// <see cref="CreateAgreementRequest.MaxHistoricalDays" /> property sent during the request.
/// An error that was returned related to the maxHistoricalDays property sent during the request.
/// </param>
/// <param name="accessValidForDaysError">
/// An error that was returned related to the
/// <see cref="CreateAgreementRequest.AccessValidForDays" /> property sent during the request.
/// An error that was returned related to the accessValidForDays property sent during the request.
/// </param>
/// <param name="agreementError">
/// An error that was returned related to the
/// <see cref="CreateAgreementRequest.InstitutionId" /> property sent during the request.
/// An error that was returned related to the institutionId property sent during the request.
/// </param>
[JsonConstructor]
public CreateAgreementError(
string summary,
string detail,
string? summary,
string? detail,
BasicResponse? institutionIdError,
BasicResponse? accessScopeError,
BasicResponse? maxHistoricalDaysError,
Expand Down
Loading

0 comments on commit 6b63e2d

Please sign in to comment.