Polymorphic Attribute Support · Issue #572 · elasticpath/epcc-cli · GitHub
Skip to content

Polymorphic Attribute Support #572

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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