Skip to content

Commit 9e42b01

Browse files
author
Konstantin Yakushev
committed
Merge branch 'release/1.10.0'
2 parents 0d3de4c + 982ce29 commit 9e42b01

File tree

91 files changed

+6756
-627
lines changed

Some content is hidden

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

91 files changed

+6756
-627
lines changed

.idea/.idea.BunqSdk/.idea/codeStyles/codeStyleConfig.xml

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

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

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

BunqSdk.Tests/Model/Generated/Endpoint/AttachmentPublicTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class AttachmentPublicTest : BunqSdkTestBase
2222
public void TestAttachmentUploadAndRetrieval()
2323
{
2424
SetUpTestCase();
25-
25+
2626
var fileContentBytes = File.ReadAllBytes(PathAttachment + AttachmentPathIn);
2727
var customHeaders = new Dictionary<string, string>
2828
{
@@ -36,4 +36,4 @@ public void TestAttachmentUploadAndRetrieval()
3636
Assert.Equal(fileContentBytes, responseBytes);
3737
}
3838
}
39-
}
39+
}

BunqSdk.Tests/Model/Generated/Endpoint/AvatarTest.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class AvatarTest : BunqSdkTestBase
2424
public void TestCreateAvatarAndRetrieval()
2525
{
2626
SetUpTestCase();
27-
27+
2828
var fileContentByte = File.ReadAllBytes(PathAttachment + AttachmentPathIn);
2929
var attachmentUuid = UploadAvatarAndGetUuid(fileContentByte);
3030

@@ -49,8 +49,8 @@ private static string UploadAvatarAndGetUuid(byte[] fileContentByte)
4949
{ApiClient.HEADER_ATTACHMENT_DESCRIPTION, AttachmentDescription},
5050
{ApiClient.HEADER_CONTENT_TYPE, ContentType},
5151
};
52-
52+
5353
return AttachmentPublic.Create(fileContentByte, customHeaders).Value;
5454
}
5555
}
56-
}
56+
}

BunqSdk.Tests/Model/Generated/Endpoint/CardDebitTest.cs

+6-4
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ public class CardDebitTest : BunqSdkTestBase
2121
/// Card constants.
2222
/// </summary>
2323
private const string CardPinAssignmentTypePrimary = "PRIMARY";
24+
2425
private const string PinCode = "4045";
2526
private const int NonnegativeIntegerMinimum = 0;
2627
private const int CardSecondLineLengthMaximum = 20;
2728
private const string CardTypeMaestro = "MAESTRO";
28-
29+
2930
/// <summary>
3031
/// Number constants.
3132
/// </summary>
3233
private const int BaseDecimal = 10;
34+
3335
private const int NumberOne = 1;
3436

3537
/// <summary>
@@ -54,10 +56,10 @@ public void TestOrderNewMaestroCard()
5456
GetAlias(),
5557
CardTypeMaestro,
5658
allCardPinAssignments
57-
).Value;
59+
).Value;
5860

5961
Assert.True(cardDebit.Id != null);
60-
62+
6163
var cardFromCardEndpoint = Card.Get(cardDebit.Id.Value).Value;
6264

6365
Assert.Equal(cardDebit.SecondLine, cardFromCardEndpoint.SecondLine);
@@ -80,4 +82,4 @@ private static string GenerateRandomSecondLine()
8082
).ToString();
8183
}
8284
}
83-
}
85+
}

BunqSdk.Tests/Model/Generated/Endpoint/DraftShareInviteBankQrCodeContentTest.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class DraftShareInviteBankQrCodeContentTest : BunqSdkTestBase
1919
/// Config values.
2020
/// </summary>
2121
private const string FilenameQrCodeImage = "tmp/qrcode.png";
22+
2223
private const int TimeUnitAmountZero = 0;
2324
private const int TimeUnitAmountOne = 1;
2425
private const string FormatDate = "yyyy-MM-dd HH:mm:ss";
@@ -49,10 +50,10 @@ private static int GetShareInviteId()
4950
var expirationTime = currentDate.Add(addTime).ToString(FormatDate);
5051

5152
var draftShareInviteEntry = new DraftShareInviteEntry(
52-
new ShareDetail{Payment = new ShareDetailPayment(true, true, true, true)}
53-
);
53+
new ShareDetail {Payment = new ShareDetailPayment(true, true, true, true)}
54+
);
5455

5556
return DraftShareInviteBank.Create(expirationTime, draftShareInviteEntry).Value;
5657
}
5758
}
58-
}
59+
}

BunqSdk.Tests/Model/Generated/Endpoint/MonetaryAccountBankTest.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class MonetaryAccountBankTest : BunqSdkTestBase
1515
/// Config values
1616
/// </summary>
1717
private const string Status = "CANCELLED";
18+
1819
private const string SubStatus = "REDEMPTION_VOLUNTARY";
1920
private const string Reason = "OTHER";
2021
private const string ReasonDescription = "Because this is a test";
@@ -27,7 +28,8 @@ public void TestCreationNewMonetaryAccount()
2728
{
2829
SetUpTestCase();
2930

30-
var monetaryAccountToCloseId = MonetaryAccountBank.Create(PaymentCurrency, MonetaryAccountDescription).Value;
31+
var monetaryAccountToCloseId =
32+
MonetaryAccountBank.Create(PaymentCurrency, MonetaryAccountDescription).Value;
3133

3234
DeleteMonetaryAccount(monetaryAccountToCloseId);
3335
}
@@ -38,4 +40,4 @@ private static void DeleteMonetaryAccount(int idToClose)
3840
reasonDescription: ReasonDescription);
3941
}
4042
}
41-
}
43+
}

BunqSdk.Tests/Model/Generated/Endpoint/PaymentTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void TestMakePaymentToOtherAccount()
4040
new Amount(PaymentAmountEur, PaymentCurrency),
4141
SecondMonetaryAccountBank.Alias.First(),
4242
PaymentDescription
43-
);
43+
);
4444
}
4545
}
46-
}
46+
}

BunqSdk.Tests/Model/Generated/Endpoint/RequestInquiryTest.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class RequestInquiryTest : BunqSdkTestBase
1818
/// The status for accepting a request.
1919
/// </summary>
2020
private const string Status = "ACCEPTED";
21-
21+
2222
/// <summary>
2323
/// Tests sending a request from monetary account 1 to monetary account 2 and accepting this request.
2424
/// </summary>
@@ -30,9 +30,9 @@ public void TestRequestInquiry()
3030
RequestInquiry.Create(
3131
new Amount(PaymentAmountEur, PaymentCurrency),
3232
SecondMonetaryAccountBank.Alias.First(),
33-
PaymentDescription,
33+
PaymentDescription,
3434
false
35-
);
35+
);
3636

3737
Assert.Equal(Status, AcceptRequest());
3838
}
@@ -45,7 +45,7 @@ private static string AcceptRequest()
4545
requestResponseId,
4646
status: Status,
4747
monetaryAccountId: SecondMonetaryAccountBank.Id.Value
48-
).Value.Status;
48+
).Value.Status;
4949
}
5050
}
51-
}
51+
}

BunqSdk.Tests/Model/Generated/Endpoint/SessionTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ public void TestSessionDeletion()
3333
File.Delete(FilenameContextConf);
3434
}
3535
}
36-
}
36+
}

BunqSdk.Tests/Model/Generated/Object/NotificationUrlTest.cs

+40-33
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class NotificationUrlTest : BunqSdkTestBase
1616
/// Getter constans.
1717
/// </summary>
1818
private const string GetPayment = "Payment";
19+
1920
private const string GetBunqMeTab = "BunqMeTab";
2021
private const string GetChatMessageAnnouncement = "ChatMessageAnnouncement";
2122
private const string GetChatMessage = "ChatMessage";
@@ -30,15 +31,18 @@ public class NotificationUrlTest : BunqSdkTestBase
3031
private const string GetScheduleInstance = "ScheduledInstance";
3132
private const string GetShareInviteBankInquiry = "ShareInviteBankInquiry";
3233
private const string GetShareInviteBankResponse = "ShareInviteBankResponse";
33-
34+
3435
/// <summary>
3536
/// Model json paths constants.
3637
/// </summary>
3738
private const string BasePathJsonModel = "../../../Resources/NotificationUrlJsons";
39+
3840
private const string JsonPathMutationModel = BasePathJsonModel + "/Mutation.json";
3941
private const string JsonPathBunqMeTabModel = BasePathJsonModel + "/BunqMeTab.json";
40-
private const string JsonPathChatMessageAnnouncementModel = BasePathJsonModel +
41-
"/ChatMessageAnnouncement.json";
42+
43+
private const string JsonPathChatMessageAnnouncementModel = BasePathJsonModel +
44+
"/ChatMessageAnnouncement.json";
45+
4246
private const string JsonPathDraftPaymentModel = BasePathJsonModel + "/DraftPayment.json";
4347
private const string JsonPathMasterCardActionModel = BasePathJsonModel + "/MasterCardAction.json";
4448
private const string JsonPathMonetaryAccountBankModel = BasePathJsonModel + "/MonetaryAccountBank.json";
@@ -47,10 +51,13 @@ public class NotificationUrlTest : BunqSdkTestBase
4751
private const string JsonPathRequestResponseModel = BasePathJsonModel + "/RequestResponse.json";
4852
private const string JsonPathSchedulePaymentModel = BasePathJsonModel + "/ScheduledPayment.json";
4953
private const string JsonPathScheduleInstanceModel = BasePathJsonModel + "/ScheduledInstance.json";
50-
private const string JsonPathShareInviteBankInquiryModel = BasePathJsonModel +
51-
"/ShareInviteBankInquiry.json";
54+
55+
private const string JsonPathShareInviteBankInquiryModel = BasePathJsonModel +
56+
"/ShareInviteBankInquiry.json";
57+
5258
private const string JsonPathShareInviteBankResponseModel = BasePathJsonModel +
53-
"/ShareInviteBankResponse.json";
59+
"/ShareInviteBankResponse.json";
60+
5461
/// <summary>
5562
/// Model root key.
5663
/// </summary>
@@ -61,19 +68,19 @@ private void ExecuteNotificationUrlTest(
6168
Type classTypeExpected,
6269
string referencedObjectPropertyName,
6370
string subClassObjectPropertyName = null,
64-
Type subClassTypeExpected = null)
71+
Type subClassTypeExpected = null)
6572
{
6673
var jsonString = ReadJsonFromFile(expectedJsonFileName);
6774
var notificationUrl = NotificationUrl.CreateFromJsonString(jsonString);
68-
75+
6976
Assert.NotNull(notificationUrl);
7077
Assert.NotNull(notificationUrl.Object);
7178

7279
var model = notificationUrl.Object.GetType()
7380
.GetProperty(referencedObjectPropertyName)
7481
.GetValue(notificationUrl.Object);
7582
var referencedModel = notificationUrl.Object.GetReferencedObject();
76-
83+
7784
Assert.NotNull(model);
7885
Assert.NotNull(referencedModel);
7986
Assert.IsType(classTypeExpected, referencedModel);
@@ -82,7 +89,7 @@ private void ExecuteNotificationUrlTest(
8289
var subClass = referencedModel.GetType()
8390
.GetProperty(subClassObjectPropertyName)
8491
.GetValue(referencedModel);
85-
92+
8693
Assert.NotNull(subClass);
8794
Assert.IsType(subClassTypeExpected, subClass);
8895
}
@@ -92,7 +99,7 @@ private static string ReadJsonFromFile(string fileName)
9299
var fileContentString = File.ReadAllText(fileName);
93100
var jsonObj = JObject.Parse(fileContentString);
94101
var notificationUrlObject = jsonObj[KeyNotificationUrlModel];
95-
102+
96103
Assert.NotNull(notificationUrlObject);
97104

98105
return notificationUrlObject.ToString();
@@ -107,7 +114,7 @@ public void TestMutationModel()
107114
GetPayment
108115
);
109116
}
110-
117+
111118
[Fact]
112119
public void TestBunqMeTabModel()
113120
{
@@ -116,8 +123,8 @@ public void TestBunqMeTabModel()
116123
typeof(BunqMeTab),
117124
GetBunqMeTab
118125
);
119-
}
120-
126+
}
127+
121128
[Fact]
122129
public void TestDraftPaymentModel()
123130
{
@@ -126,8 +133,8 @@ public void TestDraftPaymentModel()
126133
typeof(DraftPayment),
127134
GetDraftPayment
128135
);
129-
}
130-
136+
}
137+
131138
[Fact]
132139
public void TestMasterCardActionModel()
133140
{
@@ -136,8 +143,8 @@ public void TestMasterCardActionModel()
136143
typeof(MasterCardAction),
137144
GetMasterCardAction
138145
);
139-
}
140-
146+
}
147+
141148
[Fact]
142149
public void TestMonetaryAccountBankModel()
143150
{
@@ -148,8 +155,8 @@ public void TestMonetaryAccountBankModel()
148155
GetMonetaryAccountBank,
149156
typeof(MonetaryAccountBank)
150157
);
151-
}
152-
158+
}
159+
153160
[Fact]
154161
public void TestPaymentBatchModel()
155162
{
@@ -158,8 +165,8 @@ public void TestPaymentBatchModel()
158165
typeof(PaymentBatch),
159166
GetPaymentBatch
160167
);
161-
}
162-
168+
}
169+
163170
[Fact]
164171
public void TestRequestInquiryModel()
165172
{
@@ -168,8 +175,8 @@ public void TestRequestInquiryModel()
168175
typeof(RequestInquiry),
169176
GetRequestInquiry
170177
);
171-
}
172-
178+
}
179+
173180
[Fact]
174181
public void TestRequestResponseModel()
175182
{
@@ -178,8 +185,8 @@ public void TestRequestResponseModel()
178185
typeof(RequestResponse),
179186
GetRequestResponse
180187
);
181-
}
182-
188+
}
189+
183190
[Fact]
184191
public void TestScheduledInstanceModel()
185192
{
@@ -188,8 +195,8 @@ public void TestScheduledInstanceModel()
188195
typeof(ScheduleInstance),
189196
GetScheduleInstance
190197
);
191-
}
192-
198+
}
199+
193200
[Fact]
194201
public void TestScheduledPaymentModel()
195202
{
@@ -198,8 +205,8 @@ public void TestScheduledPaymentModel()
198205
typeof(SchedulePayment),
199206
GetSchedulePayment
200207
);
201-
}
202-
208+
}
209+
203210
[Fact]
204211
public void TestShareInviteBankModel()
205212
{
@@ -208,8 +215,8 @@ public void TestShareInviteBankModel()
208215
typeof(ShareInviteBankInquiry),
209216
GetShareInviteBankInquiry
210217
);
211-
}
212-
218+
}
219+
213220
[Fact]
214221
public void TestShareInviteBankResponse()
215222
{
@@ -220,4 +227,4 @@ public void TestShareInviteBankResponse()
220227
);
221228
}
222229
}
223-
}
230+
}

0 commit comments

Comments
 (0)