class AsposeEmailCloud::AiNameParseEmailAddressRequest
Request model for ai_name_parse_email_address operation.
Attributes
Email address to parse. @return [String]
A character encoding name. @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 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
Parse person's name out of an email address.
@param [String] email_address
Email address to parse. @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_parse_email_address_request.rb, line 58 def initialize(email_address:, language: nil, location: nil, encoding: nil, script: nil, style: nil) self.email_address = email_address if email_address 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
# File lib/aspose-email-cloud/models/ai_name_parse_email_address_request.rb, line 67 def to_http_info(api_client) # verify the required parameter 'email_address' is set if api_client.config.client_side_validation && self.email_address.nil? raise ArgumentError, "Missing the required parameter 'email_address' when calling AiNameApi.parse_email_address" end # resource path local_var_path = '/email/AiName/parse-email-address' # query parameters query_params = {} query_params[:emailAddress] = self.email_address 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