diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentConversationContent.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentConversationContent.cs
index c3db2d1..a071452 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentConversationContent.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentConversationContent.cs
@@ -1,6 +1,11 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
+using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -14,41 +19,38 @@ public class AttachmentConversationContent : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_LISTING = "user/{0}/chat-conversation/{1}/attachment/{2}/content";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "AttachmentConversationContent";
-
+
///
/// Get the raw content of a specific attachment.
///
- public static BunqResponse List(int chatConversationId, int attachmentId,
- IDictionary customHeaders = null)
+ public static BunqResponse List(int chatConversationId, int attachmentId, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), chatConversationId, attachmentId),
- new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), chatConversationId, attachmentId), new Dictionary(), customHeaders);
+
return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
{
return true;
}
-
+
///
///
public static AttachmentConversationContent CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccount.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccount.cs
index 2f024b0..dccef70 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccount.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccount.cs
@@ -1,8 +1,12 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -16,42 +20,38 @@ public class AttachmentMonetaryAccount : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/attachment";
-
-
+
+
///
/// The attachment.
///
[JsonProperty(PropertyName = "attachment")]
public Attachment Attachment { get; set; }
-
+
///
/// The ID of the attachment created.
///
[JsonProperty(PropertyName = "id")]
public int? Id { get; set; }
-
-
+
+
///
/// Create a new monetary account attachment. Create a POST request with a payload that contains the binary
/// representation of the file, without any JSON wrapping. Make sure you define the MIME type (i.e. image/jpeg)
/// in the Content-Type header. You are required to provide a description of the attachment using the
/// X-Bunq-Attachment-Description header.
///
- public static BunqResponse Create(byte[] requestBytes, int? monetaryAccountId = null,
- IDictionary customHeaders = null)
+ public static BunqResponse Create(byte[] requestBytes, int? monetaryAccountId= null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Post(
- string.Format(ENDPOINT_URL_CREATE, DetermineUserId(),
- DetermineMonetaryAccountId(monetaryAccountId)), requestBytes, customHeaders);
-
+ var responseRaw = apiClient.Post(string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId)), requestBytes, customHeaders);
+
return ProcessForId(responseRaw);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -60,20 +60,20 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Id != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static AttachmentMonetaryAccount CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccountContent.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccountContent.cs
index c42073b..97ceb2f 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccountContent.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccountContent.cs
@@ -1,6 +1,11 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
+using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -14,43 +19,38 @@ public class AttachmentMonetaryAccountContent : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/attachment/{2}/content";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "AttachmentMonetaryAccountContent";
-
+
///
/// Get the raw content of a specific attachment.
///
- public static BunqResponse List(int attachmentId, int? monetaryAccountId = null,
- IDictionary customHeaders = null)
+ public static BunqResponse List(int attachmentId, int? monetaryAccountId= null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Get(
- string.Format(ENDPOINT_URL_LISTING, DetermineUserId(),
- DetermineMonetaryAccountId(monetaryAccountId), attachmentId), new Dictionary(),
- customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), attachmentId), new Dictionary(), customHeaders);
+
return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
{
return true;
}
-
+
///
///
public static AttachmentMonetaryAccountContent CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentPublic.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentPublic.cs
index 2b344be..6491a79 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentPublic.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentPublic.cs
@@ -1,8 +1,12 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -17,71 +21,69 @@ public class AttachmentPublic : BunqModel
///
protected const string ENDPOINT_URL_CREATE = "attachment-public";
protected const string ENDPOINT_URL_READ = "attachment-public/{0}";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_POST = "Uuid";
private const string OBJECT_TYPE_GET = "AttachmentPublic";
-
+
///
/// The UUID of the attachment.
///
[JsonProperty(PropertyName = "uuid")]
public string Uuid { get; set; }
-
+
///
/// The timestamp of the attachment's creation.
///
[JsonProperty(PropertyName = "created")]
public string Created { get; set; }
-
+
///
/// The timestamp of the attachment's last update.
///
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
-
+
///
/// The attachment.
///
[JsonProperty(PropertyName = "attachment")]
public Attachment Attachment { get; set; }
-
-
+
+
///
/// Create a new public attachment. Create a POST request with a payload that contains a binary representation
/// of the file, without any JSON wrapping. Make sure you define the MIME type (i.e. image/jpeg, or image/png)
/// in the Content-Type header. You are required to provide a description of the attachment using the
/// X-Bunq-Attachment-Description header.
///
- public static BunqResponse Create(byte[] requestBytes, IDictionary customHeaders = null)
+ public static BunqResponse Create(byte[] requestBytes, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
var responseRaw = apiClient.Post(ENDPOINT_URL_CREATE, requestBytes, customHeaders);
-
+
return ProcessForUuid(responseRaw);
}
-
+
///
/// Get a specific attachment's metadata through its UUID. The Content-Type header of the response will describe
/// the MIME type of the attachment file.
///
- public static BunqResponse Get(string attachmentPublicUuid,
- IDictionary customHeaders = null)
+ public static BunqResponse Get(string attachmentPublicUuid, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, attachmentPublicUuid),
- new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, attachmentPublicUuid), new Dictionary(), customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -90,30 +92,30 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Created != null)
{
return false;
}
-
+
if (this.Updated != null)
{
return false;
}
-
+
if (this.Attachment != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static AttachmentPublic CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentPublicContent.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentPublicContent.cs
index 26a6c6f..7a0703d 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentPublicContent.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentPublicContent.cs
@@ -1,6 +1,11 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
+using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -14,40 +19,38 @@ public class AttachmentPublicContent : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_LISTING = "attachment-public/{0}/content";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "AttachmentPublicContent";
-
+
///
/// Get the raw content of a specific attachment.
///
- public static BunqResponse List(string attachmentPublicUuid,
- IDictionary customHeaders = null)
+ public static BunqResponse List(string attachmentPublicUuid, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, attachmentPublicUuid),
- new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, attachmentPublicUuid), new Dictionary(), customHeaders);
+
return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
{
return true;
}
-
+
///
///
public static AttachmentPublicContent CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentTab.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentTab.cs
index 1829bad..4c68196 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentTab.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentTab.cs
@@ -1,8 +1,12 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -17,75 +21,67 @@ public class AttachmentTab : BunqModel
///
protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/attachment-tab";
protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/attachment-tab/{2}";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "AttachmentTab";
-
+
///
/// The id of the attachment.
///
[JsonProperty(PropertyName = "id")]
public int? Id { get; set; }
-
+
///
/// The timestamp of the attachment's creation.
///
[JsonProperty(PropertyName = "created")]
public string Created { get; set; }
-
+
///
/// The timestamp of the attachment's last update.
///
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
-
+
///
/// The attachment.
///
[JsonProperty(PropertyName = "attachment")]
public Attachment Attachment { get; set; }
-
-
+
+
///
/// Upload a new attachment to use with a tab, and to read its metadata. Create a POST request with a payload
/// that contains the binary representation of the file, without any JSON wrapping. Make sure you define the
/// MIME type (i.e. image/jpeg) in the Content-Type header. You are required to provide a description of the
/// attachment using the X-Bunq-Attachment-Description header.
///
- public static BunqResponse Create(byte[] requestBytes, int? monetaryAccountId = null,
- IDictionary customHeaders = null)
+ public static BunqResponse Create(byte[] requestBytes, int? monetaryAccountId= null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Post(
- string.Format(ENDPOINT_URL_CREATE, DetermineUserId(),
- DetermineMonetaryAccountId(monetaryAccountId)), requestBytes, customHeaders);
-
+ var responseRaw = apiClient.Post(string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId)), requestBytes, customHeaders);
+
return ProcessForId(responseRaw);
}
-
+
///
/// Get a specific attachment. The header of the response contains the content-type of the attachment.
///
- public static BunqResponse Get(int attachmentTabId, int? monetaryAccountId = null,
- IDictionary customHeaders = null)
+ public static BunqResponse Get(int attachmentTabId, int? monetaryAccountId= null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Get(
- string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId),
- attachmentTabId), new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), attachmentTabId), new Dictionary(), customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -94,30 +90,30 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Created != null)
{
return false;
}
-
+
if (this.Updated != null)
{
return false;
}
-
+
if (this.Attachment != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static AttachmentTab CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentTabContent.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentTabContent.cs
index fa01446..4a5e039 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentTabContent.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentTabContent.cs
@@ -1,6 +1,11 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
+using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -14,43 +19,38 @@ public class AttachmentTabContent : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/attachment-tab/{2}/content";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "AttachmentTabContent";
-
+
///
/// Get the raw content of a specific attachment.
///
- public static BunqResponse List(int attachmentTabId, int? monetaryAccountId = null,
- IDictionary customHeaders = null)
+ public static BunqResponse List(int attachmentTabId, int? monetaryAccountId= null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Get(
- string.Format(ENDPOINT_URL_LISTING, DetermineUserId(),
- DetermineMonetaryAccountId(monetaryAccountId), attachmentTabId),
- new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), attachmentTabId), new Dictionary(), customHeaders);
+
return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
{
return true;
}
-
+
///
///
public static AttachmentTabContent CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentUser.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentUser.cs
index 1b6a6d0..30727dd 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentUser.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentUser.cs
@@ -1,8 +1,12 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -16,53 +20,51 @@ public class AttachmentUser : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_READ = "user/{0}/attachment/{1}";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "AttachmentUser";
-
+
///
/// The id of the attachment.
///
[JsonProperty(PropertyName = "id")]
public int? Id { get; set; }
-
+
///
/// The timestamp of the attachment's creation.
///
[JsonProperty(PropertyName = "created")]
public string Created { get; set; }
-
+
///
/// The timestamp of the attachment's last update.
///
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
-
+
///
/// The attachment.
///
[JsonProperty(PropertyName = "attachment")]
public Attachment Attachment { get; set; }
-
-
+
+
///
/// Get a specific attachment. The header of the response contains the content-type of the attachment.
///
- public static BunqResponse Get(int attachmentUserId,
- IDictionary customHeaders = null)
+ public static BunqResponse Get(int attachmentUserId, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, DetermineUserId(), attachmentUserId),
- new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, DetermineUserId(), attachmentUserId), new Dictionary(), customHeaders);
+
return FromJson(responseRaw);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -71,30 +73,30 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Created != null)
{
return false;
}
-
+
if (this.Updated != null)
{
return false;
}
-
+
if (this.Attachment != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static AttachmentUser CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentUserContent.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentUserContent.cs
index 684b714..055dc5f 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentUserContent.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentUserContent.cs
@@ -1,6 +1,11 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
+using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -14,39 +19,38 @@ public class AttachmentUserContent : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_LISTING = "user/{0}/attachment/{1}/content";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "AttachmentUserContent";
-
+
///
/// Get the raw content of a specific attachment.
///
public static BunqResponse List(int attachmentId, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), attachmentId),
- new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), attachmentId), new Dictionary(), customHeaders);
+
return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
{
return true;
}
-
+
///
///
public static AttachmentUserContent CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/Avatar.cs b/BunqSdk/Model/Generated/Endpoint/Avatar.cs
index 621108f..1fb624d 100644
--- a/BunqSdk/Model/Generated/Endpoint/Avatar.cs
+++ b/BunqSdk/Model/Generated/Endpoint/Avatar.cs
@@ -1,10 +1,12 @@
-using System.Collections.Generic;
-using System.Text;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -21,72 +23,70 @@ public class Avatar : BunqModel
///
protected const string ENDPOINT_URL_CREATE = "avatar";
protected const string ENDPOINT_URL_READ = "avatar/{0}";
-
+
///
/// Field constants.
///
public const string FIELD_ATTACHMENT_PUBLIC_UUID = "attachment_public_uuid";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_POST = "Uuid";
private const string OBJECT_TYPE_GET = "Avatar";
-
+
///
/// The public UUID of the public attachment from which an avatar image must be created.
///
[JsonProperty(PropertyName = "attachment_public_uuid")]
public string AttachmentPublicUuid { get; set; }
-
+
///
/// The UUID of the created avatar.
///
[JsonProperty(PropertyName = "uuid")]
public string Uuid { get; set; }
-
+
///
/// The content type of the image.
///
[JsonProperty(PropertyName = "image")]
public List Image { get; set; }
-
-
+
+
///
///
/// The public UUID of the public attachment from which an avatar image must be created.
- public static BunqResponse Create(string attachmentPublicUuid,
- IDictionary customHeaders = null)
+ public static BunqResponse Create(string attachmentPublicUuid, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
-
+
var requestMap = new Dictionary
- {
- {FIELD_ATTACHMENT_PUBLIC_UUID, attachmentPublicUuid},
- };
-
+ {
+ {FIELD_ATTACHMENT_PUBLIC_UUID, attachmentPublicUuid},
+ };
+
var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap));
var responseRaw = apiClient.Post(ENDPOINT_URL_CREATE, requestBytes, customHeaders);
-
+
return ProcessForUuid(responseRaw);
}
-
+
///
///
public static BunqResponse Get(string avatarUuid, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, avatarUuid),
- new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, avatarUuid), new Dictionary(), customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -95,20 +95,20 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Image != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static Avatar CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/BankSwitchServiceNetherlandsIncoming.cs b/BunqSdk/Model/Generated/Endpoint/BankSwitchServiceNetherlandsIncoming.cs
index db8eb2f..72097bd 100644
--- a/BunqSdk/Model/Generated/Endpoint/BankSwitchServiceNetherlandsIncoming.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BankSwitchServiceNetherlandsIncoming.cs
@@ -1,6 +1,7 @@
using Bunq.Sdk.Model.Core;
using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -15,63 +16,64 @@ public class BankSwitchServiceNetherlandsIncoming : BunqModel
public const string FIELD_ALIAS = "alias";
public const string FIELD_COUNTERPARTY_ALIAS = "counterparty_alias";
public const string FIELD_STATUS = "status";
-
-
+
+
///
/// The label of the monetary of this switch service.
///
[JsonProperty(PropertyName = "alias")]
public MonetaryAccountReference Alias { get; set; }
-
+
///
/// The IBAN alias that's displayed for this switch service.
///
[JsonProperty(PropertyName = "counterparty_alias")]
public MonetaryAccountReference CounterpartyAlias { get; set; }
-
+
///
/// The status of the switch service.
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
-
+
///
/// The label of the user creator of this switch service.
///
[JsonProperty(PropertyName = "user_alias")]
public LabelUser UserAlias { get; set; }
-
+
///
/// The sub status of the switch service.
///
[JsonProperty(PropertyName = "sub_status")]
public string SubStatus { get; set; }
-
+
///
/// The timestamp when the switch service desired to be start.
///
[JsonProperty(PropertyName = "time_start_desired")]
public string TimeStartDesired { get; set; }
-
+
///
/// The timestamp when the switch service actually starts.
///
[JsonProperty(PropertyName = "time_start_actual")]
public string TimeStartActual { get; set; }
-
+
///
/// The timestamp when the switch service ends.
///
[JsonProperty(PropertyName = "time_end")]
public string TimeEnd { get; set; }
-
+
///
/// Reference to the bank transfer form for this switch-service.
///
[JsonProperty(PropertyName = "attachment")]
public Attachment Attachment { get; set; }
-
-
+
+
+
///
///
public override bool IsAllFieldNull()
@@ -80,55 +82,55 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Alias != null)
{
return false;
}
-
+
if (this.CounterpartyAlias != null)
{
return false;
}
-
+
if (this.Status != null)
{
return false;
}
-
+
if (this.SubStatus != null)
{
return false;
}
-
+
if (this.TimeStartDesired != null)
{
return false;
}
-
+
if (this.TimeStartActual != null)
{
return false;
}
-
+
if (this.TimeEnd != null)
{
return false;
}
-
+
if (this.Attachment != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static BankSwitchServiceNetherlandsIncoming CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/BankSwitchServiceNetherlandsIncomingPayment.cs b/BunqSdk/Model/Generated/Endpoint/BankSwitchServiceNetherlandsIncomingPayment.cs
index 4fe0012..5e138c2 100644
--- a/BunqSdk/Model/Generated/Endpoint/BankSwitchServiceNetherlandsIncomingPayment.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BankSwitchServiceNetherlandsIncomingPayment.cs
@@ -1,7 +1,11 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -15,44 +19,38 @@ public class BankSwitchServiceNetherlandsIncomingPayment : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/switch-service-payment/{2}";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "BankSwitchServiceNetherlandsIncomingPayment";
-
+
///
/// The bank switch service details.
///
[JsonProperty(PropertyName = "bank_switch_service")]
public BankSwitchServiceNetherlandsIncoming BankSwitchService { get; set; }
-
+
///
/// The payment made using bank switch service.
///
[JsonProperty(PropertyName = "payment")]
public Payment Payment { get; set; }
-
-
+
+
///
///
- public static BunqResponse Get(
- int bankSwitchServiceNetherlandsIncomingPaymentId, int? monetaryAccountId = null,
- IDictionary customHeaders = null)
+ public static BunqResponse Get(int bankSwitchServiceNetherlandsIncomingPaymentId, int? monetaryAccountId= null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Get(
- string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId),
- bankSwitchServiceNetherlandsIncomingPaymentId), new Dictionary(),
- customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), bankSwitchServiceNetherlandsIncomingPaymentId), new Dictionary(), customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -61,20 +59,20 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Payment != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static BankSwitchServiceNetherlandsIncomingPayment CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/BillingContractSubscription.cs b/BunqSdk/Model/Generated/Endpoint/BillingContractSubscription.cs
index 2d56160..93138c5 100644
--- a/BunqSdk/Model/Generated/Endpoint/BillingContractSubscription.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BillingContractSubscription.cs
@@ -1,7 +1,11 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -14,97 +18,95 @@ public class BillingContractSubscription : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_LISTING = "user/{0}/billing-contract-subscription";
-
+
///
/// Field constants.
///
public const string FIELD_SUBSCRIPTION_TYPE = "subscription_type";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "BillingContractSubscription";
-
+
///
/// The subscription type of the user. Can be one of PERSON_SUPER_LIGHT_V1, PERSON_LIGHT_V1, PERSON_MORE_V1,
/// PERSON_FREE_V1, PERSON_PREMIUM_V1, COMPANY_V1, or COMPANY_V2.
///
[JsonProperty(PropertyName = "subscription_type")]
public string SubscriptionType { get; set; }
-
+
///
/// The id of the billing contract.
///
[JsonProperty(PropertyName = "id")]
public int? Id { get; set; }
-
+
///
/// The timestamp when the billing contract was made.
///
[JsonProperty(PropertyName = "created")]
public string Created { get; set; }
-
+
///
/// The timestamp when the billing contract was last updated.
///
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
-
+
///
/// The date from when the billing contract is valid.
///
[JsonProperty(PropertyName = "contract_date_start")]
public string ContractDateStart { get; set; }
-
+
///
/// The date until when the billing contract is valid.
///
[JsonProperty(PropertyName = "contract_date_end")]
public string ContractDateEnd { get; set; }
-
+
///
/// The version of the billing contract.
///
[JsonProperty(PropertyName = "contract_version")]
public int? ContractVersion { get; set; }
-
+
///
/// The subscription type the user will have after a subscription downgrade. Will be null if downgrading is not
/// possible.
///
[JsonProperty(PropertyName = "subscription_type_downgrade")]
public string SubscriptionTypeDowngrade { get; set; }
-
+
///
/// The subscription status.
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
-
+
///
/// The subscription substatus.
///
[JsonProperty(PropertyName = "sub_status")]
public string SubStatus { get; set; }
-
-
+
+
///
/// Get all subscription billing contract for the authenticated user.
///
- public static BunqResponse> List(IDictionary urlParams = null,
- IDictionary customHeaders = null)
+ public static BunqResponse> List( IDictionary urlParams = null, IDictionary customHeaders = null)
{
if (urlParams == null) urlParams = new Dictionary();
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId()), urlParams,
- customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId()), urlParams, customHeaders);
+
return FromJsonList(responseRaw, OBJECT_TYPE_GET);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -113,60 +115,60 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Created != null)
{
return false;
}
-
+
if (this.Updated != null)
{
return false;
}
-
+
if (this.ContractDateStart != null)
{
return false;
}
-
+
if (this.ContractDateEnd != null)
{
return false;
}
-
+
if (this.ContractVersion != null)
{
return false;
}
-
+
if (this.SubscriptionType != null)
{
return false;
}
-
+
if (this.SubscriptionTypeDowngrade != null)
{
return false;
}
-
+
if (this.Status != null)
{
return false;
}
-
+
if (this.SubStatus != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static BillingContractSubscription CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfile.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfile.cs
index 7513f6a..729c0ba 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfile.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfile.cs
@@ -1,5 +1,7 @@
using Bunq.Sdk.Model.Core;
+using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -12,58 +14,65 @@ public class BunqMeFundraiserProfile : BunqModel
/// Field constants.
///
public const string FIELD_POINTER = "pointer";
-
-
+
+
///
/// The pointer (url) which will be used to access the bunq.me fundraiser profile.
///
[JsonProperty(PropertyName = "pointer")]
public MonetaryAccountReference Pointer { get; set; }
-
+
///
/// The color chosen for the bunq.me fundraiser profile in hexadecimal format.
///
[JsonProperty(PropertyName = "color")]
public string Color { get; set; }
-
+
///
/// The LabelMonetaryAccount with the public information of the User and the MonetaryAccount that created the
/// bunq.me fundraiser profile.
///
[JsonProperty(PropertyName = "alias")]
public MonetaryAccountReference Alias { get; set; }
-
+
+ ///
+ /// The currency of the MonetaryAccount that created the bunq.me fundraiser profile.
+ ///
+ [JsonProperty(PropertyName = "currency")]
+ public string Currency { get; set; }
+
///
/// The description of the bunq.me fundraiser profile.
///
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }
-
+
///
/// The attachment attached to the fundraiser profile.
///
[JsonProperty(PropertyName = "attachment")]
public AttachmentPublic Attachment { get; set; }
-
+
///
/// The status of the bunq.me fundraiser profile, can be ACTIVE or DEACTIVATED.
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
-
+
///
/// The URL which the user is sent to when a payment is completed.
///
[JsonProperty(PropertyName = "redirect_url")]
public string RedirectUrl { get; set; }
-
+
///
/// Provided if the user has enabled their invite link.
///
[JsonProperty(PropertyName = "invite_profile_name")]
public string InviteProfileName { get; set; }
-
-
+
+
+
///
///
public override bool IsAllFieldNull()
@@ -72,50 +81,55 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Alias != null)
{
return false;
}
-
+
+ if (this.Currency != null)
+ {
+ return false;
+ }
+
if (this.Description != null)
{
return false;
}
-
+
if (this.Attachment != null)
{
return false;
}
-
+
if (this.Pointer != null)
{
return false;
}
-
+
if (this.Status != null)
{
return false;
}
-
+
if (this.RedirectUrl != null)
{
return false;
}
-
+
if (this.InviteProfileName != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static BunqMeFundraiserProfile CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfileUser.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfileUser.cs
index 43f97ac..41f8340 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfileUser.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfileUser.cs
@@ -1,7 +1,12 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
+using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -15,7 +20,7 @@ public class BunqMeFundraiserProfileUser : BunqModel
///
protected const string ENDPOINT_URL_READ = "user/{0}/bunqme-fundraiser-profile/{1}";
protected const string ENDPOINT_URL_LISTING = "user/{0}/bunqme-fundraiser-profile";
-
+
///
/// Field constants.
///
@@ -26,105 +31,106 @@ public class BunqMeFundraiserProfileUser : BunqModel
public const string FIELD_POINTER = "pointer";
public const string FIELD_REDIRECT_URL = "redirect_url";
public const string FIELD_STATUS = "status";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "BunqMeFundraiserProfileModel";
-
+
///
/// Id of the monetary account on which you want to receive bunq.me payments.
///
[JsonProperty(PropertyName = "monetary_account_id")]
public int? MonetaryAccountId { get; set; }
-
+
///
/// The color chosen for the bunq.me fundraiser profile in hexadecimal format.
///
[JsonProperty(PropertyName = "color")]
public string Color { get; set; }
-
+
///
/// The description of the bunq.me fundraiser profile.
///
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }
-
+
///
/// The public UUID of the public attachment from which an avatar image must be created.
///
[JsonProperty(PropertyName = "attachment_public_uuid")]
public string AttachmentPublicUuid { get; set; }
-
+
///
/// The pointer (url) which will be used to access the bunq.me fundraiser profile.
///
[JsonProperty(PropertyName = "pointer")]
public MonetaryAccountReference Pointer { get; set; }
-
+
///
/// The URL which the user is sent to when a payment is completed.
///
[JsonProperty(PropertyName = "redirect_url")]
public string RedirectUrl { get; set; }
-
+
///
/// The status of the bunq.me fundraiser profile, can be ACTIVE or DEACTIVATED.
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
-
+
///
/// Id of the user owning the profile.
///
[JsonProperty(PropertyName = "owner_user_id")]
public int? OwnerUserId { get; set; }
-
+
///
/// The LabelMonetaryAccount with the public information of the User and the MonetaryAccount that created the
/// bunq.me fundraiser profile.
///
[JsonProperty(PropertyName = "alias")]
public MonetaryAccountReference Alias { get; set; }
-
+
+ ///
+ /// The currency of the MonetaryAccount that created the bunq.me fundraiser profile.
+ ///
+ [JsonProperty(PropertyName = "currency")]
+ public string Currency { get; set; }
+
///
/// The attachment used for the background of the bunq.me fundraiser profile.
///
[JsonProperty(PropertyName = "attachment")]
public AttachmentPublic Attachment { get; set; }
-
-
+
+
///
///
- public static BunqResponse Get(int bunqMeFundraiserProfileUserId,
- IDictionary customHeaders = null)
+ public static BunqResponse Get(int bunqMeFundraiserProfileUserId, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Get(string.Format(ENDPOINT_URL_READ, DetermineUserId(), bunqMeFundraiserProfileUserId),
- new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, DetermineUserId(), bunqMeFundraiserProfileUserId), new Dictionary(), customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
+
///
///
- public static BunqResponse> List(IDictionary urlParams = null,
- IDictionary customHeaders = null)
+ public static BunqResponse> List( IDictionary urlParams = null, IDictionary customHeaders = null)
{
if (urlParams == null) urlParams = new Dictionary();
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId()), urlParams,
- customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId()), urlParams, customHeaders);
+
return FromJsonList(responseRaw, OBJECT_TYPE_GET);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -133,55 +139,60 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.OwnerUserId != null)
{
return false;
}
-
+
if (this.Color != null)
{
return false;
}
-
+
if (this.Alias != null)
{
return false;
}
-
+
+ if (this.Currency != null)
+ {
+ return false;
+ }
+
if (this.Description != null)
{
return false;
}
-
+
if (this.Attachment != null)
{
return false;
}
-
+
if (this.Pointer != null)
{
return false;
}
-
+
if (this.RedirectUrl != null)
{
return false;
}
-
+
if (this.Status != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static BunqMeFundraiserProfileUser CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserResult.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserResult.cs
index 49034bb..9b66665 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserResult.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserResult.cs
@@ -1,7 +1,11 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -14,60 +18,56 @@ public class BunqMeFundraiserResult : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/bunqme-fundraiser-result/{2}";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "BunqMeFundraiserResult";
-
+
///
/// The id of the bunq.me.
///
[JsonProperty(PropertyName = "id")]
public int? Id { get; set; }
-
+
///
/// The timestamp when the bunq.me was created.
///
[JsonProperty(PropertyName = "created")]
public string Created { get; set; }
-
+
///
/// The timestamp when the bunq.me was last updated.
///
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
-
+
///
/// The bunq.me fundraiser profile.
///
[JsonProperty(PropertyName = "bunqme_fundraiser_profile")]
public BunqMeFundraiserProfile BunqmeFundraiserProfile { get; set; }
-
+
///
/// The list of payments, paid to the bunq.me fundraiser profile.
///
[JsonProperty(PropertyName = "payments")]
public List Payments { get; set; }
-
-
+
+
///
///
- public static BunqResponse Get(int bunqMeFundraiserResultId,
- int? monetaryAccountId = null, IDictionary customHeaders = null)
+ public static BunqResponse Get(int bunqMeFundraiserResultId, int? monetaryAccountId= null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Get(
- string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId),
- bunqMeFundraiserResultId), new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), bunqMeFundraiserResultId), new Dictionary(), customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -76,35 +76,35 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Created != null)
{
return false;
}
-
+
if (this.Updated != null)
{
return false;
}
-
+
if (this.BunqmeFundraiserProfile != null)
{
return false;
}
-
+
if (this.Payments != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static BunqMeFundraiserResult CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeTab.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeTab.cs
index f2b2c83..c1360c3 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeTab.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeTab.cs
@@ -1,9 +1,12 @@
-using System.Collections.Generic;
-using System.Text;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
+using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -20,157 +23,160 @@ public class BunqMeTab : BunqModel
protected const string ENDPOINT_URL_UPDATE = "user/{0}/monetary-account/{1}/bunqme-tab/{2}";
protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/bunqme-tab";
protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/bunqme-tab/{2}";
-
+
///
/// Field constants.
///
public const string FIELD_BUNQME_TAB_ENTRY = "bunqme_tab_entry";
public const string FIELD_STATUS = "status";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "BunqMeTab";
-
+
///
/// The bunq.me entry containing the payment information.
///
[JsonProperty(PropertyName = "bunqme_tab_entry")]
public BunqMeTabEntry BunqmeTabEntry { get; set; }
-
+
///
/// The status of the bunq.me. Can be WAITING_FOR_PAYMENT, CANCELLED or EXPIRED.
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
-
+
///
/// The id of the created bunq.me.
///
[JsonProperty(PropertyName = "id")]
public int? Id { get; set; }
-
+
///
/// The timestamp when the bunq.me was created.
///
[JsonProperty(PropertyName = "created")]
public string Created { get; set; }
-
+
///
/// The timestamp when the bunq.me was last updated.
///
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
-
+
///
/// The timestamp of when the bunq.me expired or will expire.
///
[JsonProperty(PropertyName = "time_expiry")]
public string TimeExpiry { get; set; }
-
+
///
/// The id of the MonetaryAccount the bunq.me was sent from.
///
[JsonProperty(PropertyName = "monetary_account_id")]
public int? MonetaryAccountId { get; set; }
-
+
+ ///
+ /// The type of the bunq.me Tab. Can be BUNQ_ME or SPLIT_RECEIPT.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// The LabelMonetaryAccount with the public information of the User and the MonetaryAccount that created the
+ /// bunq.me link.
+ ///
+ [JsonProperty(PropertyName = "alias_monetary_account")]
+ public MonetaryAccountReference AliasMonetaryAccount { get; set; }
+
///
/// The url that points to the bunq.me page.
///
[JsonProperty(PropertyName = "bunqme_tab_share_url")]
public string BunqmeTabShareUrl { get; set; }
-
+
+ ///
+ /// The bunq.me tab entries attached to this bunq.me Tab.
+ ///
+ [JsonProperty(PropertyName = "bunqme_tab_entries")]
+ public List BunqmeTabEntries { get; set; }
+
///
/// The list of bunq.me result Inquiries successfully made and paid.
///
[JsonProperty(PropertyName = "result_inquiries")]
public List ResultInquiries { get; set; }
-
-
+
+
///
///
/// The bunq.me entry containing the payment information.
/// The status of the bunq.me. Ignored in POST requests but can be used for cancelling the bunq.me by setting status as CANCELLED with a PUT request.
- public static BunqResponse Create(BunqMeTabEntry bunqmeTabEntry, int? monetaryAccountId = null,
- string status = null, IDictionary customHeaders = null)
+ public static BunqResponse Create(BunqMeTabEntry bunqmeTabEntry, int? monetaryAccountId= null, string status = null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
-
+
var requestMap = new Dictionary
- {
- {FIELD_BUNQME_TAB_ENTRY, bunqmeTabEntry},
- {FIELD_STATUS, status},
- };
-
+ {
+ {FIELD_BUNQME_TAB_ENTRY, bunqmeTabEntry},
+ {FIELD_STATUS, status},
+ };
+
var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap));
- var responseRaw =
- apiClient.Post(
- string.Format(ENDPOINT_URL_CREATE, DetermineUserId(),
- DetermineMonetaryAccountId(monetaryAccountId)), requestBytes, customHeaders);
-
+ var responseRaw = apiClient.Post(string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId)), requestBytes, customHeaders);
+
return ProcessForId(responseRaw);
}
-
+
///
///
/// The status of the bunq.me. Ignored in POST requests but can be used for cancelling the bunq.me by setting status as CANCELLED with a PUT request.
- public static BunqResponse Update(int bunqMeTabId, int? monetaryAccountId = null, string status = null,
- IDictionary customHeaders = null)
+ public static BunqResponse Update(int bunqMeTabId, int? monetaryAccountId= null, string status = null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
-
+
var requestMap = new Dictionary
- {
- {FIELD_STATUS, status},
- };
-
+ {
+ {FIELD_STATUS, status},
+ };
+
var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap));
- var responseRaw =
- apiClient.Put(
- string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId),
- bunqMeTabId), requestBytes, customHeaders);
-
+ var responseRaw = apiClient.Put(string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), bunqMeTabId), requestBytes, customHeaders);
+
return ProcessForId(responseRaw);
}
-
+
///
///
- public static BunqResponse> List(int? monetaryAccountId = null,
- IDictionary urlParams = null, IDictionary customHeaders = null)
+ public static BunqResponse> List(int? monetaryAccountId= null, IDictionary urlParams = null, IDictionary customHeaders = null)
{
if (urlParams == null) urlParams = new Dictionary();
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Get(
- string.Format(ENDPOINT_URL_LISTING, DetermineUserId(),
- DetermineMonetaryAccountId(monetaryAccountId)), urlParams, customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId)), urlParams, customHeaders);
+
return FromJsonList(responseRaw, OBJECT_TYPE_GET);
}
-
+
///
///
- public static BunqResponse Get(int bunqMeTabId, int? monetaryAccountId = null,
- IDictionary customHeaders = null)
+ public static BunqResponse Get(int bunqMeTabId, int? monetaryAccountId= null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Get(
- string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId),
- bunqMeTabId), new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), bunqMeTabId), new Dictionary(), customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -179,55 +185,70 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Created != null)
{
return false;
}
-
+
if (this.Updated != null)
{
return false;
}
-
+
if (this.TimeExpiry != null)
{
return false;
}
-
+
if (this.MonetaryAccountId != null)
{
return false;
}
-
+
if (this.Status != null)
{
return false;
}
-
+
+ if (this.Type != null)
+ {
+ return false;
+ }
+
+ if (this.AliasMonetaryAccount != null)
+ {
+ return false;
+ }
+
if (this.BunqmeTabShareUrl != null)
{
return false;
}
-
+
if (this.BunqmeTabEntry != null)
{
return false;
}
-
+
+ if (this.BunqmeTabEntries != null)
+ {
+ return false;
+ }
+
if (this.ResultInquiries != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static BunqMeTab CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeTabEntry.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeTabEntry.cs
index ce6167d..0670642 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeTabEntry.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeTabEntry.cs
@@ -1,7 +1,7 @@
-using System.Collections.Generic;
using Bunq.Sdk.Model.Core;
using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -17,52 +17,53 @@ public class BunqMeTabEntry : BunqModel
public const string FIELD_AMOUNT_INQUIRED = "amount_inquired";
public const string FIELD_DESCRIPTION = "description";
public const string FIELD_REDIRECT_URL = "redirect_url";
-
-
+
+
///
/// The requested Amount.
///
[JsonProperty(PropertyName = "amount_inquired")]
public Amount AmountInquired { get; set; }
-
+
///
/// The description for the bunq.me. Maximum 9000 characters.
///
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }
-
+
///
/// The URL which the user is sent to when a payment is completed.
///
[JsonProperty(PropertyName = "redirect_url")]
public string RedirectUrl { get; set; }
-
+
///
/// The uuid of the bunq.me.
///
[JsonProperty(PropertyName = "uuid")]
public string Uuid { get; set; }
-
+
///
/// The LabelMonetaryAccount with the public information of the User and the MonetaryAccount that created the
/// bunq.me link.
///
[JsonProperty(PropertyName = "alias")]
public MonetaryAccountReference Alias { get; set; }
-
+
///
/// The status of the bunq.me. Can be WAITING_FOR_PAYMENT, CANCELLED or EXPIRED.
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
-
+
///
/// List of available merchants.
///
[JsonProperty(PropertyName = "merchant_available")]
public List MerchantAvailable { get; set; }
-
-
+
+
+
///
///
public override bool IsAllFieldNull()
@@ -71,45 +72,45 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.AmountInquired != null)
{
return false;
}
-
+
if (this.Alias != null)
{
return false;
}
-
+
if (this.Description != null)
{
return false;
}
-
+
if (this.Status != null)
{
return false;
}
-
+
if (this.RedirectUrl != null)
{
return false;
}
-
+
if (this.MerchantAvailable != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static BunqMeTabEntry CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultInquiry.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultInquiry.cs
index ac4e912..b043fae 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultInquiry.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultInquiry.cs
@@ -1,5 +1,6 @@
using Bunq.Sdk.Model.Core;
using Newtonsoft.Json;
+using System.Collections.Generic;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -14,14 +15,15 @@ public class BunqMeTabResultInquiry : BunqModel
///
[JsonProperty(PropertyName = "payment")]
public Payment Payment { get; set; }
-
+
///
/// The Id of the bunq.me tab that this BunqMeTabResultInquiry belongs to.
///
[JsonProperty(PropertyName = "bunq_me_tab_id")]
public int? BunqMeTabId { get; set; }
-
-
+
+
+
///
///
public override bool IsAllFieldNull()
@@ -30,20 +32,20 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.BunqMeTabId != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static BunqMeTabResultInquiry CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultResponse.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultResponse.cs
index 6823c02..6c82fcb 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultResponse.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultResponse.cs
@@ -1,7 +1,11 @@
-using System.Collections.Generic;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -15,35 +19,31 @@ public class BunqMeTabResultResponse : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/bunqme-tab-result-response/{2}";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_GET = "BunqMeTabResultResponse";
-
+
///
/// The payment made for the bunq.me tab.
///
[JsonProperty(PropertyName = "payment")]
public Payment Payment { get; set; }
-
+
///
///
- public static BunqResponse Get(int bunqMeTabResultResponseId,
- int? monetaryAccountId = null, IDictionary customHeaders = null)
+ public static BunqResponse Get(int bunqMeTabResultResponseId, int? monetaryAccountId= null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw =
- apiClient.Get(
- string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId),
- bunqMeTabResultResponseId), new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), bunqMeTabResultResponseId), new Dictionary(), customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -52,15 +52,15 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
return true;
}
-
+
///
///
public static BunqMeTabResultResponse CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/Card.cs b/BunqSdk/Model/Generated/Endpoint/Card.cs
index 184384a..45b995d 100644
--- a/BunqSdk/Model/Generated/Endpoint/Card.cs
+++ b/BunqSdk/Model/Generated/Endpoint/Card.cs
@@ -1,10 +1,12 @@
-using System.Collections.Generic;
-using System.Text;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -19,188 +21,189 @@ public class Card : BunqModel
protected const string ENDPOINT_URL_UPDATE = "user/{0}/card/{1}";
protected const string ENDPOINT_URL_READ = "user/{0}/card/{1}";
protected const string ENDPOINT_URL_LISTING = "user/{0}/card";
-
+
///
/// Field constants.
///
public const string FIELD_PIN_CODE = "pin_code";
public const string FIELD_ACTIVATION_CODE = "activation_code";
public const string FIELD_STATUS = "status";
+ public const string FIELD_ORDER_STATUS = "order_status";
public const string FIELD_CARD_LIMIT = "card_limit";
public const string FIELD_CARD_LIMIT_ATM = "card_limit_atm";
public const string FIELD_COUNTRY_PERMISSION = "country_permission";
public const string FIELD_PIN_CODE_ASSIGNMENT = "pin_code_assignment";
public const string FIELD_PRIMARY_ACCOUNT_NUMBERS = "primary_account_numbers";
public const string FIELD_MONETARY_ACCOUNT_ID_FALLBACK = "monetary_account_id_fallback";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_PUT = "CardDebit";
private const string OBJECT_TYPE_GET = "CardDebit";
-
+
///
/// The plaintext pin code. Requests require encryption to be enabled.
///
[JsonProperty(PropertyName = "pin_code")]
public string PinCode { get; set; }
-
+
///
/// DEPRECATED: Activate a card by setting status to ACTIVE when the order_status is ACCEPTED_FOR_PRODUCTION.
///
[JsonProperty(PropertyName = "activation_code")]
public string ActivationCode { get; set; }
-
+
///
/// The status to set for the card. Can be ACTIVE, DEACTIVATED, LOST, STOLEN, CANCELLED, EXPIRED or
/// PIN_TRIES_EXCEEDED.
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
-
+
+ ///
+ /// The order status of the card. Can be NEW_CARD_REQUEST_RECEIVED, CARD_REQUEST_PENDING, SENT_FOR_PRODUCTION,
+ /// ACCEPTED_FOR_PRODUCTION, DELIVERED_TO_CUSTOMER, CARD_UPDATE_REQUESTED, CARD_UPDATE_PENDING,
+ /// CARD_UPDATE_SENT, CARD_UPDATE_ACCEPTED, VIRTUAL_DELIVERY, NEW_CARD_REQUEST_PENDING_USER_APPROVAL,
+ /// SENT_FOR_DELIVERY or NEW_CARD_REQUEST_CANCELLED.
+ ///
+ [JsonProperty(PropertyName = "order_status")]
+ public string OrderStatus { get; set; }
+
///
/// The spending limit for the card.
///
[JsonProperty(PropertyName = "card_limit")]
public Amount CardLimit { get; set; }
-
+
///
/// The ATM spending limit for the card.
///
[JsonProperty(PropertyName = "card_limit_atm")]
public Amount CardLimitAtm { get; set; }
-
+
///
/// The countries for which to grant (temporary) permissions to use the card.
///
[JsonProperty(PropertyName = "country_permission")]
public List CountryPermission { get; set; }
-
+
///
/// Array of Types, PINs, account IDs assigned to the card.
///
[JsonProperty(PropertyName = "pin_code_assignment")]
public List PinCodeAssignment { get; set; }
-
+
///
/// Array of PANs and their attributes.
///
[JsonProperty(PropertyName = "primary_account_numbers")]
public List PrimaryAccountNumbers { get; set; }
-
+
///
/// ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if
/// not supplied.
///
[JsonProperty(PropertyName = "monetary_account_id_fallback")]
public int? MonetaryAccountIdFallback { get; set; }
-
+
///
/// The id of the card.
///
[JsonProperty(PropertyName = "id")]
public int? Id { get; set; }
-
+
///
/// The timestamp of the card's creation.
///
[JsonProperty(PropertyName = "created")]
public string Created { get; set; }
-
+
///
/// The timestamp of the card's last update.
///
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
-
+
///
/// The public UUID of the card.
///
[JsonProperty(PropertyName = "public_uuid")]
public string PublicUuid { get; set; }
-
+
///
/// The type of the card. Can be MAESTRO, MASTERCARD.
///
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
-
+
///
/// The sub-type of the card.
///
[JsonProperty(PropertyName = "sub_type")]
public string SubType { get; set; }
-
+
///
/// The second line of text on the card
///
[JsonProperty(PropertyName = "second_line")]
public string SecondLine { get; set; }
-
+
///
/// ID of the user who is owner of the card.
///
[JsonProperty(PropertyName = "user_id")]
public int? UserId { get; set; }
-
+
///
/// The sub-status of the card. Can be NONE or REPLACED.
///
[JsonProperty(PropertyName = "sub_status")]
public string SubStatus { get; set; }
-
- ///
- /// The order status of the card. Can be NEW_CARD_REQUEST_RECEIVED, CARD_REQUEST_PENDING, SENT_FOR_PRODUCTION,
- /// ACCEPTED_FOR_PRODUCTION, DELIVERED_TO_CUSTOMER, CARD_UPDATE_REQUESTED, CARD_UPDATE_PENDING,
- /// CARD_UPDATE_SENT, CARD_UPDATE_ACCEPTED, VIRTUAL_DELIVERY, NEW_CARD_REQUEST_PENDING_USER_APPROVAL,
- /// SENT_FOR_DELIVERY or NEW_CARD_REQUEST_CANCELLED.
- ///
- [JsonProperty(PropertyName = "order_status")]
- public string OrderStatus { get; set; }
-
+
///
/// Expiry date of the card.
///
[JsonProperty(PropertyName = "expiry_date")]
public string ExpiryDate { get; set; }
-
+
///
/// The user's name on the card.
///
[JsonProperty(PropertyName = "name_on_card")]
public string NameOnCard { get; set; }
-
+
///
/// The monetary account this card was ordered on and the label user that owns the card.
///
[JsonProperty(PropertyName = "label_monetary_account_ordered")]
public MonetaryAccountReference LabelMonetaryAccountOrdered { get; set; }
-
+
///
/// The monetary account that this card is currently linked to and the label user viewing it.
///
[JsonProperty(PropertyName = "label_monetary_account_current")]
public MonetaryAccountReference LabelMonetaryAccountCurrent { get; set; }
-
+
///
/// The country that is domestic to the card. Defaults to country of residence of user.
///
[JsonProperty(PropertyName = "country")]
public string Country { get; set; }
-
+
///
/// A tracking link provided by our shipment provider.
///
[JsonProperty(PropertyName = "card_shipment_tracking_url")]
public string CardShipmentTrackingUrl { get; set; }
-
+
///
/// The amount saved through ZeroFX on this card.
///
[JsonProperty(PropertyName = "amount_saved_zero_fx")]
public Amount AmountSavedZeroFx { get; set; }
-
-
+
+
///
/// Update the card details. Allow to change pin code, status, limits, country permissions and the monetary
/// account connected to the card. When the card has been received, it can be also activated through this
@@ -209,73 +212,67 @@ public class Card : BunqModel
/// The plaintext pin code. Requests require encryption to be enabled.
/// DEPRECATED: Activate a card by setting status to ACTIVE when the order_status is ACCEPTED_FOR_PRODUCTION.
/// The status to set for the card. Can be ACTIVE, DEACTIVATED, LOST, STOLEN or CANCELLED, and can only be set to LOST/STOLEN/CANCELLED when order status is ACCEPTED_FOR_PRODUCTION/DELIVERED_TO_CUSTOMER/CARD_UPDATE_REQUESTED/CARD_UPDATE_SENT/CARD_UPDATE_ACCEPTED. Can only be set to DEACTIVATED after initial activation, i.e. order_status is DELIVERED_TO_CUSTOMER/CARD_UPDATE_REQUESTED/CARD_UPDATE_SENT/CARD_UPDATE_ACCEPTED. Mind that all the possible choices (apart from ACTIVE and DEACTIVATED) are permanent and cannot be changed after.
+ /// The order status to set for the card. Set to CARD_REQUEST_PENDING to get a virtual card produced.
/// The spending limit for the card.
/// The ATM spending limit for the card.
/// The countries for which to grant (temporary) permissions to use the card.
/// Array of Types, PINs, account IDs assigned to the card.
/// Array of PANs and their attributes.
/// ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if not supplied.
- public static BunqResponse Update(int cardId, string pinCode = null, string activationCode = null,
- string status = null, Amount cardLimit = null, Amount cardLimitAtm = null,
- List countryPermission = null, List pinCodeAssignment = null,
- List primaryAccountNumbers = null, int? monetaryAccountIdFallback = null,
- IDictionary customHeaders = null)
+ public static BunqResponse Update(int cardId, string pinCode = null, string activationCode = null, string status = null, string orderStatus = null, Amount cardLimit = null, Amount cardLimitAtm = null, List countryPermission = null, List pinCodeAssignment = null, List primaryAccountNumbers = null, int? monetaryAccountIdFallback = null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
-
+
var requestMap = new Dictionary
- {
- {FIELD_PIN_CODE, pinCode},
- {FIELD_ACTIVATION_CODE, activationCode},
- {FIELD_STATUS, status},
- {FIELD_CARD_LIMIT, cardLimit},
- {FIELD_CARD_LIMIT_ATM, cardLimitAtm},
- {FIELD_COUNTRY_PERMISSION, countryPermission},
- {FIELD_PIN_CODE_ASSIGNMENT, pinCodeAssignment},
- {FIELD_PRIMARY_ACCOUNT_NUMBERS, primaryAccountNumbers},
- {FIELD_MONETARY_ACCOUNT_ID_FALLBACK, monetaryAccountIdFallback},
- };
-
+ {
+ {FIELD_PIN_CODE, pinCode},
+ {FIELD_ACTIVATION_CODE, activationCode},
+ {FIELD_STATUS, status},
+ {FIELD_ORDER_STATUS, orderStatus},
+ {FIELD_CARD_LIMIT, cardLimit},
+ {FIELD_CARD_LIMIT_ATM, cardLimitAtm},
+ {FIELD_COUNTRY_PERMISSION, countryPermission},
+ {FIELD_PIN_CODE_ASSIGNMENT, pinCodeAssignment},
+ {FIELD_PRIMARY_ACCOUNT_NUMBERS, primaryAccountNumbers},
+ {FIELD_MONETARY_ACCOUNT_ID_FALLBACK, monetaryAccountIdFallback},
+ };
+
var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap));
- var responseRaw = apiClient.Put(string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), cardId), requestBytes,
- customHeaders);
-
+ var responseRaw = apiClient.Put(string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), cardId), requestBytes, customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_PUT);
}
-
+
///
/// Return the details of a specific card.
///
public static BunqResponse Get(int cardId, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, DetermineUserId(), cardId),
- new Dictionary(), customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, DetermineUserId(), cardId), new Dictionary(), customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
+
///
/// Return all the cards available to the user.
///
- public static BunqResponse> List(IDictionary urlParams = null,
- IDictionary customHeaders = null)
+ public static BunqResponse> List( IDictionary urlParams = null, IDictionary customHeaders = null)
{
if (urlParams == null) urlParams = new Dictionary();
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
- var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId()), urlParams,
- customHeaders);
-
+ var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId()), urlParams, customHeaders);
+
return FromJsonList(responseRaw, OBJECT_TYPE_GET);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -284,130 +281,130 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Created != null)
{
return false;
}
-
+
if (this.Updated != null)
{
return false;
}
-
+
if (this.PublicUuid != null)
{
return false;
}
-
+
if (this.Type != null)
{
return false;
}
-
+
if (this.SubType != null)
{
return false;
}
-
+
if (this.SecondLine != null)
{
return false;
}
-
+
if (this.UserId != null)
{
return false;
}
-
+
if (this.Status != null)
{
return false;
}
-
+
if (this.SubStatus != null)
{
return false;
}
-
+
if (this.OrderStatus != null)
{
return false;
}
-
+
if (this.ExpiryDate != null)
{
return false;
}
-
+
if (this.NameOnCard != null)
{
return false;
}
-
+
if (this.PrimaryAccountNumbers != null)
{
return false;
}
-
+
if (this.CardLimit != null)
{
return false;
}
-
+
if (this.CardLimitAtm != null)
{
return false;
}
-
+
if (this.CountryPermission != null)
{
return false;
}
-
+
if (this.LabelMonetaryAccountOrdered != null)
{
return false;
}
-
+
if (this.LabelMonetaryAccountCurrent != null)
{
return false;
}
-
+
if (this.PinCodeAssignment != null)
{
return false;
}
-
+
if (this.MonetaryAccountIdFallback != null)
{
return false;
}
-
+
if (this.Country != null)
{
return false;
}
-
+
if (this.CardShipmentTrackingUrl != null)
{
return false;
}
-
+
if (this.AmountSavedZeroFx != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static Card CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/CardBatch.cs b/BunqSdk/Model/Generated/Endpoint/CardBatch.cs
index 379f5a3..22db5f6 100644
--- a/BunqSdk/Model/Generated/Endpoint/CardBatch.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CardBatch.cs
@@ -1,10 +1,12 @@
-using System.Collections.Generic;
-using System.Text;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -17,53 +19,51 @@ public class CardBatch : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_CREATE = "user/{0}/card-batch";
-
+
///
/// Field constants.
///
public const string FIELD_CARDS = "cards";
-
+
///
/// Object type.
///
private const string OBJECT_TYPE_POST = "CardBatch";
-
+
///
/// The cards that need to be updated.
///
[JsonProperty(PropertyName = "cards")]
public List Cards { get; set; }
-
+
///
/// The ids of the cards that have been updated.
///
[JsonProperty(PropertyName = "updated_card_ids")]
public List UpdatedCardIds { get; set; }
-
-
+
+
///
///
/// The cards that need to be updated.
- public static BunqResponse Create(List cards,
- IDictionary customHeaders = null)
+ public static BunqResponse Create(List cards, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
-
+
var requestMap = new Dictionary
- {
- {FIELD_CARDS, cards},
- };
-
+ {
+ {FIELD_CARDS, cards},
+ };
+
var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap));
- var responseRaw = apiClient.Post(string.Format(ENDPOINT_URL_CREATE, DetermineUserId()), requestBytes,
- customHeaders);
-
+ var responseRaw = apiClient.Post(string.Format(ENDPOINT_URL_CREATE, DetermineUserId()), requestBytes, customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_POST);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -72,15 +72,15 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
return true;
}
-
+
///
///
public static CardBatch CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/CardBatchReplace.cs b/BunqSdk/Model/Generated/Endpoint/CardBatchReplace.cs
new file mode 100644
index 0000000..a94d478
--- /dev/null
+++ b/BunqSdk/Model/Generated/Endpoint/CardBatchReplace.cs
@@ -0,0 +1,86 @@
+using Bunq.Sdk.Context;
+using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
+using Bunq.Sdk.Model.Core;
+using Bunq.Sdk.Model.Generated.Object;
+using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
+
+namespace Bunq.Sdk.Model.Generated.Endpoint
+{
+ ///
+ /// Used to replace multiple cards in a batch.
+ ///
+ public class CardBatchReplace : BunqModel
+ {
+ ///
+ /// Endpoint constants.
+ ///
+ protected const string ENDPOINT_URL_CREATE = "user/{0}/card-batch-replace";
+
+ ///
+ /// Field constants.
+ ///
+ public const string FIELD_CARDS = "cards";
+
+ ///
+ /// Object type.
+ ///
+ private const string OBJECT_TYPE_POST = "CardBatchReplace";
+
+ ///
+ /// The cards that need to be replaced.
+ ///
+ [JsonProperty(PropertyName = "cards")]
+ public List Cards { get; set; }
+
+ ///
+ /// The ids of the cards that have been replaced.
+ ///
+ [JsonProperty(PropertyName = "updated_card_ids")]
+ public List UpdatedCardIds { get; set; }
+
+
+ ///
+ ///
+ /// The cards that need to be replaced.
+ public static BunqResponse Create(List cards, IDictionary customHeaders = null)
+ {
+ if (customHeaders == null) customHeaders = new Dictionary();
+
+ var apiClient = new ApiClient(GetApiContext());
+
+ var requestMap = new Dictionary
+ {
+ {FIELD_CARDS, cards},
+ };
+
+ var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap));
+ var responseRaw = apiClient.Post(string.Format(ENDPOINT_URL_CREATE, DetermineUserId()), requestBytes, customHeaders);
+
+ return FromJson(responseRaw, OBJECT_TYPE_POST);
+ }
+
+
+ ///
+ ///
+ public override bool IsAllFieldNull()
+ {
+ if (this.UpdatedCardIds != null)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ ///
+ ///
+ public static CardBatchReplace CreateFromJsonString(string json)
+ {
+ return BunqModel.CreateFromJsonString(json);
+ }
+ }
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/CardCredit.cs b/BunqSdk/Model/Generated/Endpoint/CardCredit.cs
index 2be52ee..119abd6 100644
--- a/BunqSdk/Model/Generated/Endpoint/CardCredit.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CardCredit.cs
@@ -1,10 +1,12 @@
-using System.Collections.Generic;
-using System.Text;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -18,205 +20,214 @@ public class CardCredit : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_CREATE = "user/{0}/card-credit";
-
+
///
/// Field constants.
///
public const string FIELD_SECOND_LINE = "second_line";
public const string FIELD_NAME_ON_CARD = "name_on_card";
+ public const string FIELD_PREFERRED_NAME_ON_CARD = "preferred_name_on_card";
public const string FIELD_ALIAS = "alias";
public const string FIELD_TYPE = "type";
public const string FIELD_PRODUCT_TYPE = "product_type";
public const string FIELD_PIN_CODE_ASSIGNMENT = "pin_code_assignment";
public const string FIELD_MONETARY_ACCOUNT_ID_FALLBACK = "monetary_account_id_fallback";
-
+ public const string FIELD_ORDER_STATUS = "order_status";
+
///
/// Object type.
///
private const string OBJECT_TYPE_POST = "CardCredit";
-
+
///
/// The second line of text on the card
///
[JsonProperty(PropertyName = "second_line")]
public string SecondLine { get; set; }
-
+
///
/// The user's name on the card.
///
[JsonProperty(PropertyName = "name_on_card")]
public string NameOnCard { get; set; }
-
+
+ ///
+ /// The user's preferred name that can be put on the card.
+ ///
+ [JsonProperty(PropertyName = "preferred_name_on_card")]
+ public string PreferredNameOnCard { get; set; }
+
///
/// The pointer to the monetary account that will be connected at first with the card. Its IBAN code is also the
/// one that will be printed on the card itself. The pointer must be of type IBAN.
///
[JsonProperty(PropertyName = "alias")]
public MonetaryAccountReference Alias { get; set; }
-
+
///
/// The type of the card. Can is MASTERCARD.
///
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
-
+
///
/// The product type of the card.
///
[JsonProperty(PropertyName = "product_type")]
public string ProductType { get; set; }
-
+
///
/// Array of Types, PINs, account IDs assigned to the card.
///
[JsonProperty(PropertyName = "pin_code_assignment")]
public List PinCodeAssignment { get; set; }
-
+
///
/// ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if
/// not supplied.
///
[JsonProperty(PropertyName = "monetary_account_id_fallback")]
public int? MonetaryAccountIdFallback { get; set; }
-
+
+ ///
+ /// The order status of the card. Can be NEW_CARD_REQUEST_RECEIVED, CARD_REQUEST_PENDING, SENT_FOR_PRODUCTION,
+ /// ACCEPTED_FOR_PRODUCTION, DELIVERED_TO_CUSTOMER, CARD_UPDATE_REQUESTED, CARD_UPDATE_PENDING,
+ /// CARD_UPDATE_SENT, CARD_UPDATE_ACCEPTED, VIRTUAL_DELIVERY, NEW_CARD_REQUEST_PENDING_USER_APPROVAL,
+ /// SENT_FOR_DELIVERY or NEW_CARD_REQUEST_CANCELLED.
+ ///
+ [JsonProperty(PropertyName = "order_status")]
+ public string OrderStatus { get; set; }
+
///
/// The id of the card.
///
[JsonProperty(PropertyName = "id")]
public int? Id { get; set; }
-
+
///
/// The timestamp of the card's creation.
///
[JsonProperty(PropertyName = "created")]
public string Created { get; set; }
-
+
///
/// The timestamp of the card's last update.
///
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
-
+
///
/// The public UUID of the card.
///
[JsonProperty(PropertyName = "public_uuid")]
public string PublicUuid { get; set; }
-
+
///
/// The sub-type of the card.
///
[JsonProperty(PropertyName = "sub_type")]
public string SubType { get; set; }
-
+
///
/// The status to set for the card. Can be ACTIVE, DEACTIVATED, LOST, STOLEN, CANCELLED, EXPIRED or
/// PIN_TRIES_EXCEEDED.
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
-
+
///
/// The sub-status of the card. Can be NONE or REPLACED.
///
[JsonProperty(PropertyName = "sub_status")]
public string SubStatus { get; set; }
-
- ///
- /// The order status of the card. Can be NEW_CARD_REQUEST_RECEIVED, CARD_REQUEST_PENDING, SENT_FOR_PRODUCTION,
- /// ACCEPTED_FOR_PRODUCTION, DELIVERED_TO_CUSTOMER, CARD_UPDATE_REQUESTED, CARD_UPDATE_PENDING,
- /// CARD_UPDATE_SENT, CARD_UPDATE_ACCEPTED, VIRTUAL_DELIVERY, NEW_CARD_REQUEST_PENDING_USER_APPROVAL,
- /// SENT_FOR_DELIVERY or NEW_CARD_REQUEST_CANCELLED.
- ///
- [JsonProperty(PropertyName = "order_status")]
- public string OrderStatus { get; set; }
-
+
///
/// Expiry date of the card.
///
[JsonProperty(PropertyName = "expiry_date")]
public string ExpiryDate { get; set; }
-
+
///
/// The spending limit for the card.
///
[JsonProperty(PropertyName = "card_limit")]
public Amount CardLimit { get; set; }
-
+
///
/// The ATM spending limit for the card.
///
[JsonProperty(PropertyName = "card_limit_atm")]
public Amount CardLimitAtm { get; set; }
-
+
///
/// The countries for which to grant (temporary) permissions to use the card.
///
[JsonProperty(PropertyName = "country_permission")]
public List CountryPermission { get; set; }
-
+
///
/// The monetary account this card was ordered on and the label user that owns the card.
///
[JsonProperty(PropertyName = "label_monetary_account_ordered")]
public MonetaryAccountReference LabelMonetaryAccountOrdered { get; set; }
-
+
///
/// The monetary account that this card is currently linked to and the label user viewing it.
///
[JsonProperty(PropertyName = "label_monetary_account_current")]
public MonetaryAccountReference LabelMonetaryAccountCurrent { get; set; }
-
+
///
/// The country that is domestic to the card. Defaults to country of residence of user.
///
[JsonProperty(PropertyName = "country")]
public string Country { get; set; }
-
+
///
/// A tracking link provided by our shipment provider.
///
[JsonProperty(PropertyName = "card_shipment_tracking_url")]
public string CardShipmentTrackingUrl { get; set; }
-
-
+
+
///
/// Create a new credit card request.
///
/// The second line of text on the card, used as name/description for it. It can contain at most 17 characters and it can be empty.
/// The user's name as it will be on the card. Check 'card-name' for the available card names for a user.
/// The type of card to order. Can be MASTERCARD.
+ /// The user's preferred name that can be put on the card.
/// The pointer to the monetary account that will be connected at first with the card. Its IBAN code is also the one that will be printed on the card itself. The pointer must be of type IBAN.
/// The product type of the card to order.
/// Array of Types, PINs, account IDs assigned to the card.
/// ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if not supplied.
- public static BunqResponse Create(string secondLine, string nameOnCard, string type,
- Pointer alias = null, string productType = null, List pinCodeAssignment = null,
- int? monetaryAccountIdFallback = null, IDictionary customHeaders = null)
+ /// The order status of this card. Can be CARD_REQUEST_PENDING or VIRTUAL_DELIVERY.
+ public static BunqResponse Create(string secondLine, string nameOnCard, string type, string preferredNameOnCard = null, Pointer alias = null, string productType = null, List pinCodeAssignment = null, int? monetaryAccountIdFallback = null, string orderStatus = null, IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
-
+
var apiClient = new ApiClient(GetApiContext());
-
+
var requestMap = new Dictionary
- {
- {FIELD_SECOND_LINE, secondLine},
- {FIELD_NAME_ON_CARD, nameOnCard},
- {FIELD_ALIAS, alias},
- {FIELD_TYPE, type},
- {FIELD_PRODUCT_TYPE, productType},
- {FIELD_PIN_CODE_ASSIGNMENT, pinCodeAssignment},
- {FIELD_MONETARY_ACCOUNT_ID_FALLBACK, monetaryAccountIdFallback},
- };
-
+ {
+ {FIELD_SECOND_LINE, secondLine},
+ {FIELD_NAME_ON_CARD, nameOnCard},
+ {FIELD_PREFERRED_NAME_ON_CARD, preferredNameOnCard},
+ {FIELD_ALIAS, alias},
+ {FIELD_TYPE, type},
+ {FIELD_PRODUCT_TYPE, productType},
+ {FIELD_PIN_CODE_ASSIGNMENT, pinCodeAssignment},
+ {FIELD_MONETARY_ACCOUNT_ID_FALLBACK, monetaryAccountIdFallback},
+ {FIELD_ORDER_STATUS, orderStatus},
+ };
+
var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap));
- var responseRaw = apiClient.Post(string.Format(ENDPOINT_URL_CREATE, DetermineUserId()), requestBytes,
- customHeaders);
-
+ var responseRaw = apiClient.Post(string.Format(ENDPOINT_URL_CREATE, DetermineUserId()), requestBytes, customHeaders);
+
return FromJson(responseRaw, OBJECT_TYPE_POST);
}
-
-
+
+
///
///
public override bool IsAllFieldNull()
@@ -225,120 +236,125 @@ public override bool IsAllFieldNull()
{
return false;
}
-
+
if (this.Created != null)
{
return false;
}
-
+
if (this.Updated != null)
{
return false;
}
-
+
if (this.PublicUuid != null)
{
return false;
}
-
+
if (this.Type != null)
{
return false;
}
-
+
if (this.SubType != null)
{
return false;
}
-
+
if (this.ProductType != null)
{
return false;
}
-
+
if (this.SecondLine != null)
{
return false;
}
-
+
if (this.Status != null)
{
return false;
}
-
+
if (this.SubStatus != null)
{
return false;
}
-
+
if (this.OrderStatus != null)
{
return false;
}
-
+
if (this.ExpiryDate != null)
{
return false;
}
-
+
if (this.NameOnCard != null)
{
return false;
}
-
+
+ if (this.PreferredNameOnCard != null)
+ {
+ return false;
+ }
+
if (this.CardLimit != null)
{
return false;
}
-
+
if (this.CardLimitAtm != null)
{
return false;
}
-
+
if (this.CountryPermission != null)
{
return false;
}
-
+
if (this.LabelMonetaryAccountOrdered != null)
{
return false;
}
-
+
if (this.LabelMonetaryAccountCurrent != null)
{
return false;
}
-
+
if (this.PinCodeAssignment != null)
{
return false;
}
-
+
if (this.MonetaryAccountIdFallback != null)
{
return false;
}
-
+
if (this.Country != null)
{
return false;
}
-
+
if (this.CardShipmentTrackingUrl != null)
{
return false;
}
-
+
return true;
}
-
+
///
///
public static CardCredit CreateFromJsonString(string json)
{
- return CreateFromJsonString(json);
+ return BunqModel.CreateFromJsonString(json);
}
}
-}
\ No newline at end of file
+}
diff --git a/BunqSdk/Model/Generated/Endpoint/CardDebit.cs b/BunqSdk/Model/Generated/Endpoint/CardDebit.cs
index 22ee3f8..27307d1 100644
--- a/BunqSdk/Model/Generated/Endpoint/CardDebit.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CardDebit.cs
@@ -1,10 +1,12 @@
-using System.Collections.Generic;
-using System.Text;
+using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
namespace Bunq.Sdk.Model.Generated.Endpoint
{
@@ -18,185 +20,194 @@ public class CardDebit : BunqModel
/// Endpoint constants.
///
protected const string ENDPOINT_URL_CREATE = "user/{0}/card-debit";
-
+
///
/// Field constants.
///
public const string FIELD_SECOND_LINE = "second_line";
public const string FIELD_NAME_ON_CARD = "name_on_card";
+ public const string FIELD_PREFERRED_NAME_ON_CARD = "preferred_name_on_card";
public const string FIELD_ALIAS = "alias";
public const string FIELD_TYPE = "type";
public const string FIELD_PRODUCT_TYPE = "product_type";
public const string FIELD_PIN_CODE_ASSIGNMENT = "pin_code_assignment";
public const string FIELD_MONETARY_ACCOUNT_ID_FALLBACK = "monetary_account_id_fallback";
-
+ public const string FIELD_ORDER_STATUS = "order_status";
+
///
/// Object type.
///
private const string OBJECT_TYPE_POST = "CardDebit";
-
+
///
/// The second line of text on the card
///
[JsonProperty(PropertyName = "second_line")]
public string SecondLine { get; set; }
-
+
///
/// The user's name as will be on the card
///
[JsonProperty(PropertyName = "name_on_card")]
public string NameOnCard { get; set; }
-
+
+ ///
+ /// The user's preferred name that can be put on the card.
+ ///
+ [JsonProperty(PropertyName = "preferred_name_on_card")]
+ public string PreferredNameOnCard { get; set; }
+
///
/// The label for the user who requested the card.
///
[JsonProperty(PropertyName = "alias")]
public LabelUser Alias { get; set; }
-
+
///
/// The type of the card. Can be MAESTRO, MASTERCARD.
///
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
-
+
///
/// The product type of the card to order.
///
[JsonProperty(PropertyName = "product_type")]
public string ProductType { get; set; }
-
+
///
/// Array of Types, PINs, account IDs assigned to the card.
///
[JsonProperty(PropertyName = "pin_code_assignment")]
public List PinCodeAssignment { get; set; }
-
+
///
/// ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if
/// not supplied.
///
[JsonProperty(PropertyName = "monetary_account_id_fallback")]
public int? MonetaryAccountIdFallback { get; set; }
-
+
+ ///
+ /// The order status of the card. Can be NEW_CARD_REQUEST_RECEIVED, CARD_REQUEST_PENDING, SENT_FOR_PRODUCTION,
+ /// ACCEPTED_FOR_PRODUCTION, DELIVERED_TO_CUSTOMER, CARD_UPDATE_REQUESTED, CARD_UPDATE_PENDING,
+ /// CARD_UPDATE_SENT, CARD_UPDATE_ACCEPTED, VIRTUAL_DELIVERY, NEW_CARD_REQUEST_PENDING_USER_APPROVAL,
+ /// SENT_FOR_DELIVERY or NEW_CARD_REQUEST_CANCELLED.
+ ///
+ [JsonProperty(PropertyName = "order_status")]
+ public string OrderStatus { get; set; }
+
///
/// The id of the card.
///
[JsonProperty(PropertyName = "id")]
public int? Id { get; set; }
-
+
///
/// The timestamp when the card was crated.
///
[JsonProperty(PropertyName = "created")]
public string Created { get; set; }
-
+
///
/// The timestamp when the card was last updated.
///
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
-
+
///
/// The public UUID of the card.
///
[JsonProperty(PropertyName = "public_uuid")]
public string PublicUuid { get; set; }
-
+
///
/// The sub_type of card.
///
[JsonProperty(PropertyName = "sub_type")]
public string SubType { get; set; }
-
+
///
/// The status to set for the card. After ordering the card it will be DEACTIVATED.
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
-
- ///
- /// The order status of the card. Can be NEW_CARD_REQUEST_RECEIVED, CARD_REQUEST_PENDING, SENT_FOR_PRODUCTION,
- /// ACCEPTED_FOR_PRODUCTION, DELIVERED_TO_CUSTOMER, CARD_UPDATE_REQUESTED, CARD_UPDATE_PENDING,
- /// CARD_UPDATE_SENT, CARD_UPDATE_ACCEPTED, VIRTUAL_DELIVERY, NEW_CARD_REQUEST_PENDING_USER_APPROVAL,
- /// SENT_FOR_DELIVERY or NEW_CARD_REQUEST_CANCELLED.
- ///
- [JsonProperty(PropertyName = "order_status")]
- public string OrderStatus { get; set; }
-
+
///
/// The expiry date of the card.
///
[JsonProperty(PropertyName = "expiry_date")]
public string ExpiryDate { get; set; }
-
+
///
/// The countries for which to grant (temporary) permissions to use the card.
///
[JsonProperty(PropertyName = "country_permission")]
public List CountryPermission { get; set; }
-
+
///
/// The monetary account this card was ordered on and the label user that owns the card.
///
[JsonProperty(PropertyName = "label_monetary_account_ordered")]
public MonetaryAccountReference LabelMonetaryAccountOrdered { get; set; }
-
+
///
/// The monetary account that this card is currently linked to and the label user viewing it.
///
[JsonProperty(PropertyName = "label_monetary_account_current")]
public MonetaryAccountReference LabelMonetaryAccountCurrent { get; set; }
-
+
///
/// The country that is domestic to the card. Defaults to country of residence of user.
///
[JsonProperty(PropertyName = "country")]
public string Country { get; set; }
-
+
///
/// A tracking link provided by our shipment provider.
///
[JsonProperty(PropertyName = "card_shipment_tracking_url")]
public string CardShipmentTrackingUrl { get; set; }
-
-
+
+
///
/// Create a new debit card request.
///
/// The second line of text on the card, used as name/description for it. It can contain at most 17 characters and it can be empty.
/// The user's name as it will be on the card. Check 'card-name' for the available card names for a user.
/// The type of card to order. Can be MAESTRO or MASTERCARD.
+ /// The user's preferred name that can be put on the card.
/// The pointer to the monetary account that will be connected at first with the card. Its IBAN code is also the one that will be printed on the card itself. The pointer must be of type IBAN.
/// The product type of the card to order.
/// Array of Types, PINs, account IDs assigned to the card.
/// ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if not supplied.
- public static BunqResponse Create(string secondLine, string nameOnCard, string type,
- Pointer alias = null, string productType = null, List