Skip to content

Customer

// RB2 Core Connect
namespace CoreConnect.Commerce.Customer;
/// <summary>
/// Customer representation.
/// </summary>
public record Customer
{
/// <summary>
/// Gets or sets the unique identifier for the customer.
/// </summary>
public required string Id { get; set; }
/// <summary>
/// Gets or sets the identifier for the customer group to which the customer belongs, if applicable.
/// </summary>
public string? CustomerGroupId { get; set; }
/// <summary>
/// Gets or sets the first name of the customer.
/// </summary>
public required string FirstName { get; set; }
/// <summary>
/// Gets or sets the last name of the customer.
/// </summary>
public required string LastName { get; set; }
/// <summary>
/// Gets or sets the middle name of the customer, if applicable.
/// </summary>
public string? MiddleName { get; set; }
/// <summary>
/// Gets or sets the email address of the customer.
/// </summary>
public required string Email { get; set; }
/// <summary>
/// Gets or sets the company name associated with the customer, if applicable.
/// </summary>
public string? CompanyName { get; set; }
/// <summary>
/// Gets or sets the VAT (Value Added Tax) number of the customer, if applicable.
/// </summary>
public string? VatNumber { get; set; }
/// <summary>
/// Gets or sets the phone number of the customer, if provided.
/// </summary>
public string? Phone { get; set; }
/// <summary>
/// Gets or sets the birth date of the customer, if available.
/// </summary>
public string? BirthDate { get; set; }
/// <summary>
/// Gets or sets the version of the customer object.
/// </summary>
public long Version { get; set; }
/// <summary>
/// Gets or sets the default billing address for the customer, if specified.
/// </summary>
public CustomerAddress? DefaultBillingAddress { get; set; }
/// <summary>
/// Gets or sets the default shipping address for the customer, if specified.
/// </summary>
public CustomerAddress? DefaultShippingAddress { get; set; }
/// <summary>
/// Gets or sets a list of addresses associated with the customer.
/// </summary>
public IList<CustomerAddress?> Addresses { get; set; } = new List<CustomerAddress?>(capacity: 10);
/// <summary>
/// Customer's salutation
/// </summary>
public string? Salutation { get; set; }
/// <summary>
/// Newsletter consent
/// </summary>
public bool? Newsletter { get; set; }
/// <summary>
/// List of groups as strings for the user, e.g. &#x60;groupA,groupB&#x60;
/// </summary>
public IList<string>? Groups { get; set; }
}