You are here

function commerce_coupon_rules_action_info in Commerce Coupon 7.2

Same name and namespace in other branches
  1. 7 commerce_coupon.rules.inc \commerce_coupon_rules_action_info()

Implements hook_rules_action_info().

File

./commerce_coupon.rules.inc, line 11
Rules definitions for Commerce Coupon.

Code

function commerce_coupon_rules_action_info() {
  $actions['commerce_coupon_discount_get_coupons_list'] = array(
    'label' => t('List of all coupon codes related referencing this discount.'),
    'group' => t('Commerce Coupon'),
    'parameter' => array(
      'commerce_order' => array(
        'type' => 'commerce_order',
        'wrapped' => TRUE,
        'label' => t('Order'),
      ),
      'commerce_discount' => array(
        'label' => t('Commerce Discount'),
        'type' => 'token',
        'options list' => 'commerce_discount_entity_list',
      ),
    ),
    'provides' => array(
      'discount_coupons' => array(
        'type' => 'list<commerce_coupon>',
        'label' => t('List of coupons of this discount'),
        'save' => FALSE,
      ),
    ),
  );
  return $actions;
}