Class: Mpayer::Message
- Defined in:
- lib/mpayer_ruby/endpoints/message.rb
Instance Attribute Summary
Attributes inherited from Endpoint
#attributes, #config, #endpoint, #id, #pagination, #response
Class Method Summary collapse
-
.create(options = {}) ⇒ Object
message_attributes = ‘Please send me a message’, destination:‘0722737343,343843843’ Mpayer::Message.create(message_attributes).
Methods inherited from Endpoint
Constructor Details
This class inherits a constructor from Mpayer::Endpoint
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Mpayer::Endpoint
Class Method Details
.create(options = {}) ⇒ Object
message_attributes = ‘Please send me a message’, destination:‘0722737343,343843843’ Mpayer::Message.create(message_attributes)
7 8 9 10 11 |
# File 'lib/mpayer_ruby/endpoints/message.rb', line 7 def create(={}) url = "/messages" response = Mpayer::Fetch.post(url,) = new(.merge!(id:response.id ,response:response)) rescue response end |