Skip to content

Commit ae0c3f8

Browse files
author
Kevin Hellemun
committed
Regenerated code. (#76)
1 parent 031ec68 commit ae0c3f8

File tree

7 files changed

+101
-4
lines changed

7 files changed

+101
-4
lines changed

BunqSdk/Model/Generated/Endpoint/CardDebit.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ public class CardDebit : BunqModel
2727
/// </summary>
2828
public const string FIELD_SECOND_LINE = "second_line";
2929
public const string FIELD_NAME_ON_CARD = "name_on_card";
30-
public const string FIELD_PIN_CODE = "pin_code";
3130
public const string FIELD_ALIAS = "alias";
3231
public const string FIELD_TYPE = "type";
3332
public const string FIELD_PIN_CODE_ASSIGNMENT = "pin_code_assignment";

BunqSdk/Model/Generated/Endpoint/MasterCardAction.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ public class MasterCardAction : BunqModel
171171
[JsonProperty(PropertyName = "eligible_whitelist_id")]
172172
public int? EligibleWhitelistId { get; private set; }
173173

174+
/// <summary>
175+
/// The secure code id for this mastercard action or null.
176+
/// </summary>
177+
[JsonProperty(PropertyName = "secure_code_id")]
178+
public int? SecureCodeId { get; private set; }
179+
174180
/// <summary>
175181
/// </summary>
176182
public static BunqResponse<MasterCardAction> Get(ApiContext apiContext, int userId, int monetaryAccountId, int masterCardActionId, IDictionary<string, string> customHeaders = null)
@@ -321,6 +327,11 @@ public override bool IsAllFieldNull()
321327
return false;
322328
}
323329

330+
if (this.SecureCodeId != null)
331+
{
332+
return false;
333+
}
334+
324335
return true;
325336
}
326337

BunqSdk/Model/Generated/Endpoint/RequestResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public class RequestResponse : BunqModel
138138
public Geolocation Geolocation { get; private set; }
139139

140140
/// <summary>
141-
/// The type of the RequestInquiry. Can be DIRECT_DEBIT, DIRECT_DEBIT_B2B, IDEAL or INTERNAL.
141+
/// The type of the RequestInquiry. Can be DIRECT_DEBIT, DIRECT_DEBIT_B2B, IDEAL, SOFORT or INTERNAL.
142142
/// </summary>
143143
[JsonProperty(PropertyName = "type")]
144144
public string Type { get; private set; }
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
using Bunq.Sdk.Context;
2+
using Bunq.Sdk.Http;
3+
using Bunq.Sdk.Json;
4+
using Bunq.Sdk.Model.Core;
5+
using Newtonsoft.Json;
6+
using System.Collections.Generic;
7+
using System.Text;
8+
using System;
9+
10+
namespace Bunq.Sdk.Model.Generated.Endpoint
11+
{
12+
/// <summary>
13+
/// Using this call you can create a SOFORT Request assigned to your User by providing the Token of the request.
14+
/// </summary>
15+
public class TokenQrRequestSofort : BunqModel
16+
{
17+
/// <summary>
18+
/// Endpoint constants.
19+
/// </summary>
20+
private const string ENDPOINT_URL_CREATE = "user/{0}/token-qr-request-sofort";
21+
22+
/// <summary>
23+
/// Field constants.
24+
/// </summary>
25+
public const string FIELD_TOKEN = "token";
26+
27+
/// <summary>
28+
/// Object type.
29+
/// </summary>
30+
private const string OBJECT_TYPE_POST = "RequestResponse";
31+
32+
/// <summary>
33+
/// Create a request from an SOFORT transaction.
34+
/// </summary>
35+
public static BunqResponse<TokenQrRequestSofort> Create(ApiContext apiContext, IDictionary<string, object> requestMap, int userId, IDictionary<string, string> customHeaders = null)
36+
{
37+
if (customHeaders == null) customHeaders = new Dictionary<string, string>();
38+
39+
var apiClient = new ApiClient(apiContext);
40+
var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap));
41+
var responseRaw = apiClient.Post(string.Format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders);
42+
43+
return FromJson<TokenQrRequestSofort>(responseRaw, OBJECT_TYPE_POST);
44+
}
45+
46+
47+
/// <summary>
48+
/// </summary>
49+
public override bool IsAllFieldNull()
50+
{
51+
return true;
52+
}
53+
54+
/// <summary>
55+
/// </summary>
56+
public static TokenQrRequestSofort CreateFromJsonString(string json)
57+
{
58+
return BunqModel.CreateFromJsonString<TokenQrRequestSofort>(json);
59+
}
60+
}
61+
}

BunqSdk/Model/Generated/Endpoint/UserCompany.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,18 @@ public class UserCompany : BunqModel
195195
[JsonProperty(PropertyName = "session_timeout")]
196196
public int? SessionTimeout { get; private set; }
197197

198+
/// <summary>
199+
/// Card ids used for centralized card limits.
200+
/// </summary>
201+
[JsonProperty(PropertyName = "card_ids")]
202+
public List<BunqId> CardIds { get; private set; }
203+
204+
/// <summary>
205+
/// The centralized limits for user's cards.
206+
/// </summary>
207+
[JsonProperty(PropertyName = "card_limits")]
208+
public List<CardLimit> CardLimits { get; private set; }
209+
198210
/// <summary>
199211
/// The amount the company can pay in the session without asking for credentials.
200212
/// </summary>
@@ -377,6 +389,16 @@ public override bool IsAllFieldNull()
377389
return false;
378390
}
379391

392+
if (this.CardIds != null)
393+
{
394+
return false;
395+
}
396+
397+
if (this.CardLimits != null)
398+
{
399+
return false;
400+
}
401+
380402
if (this.DailyLimitWithoutConfirmationLogin != null)
381403
{
382404
return false;

BunqSdk/Model/Generated/Endpoint/UserPerson.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public class UserPerson : BunqModel
5050
public const string FIELD_SUB_STATUS = "sub_status";
5151
public const string FIELD_LEGAL_GUARDIAN_ALIAS = "legal_guardian_alias";
5252
public const string FIELD_SESSION_TIMEOUT = "session_timeout";
53+
public const string FIELD_CARD_IDS = "card_ids";
54+
public const string FIELD_CARD_LIMITS = "card_limits";
5355
public const string FIELD_DAILY_LIMIT_WITHOUT_CONFIRMATION_LOGIN = "daily_limit_without_confirmation_login";
5456
public const string FIELD_COUNTER_BANK_IBAN = "counter_bank_iban";
5557
public const string FIELD_NOTIFICATION_FILTERS = "notification_filters";

BunqSdk/Model/Generated/Object/CardPinAssignment.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ public class CardPinAssignment : BunqModel
2424
/// The ID of the monetary account to assign to this pin for the card.
2525
/// </summary>
2626
[JsonProperty(PropertyName = "monetary_account_id")]
27-
public string MonetaryAccountId { get; set; }
27+
public int? MonetaryAccountId { get; set; }
2828

29-
public CardPinAssignment(string type)
29+
public CardPinAssignment(string type, string pinCode, int? monetaryAccountId)
3030
{
3131
Type = type;
32+
PinCode = pinCode;
33+
MonetaryAccountId = monetaryAccountId;
3234
}
3335

3436

0 commit comments

Comments
 (0)