class AsposeEmailCloud::AiNameMatchRequest

Request model for ai_name_match operation.

Attributes

encoding[RW]

A character encoding name. @return [String]

language[RW]

An ISO-639 code of the language; either 639-1 or 639-3 (e.g. "it" or "ita" for Italian).

@return [String]

location[RW]

A geographic code such as an ISO-3166 two letter country code, for example "FR" for France.

@return [String]

name[RW]

A name to match. @return [String]

other_name[RW]

Another name to match. @return [String]

script[RW]

A writing system code; starts with the ISO-15924 script name. @return [String]

style[RW]

Name writing style. Enum, available values: Formal, Informal, Legal, Academic @return [String]

Public Class Methods

new(name:, other_name:, language: nil, location: nil, encoding: nil, script: nil, style: nil) click to toggle source

Compare people's names. Uses options for comparing instructions.

@param [String] name A name to match. @param [String] other_name Another name to match. @param [String] language An ISO-639 code of the language; either 639-1 or 639-3 (e.g. "it" or "ita" for Italian).

@param [String] location A geographic code such as an ISO-3166 two letter country code, for example "FR" for France.

@param [String] encoding A character encoding name. @param [String] script A writing system code; starts with the ISO-15924 script name. @param [String] style Name writing style. Enum, available values: Formal, Informal, Legal, Academic

# File lib/aspose-email-cloud/models/ai_name_match_request.rb, line 62
def initialize(name:, other_name:, language: nil, location: nil, encoding: nil, script: nil, style: nil)
  self.name = name if name
  self.other_name = other_name if other_name
  self.language = language if language
  self.location = location if location
  self.encoding = encoding if encoding
  self.script = script if script
  self.style = style if style
end

Public Instance Methods

to_http_info(api_client) click to toggle source
# File lib/aspose-email-cloud/models/ai_name_match_request.rb, line 72
def to_http_info(api_client)
  # verify the required parameter 'name' is set
  if api_client.config.client_side_validation && self.name.nil?
    raise ArgumentError, "Missing the required parameter 'name' when calling AiNameApi.match"
  end
  # verify the required parameter 'other_name' is set
  if api_client.config.client_side_validation && self.other_name.nil?
    raise ArgumentError, "Missing the required parameter 'other_name' when calling AiNameApi.match"
  end
  # resource path
  local_var_path = '/email/AiName/match'

  # query parameters
  query_params = {}
  query_params[:name] = self.name
  query_params[:otherName] = self.other_name
  query_params[:language] = self.language unless self.language.nil?
  query_params[:location] = self.location unless self.location.nil?
  query_params[:encoding] = self.encoding unless self.encoding.nil?
  query_params[:script] = self.script unless self.script.nil?
  query_params[:style] = self.style unless self.style.nil?

  # form parameters
  form_params = {}

  # http body (model)
  auth_names = ['JWT']

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = EmailRequest.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : EmailRequest.select_header_content_type(['application/json'])

  AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path,
                                    header_params: header_params,
                                    query_params: query_params,
                                    form_params: form_params,
                                    auth_names: auth_names)
end