diff --git a/BunqSdk/Model/Generated/Endpoint/MonetaryAccount.cs b/BunqSdk/Model/Generated/Endpoint/MonetaryAccount.cs index 831f790..630c59f 100644 --- a/BunqSdk/Model/Generated/Endpoint/MonetaryAccount.cs +++ b/BunqSdk/Model/Generated/Endpoint/MonetaryAccount.cs @@ -54,6 +54,11 @@ public class MonetaryAccount : BunqModel, IAnchorObjectInterface [JsonProperty(PropertyName = "MonetaryAccountSavings")] public MonetaryAccountSavings MonetaryAccountSavings { get; set; } + /// + /// + [JsonProperty(PropertyName = "MonetaryAccountExternal")] + public MonetaryAccountExternal MonetaryAccountExternal { get; set; } + /// /// Get a specific MonetaryAccount. @@ -107,6 +112,11 @@ public BunqModel GetReferencedObject() return this.MonetaryAccountSavings; } + if (this.MonetaryAccountExternal != null) + { + return this.MonetaryAccountExternal; + } + throw new BunqException(ERROR_NULL_FIELDS); } @@ -134,6 +144,11 @@ public override bool IsAllFieldNull() return false; } + if (this.MonetaryAccountExternal != null) + { + return false; + } + return true; } diff --git a/BunqSdk/Model/Generated/Endpoint/MonetaryAccountExternal.cs b/BunqSdk/Model/Generated/Endpoint/MonetaryAccountExternal.cs new file mode 100644 index 0000000..573833f --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/MonetaryAccountExternal.cs @@ -0,0 +1,274 @@ +using Bunq.Sdk.Model.Core; +using Bunq.Sdk.Model.Generated.Object; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace Bunq.Sdk.Model.Generated.Endpoint +{ + /// + /// Endpoint for managing monetary accounts which are connected to external services. + /// + public class MonetaryAccountExternal : BunqModel + { + /// + /// Field constants. + /// + public const string FIELD_CURRENCY = "currency"; + public const string FIELD_DESCRIPTION = "description"; + public const string FIELD_DAILY_LIMIT = "daily_limit"; + public const string FIELD_AVATAR_UUID = "avatar_uuid"; + public const string FIELD_STATUS = "status"; + public const string FIELD_SUB_STATUS = "sub_status"; + public const string FIELD_REASON = "reason"; + public const string FIELD_REASON_DESCRIPTION = "reason_description"; + public const string FIELD_DISPLAY_NAME = "display_name"; + public const string FIELD_SETTING = "setting"; + + + /// + /// The currency of the MonetaryAccountExternal as an ISO 4217 formatted currency code. + /// + [JsonProperty(PropertyName = "currency")] + public string Currency { get; set; } + + /// + /// The description of the MonetaryAccountExternal. Defaults to 'bunq account'. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The daily spending limit Amount of the MonetaryAccountExternal. Defaults to 1000 EUR. Currency must match + /// the MonetaryAccountExternal's currency. Limited to 10000 EUR. + /// + [JsonProperty(PropertyName = "daily_limit")] + public Amount DailyLimit { get; set; } + + /// + /// The UUID of the Avatar of the MonetaryAccountExternal. + /// + [JsonProperty(PropertyName = "avatar_uuid")] + public string AvatarUuid { get; set; } + + /// + /// The status of the MonetaryAccountExternal. Can be: ACTIVE, BLOCKED, CANCELLED or PENDING_REOPEN + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// The sub-status of the MonetaryAccountExternal providing extra information regarding the status. Will be NONE + /// for ACTIVE or PENDING_REOPEN, COMPLETELY or ONLY_ACCEPTING_INCOMING for BLOCKED and REDEMPTION_INVOLUNTARY, + /// REDEMPTION_VOLUNTARY or PERMANENT for CANCELLED. + /// + [JsonProperty(PropertyName = "sub_status")] + public string SubStatus { get; set; } + + /// + /// The reason for voluntarily cancelling (closing) the MonetaryAccountExternal, can only be OTHER. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// The optional free-form reason for voluntarily cancelling (closing) the MonetaryAccountExternal. Can be any + /// user provided message. + /// + [JsonProperty(PropertyName = "reason_description")] + public string ReasonDescription { get; set; } + + /// + /// The legal name of the user / company using this monetary account. + /// + [JsonProperty(PropertyName = "display_name")] + public string DisplayName { get; set; } + + /// + /// The settings of the MonetaryAccountExternal. + /// + [JsonProperty(PropertyName = "setting")] + public MonetaryAccountSetting Setting { get; set; } + + /// + /// The id of the MonetaryAccountExternal. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the MonetaryAccountExternal's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the MonetaryAccountExternal's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The Avatar of the MonetaryAccountExternal. + /// + [JsonProperty(PropertyName = "avatar")] + public Avatar Avatar { get; set; } + + /// + /// The maximum Amount the MonetaryAccountExternal can be 'in the red'. + /// + [JsonProperty(PropertyName = "overdraft_limit")] + public Amount OverdraftLimit { get; set; } + + /// + /// The current available balance Amount of the MonetaryAccountExternal. + /// + [JsonProperty(PropertyName = "balance")] + public Amount Balance { get; set; } + + /// + /// The Aliases for the MonetaryAccountExternal. + /// + [JsonProperty(PropertyName = "alias")] + public List Alias { get; set; } + + /// + /// The MonetaryAccountExternal's public UUID. + /// + [JsonProperty(PropertyName = "public_uuid")] + public string PublicUuid { get; set; } + + /// + /// The id of the User who owns the MonetaryAccountExternal. + /// + [JsonProperty(PropertyName = "user_id")] + public int? UserId { get; set; } + + /// + /// The profile of the account. + /// + [JsonProperty(PropertyName = "monetary_account_profile")] + public MonetaryAccountProfile MonetaryAccountProfile { get; set; } + + /// + /// The ids of the AutoSave. + /// + [JsonProperty(PropertyName = "all_auto_save_id")] + public List AllAutoSaveId { get; set; } + + + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.Avatar != null) + { + return false; + } + + if (this.Currency != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.DailyLimit != null) + { + return false; + } + + if (this.OverdraftLimit != null) + { + return false; + } + + if (this.Balance != null) + { + return false; + } + + if (this.Alias != null) + { + return false; + } + + if (this.PublicUuid != null) + { + return false; + } + + if (this.Status != null) + { + return false; + } + + if (this.SubStatus != null) + { + return false; + } + + if (this.Reason != null) + { + return false; + } + + if (this.ReasonDescription != null) + { + return false; + } + + if (this.UserId != null) + { + return false; + } + + if (this.MonetaryAccountProfile != null) + { + return false; + } + + if (this.DisplayName != null) + { + return false; + } + + if (this.Setting != null) + { + return false; + } + + if (this.AllAutoSaveId != null) + { + return false; + } + + return true; + } + + /// + /// + public static MonetaryAccountExternal CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +}