Log in
Interface

CouponGenerationSpecInterface

Magento\SalesRule\Api\Data\CouponGenerationSpecInterface

What it does

This interface defines the contract for specifying parameters when generating coupon codes in bulk for sales rules.

Developers use this to programmatically create multiple coupon codes with customizable formats, lengths, prefixes, suffixes, and delimiters.

It's essential when building features that automate coupon generation for promotions or marketing campaigns.

Public Methods

  • getRuleId()
  • setRuleId()
  • getFormat()
  • setFormat()
  • getQuantity()
  • setQuantity()
  • getLength()
  • setLength()
  • getPrefix()
  • setPrefix()
  • getSuffix()
  • setSuffix()
  • getDelimiterAtEvery()
  • setDelimiterAtEvery()
  • getDelimiter()
  • setDelimiter()
  • getExtensionAttributes()
  • setExtensionAttributes()