Sha256: 630c6d7e3de633d6f091b291b2f87ce446ad3f4027a77ac1ae86b6379622abf9
Contents?: true
Size: 579 Bytes
Versions: 3
Compression:
Stored size: 579 Bytes
Contents
class Ey::Core::Client class Real def get_message(params={}) id = params["id"] url = params["url"] request( :path => "messages/#{id}", :url => url ) end end class Mock def get_message(params={}) identity = resource_identity(params) if message = self.data[:messages].values.detect { |m| m["id"] == identity } response( :body => {"message" => message}, :status => 200, ) else response(status: 404) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ey-core-3.6.6 | lib/ey-core/requests/get_message.rb |
ey-core-3.4.5 | lib/ey-core/requests/get_message.rb |
ey-core-3.6.5 | lib/ey-core/requests/get_message.rb |