Skip to content

Commit 01e8ccf

Browse files
committed
Merge branch 'release/1.14.0'
2 parents a502315 + 62cb1cb commit 01e8ccf

File tree

249 files changed

+8325
-10075
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+8325
-10075
lines changed

.idea/.idea.BunqSdk/.idea/contentModel.xml

+36-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BunqSdk.Tests/BunqSdk.Tests.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@
2525
<ItemGroup>
2626
<Folder Include="Resources\NotificationUrlJsons" />
2727
</ItemGroup>
28+
<ItemGroup>
29+
<None Remove="Resources\chain.cert" />
30+
<None Remove="Resources\bunq-psd2-test.conf" />
31+
</ItemGroup>
2832
</Project>

BunqSdk.Tests/BunqSdkTestBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class BunqSdkTestBase
4444
protected const string PathAttachment = "../../../Resources";
4545
protected const string ContentType = "image/png";
4646
protected const string AttachmentDescription = "C# sdk image test.";
47-
protected const string AttachmentPathIn = "/bunq_App_Icon_Square@4x.png";
47+
protected const string AttachmentPathIn = "/vader.png";
4848

4949
/// <summary>
5050
/// Device registration constants.

BunqSdk.Tests/Http/PaginationScenarioTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Collections.Generic;
2-
using Bunq.Sdk.Context;
32
using Bunq.Sdk.Http;
43
using Bunq.Sdk.Json;
54
using Bunq.Sdk.Model.Generated.Endpoint;
@@ -18,6 +17,7 @@ public class PaginationScenarioTest : BunqSdkTestBase
1817
/// Constants for scenario testing.
1918
/// </summary>
2019
private const int PaymentListingPageSize = 2;
20+
2121
private const int PaymentRequiredCountMinimum = PaymentListingPageSize * 2;
2222
private const int NumberZero = 0;
2323

@@ -81,4 +81,4 @@ private static void CreatePayment()
8181
Payment.Create(new Amount(PaymentAmountEur, PaymentCurrency), GetPointerBravo(), PaymentDescription);
8282
}
8383
}
84-
}
84+
}
-9.62 KB
Binary file not shown.

BunqSdk.Tests/Resources/chain.cert

-23
This file was deleted.

BunqSdk.Tests/Resources/config.example.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"AttachmentPublicTest": {
88
"CONTENT_TYPE": "image/png",
99
"DESCRIPTION": "TEST PNG PHP",
10-
"PATH_IN": "/bunq_App_Icon_Square@4x.png"
10+
"PATH_IN": "/vader.png"
1111
},
1212
"TabUsageSingleTest": {
1313
"CASH_REGISTER_ID": "XXX"

BunqSdk.Tests/Resources/vader.png

232 KB
Loading

BunqSdk/BunqSdk.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<PackageId>Bunq.Sdk</PackageId>
99
</PropertyGroup>
1010
<PropertyGroup>
11-
<VersionPrefix>1.13.0</VersionPrefix>
11+
<VersionPrefix>1.14.0</VersionPrefix>
1212
</PropertyGroup>
1313
<PropertyGroup>
1414
<RootNamespace>Bunq.Sdk</RootNamespace>
@@ -19,7 +19,7 @@
1919
<RepositoryUrl>https://github.com/bunq/sdk_csharp</RepositoryUrl>
2020
<NeutralLanguage>en-US</NeutralLanguage>
2121
<AssemblyTitle>bunq SDK</AssemblyTitle>
22-
<Copyright>bunq 2017</Copyright>
22+
<Copyright>bunq 2020</Copyright>
2323
</PropertyGroup>
2424
<ItemGroup>
2525
<PackageReference Include="Newtonsoft.Json" Version="10.0.3-*" />

BunqSdk/Http/ApiClient.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class ApiClient
6464
/// Values for the default headers
6565
/// </summary>
6666
private const string CACHE_CONTROL_NONE = "no-cache";
67-
private const string USER_AGENT_BUNQ = "bunq-sdk-csharp/1.13.0";
67+
private const string USER_AGENT_BUNQ = "bunq-sdk-csharp/1.14.0";
6868
private const string LANGUAGE_EN_US = "en_US";
6969
private const string REGION_NL_NL = "nl_NL";
7070
private const string GEOLOCATION_ZERO = "0 0 0 0 NL";

BunqSdk/Json/BunqContractResolver.cs

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using Bunq.Sdk.Model.Generated.Endpoint;
88
using Bunq.Sdk.Model.Generated.Object;
99
using Newtonsoft.Json;
10-
using Newtonsoft.Json.Converters;
1110
using Newtonsoft.Json.Serialization;
1211

1312
namespace Bunq.Sdk.Json
@@ -19,7 +18,7 @@ public class BunqContractResolver : DefaultContractResolver
1918
{
2019
protected readonly Dictionary<Type, JsonConverter> converterRegistry = new Dictionary<Type, JsonConverter>();
2120

22-
public BunqContractResolver(IReadOnlyCollection<Type> typesToExclude=null)
21+
public BunqContractResolver(IReadOnlyCollection<Type> typesToExclude = null)
2322
{
2423
RegisterConverter(typeof(ApiEnvironmentType), new ApiEnvironmentTypeConverter());
2524
RegisterConverter(typeof(Geolocation), new GeolocationConverter());
@@ -36,9 +35,9 @@ public BunqContractResolver(IReadOnlyCollection<Type> typesToExclude=null)
3635

3736
if (typesToExclude == null)
3837
{
39-
return;
38+
return;
4039
}
41-
40+
4241
foreach (var type in typesToExclude)
4342
{
4443
converterRegistry.Remove(type);
@@ -71,8 +70,8 @@ private JsonConverter GetCustomConverterOrNull(Type objectType)
7170
? converterRegistry[typeof(IAnchorObjectInterface)]
7271
: null;
7372
}
74-
73+
7574
return converterRegistry.ContainsKey(objectType) ? converterRegistry[objectType] : null;
7675
}
7776
}
78-
}
77+
}

BunqSdk/Json/BunqMeTabResultInquiryConverter.cs

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.Reflection;
43
using Bunq.Sdk.Model.Core;
54
using Bunq.Sdk.Model.Generated.Endpoint;
@@ -9,7 +8,7 @@
98

109
namespace Bunq.Sdk.Json
1110
{
12-
public class BunqMeTabResultInquiryConverter: JsonConverter
11+
public class BunqMeTabResultInquiryConverter : JsonConverter
1312
{
1413
/// <summary>
1514
/// Field constants.
@@ -31,16 +30,16 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
3130
JObject jsonObject = JObject.Load(reader);
3231

3332
BunqMeTabResultInquiry tabResultInquiry = JsonConvert.DeserializeObject<BunqMeTabResultInquiry>(
34-
jsonObject.ToString(),
33+
jsonObject.ToString(),
3534
GetSerializerSettingsWithoutTabResultInquiryResolver()
3635
);
3736

3837
JObject paymentJsonObjectWrapped = (JObject) jsonObject.GetValue(FIELD_PAYMENT);
3938
JObject paymentJsonObject = (JObject) paymentJsonObjectWrapped.GetValue(OBJECT_TYPE_PAYMENT);
40-
39+
4140
Payment paymentObject = Payment.CreateFromJsonString(paymentJsonObject.ToString());
4241
tabResultInquiry.Payment = paymentObject;
43-
42+
4443
return tabResultInquiry;
4544
}
4645

@@ -57,4 +56,4 @@ private JsonSerializerSettings GetSerializerSettingsWithoutTabResultInquiryResol
5756
};
5857
}
5958
}
60-
}
59+
}

BunqSdk/Model/Core/OauthAccessToken.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class OauthAccessToken : BunqModel
3232
/// <summary>
3333
/// Token constants.
3434
/// </summary>
35-
protected const String TOKEN_URI_FORMAT_SANDBOX = "https://api.oauth.sandbox.bunq.com/v1/token?{0}";
35+
protected const String TOKEN_URI_FORMAT_SANDBOX = "https://api-oauth.sandbox.bunq.com/v1/token?{0}";
3636
protected const String TOKEN_URI_FORMAT_PRODUCTION = "https://api.oauth.bunq.com/v1/token?{0}";
3737

3838
[JsonProperty(PropertyName = "access_token")]
@@ -125,4 +125,4 @@ private static String DetermineTokenUriFormat()
125125
return TOKEN_URI_FORMAT_MAP[BunqContext.ApiContext.EnvironmentType.TypeString];
126126
}
127127
}
128-
}
128+
}

0 commit comments

Comments
 (0)