// Copyright 2022 Valters Melnalksnis
// Licensed under the Apache License 2.0.
// See LICENSE file in the project root for full license information.
using System;
using System.Text.Json.Serialization;
using NodaTime;
using VMelnalksnis.NordigenDotNet.Institutions;
namespace VMelnalksnis.NordigenDotNet.Accounts;
/// Information about the account record, such as the processing status and IBAN.
public record Account
{
/// Gets or sets the id of this Account, used to refer to this account in other API calls.
public Guid Id { get; set; }
/// Gets or sets the point in time when the account object was created.
public DateTimeOffset Created { get; set; }
/// Gets or sets the point in time when the account object was last accessed.
[JsonPropertyName("last_accessed")]
public DateTimeOffset LastAccessed { get; set; }
/// Gets or sets the account IBAN.
public string Iban { get; set; } = null!;
/// Gets or sets the id of the associated with the account.
[JsonPropertyName("institution_id")]
public string InstitutionId { get; set; } = null!;
/// Gets or sets the processing status of this account.
public AccountStatus Status { get; set; }
}