class AsposeEmailCloud::AiNameFormatRequest
Request model for ai_name_format operation.
Attributes
A character encoding name. @return [String]
Format of the name. Predefined format can be used by ID, or custom format can be specified. Predefined formats: /format/default/ (= '%t%F%m%N%L%p') /format/FN+LN/ (= '%F%L') /format/title+FN+LN/ (= '%t%F%L') /format/FN+MN+LN/ (= '%F%M%N%L') /format/title+FN+MN+LN/ (= '%t%F%M%N%L') /format/FN+MI+LN/ (= '%F%m%N%L') /format/title+FN+MI+LN/ (= '%t%F%m%N%L') /format/LN/ (= '%L') /format/title+LN/ (= '%t%L') /format/LN+FN+MN/ (= '%L,%F%M%N') /format/LN+title+FN+MN/ (= '%L,%t%F%M%N') /format/LN+FN+MI/ (= '%L,%F%m%N') /format/LN+title+FN+MI/ (= '%L,%t%F%m%N') Custom format string - custom combination of characters and the next term placeholders: '%t' - Title (prefix) '%F' - First name '%f' - First initial '%M' - Middle name(s) '%m' - Middle initial(s) '%N' - Nickname '%L' - Last name '%l' - Last initial '%p' - Postfix If no value for format option was provided, its default value is '%t%F%m%N%L%p'
@return [String]
An ISO-639 code of the language; either 639-1 or 639-3 (e.g. "it" or "ita" for Italian).
@return [String]
A geographic code such as an ISO-3166 two letter country code, for example "FR" for France.
@return [String]
A name to format. @return [String]
A writing system code; starts with the ISO-15924 script name. @return [String]
Name writing style. Enum, available values: Formal, Informal, Legal, Academic @return [String]
Public Class Methods
Formats a person's name in correct case and name order using options for formatting instructions.
@param [String] name A name to format. @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] format Format of the name. Predefined format can be used by ID, or custom format can be specified. Predefined formats: /format/default/ (= '%t%F%m%N%L%p') /format/FN+LN/ (= '%F%L') /format/title+FN+LN/ (= '%t%F%L') /format/FN+MN+LN/ (= '%F%M%N%L') /format/title+FN+MN+LN/ (= '%t%F%M%N%L') /format/FN+MI+LN/ (= '%F%m%N%L') /format/title+FN+MI+LN/ (= '%t%F%m%N%L') /format/LN/ (= '%L') /format/title+LN/ (= '%t%L') /format/LN+FN+MN/ (= '%L,%F%M%N') /format/LN+title+FN+MN/ (= '%L,%t%F%M%N') /format/LN+FN+MI/ (= '%L,%F%m%N') /format/LN+title+FN+MI/ (= '%L,%t%F%m%N') Custom format string - custom combination of characters and the next term placeholders: '%t' - Title (prefix) '%F' - First name '%f' - First initial '%M' - Middle name(s) '%m' - Middle initial(s) '%N' - Nickname '%L' - Last name '%l' - Last initial '%p' - Postfix If no value for format option was provided, its default value is '%t%F%m%N%L%p'
@param [String] style Name writing style. Enum, available values: Formal, Informal, Legal, Academic
# File lib/aspose-email-cloud/models/ai_name_format_request.rb, line 62 def initialize(name:, language: nil, location: nil, encoding: nil, script: nil, format: nil, style: nil) self.name = name if name self.language = language if language self.location = location if location self.encoding = encoding if encoding self.script = script if script self.format = format if format self.style = style if style end
Public Instance Methods
# File lib/aspose-email-cloud/models/ai_name_format_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.format" end # resource path local_var_path = '/email/AiName/format' # query parameters query_params = {} query_params[:name] = self.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[:format] = self.format unless self.format.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