Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Promotions Builder Support #480

Open
steve-r-west opened this issue Nov 22, 2024 · 1 comment
Open

Add Promotions Builder Support #480

steve-r-west opened this issue Nov 22, 2024 · 1 comment

Comments

@steve-r-west
Copy link
Collaborator

No description provided.

@steve-r-west
Copy link
Collaborator Author

rule-promotions:
  singular-name: "rule-promotion"
  json-api-type: "rule_promotion"
  json-api-format: "legacy"
  docs: "https://elasticpath.dev/docs/promotions-builder/promotions-builder-api/promotions-builder-api-overview"
  get-collection:
    docs: "https://elasticpath.dev/docs/promotions-builder/promotions-builder-api/promotions-builder-api-overview"
    url: "/v2/rule-promotions"
  create-entity:
    docs: "https://elasticpath.dev/docs/promotions-builder/promotions-builder-api/cart-level-promotions/create-a-cart-percent-discount-promotion"
    url: "/v2/rule-promotions"
  get-entity:
    docs: "https://elasticpath.dev/docs/promotions-builder/promotions-builder-api/promotions-builder-api-overview"
    url: "/v2/rule-promotions/{rule_promotion}"
  attributes:
    name:
      type: STRING
      autofill: VALUE:Promotion {{ pseudoRandAlpha 10 }}
    start:
      type: STRING
      #autofill: VALUE:{{ (now | int) | div 1000000000 | sub 86400 | date "2006-01-02" }}
      autofill: VALUE:{{ now | unixEpoch | add -86400 | date "2006-01-02" }}
    description:
      type: STRING
      autofill: FUNC:Phrase
    end:
      type: STRING
      autofill: VALUE:{{ now | unixEpoch | add 604800 |  date "2006-01-02" }}
    enabled:
      type: BOOL
      autofill: VALUE:true
    priority:
      type: INT
    rule_set.actions[n].strategy:
      type: ENUM:cart_discount,item_discount,shipping_discount
    rule_set.actions[n].args[n]:
      type: STRING
    rule_set.catalog_ids[n]:
      type: RESOURCE_ID:pcm-catalog
    rule_set.currencies[n]:
      type: CURRENCY
    rule_set.rules.strategy:
      type: ENUM:cart_total,cart_custom_attribute,item_price,item_quantity,item_sku,item_category,item_attribute,item_product_id
      autofill: VALUE:cart_total
    rule_set.rules.operator:
      type: ENUM:eq,gt,lt,gte,lte,in,nin
    rule_set.rules.args[n]:
      type: STRING
    stackable:
      type: BOOL

      #autofill: VALUE:{{ (now | int) | div 1000000000 | add 604800 | date "2006-01-02" }}
rule-promotions-codes:
  singular-name: "rule-promotion-code"
  json-api-format: legacy
  json-api-type: "promotion_codes"
  docs: "https://elasticpath.dev/docs/promotions-builder/promotions-builder-codes/get-rule-promotion-codes"
  no-wrapping: false
  get-collection:
    docs: "https://elasticpath.dev/docs/promotions-builder/promotions-builder-codes/get-rule-promotion-codes"
    url: "/v2/rule-promotions/{rule_promotions}/codes"
  create-entity:
    docs: "https://elasticpath.dev/docs/promotions-builder/promotions-builder-codes/create-promotion-codes"
    url: "/v2/rule-promotions/{rule_promotions}/codes"
  attributes:
    codes[n].code:
      type: STRING
    codes[n].uses:
      type: INT
    codes[n].user:
      type: RESOURCE_ID:customers
    consume_unit:
      type: ENUM:per_application,per_cart
    is_for_new_shopper:
      type: BOOL
      autofill: VALUE:false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant