Skip to content

Commit

Permalink
Merge pull request #150 from bunq/1.15.0
Browse files Browse the repository at this point in the history
Regenerated code based on the latest tag 1.15.0
  • Loading branch information
bunq-bot authored Sep 14, 2021
2 parents bdbc65b + 3fa6c03 commit 5e4544d
Show file tree
Hide file tree
Showing 245 changed files with 9,799 additions and 11,065 deletions.
32 changes: 17 additions & 15 deletions BunqSdk/Model/Generated/Endpoint/AttachmentConversationContent.cs
Original file line number Diff line number Diff line change
@@ -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
{
Expand All @@ -14,41 +19,38 @@ public class AttachmentConversationContent : BunqModel
/// Endpoint constants.
/// </summary>
protected const string ENDPOINT_URL_LISTING = "user/{0}/chat-conversation/{1}/attachment/{2}/content";

/// <summary>
/// Object type.
/// </summary>
private const string OBJECT_TYPE_GET = "AttachmentConversationContent";

/// <summary>
/// Get the raw content of a specific attachment.
/// </summary>
public static BunqResponse<byte[]> List(int chatConversationId, int attachmentId,
IDictionary<string, string> customHeaders = null)
public static BunqResponse<byte[]> List(int chatConversationId, int attachmentId, IDictionary<string, string> customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary<string, string>();

var apiClient = new ApiClient(GetApiContext());
var responseRaw =
apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), chatConversationId, attachmentId),
new Dictionary<string, string>(), customHeaders);

var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), chatConversationId, attachmentId), new Dictionary<string, string>(), customHeaders);

return new BunqResponse<byte[]>(responseRaw.BodyBytes, responseRaw.Headers);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
{
return true;
}

/// <summary>
/// </summary>
public static AttachmentConversationContent CreateFromJsonString(string json)
{
return CreateFromJsonString<AttachmentConversationContent>(json);
return BunqModel.CreateFromJsonString<AttachmentConversationContent>(json);
}
}
}
}
42 changes: 21 additions & 21 deletions BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccount.cs
Original file line number Diff line number Diff line change
@@ -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
{
Expand All @@ -16,42 +20,38 @@ public class AttachmentMonetaryAccount : BunqModel
/// Endpoint constants.
/// </summary>
protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/attachment";


/// <summary>
/// The attachment.
/// </summary>
[JsonProperty(PropertyName = "attachment")]
public Attachment Attachment { get; set; }

/// <summary>
/// The ID of the attachment created.
/// </summary>
[JsonProperty(PropertyName = "id")]
public int? Id { get; set; }


/// <summary>
/// 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.
/// </summary>
public static BunqResponse<int> Create(byte[] requestBytes, int? monetaryAccountId = null,
IDictionary<string, string> customHeaders = null)
public static BunqResponse<int> Create(byte[] requestBytes, int? monetaryAccountId= null, IDictionary<string, string> customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary<string, string>();

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);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand All @@ -60,20 +60,20 @@ public override bool IsAllFieldNull()
{
return false;
}

if (this.Id != null)
{
return false;
}

return true;
}

/// <summary>
/// </summary>
public static AttachmentMonetaryAccount CreateFromJsonString(string json)
{
return CreateFromJsonString<AttachmentMonetaryAccount>(json);
return BunqModel.CreateFromJsonString<AttachmentMonetaryAccount>(json);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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
{
Expand All @@ -14,43 +19,38 @@ public class AttachmentMonetaryAccountContent : BunqModel
/// Endpoint constants.
/// </summary>
protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/attachment/{2}/content";

/// <summary>
/// Object type.
/// </summary>
private const string OBJECT_TYPE_GET = "AttachmentMonetaryAccountContent";

/// <summary>
/// Get the raw content of a specific attachment.
/// </summary>
public static BunqResponse<byte[]> List(int attachmentId, int? monetaryAccountId = null,
IDictionary<string, string> customHeaders = null)
public static BunqResponse<byte[]> List(int attachmentId, int? monetaryAccountId= null, IDictionary<string, string> customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary<string, string>();

var apiClient = new ApiClient(GetApiContext());
var responseRaw =
apiClient.Get(
string.Format(ENDPOINT_URL_LISTING, DetermineUserId(),
DetermineMonetaryAccountId(monetaryAccountId), attachmentId), new Dictionary<string, string>(),
customHeaders);

var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), attachmentId), new Dictionary<string, string>(), customHeaders);

return new BunqResponse<byte[]>(responseRaw.BodyBytes, responseRaw.Headers);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
{
return true;
}

/// <summary>
/// </summary>
public static AttachmentMonetaryAccountContent CreateFromJsonString(string json)
{
return CreateFromJsonString<AttachmentMonetaryAccountContent>(json);
return BunqModel.CreateFromJsonString<AttachmentMonetaryAccountContent>(json);
}
}
}
}
56 changes: 29 additions & 27 deletions BunqSdk/Model/Generated/Endpoint/AttachmentPublic.cs
Original file line number Diff line number Diff line change
@@ -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
{
Expand All @@ -17,71 +21,69 @@ public class AttachmentPublic : BunqModel
/// </summary>
protected const string ENDPOINT_URL_CREATE = "attachment-public";
protected const string ENDPOINT_URL_READ = "attachment-public/{0}";

/// <summary>
/// Object type.
/// </summary>
private const string OBJECT_TYPE_POST = "Uuid";
private const string OBJECT_TYPE_GET = "AttachmentPublic";

/// <summary>
/// The UUID of the attachment.
/// </summary>
[JsonProperty(PropertyName = "uuid")]
public string Uuid { get; set; }

/// <summary>
/// The timestamp of the attachment's creation.
/// </summary>
[JsonProperty(PropertyName = "created")]
public string Created { get; set; }

/// <summary>
/// The timestamp of the attachment's last update.
/// </summary>
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }

/// <summary>
/// The attachment.
/// </summary>
[JsonProperty(PropertyName = "attachment")]
public Attachment Attachment { get; set; }


/// <summary>
/// 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.
/// </summary>
public static BunqResponse<string> Create(byte[] requestBytes, IDictionary<string, string> customHeaders = null)
public static BunqResponse<string> Create(byte[] requestBytes, IDictionary<string, string> customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary<string, string>();

var apiClient = new ApiClient(GetApiContext());
var responseRaw = apiClient.Post(ENDPOINT_URL_CREATE, requestBytes, customHeaders);

return ProcessForUuid(responseRaw);
}

/// <summary>
/// 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.
/// </summary>
public static BunqResponse<AttachmentPublic> Get(string attachmentPublicUuid,
IDictionary<string, string> customHeaders = null)
public static BunqResponse<AttachmentPublic> Get(string attachmentPublicUuid, IDictionary<string, string> customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary<string, string>();

var apiClient = new ApiClient(GetApiContext());
var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, attachmentPublicUuid),
new Dictionary<string, string>(), customHeaders);

var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, attachmentPublicUuid), new Dictionary<string, string>(), customHeaders);

return FromJson<AttachmentPublic>(responseRaw, OBJECT_TYPE_GET);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand All @@ -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;
}

/// <summary>
/// </summary>
public static AttachmentPublic CreateFromJsonString(string json)
{
return CreateFromJsonString<AttachmentPublic>(json);
return BunqModel.CreateFromJsonString<AttachmentPublic>(json);
}
}
}
}
Loading

0 comments on commit 5e4544d

Please sign in to comment.