Module: Model::Service

Extended by:
ActiveSupport::Concern
Included in:
Wechat::Service
Defined in:
app/models/wechat/model/service.rb

Instance Method Summary collapse

Instance Method Details

#contentObject



30
31
32
# File 'app/models/wechat/model/service.rb', line 30

def content
  {}
end

#do_sendObject



26
27
28
# File 'app/models/wechat/model/service.rb', line 26

def do_send
  agency.api.message_custom_send to_wechat
end

#to_wechatObject



34
35
36
37
38
39
# File 'app/models/wechat/model/service.rb', line 34

def to_wechat
  {
    touser: open_id,
    msgtype: msgtype,
  }.merge! content
end