Method: Wechat::Message#template

Defined in:
lib/wechat/message.rb

#template(opts = {}) ⇒ Object



108
109
110
111
# File 'lib/wechat/message.rb', line 108

def template opts={}
  template_fields = camelize_hash_keys(opts.symbolize_keys.slice(:template_id, :topcolor, :url, :data))
  update(:MsgType=>"template",:Template=> template_fields)
end