NuGet Package: Account Settings Models (Investec.AccountSettings.Models)
Source Code: cxt-account-settings-api/NUGET
This document details the Investec.AccountSettings.Models NuGet package, a core component of the Account Visibility project. This package provides a standardized data contract for managing account settings across different business units, ensuring consistent and reliable handling of account visibility.
Purpose and Features
The primary purpose of this NuGet package is to provide a common set of data structures (models) for interactions with the account settings API. This ensures all components that deal with account visibility use a common language, leading to more robust and maintainable integrations.
Key features include:
- Standardised Models: Offers a consistent set of models for managing account settings. This reduces ambiguity and potential errors when different services exchange account settings data.
- Validation: Incorporates validation attributes (e.g., for required fields) within the models. This helps enforce data integrity at the source, ensuring that data passed to the API is correct and complete.
- Flexibility: Designed to be extensible, allowing for straightforward integration with existing and future systems.
Why is this NuGet Package important?
For non-technical individuals, this package acts as a set of standardized blueprints for information about account settings. Just as blueprints ensure a house is built correctly, these models ensure that information about whether an account is visible or hidden is handled consistently across all banking systems. This results in a more reliable client experience and easier management for Investec.
For developers, this package simplifies development by providing pre-defined, validated models. Instead of each team defining their own representation of account settings, they can all use this common package. This speeds up development, reduces boilerplate code, and improves integration between services.
Installation
To use this package in a .NET project, developers can install it via the .NET CLI:
dotnet add package Investec.AccountSettings.ModelsThis command adds the package as a dependency, making the models available for use.
Key Data Models Overview
The package includes several important data models, with the primary ones being:
AccountModel: Represents the detailed structure for an individual account.AccountSettingsAddRequest: Defines the structure for requests to add new account settings.AccountSettingsUpdateRequest: Defines the structure for requests to update existing account settings.AccountSettingsDeleteRequest: Defines the structure for requests to delete account settings.AccountSettingsResponse: Represents a standard response structure for account settings operations.
More detailed documentation on each key model can be found on the subsequent pages.
Example Usage (Illustrative)
Here's a C# example demonstrating how to create an `