Class: Trycourier::Resources::Send

Inherits:
Object
  • Object
show all
Defined in:
lib/trycourier/resources/send.rb

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

Returns:

See Also:



20
21
22
23
24
25
26
27
28
29
# File 'lib/trycourier/resources/send.rb', line 20

def message(params)
  parsed, options = Trycourier::SendMessageParams.dump_request(params)
  @client.request(
    method: :post,
    path: "send",
    body: parsed,
    model: Trycourier::Models::SendMessageResponse,
    options: options
  )
end