You are here

function twilio_rules_data_info in Twilio 7

Implements hook_rules_data_info().

File

./twilio.rules.inc, line 10
Rules module integration

Code

function twilio_rules_data_info() {
  return array(
    'sms' => array(
      'label' => t('Twilio incoming SMS'),
      'wrap' => TRUE,
      'property info' => array(
        'number' => array(
          'type' => 'text',
          'label' => t('Number'),
          'description' => t('The phone number of the incoming SMS.'),
          'getter callback' => 'entity_property_verbatim_get',
          'setter callback' => 'entity_property_verbatim_set',
        ),
        'number_twilio' => array(
          'type' => 'text',
          'label' => t('Twilio Number'),
          'description' => t('The Twilio phone number that receieved the message.'),
          'getter callback' => 'entity_property_verbatim_get',
          'setter callback' => 'entity_property_verbatim_set',
        ),
        'message' => array(
          'type' => 'text',
          'label' => t('Message'),
          'description' => t('The message of the incoming SMS.'),
          'getter callback' => 'entity_property_verbatim_get',
          'setter callback' => 'entity_property_verbatim_set',
        ),
        'media' => array(
          'type' => 'text',
          'label' => t('Media'),
          'description' => t('The media attached to the incoming SMS.'),
          'getter callback' => 'entity_property_verbatim_get',
          'setter callback' => 'entity_property_verbatim_set',
        ),
      ),
    ),
    'voice' => array(
      'label' => t('Twilio incoming Voice'),
      'wrap' => TRUE,
      'property info' => array(
        'number' => array(
          'type' => 'text',
          'label' => t('Number'),
          'description' => t('The phone number of the incoming call.'),
          'getter callback' => 'entity_property_verbatim_get',
          'setter callback' => 'entity_property_verbatim_set',
        ),
      ),
    ),
  );
}