Class: Contactology::TransactionalMessage

Inherits:
Stash
  • Object
show all
Extended by:
API
Defined in:
lib/contactology/transactional_message.rb

Instance Method Summary collapse

Methods included from API

query, request_headers

Methods inherited from Stash

#[]=

Instance Method Details

#replacementsObject



14
15
16
# File 'lib/contactology/transactional_message.rb', line 14

def replacements
  self['replacements'] || Hash.new
end

#send_message(options = {}) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/contactology/transactional_message.rb', line 18

def send_message(options = {})
  self.class.query('Campaign_Send_Transactional', options.merge({
    'campaignId' => campaign.id,
    'contact' => normalize_contact(contact),
    'source' => source,
    'replacements' => {:_contactology => 'Contactology'}.merge(replacements),
    :on_error => false,
    :on_timeout => false,
    :on_success => true
  }))
end