Skip to content

Commit

Permalink
Merge pull request #63 from gocardless/template-changes
Browse files Browse the repository at this point in the history
Bump version to v4.3.0
  • Loading branch information
jasonlafferty authored Jul 14, 2020
2 parents 6a52361 + 2922d5e commit f782494
Show file tree
Hide file tree
Showing 13 changed files with 387 additions and 18 deletions.
4 changes: 2 additions & 2 deletions GoCardless/GoCardless.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PackageId>GoCardless</PackageId>
<PackageVersion>4.2.0</PackageVersion>
<PackageVersion>4.3.0</PackageVersion>
<Authors>GoCardless Ltd</Authors>
<Description>Client for the GoCardless API - a powerful, simple solution for the collection of recurring bank-to-bank payments</Description>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand All @@ -11,7 +11,7 @@
<Copyright>GoCardless Ltd</Copyright>
<PackageTags>gocardless payments rest api direct debit</PackageTags>
<PackageLicenseUrl>https://github.com/gocardless/gocardless-dotnet/blob/master/LICENSE.txt</PackageLicenseUrl>
<PackageReleaseNotes>https://github.com/gocardless/gocardless-dotnet/releases/tag/v4.2.0</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/gocardless/gocardless-dotnet/releases/tag/v4.3.0</PackageReleaseNotes>
<TargetFrameworks>netstandard1.6;netstandard2.0;net46</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
5 changes: 5 additions & 0 deletions GoCardless/GoCardlessClient.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,10 @@ public partial class GoCardlessClient
/// </summary>
public SubscriptionService Subscriptions => new SubscriptionService(this);

/// <summary>
///A service for working with tax rate resources.
/// </summary>
public TaxRateService TaxRates => new TaxRateService(this);

}
}
4 changes: 2 additions & 2 deletions GoCardless/GoCardlessClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ private HttpRequestMessage BuildHttpRequestMessage<T>(string method, string path
var httpMethod = new HttpMethod(method);

var requestMessage = new HttpRequestMessage(httpMethod, new Uri(_baseUrl, path));
requestMessage.Headers.Add("User-Agent", "gocardless-dotnet/4.2.0");
requestMessage.Headers.Add("User-Agent", "gocardless-dotnet/4.3.0");
requestMessage.Headers.Add("GoCardless-Version", "2015-07-06");
requestMessage.Headers.Add("GoCardless-Client-Version", "4.2.0");
requestMessage.Headers.Add("GoCardless-Client-Version", "4.3.0");
requestMessage.Headers.Add("GoCardless-Client-Library", "gocardless-dotnet");
requestMessage.Headers.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _accessToken);
Expand Down
3 changes: 2 additions & 1 deletion GoCardless/Resources/Payment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public class Payment
/// 30 characters<br /> <strong>BECS NZ</strong> - 12 characters<br />
/// <strong>Betalingsservice</strong> - 30 characters<br />
/// <strong>PAD</strong> - 12 characters<br /> <strong>SEPA</strong> -
/// 140 characters <p
/// 140 characters<br /> Note that this reference must be unique (for
/// each merchant) for the BECS scheme as it is a scheme requirement. <p
/// class='restricted-notice'><strong>Restricted</strong>: You can only
/// specify a payment reference for Bacs payments (that is, when
/// collecting from the UK) if you're on the <a
Expand Down
13 changes: 12 additions & 1 deletion GoCardless/Resources/Payout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public class Payout

/// <summary>
/// Fees that have already been deducted from the payout amount in minor
/// unit (e.g. pence in GBP, cents in EUR).
/// unit (e.g. pence in GBP, cents in EUR), inclusive of tax if
/// applicable.
///
/// For each `late_failure_settled` or `chargeback_settled` action, we
/// refund the transaction fees in a payout. This means that a payout
Expand Down Expand Up @@ -120,6 +121,16 @@ public class Payout
/// </summary>
[JsonProperty("status")]
public PayoutStatus? Status { get; set; }

/// <summary>
/// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code
/// for the currency in which tax is paid out to the tax authorities of
/// your tax jurisdiction. Currently “EUR”, “GBP”, for French or British
/// merchants, this will be `null` if tax is not applicable
/// <em>beta</em>
/// </summary>
[JsonProperty("tax_currency")]
public string TaxCurrency { get; set; }
}

/// <summary>
Expand Down
128 changes: 122 additions & 6 deletions GoCardless/Resources/PayoutItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,20 @@ public class PayoutItem
[JsonProperty("links")]
public PayoutItemLinks Links { get; set; }

/// <summary>
/// An array of tax items <em>beta</em>
///
/// Note: VAT applies to transaction and surcharge fees for merchants
/// operating in the <a
/// href="https://gocardless.com/legal/vat-faqs">UK</a> and <a
/// href="https://gocardless.com/fr-fr/legal/faq-tva">France</a>.
/// </summary>
[JsonProperty("taxes")]
public List<PayoutItemTaxis> Taxes { get; set; }

/// <summary>
/// The type of the credit (positive) or debit (negative) item in the
/// payout. One of:
/// payout (inclusive of VAT if applicable). One of:
/// <ul>
/// <li>`payment_paid_out` (credit)</li>
/// <li>`payment_failed` (debit): The payment failed to be
Expand All @@ -70,7 +81,8 @@ public class PayoutItem
/// to the customer, and the funds have been returned to you.</li>
/// <li>`gocardless_fee` (credit/debit): The fees that GoCardless
/// charged for a payment. In the case of a payment failure or
/// chargeback, these will appear as credits.</li>
/// chargeback, these will appear as credits. Will include taxes if
/// applicable for merchants.</li>
/// <li>`app_fee` (credit/debit): The optional fees that a partner may
/// have taken for a payment. In the case of a payment failure or
/// chargeback, these will appear as credits.</li>
Expand All @@ -81,7 +93,8 @@ public class PayoutItem
/// credits.</li>
/// <li>`surcharge_fee` (credit/debit): GoCardless deducted a surcharge
/// fee as the payment failed or was charged back, or refunded a
/// surcharge fee as the bank or customer cancelled the chargeback.</li>
/// surcharge fee as the bank or customer cancelled the chargeback. Will
/// include taxes if applicable for merchants.</li>
/// </ul>
///
/// </summary>
Expand Down Expand Up @@ -109,7 +122,109 @@ public class PayoutItemLinks
}

/// <summary>
/// The type of the credit (positive) or debit (negative) item in the payout. One of:
/// An array of tax items <em>beta</em>
///
/// Note: VAT applies to transaction and surcharge fees for merchants
/// operating in the <a href="https://gocardless.com/legal/vat-faqs">UK</a>
/// and <a href="https://gocardless.com/fr-fr/legal/faq-tva">France</a>.
/// </summary>
public class PayoutItemTaxis
{
/// <summary>
/// The amount of tax applied to a fee in fractional currency; the
/// lowest denomination for the currency (e.g. pence in GBP, cents in
/// EUR), to one decimal place.
/// </summary>
[JsonProperty("amount")]
public string Amount { get; set; }

/// <summary>
/// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes)
/// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD",
/// "SEK" and "USD" are supported.
/// </summary>
[JsonProperty("currency")]
public PayoutItemTaxisCurrency? Currency { get; set; }

/// <summary>
/// The amount of tax to be paid out to the tax authorities in
/// fractional currency; the lowest denomination for the currency (e.g.
/// pence in GBP, cents in EUR), to one decimal place.
///
/// When `currency` and `destination_currency` don't match this will be
/// `null` until the `exchange_rate` has been finalised.
/// </summary>
[JsonProperty("destination_amount")]
public string DestinationAmount { get; set; }

/// <summary>
/// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code
/// for the currency in which tax is paid out to the tax authorities of
/// your tax jurisdiction. Currently “EUR” for French merchants and
/// “GBP” for British merchants.
/// </summary>
[JsonProperty("destination_currency")]
public string DestinationCurrency { get; set; }

/// <summary>
/// The exchange rate for the tax from the currency into the destination
/// currency.
///
/// Present only if the currency and the destination currency don't
/// match and the exchange rate has been finalised.
///
/// You can listen for the payout's [`tax_exchange_rates_confirmed`
/// webhook](https://developer.gocardless.com/api-reference/#event-actions-payout)
/// to know when the exchange rate has been finalised for all fees in
/// the payout.
/// </summary>
[JsonProperty("exchange_rate")]
public string ExchangeRate { get; set; }

/// <summary>
/// The unique identifier created by the jurisdiction, tax type and
/// version
/// </summary>
[JsonProperty("tax_rate_id")]
public string TaxRateId { get; set; }
}

/// <summary>
/// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently
/// "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public enum PayoutItemTaxisCurrency {

/// <summary>`currency` with a value of "AUD"</summary>
[EnumMember(Value = "AUD")]
AUD,
/// <summary>`currency` with a value of "CAD"</summary>
[EnumMember(Value = "CAD")]
CAD,
/// <summary>`currency` with a value of "DKK"</summary>
[EnumMember(Value = "DKK")]
DKK,
/// <summary>`currency` with a value of "EUR"</summary>
[EnumMember(Value = "EUR")]
EUR,
/// <summary>`currency` with a value of "GBP"</summary>
[EnumMember(Value = "GBP")]
GBP,
/// <summary>`currency` with a value of "NZD"</summary>
[EnumMember(Value = "NZD")]
NZD,
/// <summary>`currency` with a value of "SEK"</summary>
[EnumMember(Value = "SEK")]
SEK,
/// <summary>`currency` with a value of "USD"</summary>
[EnumMember(Value = "USD")]
USD,
}

/// <summary>
/// The type of the credit (positive) or debit (negative) item in the payout (inclusive of VAT
/// if applicable). One of:
/// <ul>
/// <li>`payment_paid_out` (credit)</li>
/// <li>`payment_failed` (debit): The payment failed to be processed.</li>
Expand All @@ -120,15 +235,16 @@ public class PayoutItemLinks
/// <li>`refund_funds_returned` (credit): The refund could not be sent to the customer, and the
/// funds have been returned to you.</li>
/// <li>`gocardless_fee` (credit/debit): The fees that GoCardless charged for a payment. In the
/// case of a payment failure or chargeback, these will appear as credits.</li>
/// case of a payment failure or chargeback, these will appear as credits. Will include taxes if
/// applicable for merchants.</li>
/// <li>`app_fee` (credit/debit): The optional fees that a partner may have taken for a payment.
/// In the case of a payment failure or chargeback, these will appear as credits.</li>
/// <li>`revenue_share` (credit/debit): A share of the fees that GoCardless collected which some
/// partner integrations receive when their users take payments. Only shown in partner payouts.
/// In the case of a payment failure or chargeback, these will appear as credits.</li>
/// <li>`surcharge_fee` (credit/debit): GoCardless deducted a surcharge fee as the payment
/// failed or was charged back, or refunded a surcharge fee as the bank or customer cancelled
/// the chargeback.</li>
/// the chargeback. Will include taxes if applicable for merchants.</li>
/// </ul>
///
/// </summary>
Expand Down
3 changes: 2 additions & 1 deletion GoCardless/Resources/Refund.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public class Refund
/// 30 characters<br /> <strong>BECS NZ</strong> - 12 characters<br />
/// <strong>Betalingsservice</strong> - 30 characters<br />
/// <strong>PAD</strong> - 12 characters<br /> <strong>SEPA</strong> -
/// 140 characters <p
/// 140 characters<br /> Note that this reference must be unique (for
/// each merchant) for the BECS scheme as it is a scheme requirement. <p
/// class='restricted-notice'><strong>Restricted</strong>: You can only
/// specify a payment reference for Bacs payments (that is, when
/// collecting from the UK) if you're on the <a
Expand Down
57 changes: 57 additions & 0 deletions GoCardless/Resources/TaxRate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace GoCardless.Resources
{

/// <summary>
/// Represents a tax rate resource.
///
/// Tax rates from tax authority.
/// </summary>
public class TaxRate
{
/// <summary>
/// Date at which GoCardless stopped applying the tax rate for the
/// jurisdiction.
/// </summary>
[JsonProperty("end_date")]
public string EndDate { get; set; }

/// <summary>
/// The unique identifier created by the jurisdiction, tax type and
/// version
/// </summary>
[JsonProperty("id")]
public string Id { get; set; }

/// <summary>
/// The jurisdiction this tax rate applies to
/// </summary>
[JsonProperty("jurisdiction")]
public string Jurisdiction { get; set; }

/// <summary>
/// The percentage of tax that is applied onto of GoCardless fees
/// </summary>
[JsonProperty("percentage")]
public string Percentage { get; set; }

/// <summary>
/// Date at which GoCardless started applying the tax rate in the
/// jurisdiction.
/// </summary>
[JsonProperty("start_date")]
public string StartDate { get; set; }

/// <summary>
/// The type of tax applied by this rate
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}

}
6 changes: 4 additions & 2 deletions GoCardless/Services/InstalmentScheduleService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ public class InstalmentScheduleLinks
/// 30 characters<br /> <strong>BECS NZ</strong> - 12 characters<br />
/// <strong>Betalingsservice</strong> - 30 characters<br />
/// <strong>PAD</strong> - 12 characters<br /> <strong>SEPA</strong> -
/// 140 characters <p
/// 140 characters<br /> Note that this reference must be unique (for
/// each merchant) for the BECS scheme as it is a scheme requirement. <p
/// class='restricted-notice'><strong>Restricted</strong>: You can only
/// specify a payment reference for Bacs payments (that is, when
/// collecting from the UK) if you're on the <a
Expand Down Expand Up @@ -626,7 +627,8 @@ public class InstalmentScheduleLinks
/// 30 characters<br /> <strong>BECS NZ</strong> - 12 characters<br />
/// <strong>Betalingsservice</strong> - 30 characters<br />
/// <strong>PAD</strong> - 12 characters<br /> <strong>SEPA</strong> -
/// 140 characters <p
/// 140 characters<br /> Note that this reference must be unique (for
/// each merchant) for the BECS scheme as it is a scheme requirement. <p
/// class='restricted-notice'><strong>Restricted</strong>: You can only
/// specify a payment reference for Bacs payments (that is, when
/// collecting from the UK) if you're on the <a
Expand Down
3 changes: 2 additions & 1 deletion GoCardless/Services/PaymentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ public class PaymentLinks
/// 30 characters<br /> <strong>BECS NZ</strong> - 12 characters<br />
/// <strong>Betalingsservice</strong> - 30 characters<br />
/// <strong>PAD</strong> - 12 characters<br /> <strong>SEPA</strong> -
/// 140 characters <p
/// 140 characters<br /> Note that this reference must be unique (for
/// each merchant) for the BECS scheme as it is a scheme requirement. <p
/// class='restricted-notice'><strong>Restricted</strong>: You can only
/// specify a payment reference for Bacs payments (that is, when
/// collecting from the UK) if you're on the <a
Expand Down
3 changes: 2 additions & 1 deletion GoCardless/Services/RefundService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ public class RefundLinks
/// 30 characters<br /> <strong>BECS NZ</strong> - 12 characters<br />
/// <strong>Betalingsservice</strong> - 30 characters<br />
/// <strong>PAD</strong> - 12 characters<br /> <strong>SEPA</strong> -
/// 140 characters <p
/// 140 characters<br /> Note that this reference must be unique (for
/// each merchant) for the BECS scheme as it is a scheme requirement. <p
/// class='restricted-notice'><strong>Restricted</strong>: You can only
/// specify a payment reference for Bacs payments (that is, when
/// collecting from the UK) if you're on the <a
Expand Down
Loading

0 comments on commit f782494

Please sign in to comment.