class AsposeEmailCloud::ContactGetAsFileRequest
Request model for contact_get_as_file operation.
Attributes
file_name[RW]
Calendar document file name @return [String]
folder[RW]
Path to folder in storage @return [String]
from_format[RW]
File format to convert from. Enum, available values: VCard, WebDav, Msg @return [String]
storage[RW]
Storage name @return [String]
to_format[RW]
File format. Enum, available values: VCard, WebDav, Msg @return [String]
Public Class Methods
new(file_name:, to_format:, from_format:, storage: nil, folder: nil)
click to toggle source
Converts contact document from storage to specified format and returns as file
@param [String] file_name
Calendar document file name @param [String] to_format
File format. Enum, available values: VCard, WebDav, Msg @param [String] from_format
File format to convert from. Enum, available values: VCard, WebDav, Msg @param [String] storage Storage name @param [String] folder Path to folder in storage
# File lib/aspose-email-cloud/models/contact_get_as_file_request.rb, line 54 def initialize(file_name:, to_format:, from_format:, storage: nil, folder: nil) self.file_name = file_name if file_name self.to_format = to_format if to_format self.from_format = from_format if from_format self.storage = storage if storage self.folder = folder if folder end
Public Instance Methods
to_http_info(api_client)
click to toggle source
# File lib/aspose-email-cloud/models/contact_get_as_file_request.rb, line 62 def to_http_info(api_client) # verify the required parameter 'file_name' is set if api_client.config.client_side_validation && self.file_name.nil? raise ArgumentError, "Missing the required parameter 'file_name' when calling ContactApi.get_as_file" end # verify the required parameter 'to_format' is set if api_client.config.client_side_validation && self.to_format.nil? raise ArgumentError, "Missing the required parameter 'to_format' when calling ContactApi.get_as_file" end # verify the required parameter 'from_format' is set if api_client.config.client_side_validation && self.from_format.nil? raise ArgumentError, "Missing the required parameter 'from_format' when calling ContactApi.get_as_file" end # resource path local_var_path = '/email/Contact/as-file' # query parameters query_params = {} query_params[:fileName] = self.file_name query_params[:toFormat] = self.to_format query_params[:fromFormat] = self.from_format query_params[:storage] = self.storage unless self.storage.nil? query_params[:folder] = self.folder unless self.folder.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(['multipart/form-data']) # 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