Module: WeChat::Entity::Retriever::ClassMethods

Defined in:
lib/we_chat/entity/retriever.rb

Instance Method Summary collapse

Instance Method Details

#get_instance_data_from_reponse(response) ⇒ Object



13
14
15
# File 'lib/we_chat/entity/retriever.rb', line 13

def get_instance_data_from_reponse(response)
  response
end

#retrieve_from_we_chat(id) ⇒ Object



8
9
10
11
# File 'lib/we_chat/entity/retriever.rb', line 8

def retrieve_from_we_chat(id)
  response = WeChat::REST::Client.default.send("#{we_chat_entity_name.to_s}_get".to_sym, id)
  create_by_we_chat(get_instance_data_from_reponse(response))
end