Class ProductAttribute
One attribute value on a product, close to what PAPI returns. Use it to inspect attributes that no typed conversion covers; prefer Get<T>(AttributeKey<T>) otherwise.
Implements
Inherited Members
Namespace: Activout.Blue5.Attributes
Assembly: Activout.Blue5.dll
Syntax
public sealed record ProductAttribute : IEquatable<ProductAttribute>
Properties
| Edit this page View SourceColumn
Cells for column.
Declaration
public IReadOnlyList<AttributeCell> Column { get; init; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<AttributeCell> |
ContentType
Content type for formatted text: text/markdown or text/html.
Declaration
public string? ContentType { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
DataType
PAPI data type such as text or single_select; see AttributeDataTypes.
Declaration
public string? DataType { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
Dictionary
Selected entries for dictionary.
Declaration
public IReadOnlyList<SelectOption> Dictionary { get; init; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<SelectOption> |
GroupName
Attribute group name.
Declaration
public string? GroupName { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
GroupNumber
Attribute group number.
Declaration
public string? GroupNumber { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
Id
Attribute definition id.
Declaration
public string? Id { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
IsCompound
Whether this is a compound attribute (its value is composed from other attributes).
Declaration
public bool IsCompound { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
IsDefining
Whether this attribute defines the variants of a product group (PAPI definingAttribute).
Declaration
public bool IsDefining { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
IsEmpty
true when the attribute carries no value of any kind.
Declaration
[JsonIgnore]
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Matrix
Columns (each with rows) for matrix.
Declaration
public IReadOnlyList<MatrixColumn> Matrix { get; init; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<MatrixColumn> |
Name
Attribute display name.
Declaration
public string? Name { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
Number
Attribute number (the key used by ProductAttributes). Falls back to the id if PAPI omits it.
Declaration
public required string Number { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
Select
Selected options for single_select/multi_select.
Declaration
public IReadOnlyList<SelectOption> Select { get; init; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<SelectOption> |
Unit
Unit, if the attribute has one.
Declaration
public string? Unit { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
ValueType
PAPI valueType, a hint on how to interpret the value. Observed: color on selects, where each
Metadata holds a hex colour such as #ff0000.
Declaration
public string? ValueType { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
Values
Raw string values. Scalar types have at most one; select types repeat the display values.
Declaration
public IReadOnlyList<string> Values { get; init; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |