Account Settings Update Request (AccountSettingsUpdateRequest) Class
Found in the Investec.AccountSettings.Models NuGet package, the AccountSettingsUpdateRequest class is used to send a request to the server to update existing account visibility settings for a client. It specifies the client, the business unit, and a list of account profiles with their respective accounts and new visibility states.
Purpose
This model is used when modifications to existing account visibility preferences are needed. For instance, if a client decides to hide an already visible account or show a hidden one, this request structure would be used.
Properties of AccountSettingsUpdateRequest
| Property Name | Type | Required | JSON Property Name | Description |
|---|---|---|---|---|
Gcn | string | Yes | gcn | The Global Client Number, identifying the client. |
BusinessUnit | string | Yes | businessUnit | The business unit to which these settings apply (e.g., "PB", "Wealth"). |
ClientAccountProfiles | List<AccountSettingsProfileUpdate> | No | A list of client account profiles, each containing accounts to be updated. The JSON property name is not explicitly defined, so it will follow default serializer behavior (e.g., clientAccountProfiles). |
Nested Classes
Account Settings Profile Update (AccountSettingsProfileUpdate) Class
This class represents a specific profile under which account visibility settings are being updated.
Properties of AccountSettingsProfileUpdate:
| Property Name | Type | Required | JSON Property Name | Description |
|---|---|---|---|---|
ProfileId | string | No | profileId | An identifier for the client's profile. |
Accounts | List<AccountSettingsProfileAccountUpdate> | Yes | accounts | A list of accounts within this profile whose visibility settings are to be updated. Defaults to an empty list. |
Account Settings Profile Account Update (AccountSettingsProfileAccountUpdate) Class
This class defines the structure for an individual account whose visibility is being updated within a profile. It focuses on the essential identifiers and the new visibility state.
Properties of AccountSettingsProfileAccountUpdate:
| Property Name | Type | Required | JSON Property Name | Description |
|---|---|---|---|---|
AccountNumber | string | Yes | accountNumber | The unique identifier for the account. |
AccountName | string | Yes | accountName | The display name for the account. |
AccountType | string | Yes | accountType | The type of account (e.g., Savings, Cheque). |
AccountHidden | bool | Yes | accountHidden | The new boolean flag indicating if the account should be hidden (true) or visible (false). |
Validation
- For
AccountSettingsUpdateRequest:GcnandBusinessUnitare required. - For
AccountSettingsProfileUpdate: TheAccountslist is required (though it can be an empty list). - For
AccountSettingsProfileAccountUpdate:AccountNumber,AccountName,AccountType, andAccountHiddenare required.
Example Usage (C#)
This example demonstrates how to create an instance of AccountSettingsUpdateRequest:
using Investec.AccountSettings.Models;
using System.Collections.Generic;
var updateRequest = new AccountSettingsUpdateRequest
{
Gcn = "123456789",
BusinessUnit = "Private Bank SA",
ClientAccountProfiles = new List<AccountSettingsProfileUpdate>
{
new AccountSettingsProfileUpdate
{
ProfileId = "DefaultProfile01",
Accounts = new List<AccountSettingsProfileAccountUpdate>
{
new AccountSettingsProfileAccountUpdate
{
AccountNumber = "ACC001",
AccountName = "My Cheque Account", // Name & Type often sent for context/validation
AccountType = "Cheque",
AccountHidden = true // Update to hide this account
},
new AccountSettingsProfileAccountUpdate
{
AccountNumber = "ACC002",
AccountName = "My Savings Account",
AccountType = "Savings",
AccountHidden = false // Update to show this account
}
}
}
}
};
// This 'updateRequest' object would then be serialized (typically to JSON)
// and sent as the body of an HTTP POST request to the API endpoint for updating account settings.