Skip to content

CustomerAddress

// RB2 Core Connect
using HotChocolate;
using HotChocolate.Types;
namespace CoreConnect.Commerce.Customer;
public record CustomerAddress : Address
{
public CustomerAddress(string id, AddressType type)
{
Id = id;
Type = type;
}
public AddressType Type { get; set; }
public string? Email { get; set; }
[GraphQLType(typeof(AnyType))]
public Dictionary<string, object>? CustomFields { get; set; }
}
public record ShippingAddress : Address
{
public string? Email { get; set; }
public AddressCollectionPoint? CollectionPoint { get; set; }
}
public record BillingAddress : Address
{
public string? Email { get; set; }
}
public enum AddressType
{
Shipping = 1,
Billing = 2,
}
public record AddressTypeData()
{
public AddressType? Type { get; set; }
public bool IsDefault { get; set; }
public bool IsDefaultBilling { get; set; }
public bool IsDefaultShipping { get; set; }
public required string AddressKey { get; set; }
}
public record AddressCollectionPoint
{
public string? Type { get; set; }
public string? Key { get; set;}
public string? Description { get; set; }
}