Class: Trycourier::Resources::Send
- Inherits:
-
Object
- Object
- Trycourier::Resources::Send
- Defined in:
- lib/trycourier/resources/send.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Send
constructor
private
A new instance of Send.
-
#message(message: , request_options: {}) ⇒ Trycourier::Models::SendMessageResponse
Some parameter documentations has been truncated, see Models::SendMessageParams for more details.
Constructor Details
#initialize(client:) ⇒ Send
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Send.
34 35 36 |
# File 'lib/trycourier/resources/send.rb', line 34 def initialize(client:) @client = client end |
Instance Method Details
#message(message: , request_options: {}) ⇒ Trycourier::Models::SendMessageResponse
Some parameter documentations has been truncated, see Models::SendMessageParams for more details.
Send a message to one or more recipients.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/trycourier/resources/send.rb', line 20 def (params) parsed, = Trycourier::SendMessageParams.dump_request(params) @client.request( method: :post, path: "send", body: parsed, model: Trycourier::Models::SendMessageResponse, options: ) end |