Component

public struct Component : Codable, Equatable

Struct representing Product Component related values.

  • id

    Value representing the entity id.

    Declaration

    Swift

    public var id: Int
  • sku

    The component’s metric cost.

    Declaration

    Swift

    public var sku: String
  • The component’s metric cost.

    Declaration

    Swift

    public var metricAmount: String
  • The name of the metric (currency).

    Declaration

    Swift

    public var metricName: String
  • The display name of the metric (currency).

    Declaration

    Swift

    public var metricDisplayName: String
  • The start date of effectivity of the current component (in String).

    Declaration

    Swift

    public var startDate: String
  • The end date of effectivity of the current component (in String).

    Declaration

    Swift

    public var endDate: String
  • The component’s displayable title / name.

    Declaration

    Swift

    public var heading: String
  • The component’s displayable sub-info.

    Declaration

    Swift

    public var subheading: String
  • The component’s general displayable description.

    Declaration

    Swift

    public var body: String
  • The component’s displayable fine print.

    Declaration

    Swift

    public var details: String
  • The component’s image (big).

    Declaration

    Swift

    public var imageUrl: String
  • The component’s thumbnail.

    Declaration

    Swift

    public var thumbImageUrl: String
  • Additional attributes that can be configured from within the component.

    Declaration

    Swift

    public var attributes: [Product.Attribute]
  • A list of sub-components for a component that is a component group.

    Declaration

    Swift

    public var productComponents: [Product.Component]
  • Marker / state for whether to add this component or not to the order.

    Declaration

    Swift

    public var selected: Bool
  • Undocumented

    Declaration

    Swift

    public init(id: Int, sku: String, metricAmount: String, metricName: String, metricDisplayName: String,
                startDate: String, endDate: String, heading: String, subheading: String, body: String,
                details: String, imageUrl: String, thumbImageUrl: String, attributes: [Product.Attribute],
                productComponents: [Product.Component], selected: Bool)
  • Declaration

    Swift

    public init(from decoder: Decoder) throws