Class: AsposeEmailCloud::EmailRequest
- Inherits:
-
Object
- Object
- AsposeEmailCloud::EmailRequest
- Defined in:
- lib/aspose-email-cloud/models/email_request.rb
Overview
Base class for requests with basic operations
Direct Known Subclasses
AiBcrParseRequest, AiNameCompleteRequest, AiNameExpandRequest, AiNameFormatRequest, AiNameGenderizeRequest, AiNameMatchRequest, AiNameParseEmailAddressRequest, AiNameParseRequest, CalendarConvertRequest, CalendarFromFileRequest, CalendarGetAsAlternateRequest, CalendarGetAsFileRequest, CalendarGetListRequest, CalendarGetRequest, ClientAccountGetMultiRequest, ClientAccountGetRequest, ClientFolderGetListRequest, ClientMessageAppendFileRequest, ClientMessageFetchFileRequest, ClientMessageFetchRequest, ClientMessageListRequest, ClientMessageSendFileRequest, ClientThreadGetListRequest, ClientThreadGetMessagesRequest, ContactConvertRequest, ContactFromFileRequest, ContactGetAsFileRequest, ContactGetListRequest, ContactGetRequest, CopyFileRequest, CopyFolderRequest, CreateFolderRequest, DeleteFileRequest, DeleteFolderRequest, DisposableEmailIsDisposableRequest, DownloadFileRequest, EmailConfigDiscoverRequest, EmailConvertRequest, EmailFromFileRequest, EmailGetAsFileRequest, EmailGetListRequest, EmailGetRequest, GetDiscUsageRequest, GetFileVersionsRequest, GetFilesListRequest, MapiCalendarFromFileRequest, MapiCalendarGetRequest, MapiContactFromFileRequest, MapiContactGetRequest, MapiMessageFromFileRequest, MapiMessageGetRequest, MoveFileRequest, MoveFolderRequest, ObjectExistsRequest, StorageExistsRequest, UploadFileRequest
Class Method Summary collapse
-
.select_header_accept(accepts) ⇒ String
Return Accept header based on an array of accepts provided.
-
.select_header_content_type(content_types) ⇒ String
Return Content-Type header based on an array of content types provided.
Instance Method Summary collapse
Class Method Details
.select_header_accept(accepts) ⇒ String
Return Accept header based on an array of accepts provided.
36 37 38 39 40 41 42 |
# File 'lib/aspose-email-cloud/models/email_request.rb', line 36 def self.select_header_accept(accepts) return nil if accepts.nil? || accepts.empty? # use JSON when present, otherwise use all of the provided json_accept = accepts.find { |s| EmailRequest.json_mime?(s) } json_accept || accepts.join(',') end |
.select_header_content_type(content_types) ⇒ String
Return Content-Type header based on an array of content types provided.
47 48 49 50 51 52 53 54 |
# File 'lib/aspose-email-cloud/models/email_request.rb', line 47 def self.select_header_content_type(content_types) # use application/json by default return 'application/json' if content_types.nil? || content_types.empty? # use JSON when present, otherwise use the first one json_content_type = content_types.find { |s| EmailRequest.json_mime?(s) } json_content_type || content_types.first end |
Instance Method Details
#to_http_info(config) ⇒ Object
31 |
# File 'lib/aspose-email-cloud/models/email_request.rb', line 31 def to_http_info(config); end |