lib/mailinator_client/rules.rb
# Creates a Rule. Note that in the examples, ":domain_id" can be one of your private domains.
#
# 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} ruleToPost - The Rule object (https://manybrain.github.io/m8rdocs/#create-rule)
#
# Responses:
# *  Rule (https://manybrain.github.io/m8rdocs/#create-rule)
Creates a Rule. Note that in the examples, ":domain_id" can be one of your private domains.
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} ruleToPost - The Rule object

Rule
Creates a Rule . Note that in the examples " : domain_id " can be one of your private domains . 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 } ruleToPost - The Rule object Rule
def create_rule(params = {})
      params = Utils.symbolize_hash_keys(params)
      query_params = { }
      headers = {}
      body = nil
      raise ArgumentError.new("domain id is required") unless params.has_key?(:domainId)
      raise ArgumentError.new("ruleToPost is required") unless params.has_key?(:ruleToPost)
      body = params[:ruleToPost] if params.has_key?(:ruleToPost)
      path = "/domains/#{params[:domainId]}/rules"
      @client.request(
        method: :post,
        path: path,
        query: query_params,
        headers: headers,
        body: body)
    end
def create_rule ( params = { } ) params = Utils . symbolize_hash_keys ( params ) query_params = { } headers = { } body = nil raise ArgumentError . new ( "domain id is required" ) unless params . has_key? ( :domainId ) raise ArgumentError . new ( "ruleToPost is required" ) unless params . has_key? ( :ruleToPost ) body = params [ :ruleToPost ] if params . has_key? ( :ruleToPost ) path = "/domains/#{params[:domainId]}/rules" @client . request ( method : :post , path : path , query : query_params , headers : headers , body : body ) end
Creates a Rule.
Creates a Rule .
params