Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GoCardless.Tests/MandateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public async Task ShouldCancelAMandate()
public void GetAsyncShouldRejectInvalidIdentity(string identity)
{
Assert.ThrowsAsync<ArgumentException>(
(AsyncTestDelegate)(() => client.Mandates.GetAsync(identity))
(Func<Task>)(() => client.Mandates.GetAsync(identity))
);
}

Expand Down
10 changes: 8 additions & 2 deletions GoCardless/GoCardless.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
<Description>Client for the GoCardless API - a powerful, simple solution for the collection of recurring bank-to-bank payments</Description>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/gocardless/gocardless-dotnet</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/gocardless/gocardless-dotnet/master/nuget_package_icon.png</PackageIconUrl>
<PackageIcon>nuget_package_icon.png</PackageIcon>
<Copyright>GoCardless Ltd</Copyright>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>gocardless payments rest api direct debit</PackageTags>
<PackageLicenseUrl>https://github.com/gocardless/gocardless-dotnet/blob/master/LICENSE.txt</PackageLicenseUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReleaseNotes>https://github.com/gocardless/gocardless-dotnet/releases/tag/v11.0.0</PackageReleaseNotes>
<TargetFrameworks>netstandard2.0;netstandard2.1;net461;net8.0</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
Expand All @@ -24,6 +25,11 @@
<Copy SourceFiles="@(DocFile)" DestinationFolder="$(PublishDir)" SkipUnchangedFiles="false" />
</Target>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="..\nuget_package_icon.png" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>GoCardless.Tests</_Parameter1>
Expand Down
4 changes: 2 additions & 2 deletions GoCardless/GoCardlessClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,14 @@ RequestSettings requestSettings
{
return await execute().ConfigureAwait(false);
}
catch (TaskCanceledException exception)
catch (TaskCanceledException)
when (!cancellationTokenSource.Token.IsCancellationRequested)
{
// This case represents a timeout, which we want to retry - see
// https://stackoverflow.com/questions/10547895/how-can-i-tell-when-httpclient-has-timed-out/32230327
await Task.Delay(waitBetweenRetries);
}
catch (HttpRequestException exception)
catch (HttpRequestException)
{
// An HttpRequestException is raised when "[t]he request failed due to
// an underlying issue such as network connectivity, DNS failure,
Expand Down
4 changes: 4 additions & 0 deletions GoCardless/Services/BalanceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public Task<BalanceListResponse> ListAsync(
/// Get a lazily enumerated list of balances.
/// This acts like the #list method, but paginates for you automatically.
/// </summary>
/// <param name="request">An optional `BalanceListRequest` representing the query parameters for this list request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
public IEnumerable<Balance> All(
BalanceListRequest request = null,
RequestSettings customiseRequestMessage = null
Expand All @@ -94,6 +96,8 @@ public IEnumerable<Balance> All(
/// Get a lazily enumerated list of balances.
/// This acts like the #list method, but paginates for you automatically.
/// </summary>
/// <param name="request">An optional `BalanceListRequest` representing the query parameters for this list request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
public IEnumerable<Task<IReadOnlyList<Balance>>> AllAsync(
BalanceListRequest request = null,
RequestSettings customiseRequestMessage = null
Expand Down
4 changes: 3 additions & 1 deletion GoCardless/Services/BankAccountDetailService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public BankAccountDetailService(GoCardlessClient goCardlessClient)
/// href="https://docs.gocardless.com/docs/gc-embed/bank-details-access#public-key-setup">Public
/// Key Setup</a> for more details.
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BA".
/// <param name="identity">
/// Unique identifier, beginning with "BA".
/// </param>
/// <param name="request">An optional `BankAccountDetailGetRequest` representing the query parameters for this get request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single bank account detail resource</returns>
Expand Down
5 changes: 3 additions & 2 deletions GoCardless/Services/BankAccountHolderVerificationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ public Task<BankAccountHolderVerificationResponse> CreateAsync(
/// <summary>
/// Fetches a bank account holder verification by ID.
/// </summary>
/// <param name="identity"></param>The unique identifier for the bank account holder
/// verification resource, e.g. "BAHV123".
/// <param name="identity">
/// The unique identifier for the bank account holder verification resource, e.g. "BAHV123".
/// </param>
/// <param name="request">An optional `BankAccountHolderVerificationGetRequest` representing the query parameters for this get request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single bank account holder verification resource</returns>
Expand Down
4 changes: 3 additions & 1 deletion GoCardless/Services/BankAuthorisationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public Task<BankAuthorisationResponse> CreateAsync(
/// <summary>
/// Get a single bank authorisation.
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BAU".
/// <param name="identity">
/// Unique identifier, beginning with "BAU".
/// </param>
/// <param name="request">An optional `BankAuthorisationGetRequest` representing the query parameters for this get request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single bank authorisation resource</returns>
Expand Down
4 changes: 3 additions & 1 deletion GoCardless/Services/BillingRequestFlowService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ public Task<BillingRequestFlowResponse> CreateAsync(
/// used to power
/// integrations that manipulate the flow.
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRF".
/// <param name="identity">
/// Unique identifier, beginning with "BRF".
/// </param>
/// <param name="request">An optional `BillingRequestFlowInitialiseRequest` representing the body for this initialise request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request flow resource</returns>
Expand Down
44 changes: 34 additions & 10 deletions GoCardless/Services/BillingRequestService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ public Task<BillingRequestResponse> CreateAsync(
/// customer, and will take effect immediately after the request is
/// successful.
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRQ".
/// <param name="identity">
/// Unique identifier, beginning with "BRQ".
/// </param>
/// <param name="request">An optional `BillingRequestCollectCustomerDetailsRequest` representing the body for this collect_customer_details request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request resource</returns>
Expand Down Expand Up @@ -153,7 +155,9 @@ public Task<BillingRequestResponse> CollectCustomerDetailsAsync(
/// Testing instructions are <a
/// href="https://docs.gocardless.com/docs/developer-resources/scenario-simulators#payer-name-verification">here</a>
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRQ".
/// <param name="identity">
/// Unique identifier, beginning with "BRQ".
/// </param>
/// <param name="request">An optional `BillingRequestCollectBankAccountRequest` representing the body for this collect_bank_account request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request resource</returns>
Expand Down Expand Up @@ -189,7 +193,9 @@ public Task<BillingRequestResponse> CollectBankAccountAsync(
/// allow the payer to crosscheck the details entered by them and
/// confirm it.
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRQ".
/// <param name="identity">
/// Unique identifier, beginning with "BRQ".
/// </param>
/// <param name="request">An optional `BillingRequestConfirmPayerDetailsRequest` representing the body for this confirm_payer_details request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request resource</returns>
Expand Down Expand Up @@ -224,7 +230,9 @@ public Task<BillingRequestResponse> ConfirmPayerDetailsAsync(
/// cause
/// it to fulfil, executing the payment.
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRQ".
/// <param name="identity">
/// Unique identifier, beginning with "BRQ".
/// </param>
/// <param name="request">An optional `BillingRequestFulfilRequest` representing the body for this fulfil request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request resource</returns>
Expand Down Expand Up @@ -259,7 +267,9 @@ public Task<BillingRequestResponse> FulfilAsync(
/// flows
/// to expire.
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRQ".
/// <param name="identity">
/// Unique identifier, beginning with "BRQ".
/// </param>
/// <param name="request">An optional `BillingRequestCancelRequest` representing the body for this cancel request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request resource</returns>
Expand Down Expand Up @@ -321,6 +331,8 @@ public Task<BillingRequestListResponse> ListAsync(
/// Get a lazily enumerated list of billing requests.
/// This acts like the #list method, but paginates for you automatically.
/// </summary>
/// <param name="request">An optional `BillingRequestListRequest` representing the query parameters for this list request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
public IEnumerable<BillingRequest> All(
BillingRequestListRequest request = null,
RequestSettings customiseRequestMessage = null
Expand All @@ -346,6 +358,8 @@ public IEnumerable<BillingRequest> All(
/// Get a lazily enumerated list of billing requests.
/// This acts like the #list method, but paginates for you automatically.
/// </summary>
/// <param name="request">An optional `BillingRequestListRequest` representing the query parameters for this list request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
public IEnumerable<Task<IReadOnlyList<BillingRequest>>> AllAsync(
BillingRequestListRequest request = null,
RequestSettings customiseRequestMessage = null
Expand All @@ -364,7 +378,9 @@ public IEnumerable<Task<IReadOnlyList<BillingRequest>>> AllAsync(
/// <summary>
/// Fetches a billing request
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRQ".
/// <param name="identity">
/// Unique identifier, beginning with "BRQ".
/// </param>
/// <param name="request">An optional `BillingRequestGetRequest` representing the query parameters for this get request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request resource</returns>
Expand Down Expand Up @@ -402,7 +418,9 @@ public Task<BillingRequestResponse> GetAsync(
/// This endpoint is currently supported only for Pay by Bank Billing
/// Requests.
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRQ".
/// <param name="identity">
/// Unique identifier, beginning with "BRQ".
/// </param>
/// <param name="request">An optional `BillingRequestNotifyRequest` representing the body for this notify request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request resource</returns>
Expand Down Expand Up @@ -436,7 +454,9 @@ public Task<BillingRequestResponse> NotifyAsync(
/// Triggers a fallback from the open-banking flow to direct debit.
/// Note, the billing request must have fallback enabled.
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRQ".
/// <param name="identity">
/// Unique identifier, beginning with "BRQ".
/// </param>
/// <param name="request">An optional `BillingRequestFallbackRequest` representing the body for this fallback request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request resource</returns>
Expand Down Expand Up @@ -475,7 +495,9 @@ public Task<BillingRequestResponse> FallbackAsync(
/// Request Flow. It
/// will also not support any request which has a payments request.
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRQ".
/// <param name="identity">
/// Unique identifier, beginning with "BRQ".
/// </param>
/// <param name="request">An optional `BillingRequestChooseCurrencyRequest` representing the body for this choose_currency request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request resource</returns>
Expand Down Expand Up @@ -508,7 +530,9 @@ public Task<BillingRequestResponse> ChooseCurrencyAsync(
/// <summary>
/// Creates an Institution object and attaches it to the Billing Request
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRQ".
/// <param name="identity">
/// Unique identifier, beginning with "BRQ".
/// </param>
/// <param name="request">An optional `BillingRequestSelectInstitutionRequest` representing the body for this select_institution request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request resource</returns>
Expand Down
12 changes: 10 additions & 2 deletions GoCardless/Services/BillingRequestTemplateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ public Task<BillingRequestTemplateListResponse> ListAsync(
/// Get a lazily enumerated list of billing request templates.
/// This acts like the #list method, but paginates for you automatically.
/// </summary>
/// <param name="request">An optional `BillingRequestTemplateListRequest` representing the query parameters for this list request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
public IEnumerable<BillingRequestTemplate> All(
BillingRequestTemplateListRequest request = null,
RequestSettings customiseRequestMessage = null
Expand All @@ -101,6 +103,8 @@ public IEnumerable<BillingRequestTemplate> All(
/// Get a lazily enumerated list of billing request templates.
/// This acts like the #list method, but paginates for you automatically.
/// </summary>
/// <param name="request">An optional `BillingRequestTemplateListRequest` representing the query parameters for this list request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
public IEnumerable<Task<IReadOnlyList<BillingRequestTemplate>>> AllAsync(
BillingRequestTemplateListRequest request = null,
RequestSettings customiseRequestMessage = null
Expand All @@ -119,7 +123,9 @@ public IEnumerable<Task<IReadOnlyList<BillingRequestTemplate>>> AllAsync(
/// <summary>
/// Fetches a Billing Request Template
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRT".
/// <param name="identity">
/// Unique identifier, beginning with "BRT".
/// </param>
/// <param name="request">An optional `BillingRequestTemplateGetRequest` representing the query parameters for this get request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request template resource</returns>
Expand Down Expand Up @@ -179,7 +185,9 @@ public Task<BillingRequestTemplateResponse> CreateAsync(
/// Updates a Billing Request Template, which will affect all future
/// Billing Requests created by this template.
/// </summary>
/// <param name="identity"></param>Unique identifier, beginning with "BRT".
/// <param name="identity">
/// Unique identifier, beginning with "BRT".
/// </param>
/// <param name="request">An optional `BillingRequestTemplateUpdateRequest` representing the body for this update request.</param>
/// <param name="customiseRequestMessage">An optional `RequestSettings` allowing you to configure the request</param>
/// <returns>A single billing request template resource</returns>
Expand Down
Loading
Loading