Skip to content

Polymorphic Attribute Support #572

@steve-r-west

Description

@steve-r-west

Some attributes are policymorphic, lets support this so that we can have a cleaner API.

For example rule promotions, depending on the action or strategy, other parameters can be conditional.

Maybe a way of doing this would be

  rule_set.rules.operator: 
      type: CONDITIONAL
      conditions:
      - type: ENUM:gte,gt,lt,le
        when: rule_set.rules.operator.strategy == 'item_sku'

This was split up from #562

Doing the above might be the least breaking behaviour, because the attributes now are a map, and many of the conditions are over loaded, so we couldn't just specify rule_set.rules.operator twice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions