aspose_email_cloud 20.5.0 → 21.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aspose-email-cloud.rb +202 -207
- data/lib/aspose-email-cloud/api/ai_bcr_api.rb +87 -0
- data/lib/aspose-email-cloud/api/ai_group.rb +49 -0
- data/lib/aspose-email-cloud/api/ai_name_api.rb +216 -0
- data/lib/aspose-email-cloud/api/calendar_api.rb +209 -0
- data/lib/aspose-email-cloud/api/client_account_api.rb +124 -0
- data/lib/aspose-email-cloud/api/client_folder_api.rb +116 -0
- data/lib/aspose-email-cloud/api/client_group.rb +59 -0
- data/lib/aspose-email-cloud/api/client_message_api.rb +233 -0
- data/lib/aspose-email-cloud/api/client_thread_api.rb +152 -0
- data/lib/aspose-email-cloud/api/cloud_storage_group.rb +54 -0
- data/lib/aspose-email-cloud/api/contact_api.rb +174 -0
- data/lib/aspose-email-cloud/api/disposable_email_api.rb +60 -0
- data/lib/aspose-email-cloud/api/email_api.rb +105 -970
- data/lib/aspose-email-cloud/api/email_cloud.rb +96 -0
- data/lib/aspose-email-cloud/api/email_config_api.rb +114 -0
- data/lib/aspose-email-cloud/api/file_api.rb +95 -0
- data/lib/aspose-email-cloud/api/folder_api.rb +96 -0
- data/lib/aspose-email-cloud/api/mapi_calendar_api.rb +150 -0
- data/lib/aspose-email-cloud/api/mapi_contact_api.rb +150 -0
- data/lib/aspose-email-cloud/api/mapi_group.rb +54 -0
- data/lib/aspose-email-cloud/api/mapi_message_api.rb +150 -0
- data/lib/aspose-email-cloud/api/storage_api.rb +84 -0
- data/lib/aspose-email-cloud/api_client.rb +8 -6
- data/lib/aspose-email-cloud/api_invoker.rb +92 -0
- data/lib/aspose-email-cloud/configuration.rb +11 -11
- data/lib/aspose-email-cloud/models/ai_bcr_image.rb +4 -18
- data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +14 -27
- data/lib/aspose-email-cloud/models/ai_bcr_options.rb +8 -26
- data/lib/aspose-email-cloud/models/ai_bcr_parse_request.rb +95 -0
- data/lib/aspose-email-cloud/models/{ai_bcr_storage_image_rq.rb → ai_bcr_parse_storage_request.rb} +34 -40
- data/lib/aspose-email-cloud/models/{requests/ai_name_complete_request_data.rb → ai_name_complete_request.rb} +22 -28
- data/lib/aspose-email-cloud/models/ai_name_component.rb +5 -31
- data/lib/aspose-email-cloud/models/{list_response_of_string.rb → ai_name_component_list.rb} +8 -23
- data/lib/aspose-email-cloud/models/ai_name_cultural_context.rb +6 -36
- data/lib/aspose-email-cloud/models/{requests/ai_name_expand_request_data.rb → ai_name_expand_request.rb} +22 -28
- data/lib/aspose-email-cloud/models/ai_name_extracted.rb +3 -23
- data/lib/aspose-email-cloud/models/ai_name_extracted_component.rb +3 -21
- data/lib/aspose-email-cloud/models/{value_response.rb → ai_name_extracted_list.rb} +9 -23
- data/lib/aspose-email-cloud/models/{requests/ai_name_format_request_data.rb → ai_name_format_request.rb} +22 -28
- data/lib/aspose-email-cloud/models/ai_name_formatted.rb +3 -21
- data/lib/aspose-email-cloud/models/ai_name_gender_hypothesis.rb +3 -21
- data/lib/aspose-email-cloud/models/{list_response_of_ai_bcr_ocr_data.rb → ai_name_gender_hypothesis_list.rb} +8 -23
- data/lib/aspose-email-cloud/models/{requests/ai_name_genderize_request_data.rb → ai_name_genderize_request.rb} +22 -28
- data/lib/aspose-email-cloud/models/{ai_name_parsed_match_rq.rb → ai_name_match_parsed_request.rb} +7 -37
- data/lib/aspose-email-cloud/models/{requests/ai_name_match_request_data.rb → ai_name_match_request.rb} +25 -32
- data/lib/aspose-email-cloud/models/ai_name_match_result.rb +3 -23
- data/lib/aspose-email-cloud/models/ai_name_mismatch.rb +4 -26
- data/lib/aspose-email-cloud/models/{requests/ai_name_parse_email_address_request_data.rb → ai_name_parse_email_address_request.rb} +25 -28
- data/lib/aspose-email-cloud/models/{requests/ai_name_parse_request_data.rb → ai_name_parse_request.rb} +24 -30
- data/lib/aspose-email-cloud/models/{ai_name_parsed_rq.rb → ai_name_parsed_request.rb} +6 -30
- data/lib/aspose-email-cloud/models/ai_name_weighted.rb +3 -21
- data/lib/aspose-email-cloud/models/ai_name_weighted_variants.rb +3 -23
- data/lib/aspose-email-cloud/models/alternate_view.rb +8 -46
- data/lib/aspose-email-cloud/models/associated_person.rb +4 -26
- data/lib/aspose-email-cloud/models/attachment.rb +11 -59
- data/lib/aspose-email-cloud/models/attachment_base.rb +5 -33
- data/lib/aspose-email-cloud/models/{calendar_dto_alternate_rq.rb → calendar_as_alternate_request.rb} +7 -29
- data/lib/aspose-email-cloud/models/calendar_as_file_request.rb +218 -0
- data/lib/aspose-email-cloud/models/{requests/convert_calendar_request_data.rb → calendar_convert_request.rb} +18 -24
- data/lib/aspose-email-cloud/models/calendar_dto.rb +34 -129
- data/lib/aspose-email-cloud/models/{requests/get_email_file_as_model_request_data.rb → calendar_from_file_request.rb} +14 -20
- data/lib/aspose-email-cloud/models/{requests/get_calendar_model_as_alternate_request_data.rb → calendar_get_as_alternate_request.rb} +21 -26
- data/lib/aspose-email-cloud/models/{requests/get_calendar_as_file_request_data.rb → calendar_get_as_file_request.rb} +25 -30
- data/lib/aspose-email-cloud/models/{requests/get_calendar_model_list_request_data.rb → calendar_get_list_request.rb} +25 -28
- data/lib/aspose-email-cloud/models/{requests/get_calendar_model_request_data.rb → calendar_get_request.rb} +25 -30
- data/lib/aspose-email-cloud/models/calendar_reminder.rb +9 -55
- data/lib/aspose-email-cloud/models/{storage_model_rq_of_calendar_dto.rb → calendar_save_request.rb} +39 -32
- data/lib/aspose-email-cloud/models/{calendar_dto_list.rb → calendar_storage_list.rb} +5 -21
- data/lib/aspose-email-cloud/models/{ai_bcr_rq.rb → client_account_base_request.rb} +19 -28
- data/lib/aspose-email-cloud/models/{requests/get_email_attachment_request_data.rb → client_account_get_multi_request.rb} +26 -38
- data/lib/aspose-email-cloud/models/{requests/get_email_request_data.rb → client_account_get_request.rb} +25 -30
- data/lib/aspose-email-cloud/models/{storage_file_rq_of_email_client_multi_account.rb → client_account_save_multi_request.rb} +28 -35
- data/lib/aspose-email-cloud/models/{storage_file_rq_of_email_client_account.rb → client_account_save_request.rb} +28 -35
- data/lib/aspose-email-cloud/models/client_folder_create_request.rb +246 -0
- data/lib/aspose-email-cloud/models/{ai_bcr_base64_image.rb → client_folder_delete_request.rb} +49 -43
- data/lib/aspose-email-cloud/models/{requests/list_email_folders_request_data.rb → client_folder_get_list_request.rb} +29 -38
- data/lib/aspose-email-cloud/models/client_message_append_file_request.rb +114 -0
- data/lib/aspose-email-cloud/models/client_message_append_request.rb +241 -0
- data/lib/aspose-email-cloud/models/client_message_base_request.rb +237 -0
- data/lib/aspose-email-cloud/models/{email_property.rb → client_message_delete_request.rb} +47 -69
- data/lib/aspose-email-cloud/models/{requests/fetch_email_model_request_data.rb → client_message_fetch_file_request.rb} +34 -41
- data/lib/aspose-email-cloud/models/{requests/fetch_email_message_request_data.rb → client_message_fetch_request.rb} +40 -41
- data/lib/aspose-email-cloud/models/{requests/list_email_models_request_data.rb → client_message_list_request.rb} +40 -41
- data/lib/aspose-email-cloud/models/{move_email_thread_rq.rb → client_message_move_request.rb} +75 -72
- data/lib/aspose-email-cloud/models/client_message_send_file_request.rb +105 -0
- data/lib/aspose-email-cloud/models/{ai_bcr_base64_rq.rb → client_message_send_request.rb} +33 -43
- data/lib/aspose-email-cloud/models/client_message_set_is_read_request.rb +251 -0
- data/lib/aspose-email-cloud/models/{hierarchical_object_response.rb → client_thread_base_request.rb} +51 -40
- data/lib/aspose-email-cloud/models/{ai_bcr_ocr_data.rb → client_thread_delete_request.rb} +58 -68
- data/lib/aspose-email-cloud/models/{requests/list_email_threads_request_data.rb → client_thread_get_list_request.rb} +28 -41
- data/lib/aspose-email-cloud/models/{requests/fetch_email_thread_messages_request_data.rb → client_thread_get_messages_request.rb} +31 -40
- data/lib/aspose-email-cloud/models/{delete_email_thread_account_rq.rb → client_thread_move_request.rb} +79 -76
- data/lib/aspose-email-cloud/models/client_thread_set_is_read_request.rb +260 -0
- data/lib/aspose-email-cloud/models/contact_as_file_request.rb +218 -0
- data/lib/aspose-email-cloud/models/{requests/convert_contact_request_data.rb → contact_convert_request.rb} +27 -33
- data/lib/aspose-email-cloud/models/contact_dto.rb +37 -207
- data/lib/aspose-email-cloud/models/{requests/get_contact_file_as_model_request_data.rb → contact_from_file_request.rb} +15 -21
- data/lib/aspose-email-cloud/models/{requests/get_contact_as_file_request_data.rb → contact_get_as_file_request.rb} +29 -34
- data/lib/aspose-email-cloud/models/{requests/get_contact_model_list_request_data.rb → contact_get_list_request.rb} +17 -19
- data/lib/aspose-email-cloud/models/{requests/get_contact_model_request_data.rb → contact_get_request.rb} +22 -27
- data/lib/aspose-email-cloud/models/{list_response_of_hierarchical_object.rb → contact_list.rb} +8 -23
- data/lib/aspose-email-cloud/models/contact_photo.rb +45 -24
- data/lib/aspose-email-cloud/models/{storage_model_rq_of_contact_dto.rb → contact_save_request.rb} +39 -32
- data/lib/aspose-email-cloud/models/{contact_dto_list.rb → contact_storage_list.rb} +5 -21
- data/lib/aspose-email-cloud/models/content_type.rb +6 -38
- data/lib/aspose-email-cloud/models/content_type_parameter.rb +3 -21
- data/lib/aspose-email-cloud/models/{requests/copy_file_request_data.rb → copy_file_request.rb} +23 -29
- data/lib/aspose-email-cloud/models/{requests/copy_folder_request_data.rb → copy_folder_request.rb} +21 -27
- data/lib/aspose-email-cloud/models/{requests/create_folder_request_data.rb → create_folder_request.rb} +16 -21
- data/lib/aspose-email-cloud/models/customer_event.rb +3 -21
- data/lib/aspose-email-cloud/models/{indexed_hierarchical_object.rb → daily_recurrence_pattern_dto.rb} +261 -265
- data/lib/aspose-email-cloud/models/{requests/delete_file_request_data.rb → delete_file_request.rb} +18 -23
- data/lib/aspose-email-cloud/models/{requests/delete_folder_request_data.rb → delete_folder_request.rb} +18 -23
- data/lib/aspose-email-cloud/models/disc_usage.rb +8 -25
- data/lib/aspose-email-cloud/models/{discover_email_config_rq.rb → discover_email_config_request.rb} +6 -28
- data/lib/aspose-email-cloud/models/{requests/is_email_address_disposable_request_data.rb → disposable_email_is_disposable_request.rb} +17 -19
- data/lib/aspose-email-cloud/models/{requests/download_file_request_data.rb → download_file_request.rb} +18 -23
- data/lib/aspose-email-cloud/models/email_account_config.rb +9 -55
- data/lib/aspose-email-cloud/models/email_account_config_list.rb +3 -19
- data/lib/aspose-email-cloud/models/email_address.rb +31 -41
- data/lib/aspose-email-cloud/models/email_as_file_request.rb +218 -0
- data/lib/aspose-email-cloud/models/email_client_account.rb +7 -41
- data/lib/aspose-email-cloud/models/email_client_account_credentials.rb +2 -25
- data/lib/aspose-email-cloud/models/email_client_account_oauth_credentials.rb +7 -46
- data/lib/aspose-email-cloud/models/email_client_account_password_credentials.rb +4 -31
- data/lib/aspose-email-cloud/models/email_client_multi_account.rb +3 -23
- data/lib/aspose-email-cloud/models/{discover_email_config_oauth.rb → email_config_discover_oauth_request.rb} +10 -48
- data/lib/aspose-email-cloud/models/{discover_email_config_password.rb → email_config_discover_password_request.rb} +7 -33
- data/lib/aspose-email-cloud/models/{requests/discover_email_config_request_data.rb → email_config_discover_request.rb} +19 -22
- data/lib/aspose-email-cloud/models/email_convert_request.rb +94 -0
- data/lib/aspose-email-cloud/models/email_dto.rb +33 -191
- data/lib/aspose-email-cloud/models/email_from_file_request.rb +84 -0
- data/lib/aspose-email-cloud/models/{requests/get_email_as_file_request_data.rb → email_get_as_file_request.rb} +18 -23
- data/lib/aspose-email-cloud/models/{requests/get_email_model_list_request_data.rb → email_get_list_request.rb} +19 -21
- data/lib/aspose-email-cloud/models/{requests/get_email_model_request_data.rb → email_get_request.rb} +24 -29
- data/lib/aspose-email-cloud/models/email_list.rb +199 -0
- data/lib/aspose-email-cloud/models/{requests/email_request.rb → email_request.rb} +6 -11
- data/lib/aspose-email-cloud/models/{storage_model_rq_of_email_dto.rb → email_save_request.rb} +39 -32
- data/lib/aspose-email-cloud/models/{email_dto_list.rb → email_storage_list.rb} +5 -21
- data/lib/aspose-email-cloud/models/email_thread.rb +5 -33
- data/lib/aspose-email-cloud/models/email_thread_list.rb +3 -19
- data/lib/aspose-email-cloud/models/enum_with_custom_of_associated_person_category.rb +22 -21
- data/lib/aspose-email-cloud/models/enum_with_custom_of_email_address_category.rb +22 -21
- data/lib/aspose-email-cloud/models/enum_with_custom_of_event_category.rb +22 -21
- data/lib/aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category.rb +22 -21
- data/lib/aspose-email-cloud/models/enum_with_custom_of_phone_number_category.rb +22 -21
- data/lib/aspose-email-cloud/models/enum_with_custom_of_postal_address_category.rb +22 -21
- data/lib/aspose-email-cloud/models/enum_with_custom_of_url_category.rb +22 -21
- data/lib/aspose-email-cloud/models/error.rb +14 -39
- data/lib/aspose-email-cloud/models/error_details.rb +8 -25
- data/lib/aspose-email-cloud/models/file_version.rb +24 -61
- data/lib/aspose-email-cloud/models/file_versions.rb +5 -20
- data/lib/aspose-email-cloud/models/files_list.rb +5 -20
- data/lib/aspose-email-cloud/models/files_upload_result.rb +8 -29
- data/lib/aspose-email-cloud/models/{requests/get_disc_usage_request_data.rb → get_disc_usage_request.rb} +13 -17
- data/lib/aspose-email-cloud/models/{requests/get_file_versions_request_data.rb → get_file_versions_request.rb} +16 -21
- data/lib/aspose-email-cloud/models/{requests/get_files_list_request_data.rb → get_files_list_request.rb} +16 -21
- data/lib/aspose-email-cloud/models/{requests/http_request.rb → http_request.rb} +1 -5
- data/lib/aspose-email-cloud/models/instant_messenger_address.rb +4 -26
- data/lib/aspose-email-cloud/models/linked_resource.rb +7 -39
- data/lib/aspose-email-cloud/models/list_response_of_ai_name_component.rb +2 -18
- data/lib/aspose-email-cloud/models/list_response_of_ai_name_extracted.rb +2 -18
- data/lib/aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis.rb +2 -18
- data/lib/aspose-email-cloud/models/list_response_of_contact_dto.rb +2 -18
- data/lib/aspose-email-cloud/models/list_response_of_email_account_config.rb +2 -18
- data/lib/aspose-email-cloud/models/list_response_of_email_dto.rb +2 -18
- data/lib/aspose-email-cloud/models/list_response_of_email_thread.rb +2 -18
- data/lib/aspose-email-cloud/models/list_response_of_mail_message_base.rb +198 -0
- data/lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb +2 -18
- data/lib/aspose-email-cloud/models/list_response_of_storage_file_location.rb +2 -18
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto.rb +2 -18
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto.rb +2 -18
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_email_dto.rb +2 -18
- data/lib/aspose-email-cloud/models/mail_address.rb +5 -31
- data/lib/aspose-email-cloud/models/mail_message_base.rb +205 -0
- data/lib/aspose-email-cloud/models/mail_message_base64.rb +252 -0
- data/lib/aspose-email-cloud/models/mail_message_base_list.rb +199 -0
- data/lib/aspose-email-cloud/models/mail_message_dto.rb +219 -0
- data/lib/aspose-email-cloud/models/mail_message_mapi.rb +219 -0
- data/lib/aspose-email-cloud/models/mail_server_folder.rb +3 -21
- data/lib/aspose-email-cloud/models/mail_server_folder_list.rb +199 -0
- data/lib/aspose-email-cloud/models/{mime_response.rb → mapi_attachment_dto.rb} +22 -27
- data/lib/aspose-email-cloud/models/mapi_binary_property_dto.rb +223 -0
- data/lib/aspose-email-cloud/models/mapi_boolean_property_dto.rb +228 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_as_file_request.rb +218 -0
- data/lib/aspose-email-cloud/models/{add_attachment_request.rb → mapi_calendar_attendees_dto.rb} +51 -41
- data/lib/aspose-email-cloud/models/mapi_calendar_daily_recurrence_pattern_dto.rb +381 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_dto.rb +561 -0
- data/lib/aspose-email-cloud/models/{ai_bcr_ocr_data_part.rb → mapi_calendar_event_recurrence_dto.rb} +68 -109
- data/lib/aspose-email-cloud/models/mapi_calendar_exception_info_dto.rb +361 -0
- data/lib/aspose-email-cloud/models/{requests/get_calendar_file_as_model_request_data.rb → mapi_calendar_from_file_request.rb} +14 -20
- data/lib/aspose-email-cloud/models/{requests/get_calendar_request_data.rb → mapi_calendar_get_request.rb} +28 -30
- data/lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb +372 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_save_request.rb +232 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_time_zone_dto.rb +208 -0
- data/lib/aspose-email-cloud/models/{account_base_request.rb → mapi_calendar_time_zone_info_dto.rb} +84 -74
- data/lib/aspose-email-cloud/models/{set_message_read_flag_account_base_request.rb → mapi_calendar_time_zone_rule_dto.rb} +132 -106
- data/lib/aspose-email-cloud/models/mapi_calendar_weekly_recurrence_pattern_dto.rb +381 -0
- data/lib/aspose-email-cloud/models/mapi_calendar_yearly_and_monthly_recurrence_pattern_dto.rb +409 -0
- data/lib/aspose-email-cloud/models/mapi_contact_as_file_request.rb +218 -0
- data/lib/aspose-email-cloud/models/mapi_contact_dto.rb +440 -0
- data/lib/aspose-email-cloud/models/mapi_contact_electronic_address_dto.rb +249 -0
- data/lib/aspose-email-cloud/models/{append_email_base_request.rb → mapi_contact_electronic_address_property_set_dto.rb} +91 -146
- data/lib/aspose-email-cloud/models/mapi_contact_event_property_set_dto.rb +218 -0
- data/lib/aspose-email-cloud/models/mapi_contact_from_file_request.rb +84 -0
- data/lib/aspose-email-cloud/models/mapi_contact_get_request.rb +99 -0
- data/lib/aspose-email-cloud/models/{link.rb → mapi_contact_name_property_set_dto.rb} +96 -63
- data/lib/aspose-email-cloud/models/mapi_contact_other_property_set_dto.rb +277 -0
- data/lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb +366 -0
- data/lib/aspose-email-cloud/models/{indexed_primitive_object.rb → mapi_contact_photo_dto.rb} +252 -263
- data/lib/aspose-email-cloud/models/{email_thread_read_flag_rq.rb → mapi_contact_physical_address_dto.rb} +86 -104
- data/lib/aspose-email-cloud/models/{ai_bcr_parse_ocr_data_rq.rb → mapi_contact_physical_address_property_set_dto.rb} +32 -48
- data/lib/aspose-email-cloud/models/mapi_contact_professional_property_set_dto.rb +253 -0
- data/lib/aspose-email-cloud/models/mapi_contact_save_request.rb +232 -0
- data/lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb +371 -0
- data/lib/aspose-email-cloud/models/mapi_date_time_property_dto.rb +228 -0
- data/lib/aspose-email-cloud/models/{base_object.rb → mapi_electronic_address_dto.rb} +235 -232
- data/lib/aspose-email-cloud/models/{primitive_object.rb → mapi_file_as_property_dto.rb} +228 -245
- data/lib/aspose-email-cloud/models/mapi_importance_property_dto.rb +228 -0
- data/lib/aspose-email-cloud/models/mapi_int_property_dto.rb +228 -0
- data/lib/aspose-email-cloud/models/mapi_known_property_descriptor.rb +238 -0
- data/lib/aspose-email-cloud/models/mapi_legacy_free_busy_property_dto.rb +228 -0
- data/lib/aspose-email-cloud/models/mapi_message_as_file_request.rb +218 -0
- data/lib/aspose-email-cloud/models/mapi_message_dto.rb +604 -0
- data/lib/aspose-email-cloud/models/{requests/convert_email_request_data.rb → mapi_message_from_file_request.rb} +18 -24
- data/lib/aspose-email-cloud/models/mapi_message_get_request.rb +99 -0
- data/lib/aspose-email-cloud/models/mapi_message_item_base_dto.rb +359 -0
- data/lib/aspose-email-cloud/models/mapi_message_save_request.rb +232 -0
- data/lib/aspose-email-cloud/models/mapi_multi_int_property_dto.rb +223 -0
- data/lib/aspose-email-cloud/models/mapi_multi_string_property_dto.rb +223 -0
- data/lib/aspose-email-cloud/models/mapi_physical_address_index_property_dto.rb +228 -0
- data/lib/aspose-email-cloud/models/mapi_pid_lid_property_descriptor.rb +279 -0
- data/lib/aspose-email-cloud/models/mapi_pid_name_property_descriptor.rb +265 -0
- data/lib/aspose-email-cloud/models/mapi_pid_property_descriptor.rb +251 -0
- data/lib/aspose-email-cloud/models/mapi_pid_tag_property_descriptor.rb +279 -0
- data/lib/aspose-email-cloud/models/mapi_property_descriptor.rb +205 -0
- data/lib/aspose-email-cloud/models/{email_document_response.rb → mapi_property_dto.rb} +28 -27
- data/lib/aspose-email-cloud/models/{hierarchical_object.rb → mapi_recipient_dto.rb} +231 -247
- data/lib/aspose-email-cloud/models/mapi_response_type_property_dto.rb +228 -0
- data/lib/aspose-email-cloud/models/mapi_string_property_dto.rb +223 -0
- data/lib/aspose-email-cloud/models/monthly_recurrence_pattern_dto.rb +303 -0
- data/lib/aspose-email-cloud/models/{requests/move_file_request_data.rb → move_file_request.rb} +23 -29
- data/lib/aspose-email-cloud/models/{requests/move_folder_request_data.rb → move_folder_request.rb} +24 -27
- data/lib/aspose-email-cloud/models/name_value_pair.rb +3 -21
- data/lib/aspose-email-cloud/models/object_exist.rb +8 -25
- data/lib/aspose-email-cloud/models/{requests/object_exists_request_data.rb → object_exists_request.rb} +18 -23
- data/lib/aspose-email-cloud/models/phone_number.rb +4 -26
- data/lib/aspose-email-cloud/models/postal_address.rb +12 -66
- data/lib/aspose-email-cloud/models/recurrence_pattern_dto.rb +261 -0
- data/lib/aspose-email-cloud/models/reminder_attendee.rb +26 -16
- data/lib/aspose-email-cloud/models/reminder_trigger.rb +4 -26
- data/lib/aspose-email-cloud/models/storage_exist.rb +5 -18
- data/lib/aspose-email-cloud/models/{requests/storage_exists_request_data.rb → storage_exists_request.rb} +17 -19
- data/lib/aspose-email-cloud/models/storage_file.rb +17 -46
- data/lib/aspose-email-cloud/models/storage_file_location.rb +5 -27
- data/lib/aspose-email-cloud/models/storage_file_location_list.rb +199 -0
- data/lib/aspose-email-cloud/models/storage_folder_location.rb +3 -21
- data/lib/aspose-email-cloud/models/storage_model_of_calendar_dto.rb +13 -21
- data/lib/aspose-email-cloud/models/storage_model_of_contact_dto.rb +13 -21
- data/lib/aspose-email-cloud/models/storage_model_of_email_client_account.rb +217 -0
- data/lib/aspose-email-cloud/models/storage_model_of_email_client_multi_account.rb +217 -0
- data/lib/aspose-email-cloud/models/storage_model_of_email_dto.rb +13 -21
- data/lib/aspose-email-cloud/models/storage_model_of_mapi_calendar_dto.rb +217 -0
- data/lib/aspose-email-cloud/models/storage_model_of_mapi_contact_dto.rb +217 -0
- data/lib/aspose-email-cloud/models/storage_model_of_mapi_message_dto.rb +217 -0
- data/lib/aspose-email-cloud/models/task_regenerating_pattern_dto.rb +275 -0
- data/lib/aspose-email-cloud/models/{requests/upload_file_request_data.rb → upload_file_request.rb} +19 -23
- data/lib/aspose-email-cloud/models/url.rb +4 -26
- data/lib/aspose-email-cloud/models/value_t_of_boolean.rb +2 -16
- data/lib/aspose-email-cloud/models/value_t_of_string.rb +222 -0
- data/lib/aspose-email-cloud/models/weekly_recurrence_pattern_dto.rb +270 -0
- data/lib/aspose-email-cloud/models/{move_email_message_rq.rb → yearly_recurrence_pattern_dto.rb} +115 -100
- data/lib/aspose-email-cloud/version.rb +2 -2
- metadata +191 -181
- data/lib/aspose-email-cloud/models/ai_bcr_parse_storage_rq.rb +0 -251
- data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +0 -318
- data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +0 -355
- data/lib/aspose-email-cloud/models/append_email_model_rq.rb +0 -336
- data/lib/aspose-email-cloud/models/create_email_request.rb +0 -231
- data/lib/aspose-email-cloud/models/create_folder_base_request.rb +0 -313
- data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +0 -318
- data/lib/aspose-email-cloud/models/delete_message_base_request.rb +0 -331
- data/lib/aspose-email-cloud/models/email_account_request.rb +0 -397
- data/lib/aspose-email-cloud/models/email_document.rb +0 -233
- data/lib/aspose-email-cloud/models/email_properties.rb +0 -233
- data/lib/aspose-email-cloud/models/email_property_response.rb +0 -213
- data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +0 -231
- data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +0 -214
- data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +0 -99
- data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +0 -109
- data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +0 -99
- data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +0 -99
- data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_file_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/convert_contact_model_to_file_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/convert_email_model_to_file_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +0 -99
- data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +0 -109
- data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +0 -119
- data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/delete_email_thread_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +0 -99
- data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/discover_email_config_oauth_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/discover_email_config_password_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +0 -101
- data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +0 -108
- data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +0 -111
- data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +0 -103
- data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +0 -101
- data/lib/aspose-email-cloud/models/requests/get_email_client_account_request_data.rb +0 -102
- data/lib/aspose-email-cloud/models/requests/get_email_client_multi_account_request_data.rb +0 -102
- data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +0 -101
- data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +0 -101
- data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +0 -91
- data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +0 -93
- data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +0 -91
- data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +0 -127
- data/lib/aspose-email-cloud/models/requests/move_email_message_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/move_email_thread_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +0 -99
- data/lib/aspose-email-cloud/models/requests/save_email_client_account_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/save_email_client_multi_account_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +0 -99
- data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +0 -99
- data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +0 -79
- data/lib/aspose-email-cloud/models/requests/set_email_thread_read_flag_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +0 -99
- data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +0 -89
- data/lib/aspose-email-cloud/models/save_email_account_request.rb +0 -434
- data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +0 -521
- data/lib/aspose-email-cloud/models/send_email_base_request.rb +0 -281
- data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +0 -300
- data/lib/aspose-email-cloud/models/send_email_model_rq.rb +0 -276
- data/lib/aspose-email-cloud/models/set_email_property_request.rb +0 -231
@@ -0,0 +1,92 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# ----------------------------------------------------------------------------
|
4
|
+
# <copyright company="Aspose" file="api_invoker.rb">
|
5
|
+
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
|
6
|
+
# </copyright>
|
7
|
+
# <summary>
|
8
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
9
|
+
# copy of this software and associated documentation files (the "Software"),
|
10
|
+
# to deal in the Software without restriction, including without limitation
|
11
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
12
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
13
|
+
# Software is furnished to do so, subject to the following conditions:
|
14
|
+
#
|
15
|
+
# The above copyright notice and this permission notice shall be included in
|
16
|
+
# all copies or substantial portions of the Software.
|
17
|
+
#
|
18
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
23
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
24
|
+
# DEALINGS IN THE SOFTWARE.
|
25
|
+
# </summary>
|
26
|
+
# ----------------------------------------------------------------------------
|
27
|
+
|
28
|
+
module AsposeEmailCloud
|
29
|
+
# API client invoker. Processes all requests and obtains actual token if necessary.
|
30
|
+
class ApiInvoker
|
31
|
+
attr_reader :api_client
|
32
|
+
|
33
|
+
def initialize(api_client)
|
34
|
+
@api_client = api_client
|
35
|
+
end
|
36
|
+
|
37
|
+
def make_request(http_request, method, return_type)
|
38
|
+
call_api(http_request, method, return_type)
|
39
|
+
rescue ApiError => e
|
40
|
+
if e.code.equal? 401
|
41
|
+
request_token
|
42
|
+
return call_api(http_request, method, return_type)
|
43
|
+
end
|
44
|
+
raise
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def call_api(http_request, method, return_type)
|
50
|
+
response = @api_client.call_api(method,
|
51
|
+
http_request.resource_path,
|
52
|
+
header_params: http_request.header_params,
|
53
|
+
query_params: http_request.query_params,
|
54
|
+
form_params: http_request.form_params,
|
55
|
+
body: http_request.body,
|
56
|
+
auth_names: http_request.auth_names,
|
57
|
+
return_type: return_type)
|
58
|
+
response[0]
|
59
|
+
end
|
60
|
+
|
61
|
+
def request_token
|
62
|
+
config = @api_client.config
|
63
|
+
|
64
|
+
header_params =
|
65
|
+
{
|
66
|
+
'Accept' => 'application/json',
|
67
|
+
'Content-Type' => 'application/x-www-form-urlencoded'
|
68
|
+
}
|
69
|
+
|
70
|
+
base_path = @api_client.config.base_path
|
71
|
+
@api_client.config.base_path = ''
|
72
|
+
|
73
|
+
data = @api_client.call_api(:POST, '/connect/token',
|
74
|
+
header_params: header_params,
|
75
|
+
form_params: request_token_form_params(config),
|
76
|
+
return_type: 'Object',
|
77
|
+
host: @api_client.config.auth_url)
|
78
|
+
|
79
|
+
@api_client.config.base_path = base_path
|
80
|
+
@api_client.config.access_token = data[0]['access_token'.to_sym]
|
81
|
+
end
|
82
|
+
|
83
|
+
def request_token_form_params(config)
|
84
|
+
{
|
85
|
+
'grant_type': 'client_credentials',
|
86
|
+
'client_id': config.client_credentials[:client_id],
|
87
|
+
'client_secret': config.client_credentials[:client_secret]
|
88
|
+
}
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
@@ -51,9 +51,9 @@ module AsposeEmailCloud
|
|
51
51
|
#
|
52
52
|
# @return [Hash] key: parameter name, value: parameter value (API key)
|
53
53
|
#
|
54
|
-
# @example parameter name is "
|
55
|
-
# config.
|
56
|
-
attr_accessor :
|
54
|
+
# @example parameter name is "client_secret", API key is "xxx" (e.g. "client_secret=xxx" in query string)
|
55
|
+
# config.client_secret['client_secret'] = 'xxx'
|
56
|
+
attr_accessor :client_credentials
|
57
57
|
|
58
58
|
# Defines API key prefixes used with API Key authentications.
|
59
59
|
#
|
@@ -152,19 +152,19 @@ module AsposeEmailCloud
|
|
152
152
|
attr_accessor :force_ending_format
|
153
153
|
|
154
154
|
# Initializes a new instance.
|
155
|
-
# @param [String]
|
156
|
-
# @param [String]
|
155
|
+
# @param [String] client_secret Key to access the server.
|
156
|
+
# @param [String] client_id ID to access the server.
|
157
157
|
# @param [String] base_url Server URL.
|
158
158
|
# @param [String] api_version Api version.
|
159
159
|
# @param [Object] debug Debug switch [true, false].
|
160
|
-
def initialize(
|
160
|
+
def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
161
161
|
@scheme = 'https'
|
162
162
|
self.host = base_url
|
163
163
|
self.auth_url = base_url
|
164
164
|
@api_version = api_version
|
165
165
|
self.base_path = @api_version
|
166
|
-
@
|
167
|
-
|
166
|
+
@client_credentials = { 'client_secret': client_secret || '',
|
167
|
+
'client_id': client_id || '' }
|
168
168
|
@api_key_prefix = {}
|
169
169
|
@timeout = 0
|
170
170
|
@client_side_validation = true
|
@@ -177,7 +177,7 @@ module AsposeEmailCloud
|
|
177
177
|
@inject_format = false
|
178
178
|
@force_ending_format = false
|
179
179
|
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
180
|
-
@on_premise = (!(
|
180
|
+
@on_premise = (!(client_secret || client_id) && base_url)
|
181
181
|
|
182
182
|
yield(self) if block_given?
|
183
183
|
end
|
@@ -213,9 +213,9 @@ module AsposeEmailCloud
|
|
213
213
|
# @param [String] param_name the parameter name of API key auth
|
214
214
|
def api_key_with_prefix(param_name)
|
215
215
|
if @api_key_prefix[param_name]
|
216
|
-
"#{@api_key_prefix[param_name]} #{@
|
216
|
+
"#{@api_key_prefix[param_name]} #{@client_credentials[param_name]}"
|
217
217
|
else
|
218
|
-
@
|
218
|
+
@client_credentials[param_name]
|
219
219
|
end
|
220
220
|
end
|
221
221
|
|
@@ -23,16 +23,14 @@
|
|
23
23
|
# </summary>
|
24
24
|
# ----------------------------------------------------------------------------
|
25
25
|
|
26
|
-
|
27
26
|
require 'date'
|
28
27
|
|
29
28
|
module AsposeEmailCloud
|
30
29
|
# Image for recognition
|
31
30
|
class AiBcrImage
|
32
|
-
# Determines that image contains single VCard or more.
|
31
|
+
# Determines that image contains single VCard or more.
|
33
32
|
# @return [BOOLEAN]
|
34
33
|
attr_accessor :is_single
|
35
|
-
|
36
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
35
|
def self.attribute_map
|
38
36
|
{
|
@@ -48,21 +46,9 @@ module AsposeEmailCloud
|
|
48
46
|
end
|
49
47
|
|
50
48
|
# Initializes the object
|
51
|
-
# @param [
|
52
|
-
def initialize(
|
53
|
-
|
54
|
-
|
55
|
-
# convert string to symbol for hash key
|
56
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
57
|
-
|
58
|
-
if attributes.has_key?(:'isSingle')
|
59
|
-
self.is_single = attributes[:'isSingle']
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
# Initializes the object
|
64
|
-
# @param [BOOLEAN] is_single Determines that image contains single VCard or more. Ignored in current version. Multiple cards on image support will be added soon
|
65
|
-
def initialize(is_single=nil)
|
49
|
+
# @param [BOOLEAN] is_single Determines that image contains single VCard or more.
|
50
|
+
def initialize(
|
51
|
+
is_single: nil)
|
66
52
|
self.is_single = is_single if is_single
|
67
53
|
end
|
68
54
|
|
@@ -23,20 +23,17 @@
|
|
23
23
|
# </summary>
|
24
24
|
# ----------------------------------------------------------------------------
|
25
25
|
|
26
|
-
|
27
26
|
require 'date'
|
28
27
|
|
29
28
|
module AsposeEmailCloud
|
30
29
|
# Image from storage for recognition
|
31
|
-
class AiBcrImageStorageFile
|
32
|
-
# Determines that image contains single VCard or more.
|
30
|
+
class AiBcrImageStorageFile < AiBcrImage
|
31
|
+
# Determines that image contains single VCard or more.
|
33
32
|
# @return [BOOLEAN]
|
34
33
|
attr_accessor :is_single
|
35
|
-
|
36
34
|
# Image location
|
37
|
-
# @return [
|
35
|
+
# @return [StorageFileLocation]
|
38
36
|
attr_accessor :file
|
39
|
-
|
40
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
38
|
def self.attribute_map
|
42
39
|
{
|
@@ -49,31 +46,16 @@ module AsposeEmailCloud
|
|
49
46
|
def self.swagger_types
|
50
47
|
{
|
51
48
|
:'is_single' => :'BOOLEAN',
|
52
|
-
:'file' => :'
|
49
|
+
:'file' => :'StorageFileLocation'
|
53
50
|
}
|
54
51
|
end
|
55
52
|
|
56
53
|
# Initializes the object
|
57
|
-
# @param [
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
63
|
-
|
64
|
-
if attributes.has_key?(:'isSingle')
|
65
|
-
self.is_single = attributes[:'isSingle']
|
66
|
-
end
|
67
|
-
|
68
|
-
if attributes.has_key?(:'file')
|
69
|
-
self.file = attributes[:'file']
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
# Initializes the object
|
74
|
-
# @param [BOOLEAN] is_single Determines that image contains single VCard or more. Ignored in current version. Multiple cards on image support will be added soon
|
75
|
-
# @param [Object] file Image location
|
76
|
-
def initialize(is_single=nil, file=nil)
|
54
|
+
# @param [BOOLEAN] is_single Determines that image contains single VCard or more.
|
55
|
+
# @param [StorageFileLocation] file Image location
|
56
|
+
def initialize(
|
57
|
+
is_single: nil,
|
58
|
+
file: nil)
|
77
59
|
self.is_single = is_single if is_single
|
78
60
|
self.file = file if file
|
79
61
|
end
|
@@ -86,6 +68,10 @@ module AsposeEmailCloud
|
|
86
68
|
invalid_properties.push('invalid value for "is_single", is_single cannot be nil.')
|
87
69
|
end
|
88
70
|
|
71
|
+
if @file.nil?
|
72
|
+
invalid_properties.push('invalid value for "file", file cannot be nil.')
|
73
|
+
end
|
74
|
+
|
89
75
|
invalid_properties
|
90
76
|
end
|
91
77
|
|
@@ -93,6 +79,7 @@ module AsposeEmailCloud
|
|
93
79
|
# @return true if the model is valid
|
94
80
|
def valid?
|
95
81
|
return false if @is_single.nil?
|
82
|
+
return false if @file.nil?
|
96
83
|
true
|
97
84
|
end
|
98
85
|
|
@@ -23,20 +23,17 @@
|
|
23
23
|
# </summary>
|
24
24
|
# ----------------------------------------------------------------------------
|
25
25
|
|
26
|
-
|
27
26
|
require 'date'
|
28
27
|
|
29
28
|
module AsposeEmailCloud
|
30
|
-
# Recognition options
|
29
|
+
# Recognition options.
|
31
30
|
class AiBcrOptions
|
32
|
-
# Comma-separated ISO-639 codes of languages (either 639-1 or 639-3; i.e. \"it\" or \"ita\" for Italian); it's \"\" by default
|
31
|
+
# Comma-separated ISO-639 codes of languages (either 639-1 or 639-3; i.e. \"it\" or \"ita\" for Italian); it's \"\" by default.
|
33
32
|
# @return [String]
|
34
33
|
attr_accessor :languages
|
35
|
-
|
36
|
-
# Comma-separated codes of countries
|
34
|
+
# Comma-separated codes of countries.
|
37
35
|
# @return [String]
|
38
36
|
attr_accessor :countries
|
39
|
-
|
40
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
38
|
def self.attribute_map
|
42
39
|
{
|
@@ -54,26 +51,11 @@ module AsposeEmailCloud
|
|
54
51
|
end
|
55
52
|
|
56
53
|
# Initializes the object
|
57
|
-
# @param [
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
63
|
-
|
64
|
-
if attributes.has_key?(:'languages')
|
65
|
-
self.languages = attributes[:'languages']
|
66
|
-
end
|
67
|
-
|
68
|
-
if attributes.has_key?(:'countries')
|
69
|
-
self.countries = attributes[:'countries']
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
# Initializes the object
|
74
|
-
# @param [String] languages Comma-separated ISO-639 codes of languages (either 639-1 or 639-3; i.e. \"it\" or \"ita\" for Italian); it's \"\" by default
|
75
|
-
# @param [String] countries Comma-separated codes of countries
|
76
|
-
def initialize(languages=nil, countries=nil)
|
54
|
+
# @param [String] languages Comma-separated ISO-639 codes of languages (either 639-1 or 639-3; i.e. \"it\" or \"ita\" for Italian); it's \"\" by default.
|
55
|
+
# @param [String] countries Comma-separated codes of countries.
|
56
|
+
def initialize(
|
57
|
+
languages: nil,
|
58
|
+
countries: nil)
|
77
59
|
self.languages = languages if languages
|
78
60
|
self.countries = countries if countries
|
79
61
|
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="ai_bcr_parse_request.rb">
|
3
|
+
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ----------------------------------------------------------------------------
|
25
|
+
|
26
|
+
require_relative './email_request'
|
27
|
+
require_relative './http_request'
|
28
|
+
|
29
|
+
module AsposeEmailCloud
|
30
|
+
# Request model for ai_bcr_parse operation.
|
31
|
+
class AiBcrParseRequest < EmailRequest
|
32
|
+
# File to parse
|
33
|
+
# @return [File]
|
34
|
+
attr_accessor :file
|
35
|
+
# Comma-separated codes of countries.
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :countries
|
38
|
+
# Comma-separated ISO-639 codes of languages (either 639-1 or 639-3; i.e. \"it\" or \"ita\" for Italian); it's \"\" by default.
|
39
|
+
# @return [String]
|
40
|
+
attr_accessor :languages
|
41
|
+
# Determines that image contains single VCard or more.
|
42
|
+
# @return [BOOLEAN]
|
43
|
+
attr_accessor :is_single
|
44
|
+
|
45
|
+
# Parse images to vCard document models
|
46
|
+
# @param [File] file File to parse
|
47
|
+
# @param [String] countries Comma-separated codes of countries.
|
48
|
+
# @param [String] languages Comma-separated ISO-639 codes of languages (either 639-1 or 639-3; i.e. \"it\" or \"ita\" for Italian); it's \"\" by default.
|
49
|
+
# @param [BOOLEAN] is_single Determines that image contains single VCard or more.
|
50
|
+
def initialize(file:, countries: nil, languages: nil, is_single: nil)
|
51
|
+
self.file = file if file
|
52
|
+
self.countries = countries if countries
|
53
|
+
self.languages = languages if languages
|
54
|
+
self.is_single = is_single if is_single
|
55
|
+
end
|
56
|
+
|
57
|
+
def to_http_info(api_client)
|
58
|
+
# verify the required parameter 'file' is set
|
59
|
+
if api_client.config.client_side_validation && self.file.nil?
|
60
|
+
raise ArgumentError, "Missing the required parameter 'file' when calling AiBcrApi.parse"
|
61
|
+
end
|
62
|
+
# resource path
|
63
|
+
local_var_path = '/email/AiBcr/parse'
|
64
|
+
|
65
|
+
# query parameters
|
66
|
+
query_params = {}
|
67
|
+
query_params[:countries] = self.countries unless self.countries.nil?
|
68
|
+
query_params[:languages] = self.languages unless self.languages.nil?
|
69
|
+
query_params[:isSingle] = self.is_single unless self.is_single.nil?
|
70
|
+
|
71
|
+
# form parameters
|
72
|
+
form_params = {}
|
73
|
+
form_params['File'] = self.file
|
74
|
+
|
75
|
+
# http body (model)
|
76
|
+
auth_names = ['JWT']
|
77
|
+
|
78
|
+
# header parameters
|
79
|
+
header_params = {}
|
80
|
+
# HTTP header 'Accept' (if needed)
|
81
|
+
header_params['Accept'] = EmailRequest.select_header_accept(['application/json'])
|
82
|
+
# HTTP header 'Content-Type'
|
83
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : EmailRequest.select_header_content_type(['multipart/form-data'])
|
84
|
+
|
85
|
+
AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path,
|
86
|
+
header_params: header_params,
|
87
|
+
query_params: query_params,
|
88
|
+
form_params: form_params,
|
89
|
+
auth_names: auth_names)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
|
95
|
+
|
data/lib/aspose-email-cloud/models/{ai_bcr_storage_image_rq.rb → ai_bcr_parse_storage_request.rb}
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
# ----------------------------------------------------------------------------
|
2
|
-
# <copyright company="Aspose" file="
|
2
|
+
# <copyright company="Aspose" file="AiBcrParseStorageRequest.rb">
|
3
3
|
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
@@ -23,67 +23,59 @@
|
|
23
23
|
# </summary>
|
24
24
|
# ----------------------------------------------------------------------------
|
25
25
|
|
26
|
-
|
27
26
|
require 'date'
|
28
27
|
|
29
28
|
module AsposeEmailCloud
|
30
|
-
#
|
31
|
-
class
|
32
|
-
#
|
33
|
-
# @return [
|
34
|
-
attr_accessor :
|
35
|
-
|
36
|
-
# List of images with business cards
|
29
|
+
# Parse business card images from Storage request
|
30
|
+
class AiBcrParseStorageRequest
|
31
|
+
# Parse output folder location on storage
|
32
|
+
# @return [StorageFolderLocation]
|
33
|
+
attr_accessor :out_folder
|
34
|
+
# Images to parse.
|
37
35
|
# @return [Array<AiBcrImageStorageFile>]
|
38
36
|
attr_accessor :images
|
39
|
-
|
37
|
+
# Recognition options.
|
38
|
+
# @return [AiBcrOptions]
|
39
|
+
attr_accessor :options
|
40
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
41
|
def self.attribute_map
|
42
42
|
{
|
43
|
-
:'
|
44
|
-
:'images' => :'images'
|
43
|
+
:'out_folder' => :'outFolder',
|
44
|
+
:'images' => :'images',
|
45
|
+
:'options' => :'options'
|
45
46
|
}
|
46
47
|
end
|
47
48
|
|
48
49
|
# Attribute type mapping.
|
49
50
|
def self.swagger_types
|
50
51
|
{
|
51
|
-
:'
|
52
|
-
:'images' => :'Array<AiBcrImageStorageFile>'
|
52
|
+
:'out_folder' => :'StorageFolderLocation',
|
53
|
+
:'images' => :'Array<AiBcrImageStorageFile>',
|
54
|
+
:'options' => :'AiBcrOptions'
|
53
55
|
}
|
54
56
|
end
|
55
57
|
|
56
58
|
# Initializes the object
|
57
|
-
# @param [
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
if
|
65
|
-
self.options = attributes[:'options']
|
66
|
-
end
|
67
|
-
|
68
|
-
if attributes.has_key?(:'images')
|
69
|
-
if (value = attributes[:'images']).is_a?(Array)
|
70
|
-
self.images = value
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
# Initializes the object
|
76
|
-
# @param [AiBcrOptions] options Recognition options
|
77
|
-
# @param [Array<AiBcrImageStorageFile>] images List of images with business cards
|
78
|
-
def initialize(options=nil, images=nil)
|
79
|
-
self.options = options if options
|
59
|
+
# @param [StorageFolderLocation] out_folder Parse output folder location on storage
|
60
|
+
# @param [Array<AiBcrImageStorageFile>] images Images to parse.
|
61
|
+
# @param [AiBcrOptions] options Recognition options.
|
62
|
+
def initialize(
|
63
|
+
out_folder: nil,
|
64
|
+
images: nil,
|
65
|
+
options: nil)
|
66
|
+
self.out_folder = out_folder if out_folder
|
80
67
|
self.images = images if images
|
68
|
+
self.options = options if options
|
81
69
|
end
|
82
70
|
|
83
71
|
# Show invalid properties with the reasons. Usually used together with valid?
|
84
72
|
# @return Array for valid properties with the reasons
|
85
73
|
def list_invalid_properties
|
86
74
|
invalid_properties = Array.new
|
75
|
+
if @out_folder.nil?
|
76
|
+
invalid_properties.push('invalid value for "out_folder", out_folder cannot be nil.')
|
77
|
+
end
|
78
|
+
|
87
79
|
if @images.nil?
|
88
80
|
invalid_properties.push('invalid value for "images", images cannot be nil.')
|
89
81
|
end
|
@@ -94,6 +86,7 @@ module AsposeEmailCloud
|
|
94
86
|
# Check to see if the all the properties in the model are valid
|
95
87
|
# @return true if the model is valid
|
96
88
|
def valid?
|
89
|
+
return false if @out_folder.nil?
|
97
90
|
return false if @images.nil?
|
98
91
|
true
|
99
92
|
end
|
@@ -103,8 +96,9 @@ module AsposeEmailCloud
|
|
103
96
|
def ==(o)
|
104
97
|
return true if self.equal?(o)
|
105
98
|
self.class == o.class &&
|
106
|
-
|
107
|
-
images == o.images
|
99
|
+
out_folder == o.out_folder &&
|
100
|
+
images == o.images &&
|
101
|
+
options == o.options
|
108
102
|
end
|
109
103
|
|
110
104
|
# @see the `==` method
|
@@ -116,7 +110,7 @@ module AsposeEmailCloud
|
|
116
110
|
# Calculates hash code according to all attributes.
|
117
111
|
# @return [Fixnum] Hash code
|
118
112
|
def hash
|
119
|
-
[
|
113
|
+
[out_folder, images, options].hash
|
120
114
|
end
|
121
115
|
|
122
116
|
# Builds the object from hash
|