lib/mailinator_client/messages.rb
def inject_message(params = {})
      params = Utils.symbolize_hash_keys(params)
      query_params = { }
      headers = {}
      body = nil

      raise ArgumentError.new("domain is required") unless params.has_key?(:domain)
      raise ArgumentError.new("inbox is required") unless params.has_key?(:inbox)
      raise ArgumentError.new("messageToPost is required") unless params.has_key?(:messageToPost)

      body = params[:messageToPost] if params.has_key?(:messageToPost)

      path = "/domains/#{params[:domain]}/inboxes/#{params[:inbox]}/messages"

      @client.request(
        method: :post,
        path: path,
        query: query_params,
        headers: headers,
        body: body)
    end
# Deliver a JSON message into your private domain.
#
# Authentication:
# The client must be configured with a valid api
# access token to call this action.
#
# Parameters:
# *  {string} domainId - The Domain name or the Domain id
# *  {string} inbox - The Inbox name
# *  {string} messageToPost - The Message object (https://manybrain.github.io/m8rdocs/#inject-a-message-http-post-messages)
#
# Responses:
# *  Status, Id and RulesToFired info (https://manybrain.github.io/m8rdocs/#fetch-an-sms-messages)
Deliver a JSON message into your private domain.
Authentication:
The client must be configured with a valid api
access token to call this action.

{string} domainId - The Domain name or the Domain id
{string} inbox - The Inbox name
{string} messageToPost - The Message object

Status, Id and RulesToFired info
Deliver a JSON message into your private domain . Authentication : The client must be configured with a valid api access token to call this action . { string } domainId - The Domain name or the Domain id { string } inbox - The Inbox name { string } messageToPost - The Message object Status Id and RulesToFired info
def inject_message(params = {})
      params = Utils.symbolize_hash_keys(params)
      query_params = { }
      headers = {}
      body = nil
      raise ArgumentError.new("domain is required") unless params.has_key?(:domain)
      raise ArgumentError.new("inbox is required") unless params.has_key?(:inbox)
      raise ArgumentError.new("messageToPost is required") unless params.has_key?(:messageToPost)
      body = params[:messageToPost] if params.has_key?(:messageToPost)
      path = "/domains/#{params[:domain]}/inboxes/#{params[:inbox]}/messages"
      @client.request(
        method: :post,
        path: path,
        query: query_params,
        headers: headers,
        body: body)
    end
def inject_message ( params = { } ) params = Utils . symbolize_hash_keys ( params ) query_params = { } headers = { } body = nil raise ArgumentError . new ( "domain is required" ) unless params . has_key? ( :domain ) raise ArgumentError . new ( "inbox is required" ) unless params . has_key? ( :inbox ) raise ArgumentError . new ( "messageToPost is required" ) unless params . has_key? ( :messageToPost ) body = params [ :messageToPost ] if params . has_key? ( :messageToPost ) path = "/domains/#{params[:domain]}/inboxes/#{params[:inbox]}/messages" @client . request ( method : :post , path : path , query : query_params , headers : headers , body : body ) end
Deliver a JSON message into your private domain.
Deliver a JSON message into your private domain .
params