Skip to content

Commit

Permalink
Merge pull request #43 from gocardless/template-changes
Browse files Browse the repository at this point in the history
Changes from gocardless-dotnet-template
  • Loading branch information
paprikati authored Mar 12, 2020
2 parents 273ccca + 0d9a394 commit fdefac9
Show file tree
Hide file tree
Showing 10 changed files with 374 additions and 57 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>3.4.1</PackageVersion>
<PackageVersion>3.5.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/v3.4.1</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/gocardless/gocardless-dotnet/releases/tag/v3.5.0</PackageReleaseNotes>
<TargetFrameworks>netstandard1.6;netstandard2.0;net46</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
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/3.4.1");
requestMessage.Headers.Add("User-Agent", "gocardless-dotnet/3.5.0");
requestMessage.Headers.Add("GoCardless-Version", "2015-07-06");
requestMessage.Headers.Add("GoCardless-Client-Version", "3.4.1");
requestMessage.Headers.Add("GoCardless-Client-Version", "3.5.0");
requestMessage.Headers.Add("GoCardless-Client-Library", "gocardless-dotnet");
requestMessage.Headers.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _accessToken);
Expand Down
6 changes: 3 additions & 3 deletions GoCardless/Resources/Creditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ public class Creditor
/// Boolean value indicating whether the organisation is responsible for
/// sending all customer notifications (note this is separate from the
/// functionality described
/// [here](https://developer.gocardless.com/getting-started/api/handling-customer-notifications/).
/// If you are a partner app, and this value is true, you should not
/// send notifications on behalf of this organisation.
/// [here](/getting-started/api/handling-customer-notifications/)). If
/// you are a partner app, and this value is true, you should not send
/// notifications on behalf of this organisation.
/// </summary>
[JsonProperty("merchant_responsible_for_notifications")]
public bool? MerchantResponsibleForNotifications { get; set; }
Expand Down
24 changes: 14 additions & 10 deletions GoCardless/Resources/Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ namespace GoCardless.Resources
///
/// Events are stored for all webhooks. An event refers to a resource which
/// has been updated, for example a payment which has been collected, or a
/// mandate which has been transferred.
/// mandate which has been transferred. See [here](#event-actions) for a
/// complete list of event types.
/// </summary>
public class Event
{
Expand Down Expand Up @@ -378,12 +379,18 @@ public class EventLinks
[JsonConverter(typeof(StringEnumConverter))]
public enum EventResourceType {

/// <summary>`resource_type` with a value of "payments"</summary>
[EnumMember(Value = "payments")]
Payments,
/// <summary>`resource_type` with a value of "creditors"</summary>
[EnumMember(Value = "creditors")]
Creditors,
/// <summary>`resource_type` with a value of "instalment_schedules"</summary>
[EnumMember(Value = "instalment_schedules")]
InstalmentSchedules,
/// <summary>`resource_type` with a value of "mandates"</summary>
[EnumMember(Value = "mandates")]
Mandates,
/// <summary>`resource_type` with a value of "payments"</summary>
[EnumMember(Value = "payments")]
Payments,
/// <summary>`resource_type` with a value of "payouts"</summary>
[EnumMember(Value = "payouts")]
Payouts,
Expand All @@ -393,12 +400,9 @@ public enum EventResourceType {
/// <summary>`resource_type` with a value of "subscriptions"</summary>
[EnumMember(Value = "subscriptions")]
Subscriptions,
/// <summary>`resource_type` with a value of "instalment_schedules"</summary>
[EnumMember(Value = "instalment_schedules")]
InstalmentSchedules,
/// <summary>`resource_type` with a value of "creditors"</summary>
[EnumMember(Value = "creditors")]
Creditors,
/// <summary>`resource_type` with a value of "organisations"</summary>
[EnumMember(Value = "organisations")]
Organisations,
}

}
10 changes: 5 additions & 5 deletions GoCardless/Resources/InstalmentSchedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public class InstalmentSchedule
/// also be
/// copied to the payments of the instalment schedule if you use
/// schedule-based creation.
///
/// </summary>
[JsonProperty("name")]
public string Name { get; set; }
Expand Down Expand Up @@ -104,10 +103,11 @@ public class InstalmentSchedule
/// <summary>
/// The total amount of the instalment schedule, defined as the sum of
/// all individual
/// payments. If the requested payment amounts do not sum up correctly,
/// a validation
/// error will be returned.
///
/// payments, in the lowest denomination for the currency (e.g. pence in
/// GBP, cents in
/// EUR). If the requested payment amounts do not sum up correctly, a
/// validation error
/// will be returned.
/// </summary>
[JsonProperty("total_amount")]
public int? TotalAmount { get; set; }
Expand Down
7 changes: 7 additions & 0 deletions GoCardless/Resources/Subscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ public class Subscription
[JsonProperty("app_fee")]
public int? AppFee { get; set; }

/// <summary>
/// The total number of payments that should be taken by this
/// subscription.
/// </summary>
[JsonProperty("count")]
public int? Count { get; set; }

/// <summary>
/// Fixed [timestamp](#api-usage-time-zones--dates), recording when this
/// resource was created.
Expand Down
24 changes: 14 additions & 10 deletions GoCardless/Services/EventService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ namespace GoCardless.Services
///
/// Events are stored for all webhooks. An event refers to a resource which
/// has been updated, for example a payment which has been collected, or a
/// mandate which has been transferred.
/// mandate which has been transferred. See [here](#event-actions) for a
/// complete list of event types.
/// </summary>

public class EventService
Expand Down Expand Up @@ -306,12 +307,18 @@ public enum EventInclude
public enum EventResourceType
{

/// <summary>`resource_type` with a value of "payments"</summary>
[EnumMember(Value = "payments")]
Payments,
/// <summary>`resource_type` with a value of "creditors"</summary>
[EnumMember(Value = "creditors")]
Creditors,
/// <summary>`resource_type` with a value of "instalment_schedules"</summary>
[EnumMember(Value = "instalment_schedules")]
InstalmentSchedules,
/// <summary>`resource_type` with a value of "mandates"</summary>
[EnumMember(Value = "mandates")]
Mandates,
/// <summary>`resource_type` with a value of "payments"</summary>
[EnumMember(Value = "payments")]
Payments,
/// <summary>`resource_type` with a value of "payouts"</summary>
[EnumMember(Value = "payouts")]
Payouts,
Expand All @@ -321,12 +328,9 @@ public enum EventResourceType
/// <summary>`resource_type` with a value of "subscriptions"</summary>
[EnumMember(Value = "subscriptions")]
Subscriptions,
/// <summary>`resource_type` with a value of "instalment_schedules"</summary>
[EnumMember(Value = "instalment_schedules")]
InstalmentSchedules,
/// <summary>`resource_type` with a value of "creditors"</summary>
[EnumMember(Value = "creditors")]
Creditors,
/// <summary>`resource_type` with a value of "organisations"</summary>
[EnumMember(Value = "organisations")]
Organisations,
}

/// <summary>
Expand Down
Loading

0 comments on commit fdefac9

Please sign in to comment.